Package: rails / 2.3.5-1.2+squeeze8

debian-changes-2.3.5-1 Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
Description: Upstream changes introduced in version 2.3.5-1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 rails (2.3.5-1) unstable; urgency=low
 .
   * New upstream release (closes: #547658)
   * Package is now split up and non-core rails components, like AR, are on
     the ruby load path. (closes: #469524, #517328)
   * debian/control
     + Depend on rubygems.
     + Suggest thin or thin1.8 as a possible server to run your production
       environment on. This is particularly useful if it is already being
       proxied.
     + xml-simple is no longer used by rails
     + Updated Standard to 3.8.4
 .
 The person named in the Author field signed this changelog entry.
Author: Adam Majer <adamm@zombino.com>
Bug-Debian: http://bugs.debian.org/469524
Bug-Debian: http://bugs.debian.org/517328
Bug-Debian: http://bugs.debian.org/547658

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- /dev/null
+++ rails-2.3.5/rails
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ruby /usr/share/rails-ruby1.8/railties/bin/rails "$@"
--- rails-2.3.5.orig/actionmailer/lib/action_mailer.rb
+++ rails-2.3.5/actionmailer/lib/action_mailer.rb
@@ -59,4 +59,4 @@ end
 
 autoload :MailHelper, 'action_mailer/mail_helper'
 
-require 'action_mailer/vendor/tmail'
+require 'tmail'
--- rails-2.3.5.orig/actionmailer/lib/action_mailer/vendor/text_format.rb
+++ rails-2.3.5/actionmailer/lib/action_mailer/vendor/text_format.rb
@@ -2,9 +2,9 @@
 require 'rubygems'
 
 begin
-  gem 'text-format', '>= 0.6.3'
+  gem 'text-format', '>= 0.6.3' # deb
 rescue Gem::LoadError
-  $:.unshift "#{File.dirname(__FILE__)}/text-format-0.6.3"
+  # Use debian's version
 end
 
 require 'text/format'
--- rails-2.3.5.orig/actionmailer/lib/action_mailer/vendor/tmail.rb
+++ rails-2.3.5/actionmailer/lib/action_mailer/vendor/tmail.rb
@@ -2,9 +2,9 @@
 require 'rubygems'
 
 begin
-  gem 'tmail', '~> 1.2.3'
+  gem 'tmail', '~> 1.2.3' # deb
 rescue Gem::LoadError
-  $:.unshift "#{File.dirname(__FILE__)}/tmail-1.2.3"
+  # Use debian version
 end
 
 module TMail
--- rails-2.3.5.orig/actionpack/lib/action_controller.rb
+++ rails-2.3.5/actionpack/lib/action_controller.rb
@@ -31,8 +31,12 @@ rescue LoadError
   end
 end
 
-gem 'rack', '~> 1.0.1'
-require 'rack'
+begin
+  require 'rack'
+rescue LoadError
+  gem 'rack', '~> 1.0.1'
+  require 'rack'
+end
 require 'action_controller/cgi_ext'
 
 module ActionController
--- rails-2.3.5.orig/actionpack/test/abstract_unit.rb
+++ rails-2.3.5/actionpack/test/abstract_unit.rb
@@ -8,7 +8,8 @@ require 'yaml'
 require 'stringio'
 require 'test/unit'
 
-gem 'mocha', '>= 0.9.7'
+# Just use Debian version for testing
+# gem 'mocha', '>= 0.9.7'
 require 'mocha'
 
 begin
--- rails-2.3.5.orig/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ rails-2.3.5/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -516,7 +516,7 @@ module ActiveRecord
         unescape_col = []
         for j in 0...res.nfields do
           # unescape string passed BYTEA field (OID == 17)
-          unescape_col << ( res.ftype(j)==17 )
+          unescape_col << ( res.fformat(j)==0 and res.ftype(j)==17 )
         end
 
         ary = []
--- rails-2.3.5.orig/activesupport/lib/active_support/vendor.rb
+++ rails-2.3.5/activesupport/lib/active_support/vendor.rb
@@ -1,10 +1,11 @@
 # Prefer gems to the bundled libs.
+begin
 require 'rubygems'
 
 begin
   gem 'builder', '~> 2.1.2'
 rescue Gem::LoadError
-  $:.unshift "#{File.dirname(__FILE__)}/vendor/builder-2.1.2"
+  # Use Debian version
 end
 require 'builder'
 
@@ -26,3 +27,11 @@ rescue Gem::LoadError
   $:.unshift "#{File.dirname(__FILE__)}/vendor/i18n-0.1.3/lib"
 end
 require 'i18n'
+
+rescue LoadError # No rubygems
+  require 'builder'
+  $:.unshift "#{File.dirname(__FILE__)}/vendor/memcache-client-1.7.4"
+  $:.unshift "#{File.dirname(__FILE__)}/vendor/tzinfo-0.3.12"
+  $:.unshift "#{File.dirname(__FILE__)}/vendor/i18n-0.1.3/lib"
+  require 'i18n'
+end
--- rails-2.3.5.orig/activemodel/test/test_helper.rb
+++ rails-2.3.5/activemodel/test/test_helper.rb
@@ -1,7 +1,8 @@
 require 'rubygems'
 require 'test/unit'
 
-gem 'mocha', '>= 0.9.3'
+# We just use the Debian version
+# gem 'mocha', '>= 0.9.3'
 require 'mocha'
 
 require 'active_model'
--- rails-2.3.5.orig/railties/Rakefile
+++ rails-2.3.5/railties/Rakefile
@@ -153,7 +153,7 @@ end
 desc "Link in all the Rails packages to vendor"
 task :link_vendor_libraries do
   mkdir File.join(PKG_DESTINATION, 'vendor', 'rails')
-  VENDOR_LIBS.each { |dir| ln_s File.join('..', '..', '..', dir), File.join(PKG_DESTINATION, 'vendor', 'rails', dir) }
+  VENDOR_LIBS.each { |dir| ln_s "/usr/share/rails/#{dir}", File.join(PKG_DESTINATION, 'vendor', 'rails', dir) }
 end
 
 
--- rails-2.3.5.orig/railties/lib/commands/server.rb
+++ rails-2.3.5/railties/lib/commands/server.rb
@@ -13,7 +13,7 @@ end
 
 options = {
   :Port        => 3000,
-  :Host        => "0.0.0.0",
+  :Host        => "127.0.0.1",
   :environment => (ENV['RAILS_ENV'] || "development").dup,
   :config      => RAILS_ROOT + "/config.ru",
   :detach      => false,
--- rails-2.3.5.orig/railties/lib/rails_generator/commands.rb
+++ rails-2.3.5/railties/lib/rails_generator/commands.rb
@@ -344,6 +344,17 @@ HELP
           end
         end
 
+        # Creates symlink
+        def symlink(relative_source, relative_destination)
+          path = destination_path(relative_destination)
+          if File.exist?(path)
+            logger.exists relative_destination
+          else
+            logger.create relative_destination
+            FileUtils.ln_s(relative_source, path)
+          end
+        end
+
         # Display a README.
         def readme(*relative_sources)
           relative_sources.flatten.each do |relative_source|
--- rails-2.3.5.orig/railties/lib/rails_generator/generators/applications/app/app_generator.rb
+++ rails-2.3.5/railties/lib/rails_generator/generators/applications/app/app_generator.rb
@@ -35,6 +35,8 @@ class AppGenerator < Rails::Generator::B
       create_public_files(m)
       create_documentation_file(m)
       create_log_files(m)
+
+      create_debian_railties_link(m)
     end
   end
 
@@ -246,6 +248,11 @@ class AppGenerator < Rails::Generator::B
       end
     end
 
+    def create_debian_railties_link(m)
+      m.symlink "/usr/share/rails-ruby1.8", "vendor/rails"
+      m.symlink "/usr/share/rails/railties-ruby1.8", "vendor/railties"
+    end
+
 
     def mysql_socket_location
       [
--- rails-2.3.5.orig/railties/guides/rails_guides.rb
+++ rails-2.3.5/railties/guides/rails_guides.rb
@@ -18,13 +18,13 @@ rescue LoadError
   require "action_view"
 end
 
-begin
-  require 'rubygems'
-  gem 'RedCloth', '>= 4.1.1'
-rescue Gem::LoadError
-  $stderr.puts %(Generating Guides requires RedCloth 4.1.1+)
-  exit 1
-end
+# begin
+#   require 'rubygems'
+#   gem 'RedCloth', '>= 4.1.1'
+# rescue Gem::LoadError
+#   $stderr.puts %(Generating Guides requires RedCloth 4.1.1+)
+#   exit 1
+# end
 
 require 'redcloth'