sequel-string_nilifier 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 883d1729a49b7f4770f650a7c96f4adabfb4db9b
4
- data.tar.gz: ce7b604cc2431bfee3f9870c187cbf3142409820
2
+ SHA256:
3
+ metadata.gz: 42c2a8bb6e90c20819a6b77adf74b1fe71984c3d98bbc2cbdc372b020c3d49db
4
+ data.tar.gz: 4fc861e35160ccef901b0a227a97659f8aa0925fca7eccf34507f4e5a0810659
5
5
  SHA512:
6
- metadata.gz: 8968af4028a5d4a4f5bc7b2da747cac1e5692afbf7fa3b1bc8d8c44ef6c2006bb08fc2a62aa0a4bc95f65b6ffc58c414bda90b21b6f9cd779179b11cb6efcd23
7
- data.tar.gz: 184b6ceab44de0fe82c5ee27e0433cbdd8a6f7361379f59d46d8e43e184a9eaa4f584707ca35e3f951ac80765c65b490653e71a9c5e3cdee989a6e7b8aa476f6
6
+ metadata.gz: ee4e141d11bf7006290a4c7c346c274e17f9788bc2273d67a6a9f7c006c3c7fdcf717cfe659a4676cb481a7de295f212ea2066a475294d09c7f382d6df0198e3
7
+ data.tar.gz: 4410c435bda5e34c936c5e2467b00814f0592f4543a485c8bd1f7520626af3c73bacd01a9c95322f9473664540e8e409f0a9bbbd46e4497403bcfa6cee9f8ae6
@@ -1,5 +1,13 @@
1
+ language: ruby
2
+ cache:
3
+ bundler: true
4
+ sudo: false
1
5
  rvm:
2
- - 1.9.3
3
- - 2.0.0
4
- - 2.1.0
5
- - jruby-19mode
6
+ - 2.3.8
7
+ - 2.4.5
8
+ - 2.5.3
9
+ env:
10
+ - SEQUEL='~> 4.0'
11
+ - SEQUEL='~> 5.0'
12
+ gemfile:
13
+ - ci/sequel.gemfile
@@ -0,0 +1,17 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec :path => '../'
4
+
5
+ gem 'sequel', "#{ENV['SEQUEL']}"
6
+
7
+ # MRI/Rubinius Adapter Dependencies
8
+ platforms :ruby do
9
+ gem "pg"
10
+ gem "sqlite3"
11
+ end
12
+
13
+ # JRuby Adapter Dependencies
14
+ platforms :jruby do
15
+ gem "jdbc-postgres"
16
+ gem "jdbc-sqlite3"
17
+ end
@@ -1,7 +1,7 @@
1
1
  module Sequel
2
2
  module Plugins
3
3
  module StringNilifier
4
- VERSION = "1.2.0"
4
+ VERSION = "1.3.0"
5
5
  end
6
6
  end
7
7
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["jonathan.tron@metrilio.com", "joseph.halter@metrilio.com"]
11
11
  spec.description = %q{Sequel plugin to store empty string as nil}
12
12
  spec.summary = spec.description
13
- spec.homepage = ""
13
+ spec.homepage = "https://github.com/TalentBox/sequel-string_nilifier"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_runtime_dependency "sequel", ">= 3.48.0", "< 5.0"
21
+ spec.add_runtime_dependency "sequel", ">= 4.0", "< 6.0"
22
22
 
23
23
  spec.add_development_dependency "rake"
24
24
  spec.add_development_dependency "rspec"
@@ -12,47 +12,47 @@ describe Sequel::Plugins::StringNilifier do
12
12
 
13
13
  it "should convert empty string to nil for all input strings" do
14
14
  @o.name = " \n"
15
- @o.name.should be_nil
15
+ expect( @o.name ).to be nil
16
16
  end
17
17
 
18
18
  it "should not convert non-empty string" do
19
19
  @o.name = "a \n"
