typed 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem 'activesupport'
4
- gem 'must', '>= 0.2.6'
3
+ gemspec
data/lib/typed/hash.rb CHANGED
@@ -96,7 +96,7 @@ module Typed
96
96
 
97
97
  def check(key, type = nil)
98
98
  type ||= @schema[key]
99
- @schema.validate!(key, self[key], type)
99
+ @schema.validate!(key, @hash[key], type)
100
100
  end
101
101
 
102
102
  ######################################################################
data/lib/typed/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Typed
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
data/spec/events_spec.rb CHANGED
@@ -30,5 +30,17 @@ describe Typed::Events do
30
30
  data[:c] = 5
31
31
  written.should == [[:a,3], [:c,5]]
32
32
  end
33
+
34
+ it "should not fire :read event on :write" do
35
+ data = Typed::Hash.new
36
+
37
+ read = []
38
+ data.events.on(:read) {|k,v|
39
+ read << [k,v]
40
+ }
41
+
42
+ data[:x] = 10
43
+ read.should == []
44
+ end
33
45
  end
34
46
 
data/typed.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.add_dependency "activesupport"
22
- s.add_dependency "must", ">= 0.2.6"
22
+ s.add_dependency "must", ">= 0.2.7"
23
23
 
24
24
  s.add_development_dependency "rspec"
25
25
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typed
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 4
10
- version: 0.1.4
9
+ - 5
10
+ version: 0.1.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - maiha
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-04-27 00:00:00 +09:00
18
+ date: 2012-05-01 00:00:00 +09:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -40,12 +40,12 @@ dependencies:
40
40
  requirements:
41
41
  - - ">="
42
42
  - !ruby/object:Gem::Version
43
- hash: 27
43
+ hash: 25
44
44
  segments:
45
45
  - 0
46
46
  - 2
47
- - 6
48
- version: 0.2.6
47
+ - 7
48
+ version: 0.2.7
49
49
  type: :runtime
50
50
  version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency