disposable 0.4.4 → 0.4.5

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: c909813e9e956a7fc7f01053b0be5984ccfb8ca9
4
- data.tar.gz: dfa602431c42bb639e696eaf07e5822ad2f89e58
2
+ SHA256:
3
+ metadata.gz: 0a0b6cd70b82bc532b0a07ca0035dc1f1c6b112cb90fca7d244e1ac3468c327f
4
+ data.tar.gz: 661653dde2ad0f4aca0107e84605e92764952023aae4c7b0d624cded6d7130ad
5
5
  SHA512:
6
- metadata.gz: 8fdf6d50142307f1dad082e3ab73639888e1fe37c482fa49e3379d5751e39e83ba3d60e6f00699083d402f4ca56eb21be111ccbc069f2e0ee28f573838953d18
7
- data.tar.gz: 99b5c357dbb03d0870ae9934732cc7786e37d728abdcfc6e7430b0cb6ba7de8fb47fd4d589edd501b14528bda26831fced5939814198e7e6906b397907f5bf93
6
+ metadata.gz: f382b96782f326b2b52a85cfdf340c99a29824af3aa7cccbf9129a146700b73b6b48137361e56a7b1b017b48236c6aef15029d98b78a35e192eafeb765caacb2
7
+ data.tar.gz: b2712eab0e52144fbe418e2035dc39ccba6ce241304debaab9e04b4ee39f71dcc3eb95a77c0f1d2885538c38361f6efb896620c052e4bcb58f1529390b61eae8
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.4.5
2
+
3
+ * Use Gem::Version to detect version for dry-types
4
+
1
5
  # 0.4.4
2
6
 
3
7
  * Add support for Dry::Types version 0.13
data/Gemfile CHANGED
@@ -1,11 +1,5 @@
1
1
  source "https://rubygems.org"
2
2
  gemspec
3
-
4
- # gem "representable", path: "../representable"
5
- # gem "representable", "3.0.0"
6
- # gem "representable", github: "apotonick/representable"
7
- # gem "declarative", path: "../declarative"
8
- # gem "declarative", github: "apotonick/declarative"
9
3
  gem "minitest-line"
10
4
 
11
5
  { "dry-types" => ENV['DRY_TYPES'], "activerecord" => ENV['ACTIVERECORD']}.each do |gem_name, dependency|
@@ -13,10 +7,4 @@ gem "minitest-line"
13
7
  gem gem_name, dependency
14
8
  end
15
9
 
16
- # gem "dry-struct"
17
-
18
10
 
19
- # gem "uber", path: "../uber"
20
- # gem "declarative-option", path: "../declarative-option"
21
- # gem "declarative-builder", path: "../declarative-builder"
22
- # gem "representable", path: "../representable"
@@ -13,8 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.license = "MIT"
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
16
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
16
+ spec.test_files = spec.files.grep(%r{^(test)/})
18
17
  spec.require_paths = ["lib"]
19
18
 
20
19
  spec.add_dependency "uber", "< 0.2.0"
@@ -5,8 +5,8 @@ module Disposable::Twin::Coercion
5
5
  include Dry::Types.module
6
6
  end
7
7
 
8
- DRY_TYPES_VERSION = Integer(Dry::Types::VERSION.split('.')[-2])
9
- DRY_TYPES_CONSTANT = DRY_TYPES_VERSION < 13 ? Types::Form : Types::Params
8
+ DRY_TYPES_VERSION = Gem::Version.new(Dry::Types::VERSION)
9
+ DRY_TYPES_CONSTANT = DRY_TYPES_VERSION < Gem::Version.new("0.13.0") ? Types::Form : Types::Params
10
10
 
11
11
  module ClassMethods
12
12
  def property(name, options={}, &block)
@@ -1,3 +1,3 @@
1
1
  module Disposable
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
@@ -6,7 +6,7 @@ require "declarative/testing"
6
6
 
7
7
  require "disposable/twin/coercion"
8
8
  DRY_TYPES_CONSTANT = Disposable::Twin::Coercion::DRY_TYPES_CONSTANT
9
- DRY_TYPES_INT_CONSTANT = Disposable::Twin::Coercion::DRY_TYPES_VERSION < 13 ? 'Int' : 'Integer'
9
+ DRY_TYPES_INT_CONSTANT = Disposable::Twin::Coercion::DRY_TYPES_VERSION < Gem::Version.new("0.13.0") ? 'Int' : 'Integer'
10
10
 
11
11
  class Track
12
12
  def initialize(options={})
@@ -155,7 +155,7 @@ class CoercionTypingTest < MiniTest::Spec
155
155
 
156
156
  # property :title, type: Dry::Types::Strict::String.constructor(Dry::Types::Params.method(:to_nil))
157
157
 
158
- constructor = Disposable::Twin::Coercion::DRY_TYPES_VERSION < 13 ? 'form.nil' : 'params.nil'
158
+ constructor = Disposable::Twin::Coercion::DRY_TYPES_VERSION < Gem::Version.new("0.13.0") ? 'form.nil' : 'params.nil'
159
159
  property :title, type: Types::Strict::String.optional.constructor(Dry::Types[constructor]) # this is the behavior of the "DB" data twin. this is NOT the form.
160
160
 
161
161
  # property :name, type: Types::Params::String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: disposable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-17 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uber
@@ -191,11 +191,6 @@ files:
191
191
  - README.md
192
192
  - Rakefile
193
193
  - disposable.gemspec
194
- - gemfiles/Gemfile.rails-2.3
195
- - gemfiles/Gemfile.rails-3.0
196
- - gemfiles/Gemfile.rails-3.2
197
- - gemfiles/Gemfile.rails-4.0
198
- - gemfiles/Gemfile.rails-4.1
199
194
  - lib/disposable.rb
200
195
  - lib/disposable/callback.rb
201
196
  - lib/disposable/composition.rb
@@ -278,8 +273,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
278
273
  - !ruby/object:Gem::Version
279
274
  version: '0'
280
275
  requirements: []
281
- rubyforge_project:
282
- rubygems_version: 2.6.14
276
+ rubygems_version: 3.0.2
283
277
  signing_key:
284
278
  specification_version: 4
285
279
  summary: Decorators on top of your ORM layer with change tracking, collection semantics
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'rails', '2.3.18'
7
- gem 'nokogiri', '~> 1.5.0'
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 3.0.11'
7
- gem 'activerecord', '~> 3.0.11'
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 3.2.0'
7
- gem 'activerecord', '~> 3.2.0'
@@ -1,8 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 4.0.0'
7
- gem 'activerecord', '~> 4.0.0'
8
- gem 'minitest', '~> 4.2.0'
@@ -1,7 +0,0 @@
1
- source "http://rubygems.org"
2
-
3
- # Specify your gem's dependencies in reform.gemspec
4
- gemspec :path => '../'
5
-
6
- gem 'railties', '~> 4.1.0'
7
- gem 'activerecord', '~> 4.1.0'