20
- @o.name.should == "a \n"
20
+ expect( @o.name ).to eq "a \n"
21
21
  end
22
22
 
23
23
  it "should not affect other types" do
24
24
  @o.name = 1
25
- @o.name.should == 1
25
+ expect( @o.name ).to eq 1
26
26
  @o.name = Date.today
27
- @o.name.should == Date.today
27
+ expect( @o.name ).to eq Date.today
28
28
  end
29
29
 
30
30
  it "should not nilify strings for blob arguments" do
31
31
  v = Sequel.blob(" \n")
32
32
  @o.name = v
33
- @o.name.should equal(v)
33
+ expect( @o.name ).to eq v
34
34
  end
35
35
 
36
36
  it "should not nilify strings for blob columns" do
37
37
  @o.b = " \n"
38
- @o.b.should be_a_kind_of(Sequel::SQL::Blob)
39
- @o.b.should == Sequel.blob(" \n")
38
+ expect( @o.b ).to be_a_kind_of Sequel::SQL::Blob
39
+ expect( @o.b ).to eq Sequel.blob(" \n")
40
40
  end
41
41
 
42
42
  it "should allow skipping of columns using Model.skip_string_nilifying" do
43
43
  @c.skip_string_nilifying :name
44
44
  v = " \n"
45
45
  @o.name = v
46
- @o.name.should equal(v)
46
+ expect( @o.name ).to eq v
47
47
  end
48
48
 
49
49
  it "should work correctly in subclasses" do
50
50
  o = Class.new(@c).new
51
51
  o.name = " \n"
52
- o.name.should be_nil
52
+ expect( o.name ).to be nil
53
53
  o.b = " \n"
54
- o.b.should be_a_kind_of(Sequel::SQL::Blob)
55
- o.b.should == Sequel.blob(" \n")
54
+ expect( o.b ).to be_a_kind_of Sequel::SQL::Blob
55
+ expect( o.b ).to eq Sequel.blob(" \n")
56
56
  end
57
57
 
58
58
  it "should work correctly for dataset changes" do
@@ -63,9 +63,9 @@ describe Sequel::Plugins::StringNilifier do
63
63
  c.set_dataset(@db[:test2])
64
64
  o = c.new
65
65
  o.name = " \n"
66
- o.name.should be_nil
66
+ expect( o.name ).to be nil
67
67
  o.b = " \n"
68
- o.b.should be_a_kind_of(Sequel::SQL::Blob)
69
- o.b.should == Sequel.blob(" \n")
68
+ expect( o.b ).to be_a_kind_of Sequel::SQL::Blob
69
+ expect( o.b ).to eq Sequel.blob(" \n")
70
70
  end
71
71
  end
@@ -7,7 +7,7 @@ class << Sequel::Model
7
7
  def columns(*cols)
8
8
  return super if cols.empty?
9
9
  define_method(:columns){cols}
10
- @dataset.instance_variable_set(:@columns, cols) if @dataset
10
+ @dataset.send(:columns=, cols) if @dataset
11
11
  def_column_accessor(*cols)
12
12
  @columns = cols
13
13
  @db_schema = {}
@@ -16,7 +16,9 @@ class << Sequel::Model
16
16
  end
17
17
 
18
18
  Sequel::Model.use_transactions = false
19
- Sequel.cache_anonymous_models = false
19
+ if Sequel.respond_to? :cache_anonymous_models=
20
+ Sequel.cache_anonymous_models = false
21
+ end
20
22
 
21
23
  db = Sequel.mock(:fetch=>{:id => 1, :x => 1}, :numrows=>1, :autoid=>proc{|sql| 10})
22
24
  def db.schema(*) [[:id, {:primary_key=>true}]] end
metadata CHANGED
@@ -1,64 +1,64 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-string_nilifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Tron
8
8
  - Joseph Halter
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-30 00:00:00.000000000 Z
12
+ date: 2018-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: 3.48.0
21
- - - <
22
- - !ruby/object:Gem::Version
23
- version: '5.0'
24
16
  requirement: !ruby/object:Gem::Requirement
