moosex 0.0.18 → 0.0.19

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,8 +19,8 @@ class TriggerTest
19
19
 
20
20
  has attr_with_default: {
21
21
  is: :rw,
22
- trigger: lambda do |object, new_value|
23
- object.logger.log "will update attr_with_trigger with new value #{new_value}"
22
+ trigger: ->(this, new_value) do
23
+ this.logger.log "will update attr_with_trigger with new value #{new_value}"
24
24
  end,
25
25
  default: 1,
26
26
  }
@@ -28,7 +28,7 @@ class TriggerTest
28
28
  has attr_lazy_trigger: {
29
29
  is: :lazy,
30
30
  trigger: :my_method,
31
- builder: lambda{ |x| 1},
31
+ builder: ->(this) { 1 },
32
32
  }
33
33
 
34
34
  def my_method(new_value)
@@ -191,7 +191,7 @@ describe "MooseX::Types" do
191
191
  "AnyOf Check violation: caused by [Type violation: value '[]' (Array) is not an instance of [Type Fixnum], Type violation: value '[]' (Array) is not an instance of [Type String], Type violation: value '[]' (Array) is not an instance of [Type Symbol]]")
192
192
 
193
193
  expect {
194
- Test.isAnyOf(lambda {|x| raise "OPS"}).call(1)
194
+ Test.isAnyOf(->(x) {raise "OPS"}).call(1)
195
195
  }.to raise_error(MooseX::Types::TypeCheckError,
196
196
  'unexpected exception OPS')
197
197
  end
@@ -5,7 +5,7 @@ class WeakRefExample
5
5
  include MooseX
6
6
 
7
7
  has a: { is: :rw, weak: true }
8
- has b: { is: :rw, weak: true, default: lambda{ Object.new } }
8
+ has b: { is: :rw, weak: true, default: -> { Object.new } }
9
9
  has c: { is: :lazy, weak: true, clearer: true }
10
10
 
11
11
  def build_c
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moosex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.18
4
+ version: 0.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tiago Peczenyj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-12 00:00:00.000000000 Z
11
+ date: 2014-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,6 +107,7 @@ files:
107
107
  - lib/moosex/event.rb
108
108
  - lib/moosex/exceptions.rb
109
109
  - lib/moosex/meta.rb
110
+ - lib/moosex/traits.rb
110
111
  - lib/moosex/types.rb
111
112
  - lib/moosex/version.rb
112
113
  - moosex.gemspec
@@ -131,10 +132,12 @@ files:
131
132
  - spec/modifiers_spec.rb
132
133
  - spec/moosex_spec.rb
133
134
  - spec/parametric_role_spec.rb
135
+ - spec/plugin_spec.rb
134
136
  - spec/point_spec.rb
135
137
  - spec/proxy_spec.rb
136
138
  - spec/role_spec.rb
137
139
  - spec/spec_helper.rb
140
+ - spec/traits_spec.rb
138
141
  - spec/trigger_spec.rb
139
142
  - spec/types_spec.rb
140
143
  - spec/weak_spec.rb
@@ -178,10 +181,12 @@ test_files:
178
181
  - spec/modifiers_spec.rb
179
182
  - spec/moosex_spec.rb
180
183
  - spec/parametric_role_spec.rb
184
+ - spec/plugin_spec.rb
181
185
  - spec/point_spec.rb
182
186
  - spec/proxy_spec.rb
183
187
  - spec/role_spec.rb
184
188
  - spec/spec_helper.rb
189
+ - spec/traits_spec.rb
185
190
  - spec/trigger_spec.rb
186
191
  - spec/types_spec.rb
187
192
  - spec/weak_spec.rb