rom 3.2.0 → 3.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3be503f4afdb36bf8b23b51bbafe4fad82f18146
4
- data.tar.gz: eef4ca7433150d025b68bde69bf34a88fe9a7f3a
3
+ metadata.gz: 46b1295151bfce6eb65ba6ddc43c38ec02891a6b
4
+ data.tar.gz: 00b551e3af83e06ca2b47e2cc341713f9c21412f
5
5
  SHA512:
6
- metadata.gz: bcaa8c8cda675c11f136e22598641e7e5bcaf6fe6a87bfe0a36b9eb1fea7b114b9871a272a70d66155ba8e877ea70ded5bae32084304a4d00e04ab4a26411e9f
7
- data.tar.gz: 162ce7faa345e81153b5ce91192f34da29a2c5ccf0bf44972ad02d8d23e1383c4170b6a1850cde9043a7e3692b1811940c1fe155f53bdf5cec85944479595d83
6
+ metadata.gz: 861f80190d88eb5946cc620557bae2ffff484abc46b7177f20c5e6a4dbc9c34e7e223db27705f55360587422f51776904a439e9610703b6ab57c60f45b09885c
7
+ data.tar.gz: 731b82c742dedeb3c05f71b88703c6327d057bf55f8e6a2539738c5790a70ea695b269b93b645c1785efb92acf22e2bd9788f55a428151d0104ddc648001af24
@@ -16,6 +16,9 @@ env:
16
16
  global:
17
17
  - JRUBY_OPTS='--dev -J-Xmx1024M'
18
18
  - COVERAGE='true'
19
+ matrix:
20
+ allow_failures:
21
+ - rvm: rbx-3
19
22
  notifications:
20
23
  webhooks:
21
24
  urls:
@@ -1,8 +1,16 @@
1
+ # v3.2.1 2017-05-02
2
+
3
+ ## Changed
4
+
5
+ * `ROM::Schema::Attribute` uses `Initializer` now (flash-gordon)
6
+
7
+ [Compare v3.2.0...v3.2.1](https://github.com/rom-rb/rom/compare/v3.2.0...v3.2.1)
8
+
1
9
  # v3.2.0 2017-03-25
2
10
 
3
11
  ## Changed
4
12
 
5
- * `dry-initializer` was updated to `1.3`, this is a minor change, but leads to some incompabilities with existing adapters, hence `3.2.0` shall be released (flash-gordon)
13
+ * `dry-initializer` was updated to `1.3`, this is a minor change, but leads to some incompatibilities with existing adapters, hence `3.2.0` shall be released (flash-gordon)
6
14
 
7
15
  [Compare v3.1.0...v3.2.0](https://github.com/rom-rb/rom/compare/v3.1.0...v3.2.0)
8
16
 
@@ -471,5 +471,18 @@ module ROM
471
471
  end
472
472
  end
473
473
  end
474
+
475
+ # Pipes a dataset through command's relation
476
+ #
477
+ # @return [Array]
478
+ #
479
+ # @api private
480
+ def wrap_dataset(dataset)
481
+ if relation.is_a?(Relation::Composite)
482
+ relation.new(dataset).to_a
483
+ else
484
+ dataset
485
+ end
486
+ end
474
487
  end
475
488
  end
@@ -1,6 +1,7 @@
1
1
  require 'delegate'
2
2
  require 'dry/equalizer'
3
3
  require 'dry/types/decorator'
4
+ require 'rom/initializer'
4
5
 
5
6
  module ROM
6
7
  class Schema
@@ -14,16 +15,13 @@ module ROM
14
15
  #
15
16
  # @api public
16
17
  class Attribute
17
- include Dry::Equalizer(:type)
18
+ include Dry::Equalizer(:type, :options)
19
+
20
+ extend Initializer
18
21
 
19
22
  # !@attribute [r] type
20
23
  # @return [Dry::Types::Definition, Dry::Types::Sum, Dry::Types::Constrained]
21
- attr_reader :type
22
-
23
- # @api private
24
- def initialize(type)
25
- @type = type
26
- end
24
+ param :type
27
25
 
28
26
  # @api private
29
27
  def [](input)
@@ -379,7 +377,7 @@ module ROM
379
377
  response = type.__send__(meth, *args, &block)
380
378
 
381
379
  if response.is_a?(type.class)
382
- self.class.new(type)
380
+ self.class.new(type, options)
383
381
  else
384
382
  response
385
383
  end
@@ -1,3 +1,3 @@
1
1
  module ROM
2
- VERSION = '3.2.0'.freeze
2
+ VERSION = '3.2.1'.freeze
3
3
  end
@@ -1,7 +1,13 @@
1
- if ENV['COVERAGE'] == 'true' && RUBY_ENGINE == 'ruby' && RUBY_VERSION == '2.4.1'
2
- require "simplecov"
3
- SimpleCov.start do
4
- add_filter '/spec/'
1
+ if RUBY_ENGINE == 'ruby' && ENV['COVERAGE'] == 'true'
2
+ require 'yaml'
3
+ rubies = YAML.load(File.read(File.join(__dir__, '..', '.travis.yml')))['rvm']
4
+ latest_mri = rubies.select { |v| v =~ /\A\d+\.\d+.\d+\z/ }.max
5
+
6
+ if RUBY_VERSION == latest_mri
7
+ require 'simplecov'
8
+ SimpleCov.start do
9
+ add_filter '/spec/'
10
+ end
5
11
  end
6
12
  end
7
13
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rom
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 3.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Solnica
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-25 00:00:00.000000000 Z
11
+ date: 2017-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -394,7 +394,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
394
394
  version: '0'
395
395
  requirements: []
396
396
  rubyforge_project:
397
- rubygems_version: 2.6.10
397
+ rubygems_version: 2.6.11
398
398
  signing_key:
399
399
  specification_version: 4
400
400
  summary: Ruby Object Mapper