[DRE-commits] [SCM] rails-2.3.git branch, debian-sid, updated. debian/2.3.11-1-13-g64251bf

Ondřej Surý ondrej at sury.org
Mon Aug 29 08:23:09 UTC 2011


The following commit has been merged in the debian-sid branch:
commit 18cda7b1e2f93e196d4a1c893b2c3bd20b86675f
Author: Ondřej Surý <ondrej at sury.org>
Date:   Mon Aug 22 19:16:41 2011 +0200

    Add a patch to symlink rails to vendor/ directory in the app (Closes: #637496)

diff --git a/debian/patches/0006-add_debian_symlinks_to_vendor_app_dir.patch b/debian/patches/0006-add_debian_symlinks_to_vendor_app_dir.patch
new file mode 100644
index 0000000..8181e24
--- /dev/null
+++ b/debian/patches/0006-add_debian_symlinks_to_vendor_app_dir.patch
@@ -0,0 +1,40 @@
+--- a/lib/rails_generator/generators/applications/app/app_generator.rb
++++ b/lib/rails_generator/generators/applications/app/app_generator.rb
+@@ -35,6 +35,7 @@ class AppGenerator < Rails::Generator::B
+       create_public_files(m)
+       create_documentation_file(m)
+       create_log_files(m)
++      create_debian_railties_link(m)
+     end
+   end
+ 
+@@ -249,6 +250,9 @@ class AppGenerator < Rails::Generator::B
+       end
+     end
+ 
++    def create_debian_railties_link(m)
++      m.symlink "/usr/lib/ruby/vendor_ruby/rails", "vendor/rails"
++    end
+ 
+     def mysql_socket_location
+       [
+--- a/lib/rails_generator/commands.rb
++++ b/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|
diff --git a/debian/patches/series b/debian/patches/series
index 9538610..7579760 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 0003-change_default_listen_address.patch
 0004-dont_recommend_very_bad_things.patch
 0005-set_absolute_path_in_app_generator.patch
+0006-add_debian_symlinks_to_vendor_app_dir.patch

-- 
rails-2.3.git



More information about the Pkg-ruby-extras-commits mailing list