volute 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,91 @@
1
+
2
+ require File.join(File.dirname(__FILE__), 'spec_helper.rb')
3
+
4
+
5
+ describe 'volutes' do
6
+
7
+ before(:each) do
8
+
9
+ Volute.clear!
10
+
11
+ volute Invoice do
12
+ end
13
+ volute Package do
14
+ end
15
+ volute Financing::Loan do
16
+ end
17
+ volute Financing::Grant do
18
+ end
19
+ volute Financing do
20
+ end
21
+ volute :delivered do
22
+ end
23
+ volute :not, Financing do
24
+ end
25
+ end
26
+
27
+ it 'should return an empty array when there are no volutes' do
28
+
29
+ Volute.clear!
30
+
31
+ volutes.should == []
32
+ end
33
+
34
+ it 'should list volutes' do
35
+
36
+ volutes.size.should == 7
37
+ end
38
+
39
+ it 'should be updatable' do
40
+
41
+ financing = volutes(Financing)
42
+ volutes.reject! { |v| financing.include?(v) }
43
+
44
+ volutes.size.should == 3
45
+ end
46
+
47
+ it 'should be removable' do
48
+
49
+ volutes.remove(Financing)
50
+
51
+ volutes.size.should == 3
52
+ end
53
+
54
+ describe 'with a class argument' do
55
+
56
+ it 'should list only the top-level volutes for that class' do
57
+
58
+ volutes(Invoice).size.should == 1
59
+ end
60
+ end
61
+
62
+ describe 'with a module argument' do
63
+
64
+ it 'should list only the top-level volutes for classes of that module' do
65
+
66
+ volutes(Financing).size.should == 4
67
+ end
68
+ end
69
+
70
+ describe 'with an :attribute argument' do
71
+
72
+ it 'should list only the top-level volutes for that argument' do
73
+
74
+ volutes(:delivered).size.should == 1
75
+ end
76
+ end
77
+
78
+ describe 'with a :not as first arg' do
79
+
80
+ it 'should simply ignore the :not' do
81
+
82
+ volutes(Financing).size.should == 4
83
+ end
84
+
85
+ it 'should list :not volutes' do
86
+
87
+ volutes(:not).size.should == 1
88
+ end
89
+ end
90
+ end
91
+
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{volute}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux"]
12
- s.date = %q{2010-10-08}
12
+ s.date = %q{2010-10-12}
13
13
  s.description = %q{
14
14
  placing some [business] logic outside of classes
15
15
  }
@@ -24,46 +24,66 @@ placing some [business] logic outside of classes
24
24
  "README.rdoc",
25
25
  "Rakefile",
26
26
  "TODO.txt",
27
+ "examples/diagnosis.rb",
27
28
  "examples/equation.rb",
29
+ "examples/light.rb",
28
30
  "examples/state_machine.rb",
31
+ "examples/state_machine_2.rb",
32
+ "examples/traffic.rb",
29
33
  "lib/volute.rb",
34
+ "spec/apply_spec.rb",
35
+ "spec/filter_not_spec.rb",
36
+ "spec/filter_spec.rb",
37
+ "spec/filter_state_spec.rb",
38
+ "spec/filter_transitions_spec.rb",
30
39
  "spec/include_volute_spec.rb",
40
+ "spec/over_spec.rb",
31
41
  "spec/spec_helper.rb",
32
- "spec/volute_guard_spec.rb",
33
42
  "spec/volute_spec.rb",
43
+ "spec/volutes_spec.rb",
34
44
  "volute.gemspec"
35
45
  ]
36
46
  s.homepage = %q{http://github.com/jmettraux/volute/}
37
47
  s.rdoc_options = ["--charset=UTF-8"]
38
48
  s.require_paths = ["lib"]
39
49
  s.rubyforge_project = %q{rufus}
40
- s.rubygems_version = %q{1.3.5}
50
+ s.rubygems_version = %q{1.3.7}
41
51
  s.summary = %q{placing some [business] logic outside of classes}
42
52
  s.test_files = [
43
- "spec/include_volute_spec.rb",
53
+ "spec/apply_spec.rb",
54
+ "spec/filter_not_spec.rb",
55
+ "spec/filter_spec.rb",
56
+ "spec/filter_state_spec.rb",
57
+ "spec/filter_transitions_spec.rb",
58
+ "spec/include_volute_spec.rb",
59
+ "spec/over_spec.rb",
44
60
  "spec/spec_helper.rb",
45
- "spec/volute_guard_spec.rb",
46
61
  "spec/volute_spec.rb",
62
+ "spec/volutes_spec.rb",
63
+ "examples/diagnosis.rb",
47
64
  "examples/equation.rb",
48
- "examples/state_machine.rb"
65
+ "examples/light.rb",
66
+ "examples/state_machine.rb",
67
+ "examples/state_machine_2.rb",
68
+ "examples/traffic.rb"
49
69
  ]
50
70
 
51
71
  if s.respond_to? :specification_version then
52
72
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
53
73
  s.specification_version = 3
54
74
 
55
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
75
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
56
76
  s.add_development_dependency(%q<rake>, [">= 0"])
57
- s.add_development_dependency(%q<rspec>, [">= 0"])
77
+ s.add_development_dependency(%q<rspec>, [">= 2.0.0"])
58
78
  s.add_development_dependency(%q<jeweler>, [">= 0"])
59
79
  else
60
80
  s.add_dependency(%q<rake>, [">= 0"])
61
- s.add_dependency(%q<rspec>, [">= 0"])
81
+ s.add_dependency(%q<rspec>, [">= 2.0.0"])
62
82
  s.add_dependency(%q<jeweler>, [">= 0"])
63
83
  end
64
84
  else
65
85
  s.add_dependency(%q<rake>, [">= 0"])
66
- s.add_dependency(%q<rspec>, [">= 0"])
86
+ s.add_dependency(%q<rspec>, [">= 2.0.0"])
67
87
  s.add_dependency(%q<jeweler>, [">= 0"])
68
88
  end
69
89
  end
metadata CHANGED
@@ -1,7 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volute
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 1
8
+ - 1
9
+ version: 0.1.1
5
10
  platform: ruby
6
11
  authors:
7
12
  - John Mettraux
@@ -9,39 +14,50 @@ autorequire:
9
14
  bindir: bin
10
15
  cert_chain: []
11
16
 
12
- date: 2010-10-08 00:00:00 +09:00
17
+ date: 2010-10-12 00:00:00 +09:00
13
18
  default_executable:
14
19
  dependencies:
15
20
  - !ruby/object:Gem::Dependency
16
21
  name: rake
17
- type: :development
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
20
25
  requirements:
21
26
  - - ">="
22
27
  - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
23
30
  version: "0"
24
- version:
31
+ type: :development
32
+ version_requirements: *id001
25
33
  - !ruby/object:Gem::Dependency
26
34
  name: rspec
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
30
38
  requirements:
31
39
  - - ">="
32
40
  - !ruby/object:Gem::Version
33
- version: "0"
34
- version:
41
+ segments:
42
+ - 2
43
+ - 0
44
+ - 0
45
+ version: 2.0.0
46
+ type: :development
47
+ version_requirements: *id002
35
48
  - !ruby/object:Gem::Dependency
36
49
  name: jeweler
37
- type: :development
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
40
53
  requirements:
41
54
  - - ">="
42
55
  - !ruby/object:Gem::Version
56
+ segments:
57
+ - 0
43
58
  version: "0"
44
- version:
59
+ type: :development
60
+ version_requirements: *id003
45
61
  description: "\n\
46
62
  placing some [business] logic outside of classes\n "
47
63
  email: jmettraux@gmail.com
@@ -58,13 +74,23 @@ files:
58
74
  - README.rdoc
59
75
  - Rakefile
60
76
  - TODO.txt
77
+ - examples/diagnosis.rb
61
78
  - examples/equation.rb
79
+ - examples/light.rb
62
80
  - examples/state_machine.rb
81
+ - examples/state_machine_2.rb
82
+ - examples/traffic.rb
63
83
  - lib/volute.rb
84
+ - spec/apply_spec.rb
85
+ - spec/filter_not_spec.rb
86
+ - spec/filter_spec.rb
87
+ - spec/filter_state_spec.rb
88
+ - spec/filter_transitions_spec.rb
64
89
  - spec/include_volute_spec.rb
90
+ - spec/over_spec.rb
65
91
  - spec/spec_helper.rb
66
- - spec/volute_guard_spec.rb
67
92
  - spec/volute_spec.rb
93
+ - spec/volutes_spec.rb
68
94
  - volute.gemspec
69
95
  has_rdoc: true
70
96
  homepage: http://github.com/jmettraux/volute/
@@ -76,28 +102,42 @@ rdoc_options:
76
102
  require_paths:
77
103
  - lib
78
104
  required_ruby_version: !ruby/object:Gem::Requirement
105
+ none: false
79
106
  requirements:
80
107
  - - ">="
81
108
  - !ruby/object:Gem::Version
109
+ segments:
110
+ - 0
82
111
  version: "0"
83
- version:
84
112
  required_rubygems_version: !ruby/object:Gem::Requirement
113
+ none: false
85
114
  requirements:
86
115
  - - ">="
87
116
  - !ruby/object:Gem::Version
117
+ segments:
118
+ - 0
88
119
  version: "0"
89
- version:
90
120
  requirements: []
91
121
 
92
122
  rubyforge_project: rufus
93
- rubygems_version: 1.3.5
123
+ rubygems_version: 1.3.7
94
124
  signing_key:
95
125
  specification_version: 3
96
126
  summary: placing some [business] logic outside of classes
97
127
  test_files:
128
+ - spec/apply_spec.rb
129
+ - spec/filter_not_spec.rb
130
+ - spec/filter_spec.rb
131
+ - spec/filter_state_spec.rb
132
+ - spec/filter_transitions_spec.rb
98
133
  - spec/include_volute_spec.rb
134
+ - spec/over_spec.rb
99
135
  - spec/spec_helper.rb
100
- - spec/volute_guard_spec.rb
101
136
  - spec/volute_spec.rb
137
+ - spec/volutes_spec.rb
138
+ - examples/diagnosis.rb
102
139
  - examples/equation.rb
140
+ - examples/light.rb
103
141
  - examples/state_machine.rb
142
+ - examples/state_machine_2.rb
143
+ - examples/traffic.rb