yaks 0.7.3 → 0.7.4

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: e0db5e4f8db7d54360910d188c99b6587d760117
4
- data.tar.gz: 829b42f706fcfa28d310d7570a94a58df5f68e4d
3
+ metadata.gz: 776238668b4fdadb94093d0238f2c70410839554
4
+ data.tar.gz: 9f0a6759d926591facf1e6e1e76ea8f74502744b
5
5
  SHA512:
6
- metadata.gz: 0f333afb72bb42b0e42f24c94547a16edc630ece2dfa7428f1875c02556071ed3e68cdc2e7658dc295967dfd914c5d427927bb72d6704d8c2dc406893974f05d
7
- data.tar.gz: 73619976d557486367a92fde61823b7943c43ac4fce44704ffa7c244fcc18d574ee72e54fddc283858fbf55d9a506e551e007d4152e18f4c53497a67c202a73b
6
+ metadata.gz: 27ab2fc145cc3e3cbc64f9cc78bc941268a41858f1ccac9d3a45735b1f779299edb91aa2d9f7ae07f31ab81b4d74b549113477bbcc8468c2f8300b62d9179346
7
+ data.tar.gz: cec0a45406bdfbfa0906ba696d21753e25797360a6505eca8ba1b7b773dd5591fc2e18e7fbe0085c941677f5d833a64bc14d4b262130d635606daa763a705249
@@ -4,7 +4,7 @@ module Yaks
4
4
 
5
5
  def initialize(*attrs)
6
6
  @defaults = attrs.last.instance_of?(Hash) ? attrs.pop : {}
7
- @attributes = attrs + @defaults.keys
7
+ @attributes = (attrs + @defaults.keys).uniq
8
8
  end
9
9
 
10
10
  def add(*attrs)
data/lib/yaks/mapper.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  module Yaks
4
4
  class Mapper
5
5
  extend ClassMethods, Forwardable
6
- include Util, FP
6
+ include Util, FP, FP::Callable
7
7
 
8
8
  def_delegators 'self.class', :config
9
9
  def_delegators :config, :attributes, :links, :associations, :controls
data/lib/yaks/runner.rb CHANGED
@@ -100,7 +100,7 @@ module Yaks
100
100
  when :after
101
101
  [[step_name, callable], [name, hook]]
102
102
  when :around
103
- [[step_name, ->(x) { hook.call(x, &callable) }]]
103
+ [[step_name, ->(x, env) { hook.call(x, env, &callable) }]]
104
104
  when :skip
105
105
  []
106
106
  end
data/lib/yaks/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yaks
2
- VERSION = '0.7.3'
2
+ VERSION = '0.7.4'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -1,5 +1,3 @@
1
- $VERBOSE=true
2
-
3
1
  require 'rspec/its'
4
2
  require 'bogus/rspec'
5
3
  require 'timeout'
@@ -155,7 +155,7 @@ RSpec.describe Yaks::Runner do
155
155
  expect(runner.steps.map(&:first)).to eql [
156
156
  :map, :format, :primitivize, :serialize
157
157
  ]
158
- expect(runner.steps.assoc(:format).last.call(nil)).to be :around_format_impl
158
+ expect(runner.steps.assoc(:format).last.call(nil, nil)).to be :around_format_impl
159
159
  end
160
160
  end
161
161
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yaks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.3
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arne Brasseur
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-11 00:00:00.000000000 Z
11
+ date: 2014-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inflection