[DRE-commits] [ruby-state-machine] 05/08: a pair of patches to remove rubygems command and fix paths

Cédric Boutillier boutil at moszumanska.debian.org
Wed Mar 5 23:09:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

boutil pushed a commit to branch master
in repository ruby-state-machine.

commit 6c669094289aed1882746fc3bee30f95796a2580
Author: Cédric Boutillier <boutil at debian.org>
Date:   Wed Mar 5 23:49:12 2014 +0100

    a pair of patches to remove rubygems command and fix paths
---
 ...fix_path_default_locale_integration_tests.patch | 50 ++++++++++++++++++++++
 debian/patches/no-rubygems.patch                   | 19 ++++++++
 debian/patches/series                              |  2 +
 3 files changed, 71 insertions(+)

diff --git a/debian/patches/fix_path_default_locale_integration_tests.patch b/debian/patches/fix_path_default_locale_integration_tests.patch
new file mode 100644
index 0000000..6f7fc94
--- /dev/null
+++ b/debian/patches/fix_path_default_locale_integration_tests.patch
@@ -0,0 +1,50 @@
+Description: fix path for default locale in integration tests
+Origin: vendor
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: not-needed
+Last-Update: 2014-03-05
+
+--- a/test/unit/integrations/active_model_test.rb
++++ b/test/unit/integrations/active_model_test.rb
+@@ -1215,7 +1215,7 @@
+       I18n.backend = I18n::Backend::Simple.new
+       
+       app_locale = File.dirname(__FILE__) + '/../../files/en.yml'
+-      default_locale = File.dirname(__FILE__) + '/../../../lib/state_machine/integrations/active_model/locale.rb'
++      default_locale = File.dirname(__FILE__) + '/../../../debian/ruby-state-machine/usr/lib/ruby/vendor_ruby/state_machine/integrations/active_model/locale.rb'
+       I18n.load_path = [app_locale]
+       
+       StateMachine::Machine.new(@model)
+--- a/test/unit/integrations/mongo_mapper_test.rb
++++ b/test/unit/integrations/mongo_mapper_test.rb
+@@ -1993,7 +1993,7 @@
+         I18n.backend = I18n::Backend::Simple.new
+         
+         app_locale = File.dirname(__FILE__) + '/../../files/en.yml'
+-        default_locale = File.dirname(__FILE__) + '/../../../lib/state_machine/integrations/mongo_mapper/locale.rb'
++        default_locale = File.dirname(__FILE__) + '/../../debian/ruby-state-machine/usr/lib/ruby/vendor_ruby/state_machine/integrations/mongo_mapper/locale.rb'
+         I18n.load_path = [app_locale]
+         
+         StateMachine::Machine.new(@model)
+--- a/test/unit/integrations/mongoid_test.rb
++++ b/test/unit/integrations/mongoid_test.rb
+@@ -2279,7 +2279,7 @@
+       I18n.backend = I18n::Backend::Simple.new
+       
+       app_locale = File.dirname(__FILE__) + '/../../files/en.yml'
+-      default_locale = File.dirname(__FILE__) + '/../../../lib/state_machine/integrations/mongoid/locale.rb'
++      default_locale = File.dirname(__FILE__) + '/../../../debian/ruby-state-machine/usr/libruby/vendor_ruby/state_machine/integrations/mongoid/locale.rb'
+       I18n.load_path = [app_locale]
+       
+       StateMachine::Machine.new(@model)
+--- a/test/unit/integrations/active_record_test.rb
++++ b/test/unit/integrations/active_record_test.rb
+@@ -2513,7 +2513,7 @@
+         I18n.backend = I18n::Backend::Simple.new
+         
+         app_locale = File.dirname(__FILE__) + '/../../files/en.yml'
+-        default_locale = File.dirname(__FILE__) + '/../../../lib/state_machine/integrations/active_record/locale.rb'
++        default_locale = File.dirname(__FILE__) + '/../../../debian/ruby-state-machine/usr/lib/ruby/vendor_ruby/state_machine/integrations/active_record/locale.rb'
+         I18n.load_path = [app_locale]
+         
+         StateMachine::Machine.new(@model)
diff --git a/debian/patches/no-rubygems.patch b/debian/patches/no-rubygems.patch
new file mode 100644
index 0000000..0fc6633
--- /dev/null
+++ b/debian/patches/no-rubygems.patch
@@ -0,0 +1,19 @@
+Description: do not use rubygems to require ruby-graphviz
+Origin: vendor
+Bug: https://github.com/pluginaweek/state_machine/issues/304
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-03-05
+
+--- a/lib/state_machine/graph.rb
++++ b/lib/state_machine/graph.rb
+@@ -1,9 +1,7 @@
+ begin
+-  require 'rubygems'
+-  gem 'ruby-graphviz', '>=0.9.17'
+   require 'graphviz'
+ rescue LoadError => ex
+-  $stderr.puts "Cannot draw the machine (#{ex.message}). `gem install ruby-graphviz` >= v0.9.17 and try again."
++  $stderr.puts "Cannot draw the machine (#{ex.message}). `apt-get install ruby-graphviz` and try again."
+   raise
+ end
+ 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d39b54f
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+no-rubygems.patch
+fix_path_default_locale_integration_tests.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-state-machine.git



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