[DRE-commits] [SCM] ruby-moneta.git branch, master, updated. debian/0.6.0-4-16-g741fce5

Jérémy Bobbio lunar at debian.org
Wed Mar 27 15:23:40 UTC 2013


The following commit has been merged in the master branch:
commit d6cd0700cdef25fb92eb7452e82df7207983a6ac
Author: Jérémy Bobbio <lunar at debian.org>
Date:   Mon Mar 25 17:59:39 2013 +0000

    Add patch to be able to use our dedicated MySQL test instance

diff --git a/debian/patches/0001-Allow-to-specify-the-MySQL-socket-through-the-MYSQL_.patch b/debian/patches/0001-Allow-to-specify-the-MySQL-socket-through-the-MYSQL_.patch
new file mode 100644
index 0000000..a3e2418
--- /dev/null
+++ b/debian/patches/0001-Allow-to-specify-the-MySQL-socket-through-the-MYSQL_.patch
@@ -0,0 +1,151 @@
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
+Date: Mon, 25 Mar 2013 17:58:14 +0000
+Subject: Allow to specify the MySQL socket through the MYSQL_TEST_SOCKET
+ environment variable
+
+---
+ script/generate-specs |   38 +++++++++++++++++++-------------------
+ 1 file changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/script/generate-specs b/script/generate-specs
+index 6b02524..c892797 100755
+--- a/script/generate-specs
++++ b/script/generate-specs
+@@ -427,27 +427,27 @@ end
+   },
+   'simple_sequel' => {
+     :store => :Sequel,
+-    :options => ':db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel"',
++    :options => ':db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root#{ENV["MYSQL_TEST_SOCKET"] ? "&socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}" : "mysql2://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}"), :table => "simple_sequel"',
+     :load_value => '::Marshal.load(value.unpack(\'m\').first)',
+     :specs => STANDARD_SPECS
+   },
+   'simple_sequel_with_expires' => {
+     :store => :Sequel,
+-    :options => ':db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel_with_expires", :expires => true',
++    :options => ':db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root#{ENV["MYSQL_TEST_SOCKET"] ? "&socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}" : "mysql2://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}"), :table => "simple_sequel_with_expires", :expires => true',
+     :specs => STANDARD_SPECS.with_expires,
+     :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+   },
+   'simple_datamapper' => {
+     :store => :DataMapper,
+     :specs => STANDARD_SPECS.without_increment,
+-    :options => ':setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper"',
++    :options => ':setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "simple_datamapper"',
+     # DataMapper needs default repository to be setup
+     :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
+     :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+   },
+   'simple_datamapper_with_expires' => {
+     :store => :DataMapper,
+-    :options => ':setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_expires", :expires => true',
++    :options => ':setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "simple_datamapper_with_expires", :expires => true',
+     # DataMapper needs default repository to be setup
+     :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
+     :specs => STANDARD_SPECS.without_increment.with_expires,
+@@ -456,7 +456,7 @@ end
+   'simple_datamapper_with_repository' => {
+     :store => :DataMapper,
+     :specs => STANDARD_SPECS.without_increment,
+-    :options => ':repository => :repo, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_repository"',
++    :options => ':repository => :repo, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "simple_datamapper_with_repository"',
+     # DataMapper needs default repository to be setup
+     :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
+     :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+@@ -464,12 +464,12 @@ end
+   'simple_activerecord' => {
+     :store => :ActiveRecord,
+     :specs => STANDARD_SPECS,
+-    :options => ":table => 'simple_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }",
++    :options => ":table => 'simple_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] }",
+     :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+   },
+   'simple_activerecord_with_expires' => {
+     :store => :ActiveRecord,
+-    :options => ":table => 'simple_activerecord_with_expires', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }, :expires => true",
++    :options => ":table => 'simple_activerecord_with_expires', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] }, :expires => true",
+     :specs => STANDARD_SPECS.with_expires,
+     :load_value => '::Marshal.load(value.unpack(\'m\').first)'
+   },
+@@ -1105,7 +1105,7 @@ it 'compile transformer class' do
+ end}
+   },
+   'adapter_activerecord' => {
+-    :build => "Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })",
++    :build => "Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })",
+     :specs => ADAPTER_SPECS,
+     :tests => %{
+ it 'updates an existing key/value' do
+@@ -1116,8 +1116,8 @@ it 'updates an existing key/value' do
+ end
+ 
+ it 'supports different tables same database' do
+-  store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord1', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
+-  store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord2', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
++  store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord1', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
++  store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord2', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
+ 
+   store1['key'] = 'value1'
+   store2['key'] = 'value2'
+@@ -1129,8 +1129,8 @@ it 'supports different tables same database' do
+ end
+ 
+ it 'supports different databases same table' do
+-  store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord1', :username => 'root' })
+-  store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord2', :username => 'root' })
++  store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord1', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
++  store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord2', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
+ 
+   store1['key'] = 'value1'
+   store2['key'] = 'value2'
+@@ -1142,7 +1142,7 @@ it 'supports different databases same table' do
+ end}
+   },
+   'adapter_activerecord_exisiting_connection' => {
+-    :preamble => "require 'active_record'\nActiveRecord::Base.establish_connection :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root'\n",
++    :preamble => "require 'active_record'\nActiveRecord::Base.establish_connection :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET']\n",
+     :build => "Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord_existing_connection')",
+     :specs => ADAPTER_SPECS
+   },
+@@ -1177,16 +1177,16 @@ end}
+     :specs => ADAPTER_SPECS.without_increment.without_create
+   },
+   'adapter_datamapper' => {
+-    :build => 'Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "adapter_datamapper")',
++    :build => 'Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "adapter_datamapper")',
+     # DataMapper needs default repository to be setup
+     :preamble => "require 'dm-core'\nDataMapper.setup(:default, :adapter => :in_memory)\n",
+     :specs => ADAPTER_SPECS.without_increment,
+     :tests => %q{
+ it 'does not cross contaminate when storing' do
+-  first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
++  first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_first")
+   first.clear
+ 
+-  second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
++  second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_second")
+   second.clear
+ 
+   first['key'] = 'value'
+@@ -1197,10 +1197,10 @@ it 'does not cross contaminate when storing' do
+ end
+ 
+ it 'does not cross contaminate when deleting' do
+-  first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
++  first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_first")
+   first.clear
+ 
+-  second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
++  second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_second")
+   second.clear
+ 
+   first['key'] = 'value'
+@@ -1335,7 +1335,7 @@ end}
+     :specs => ADAPTER_SPECS.without_multiprocess
+   },
+   'adapter_sequel' => {
+-    :build => 'Moneta::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "adapter_sequel")',
++    :build => 'Moneta::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root#{ENV["MYSQL_TEST_SOCKET"] ? "&socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}" : "mysql2://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}"), :table => "adapter_sequel")',
+     :specs => ADAPTER_SPECS
+   },
+   'adapter_sqlite' => {
diff --git a/debian/patches/0099-Re-generate-specs-using-script-generate-specs.patch b/debian/patches/0099-Re-generate-specs-using-script-generate-specs.patch
new file mode 100644
index 0000000..f1908e5
--- /dev/null
+++ b/debian/patches/0099-Re-generate-specs-using-script-generate-specs.patch
@@ -0,0 +1,209 @@
+From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Bobbio?= <lunar at debian.org>
+Date: Mon, 25 Mar 2013 17:59:16 +0000
+Subject: Re-generate specs using script/generate-specs
+
+---
+ .../moneta/adapter_activerecord_exisiting_connection_spec.rb |    2 +-
+ spec/moneta/adapter_activerecord_spec.rb                     |   10 +++++-----
+ spec/moneta/adapter_datamapper_spec.rb                       |   10 +++++-----
+ spec/moneta/adapter_sequel_spec.rb                           |    2 +-
+ spec/moneta/simple_activerecord_spec.rb                      |    2 +-
+ spec/moneta/simple_activerecord_with_expires_spec.rb         |    2 +-
+ spec/moneta/simple_datamapper_spec.rb                        |    2 +-
+ spec/moneta/simple_datamapper_with_expires_spec.rb           |    2 +-
+ spec/moneta/simple_datamapper_with_repository_spec.rb        |    2 +-
+ spec/moneta/simple_sequel_spec.rb                            |    2 +-
+ spec/moneta/simple_sequel_with_expires_spec.rb               |    2 +-
+ 11 files changed, 19 insertions(+), 19 deletions(-)
+
+diff --git a/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb b/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
+index c3b3ddf..4f60067 100644
+--- a/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
++++ b/spec/moneta/adapter_activerecord_exisiting_connection_spec.rb
+@@ -3,7 +3,7 @@ require 'helper'
+ 
+ describe_moneta "adapter_activerecord_exisiting_connection" do
+   require 'active_record'
+-  ActiveRecord::Base.establish_connection :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root'
++  ActiveRecord::Base.establish_connection :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET']
+   def features
+     [:create, :increment]
+   end
+diff --git a/spec/moneta/adapter_activerecord_spec.rb b/spec/moneta/adapter_activerecord_spec.rb
+index e105094..a92f8aa 100644
+--- a/spec/moneta/adapter_activerecord_spec.rb
++++ b/spec/moneta/adapter_activerecord_spec.rb
+@@ -7,7 +7,7 @@ describe_moneta "adapter_activerecord" do
+   end
+ 
+   def new_store
+-    Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
++    Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
+   end
+ 
+   def load_value(value)
+@@ -34,8 +34,8 @@ describe_moneta "adapter_activerecord" do
+   end
+ 
+   it 'supports different tables same database' do
+-    store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord1', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
+-    store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord2', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' })
++    store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord1', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
++    store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord2', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
+ 
+     store1['key'] = 'value1'
+     store2['key'] = 'value2'
+@@ -47,8 +47,8 @@ describe_moneta "adapter_activerecord" do
+   end
+ 
+   it 'supports different databases same table' do
+-    store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord1', :username => 'root' })
+-    store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord2', :username => 'root' })
++    store1 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord1', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
++    store2 = Moneta::Adapters::ActiveRecord.new(:table => 'adapter_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta_activerecord2', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] })
+ 
+     store1['key'] = 'value1'
+     store2['key'] = 'value2'
+diff --git a/spec/moneta/adapter_datamapper_spec.rb b/spec/moneta/adapter_datamapper_spec.rb
+index afb6e2e..38a1a0d 100644
+--- a/spec/moneta/adapter_datamapper_spec.rb
++++ b/spec/moneta/adapter_datamapper_spec.rb
+@@ -9,7 +9,7 @@ describe_moneta "adapter_datamapper" do
+   end
+ 
+   def new_store
+-    Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "adapter_datamapper")
++    Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "adapter_datamapper")
+   end
+ 
+   def load_value(value)
+@@ -28,10 +28,10 @@ describe_moneta "adapter_datamapper" do
+   it_should_behave_like 'store_stringkey_stringvalue'
+   it_should_behave_like 'store_large'
+   it 'does not cross contaminate when storing' do
+-    first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
++    first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_first")
+     first.clear
+ 
+-    second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
++    second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_second")
+     second.clear
+ 
+     first['key'] = 'value'
+@@ -42,10 +42,10 @@ describe_moneta "adapter_datamapper" do
+   end
+ 
+   it 'does not cross contaminate when deleting' do
+-    first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta", :table => "datamapper_first")
++    first = Moneta::Adapters::DataMapper.new(:setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_first")
+     first.clear
+ 
+-    second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta", :table => "datamapper_second")
++    second = Moneta::Adapters::DataMapper.new(:repository => :sample, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "datamapper_second")
+     second.clear
+ 
+     first['key'] = 'value'
+diff --git a/spec/moneta/adapter_sequel_spec.rb b/spec/moneta/adapter_sequel_spec.rb
+index 7e367b9..e1e2767 100644
+--- a/spec/moneta/adapter_sequel_spec.rb
++++ b/spec/moneta/adapter_sequel_spec.rb
+@@ -7,7 +7,7 @@ describe_moneta "adapter_sequel" do
+   end
+ 
+   def new_store
+-    Moneta::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "adapter_sequel")
++    Moneta::Adapters::Sequel.new(:db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root#{ENV["MYSQL_TEST_SOCKET"] ? "&socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}" : "mysql2://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}"), :table => "adapter_sequel")
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_activerecord_spec.rb b/spec/moneta/simple_activerecord_spec.rb
+index cb19f70..1f758b8 100644
+--- a/spec/moneta/simple_activerecord_spec.rb
++++ b/spec/moneta/simple_activerecord_spec.rb
+@@ -7,7 +7,7 @@ describe_moneta "simple_activerecord" do
+   end
+ 
+   def new_store
+-    Moneta.new(:ActiveRecord, :table => 'simple_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }, :logger => {:file => File.join(make_tempdir, 'simple_activerecord.log')})
++    Moneta.new(:ActiveRecord, :table => 'simple_activerecord', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] }, :logger => {:file => File.join(make_tempdir, 'simple_activerecord.log')})
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_activerecord_with_expires_spec.rb b/spec/moneta/simple_activerecord_with_expires_spec.rb
+index c4e202c..ff0a014 100644
+--- a/spec/moneta/simple_activerecord_with_expires_spec.rb
++++ b/spec/moneta/simple_activerecord_with_expires_spec.rb
+@@ -7,7 +7,7 @@ describe_moneta "simple_activerecord_with_expires" do
+   end
+ 
+   def new_store
+-    Moneta.new(:ActiveRecord, :table => 'simple_activerecord_with_expires', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root' }, :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_activerecord_with_expires.log')})
++    Moneta.new(:ActiveRecord, :table => 'simple_activerecord_with_expires', :connection => { :adapter => (defined?(JRUBY_VERSION) ? 'jdbcmysql' : 'mysql2'), :database => 'moneta', :username => 'root', :socket => ENV['MYSQL_TEST_SOCKET'] }, :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_activerecord_with_expires.log')})
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_datamapper_spec.rb b/spec/moneta/simple_datamapper_spec.rb
+index da6014d..d95decd 100644
+--- a/spec/moneta/simple_datamapper_spec.rb
++++ b/spec/moneta/simple_datamapper_spec.rb
+@@ -9,7 +9,7 @@ describe_moneta "simple_datamapper" do
+   end
+ 
+   def new_store
+-    Moneta.new(:DataMapper, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper", :logger => {:file => File.join(make_tempdir, 'simple_datamapper.log')})
++    Moneta.new(:DataMapper, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "simple_datamapper", :logger => {:file => File.join(make_tempdir, 'simple_datamapper.log')})
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_datamapper_with_expires_spec.rb b/spec/moneta/simple_datamapper_with_expires_spec.rb
+index a50aa35..c031e0d 100644
+--- a/spec/moneta/simple_datamapper_with_expires_spec.rb
++++ b/spec/moneta/simple_datamapper_with_expires_spec.rb
+@@ -9,7 +9,7 @@ describe_moneta "simple_datamapper_with_expires" do
+   end
+ 
+   def new_store
+-    Moneta.new(:DataMapper, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_datamapper_with_expires.log')})
++    Moneta.new(:DataMapper, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "simple_datamapper_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_datamapper_with_expires.log')})
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_datamapper_with_repository_spec.rb b/spec/moneta/simple_datamapper_with_repository_spec.rb
+index 8748503..c7e59ee 100644
+--- a/spec/moneta/simple_datamapper_with_repository_spec.rb
++++ b/spec/moneta/simple_datamapper_with_repository_spec.rb
+@@ -9,7 +9,7 @@ describe_moneta "simple_datamapper_with_repository" do
+   end
+ 
+   def new_store
+-    Moneta.new(:DataMapper, :repository => :repo, :setup => "mysql://root:@localhost/moneta", :table => "simple_datamapper_with_repository", :logger => {:file => File.join(make_tempdir, 'simple_datamapper_with_repository.log')})
++    Moneta.new(:DataMapper, :repository => :repo, :setup => "mysql://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}", :table => "simple_datamapper_with_repository", :logger => {:file => File.join(make_tempdir, 'simple_datamapper_with_repository.log')})
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_sequel_spec.rb b/spec/moneta/simple_sequel_spec.rb
+index a1f91ae..6ae3725 100644
+--- a/spec/moneta/simple_sequel_spec.rb
++++ b/spec/moneta/simple_sequel_spec.rb
+@@ -7,7 +7,7 @@ describe_moneta "simple_sequel" do
+   end
+ 
+   def new_store
+-    Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel", :logger => {:file => File.join(make_tempdir, 'simple_sequel.log')})
++    Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root#{ENV["MYSQL_TEST_SOCKET"] ? "&socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}" : "mysql2://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}"), :table => "simple_sequel", :logger => {:file => File.join(make_tempdir, 'simple_sequel.log')})
+   end
+ 
+   def load_value(value)
+diff --git a/spec/moneta/simple_sequel_with_expires_spec.rb b/spec/moneta/simple_sequel_with_expires_spec.rb
+index 9bd7130..8592955 100644
+--- a/spec/moneta/simple_sequel_with_expires_spec.rb
++++ b/spec/moneta/simple_sequel_with_expires_spec.rb
+@@ -7,7 +7,7 @@ describe_moneta "simple_sequel_with_expires" do
+   end
+ 
+   def new_store
+-    Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root" : "mysql2://root:@localhost/moneta"), :table => "simple_sequel_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_sequel_with_expires.log')})
++    Moneta.new(:Sequel, :db => (defined?(JRUBY_VERSION) ? "jdbc:mysql://localhost/moneta?user=root#{ENV["MYSQL_TEST_SOCKET"] ? "&socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}" : "mysql2://root:@localhost/moneta#{ENV["MYSQL_TEST_SOCKET"] ? "?socket=#{ENV["MYSQL_TEST_SOCKET"]}" : ""}"), :table => "simple_sequel_with_expires", :expires => true, :logger => {:file => File.join(make_tempdir, 'simple_sequel_with_expires.log')})
+   end
+ 
+   def load_value(value)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..c3305af
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Allow-to-specify-the-MySQL-socket-through-the-MYSQL_.patch
+0099-Re-generate-specs-using-script-generate-specs.patch

-- 
ruby-moneta.git



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