hero 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,9 +1,3 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
+ gemspec
2
3
 
3
- group :development do
4
- # gem "awesome_print"
5
- gem "micro_test"
6
- gem "micro_mock"
7
- gem "pry"
8
- # gem "pry-stack_explorer"
9
- end
@@ -1,33 +1,28 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ hero (0.1.8)
5
+
1
6
  GEM
2
- remote: http://rubygems.org/
7
+ remote: https://rubygems.org/
3
8
  specs:
4
- celluloid (0.12.3)
5
- facter (>= 1.6.12)
6
- timers (>= 1.0.0)
7
- coderay (1.0.8)
8
- facter (1.6.14)
9
+ coderay (1.0.9)
9
10
  method_source (0.8.1)
10
- micro_mock (0.1.1)
11
- micro_test (0.3.0)
12
- celluloid
13
- pry (0.9.10)
14
- coderay (~> 1.0.5)
15
- method_source (~> 0.8)
16
- slop (~> 3.3.1)
17
- pry (0.9.10-java)
11
+ micro_mock (1.1.0)
12
+ micro_test (0.3.5)
13
+ os
14
+ os (0.9.6)
15
+ pry (0.9.12)
18
16
  coderay (~> 1.0.5)
19
17
  method_source (~> 0.8)
20
- slop (~> 3.3.1)
21
- spoon (~> 0.0)
22
- slop (3.3.3)
23
- spoon (0.0.1)
24
- timers (1.0.1)
18
+ slop (~> 3.4)
19
+ slop (3.4.4)
25
20
 
26
21
  PLATFORMS
27
- java
28
22
  ruby
29
23
 
30
24
  DEPENDENCIES
25
+ hero!
31
26
  micro_mock
32
27
  micro_test
33
28
  pry
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Hero
2
2
 
3
+ [![Build Status](https://travis-ci.org/hopsoft/hero.png)](https://travis-ci.org/hopsoft/hero)
4
+ [![Dependency Status](https://gemnasium.com/hopsoft/hero.png)](https://gemnasium.com/hopsoft/hero)
5
+
3
6
  ![Hero GEM](http://hopsoft.github.com/hero/images/hero.jpg)
4
7
 
5
8
  ## Its a bird, its a plane, its... its... my Hero
@@ -0,0 +1,11 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ task :default => [:test]
4
+
5
+ desc "Runs the test suite."
6
+ task :test do
7
+ ENV["TEST"] = "1"
8
+ output = `bundle exec mt`
9
+ puts output
10
+ exit output.index(/tests\sfinished.*failed/).nil?
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Hero
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
3
3
  end
@@ -44,7 +44,7 @@ class FormulaTest < MicroTest::Test
44
44
 
45
45
  test "should allow unnamed Class steps" do
46
46
  step = MicroMock.make
47
- step.stub(:call) {}
47
+ step.def(:call) {}
48
48
  Hero::Formula[@formula_name].add_step step
49
49
  assert Hero::Formula[@formula_name].steps.map{|s| s.first}.first =~ /MicroMock/
50
50
  assert Hero::Formula[@formula_name].steps.map{|s| s.last}.include?(step)
@@ -52,7 +52,7 @@ class FormulaTest < MicroTest::Test
52
52
 
53
53
  test "should allow named Class steps" do
54
54
  step = MicroMock.make
55
- step.stub(:call) {}
55
+ step.def(:call) {}
56
56
  Hero::Formula[@formula_name].add_step :foo, step
57
57
  assert Hero::Formula[@formula_name].steps.map{|s| s.first}.include?(:foo)
58
58
  assert Hero::Formula[@formula_name].steps.map{|s| s.last}.include?(step)
@@ -60,7 +60,7 @@ class FormulaTest < MicroTest::Test
60
60
 
61
61
  test "should allow unnamed instance steps" do
62
62
  step = MicroMock.make.new
63
- step.stub(:call) {}
63
+ step.def(:call) {}
64
64
  Hero::Formula[@formula_name].add_step step
65
65
  names = Hero::Formula[@formula_name].steps.map{|s| s.first}
66
66
  steps = Hero::Formula[@formula_name].steps.map{|s| s.last}
@@ -71,7 +71,7 @@ class FormulaTest < MicroTest::Test
71
71
 
72
72
  test "should allow named instance steps" do
73
73
  step = MicroMock.make.new
74
- step.stub(:call) {}
74
+ step.def(:call) {}
75
75
  Hero::Formula[@formula_name].add_step :foo, step
76
76
  names = Hero::Formula[@formula_name].steps.map{|s| s.first}
77
77
  steps = Hero::Formula[@formula_name].steps.map{|s| s.last}
@@ -167,7 +167,7 @@ class FormulaTest < MicroTest::Test
167
167
 
168
168
  test "should support running step defined in a class" do
169
169
  step = MicroMock.make.new
170
- step.stub(:call) do |context, options|
170
+ step.def(:call) do |context, options|
171
171
  options[:context] = context
172
172
  end
173
173
 
@@ -209,8 +209,8 @@ class FormulaTest < MicroTest::Test
209
209
  logger = MicroMock.make.new
210
210
  logger.attr :buffer
211
211
  logger.buffer = []
212
- logger.stub(:info) { |value| buffer << value }
213
- logger.stub(:error) { |value| buffer << value }
212
+ logger.def(:info) { |value| buffer << value }
213
+ logger.def(:error) { |value| buffer << value }
214
214
  Hero.logger = logger
215
215
 
216
216
  Hero::Formula[@formula_name].add_step(:one) { |list, opts| list << 1; opts[:step] = 1 }
@@ -231,8 +231,8 @@ class FormulaTest < MicroTest::Test
231
231
  # logger.attr :buffer
232
232
  # logger.attr(:info_count)
233
233
  # logger.attr(:error_count)
234
- # logger.stub(:info) { |value| buffer << value; self.info_count += 1 }
235
- # logger.stub(:error) { |value| buffer << value; self.error_count += 1 }
234
+ # logger.def(:info) { |value| buffer << value; self.info_count += 1 }
235
+ # logger.def(:error) { |value| buffer << value; self.error_count += 1 }
236
236
  # logger.buffer = []
237
237
  # logger.info_count = 0
238
238
  # logger.error_count = 0
@@ -1,5 +1,5 @@
1
- require "bundler"
2
- Bundler.require :default, :development
1
+ require "micro_test"
2
+ require "micro_mock"
3
3
 
4
4
  Dir[File.join(File.dirname(__FILE__), "..", "lib", "*.rb")].each do |file|
5
5
  require file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,57 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-27 00:00:00.000000000 Z
13
- dependencies: []
14
- description: ! ' Simplify your app by effectively modeling business processes within
15
- it.
16
-
17
- '
12
+ date: 2013-04-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: micro_test
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: micro_mock
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: pry
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: Think of Hero as a simplified state machine.
18
63
  email:
19
64
  - natehop@gmail.com
20
65
  executables: []
@@ -28,6 +73,7 @@ files:
28
73
  - Gemfile
29
74
  - Gemfile.lock
30
75
  - LICENSE.txt
76
+ - Rakefile
31
77
  - README.md
32
78
  - test/formula_test.rb
33
79
  - test/observer_test.rb
@@ -53,9 +99,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
99
  version: '0'
54
100
  requirements: []
55
101
  rubyforge_project:
56
- rubygems_version: 1.8.23
102
+ rubygems_version: 1.8.25
57
103
  signing_key:
58
104
  specification_version: 3
59
105
  summary: Think of Hero as a simplified state machine.
60
- test_files: []
61
- has_rdoc:
106
+ test_files:
107
+ - test/formula_test.rb
108
+ - test/observer_test.rb
109
+ - test/test_helper.rb