25
17
  requirements:
26
- - - '>='
18
+ - - ">="
27
19
  - !ruby/object:Gem::Version
28
- version: 3.48.0
29
- - - <
20
+ version: '4.0'
21
+ - - "<"
30
22
  - !ruby/object:Gem::Version
31
- version: '5.0'
32
- prerelease: false
23
+ version: '6.0'
33
24
  type: :runtime
34
- - !ruby/object:Gem::Dependency
35
- name: rake
25
+ prerelease: false
36
26
  version_requirements: !ruby/object:Gem::Requirement
37
27
  requirements:
38
- - - '>='
28
+ - - ">="
39
29
  - !ruby/object:Gem::Version
40
- version: '0'
30
+ version: '4.0'
31
+ - - "<"
32
+ - !ruby/object:Gem::Version
33
+ version: '6.0'
34
+ - !ruby/object:Gem::Dependency
35
+ name: rake
41
36
  requirement: !ruby/object:Gem::Requirement
42
37
  requirements:
43
- - - '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
- prerelease: false
47
41
  type: :development
48
- - !ruby/object:Gem::Dependency
49
- name: rspec
42
+ prerelease: false
50
43
  version_requirements: !ruby/object:Gem::Requirement
51
44
  requirements:
52
- - - '>='
45
+ - - ">="
53
46
  - !ruby/object:Gem::Version
54
47
  version: '0'
48
+ - !ruby/object:Gem::Dependency
49
+ name: rspec
55
50
  requirement: !ruby/object:Gem::Requirement
56
51
  requirements:
57
- - - '>='
52
+ - - ">="
58
53
  - !ruby/object:Gem::Version
59
54
  version: '0'
60
- prerelease: false
61
55
  type: :development
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
62
  description: Sequel plugin to store empty string as nil
63
63
  email:
64
64
  - jonathan.tron@metrilio.com
@@ -67,40 +67,41 @@ executables: []
67
67
  extensions: []
68
68
  extra_rdoc_files: []
69
69
  files:
70
- - .gitignore
71
- - .travis.yml
70
+ - ".gitignore"
71
+ - ".travis.yml"
72
72
  - Gemfile
73
73
  - LICENSE.txt
74
74
  - README.md
75
75
  - Rakefile
76
+ - ci/sequel.gemfile
76
77
  - lib/sequel/plugins/string_nilifier.rb
77
78
  - lib/sequel/plugins/string_nilifier/version.rb
78
79
  - lib/sequel/string_nilifier.rb
79
80
  - sequel-string_nilifier.gemspec
80
81
  - spec/sequel/plugins/string_nilifier_spec.rb
81
82
  - spec/spec_helper.rb
82
- homepage: ''
83
+ homepage: https://github.com/TalentBox/sequel-string_nilifier
83
84
  licenses:
84
85
  - MIT
85
86
  metadata: {}
86
- post_install_message:
87
+ post_install_message:
87
88
  rdoc_options: []
88
89
  require_paths:
89
90
  - lib
90
91
  required_ruby_version: !ruby/object:Gem::Requirement
91
92
  requirements:
92
- - - '>='
93
+ - - ">="
93
94
  - !ruby/object:Gem::Version
94
95
  version: '0'
95
96
  required_rubygems_version: !ruby/object:Gem::Requirement
96
97
  requirements:
97
- - - '>='
98
+ - - ">="
98
99
  - !ruby/object:Gem::Version
99
100
  version: '0'
100
101
  requirements: []
101
- rubyforge_project:
102
- rubygems_version: 2.1.9
103
- signing_key:
102
+ rubyforge_project:
103
+ rubygems_version: 2.7.6
104
+ signing_key:
104
105
  specification_version: 4
105
106
  summary: Sequel plugin to store empty string as nil
106
107
  test_files: