watchmaker 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,5 +4,5 @@ rvm:
4
4
  script: "bundle exec rake spec"
5
5
  gemfile:
6
6
  - gemfiles/rails-3.0.9.gemfile
7
- - gemfiles/rails-3.1.0.rc5.gemfile
7
+ - gemfiles/rails-3.1.0.gemfile
8
8
  - gemfiles/rails-master.gemfile
data/Guardfile CHANGED
@@ -1,6 +1,3 @@
1
- # A sample Guardfile
2
- # More info at https://github.com/guard/guard#readme
3
-
4
1
  guard 'rspec', :version => 2 do
5
2
  watch(%r{^spec/.+_spec\.rb$})
6
3
  watch(%r{^lib/(.+)\.rb$}) { "spec/" }
@@ -12,12 +12,7 @@ place; for example:
12
12
 
13
13
  == Using
14
14
 
15
- === Basics
16
-
17
- Watchmaker creates persisted objects only. This is because these
18
- objects are meant for integration tests where persistence is required.
19
-
20
- === Learn profiles
15
+ === Define profiles
21
16
 
22
17
  ==== Implicit profiles
23
18
 
@@ -25,13 +20,13 @@ Specify a dependency hash of profile name to objects. The watchmaker
25
20
  will either yield another watchmaker or a factory when resolving those
26
21
  dependencies.
27
22
 
28
- Watchmaker.learn :lots_of_things => [:car, :garage, :boat]
23
+ Watchmaker.define :lots_of_things => [:car, :garage, :boat]
29
24
 
30
25
  ==== Lambda-based profiles
31
26
 
32
27
  When called, will call the lambda.
33
28
 
34
- Watchmaker.learn :two_garages do
29
+ Watchmaker.define :two_garages do
35
30
  2.times do
36
31
  Factory.create :garage
37
32
  end
@@ -41,7 +36,7 @@ When called, will call the lambda.
41
36
 
42
37
  Create a garage using the garage factory.
43
38
 
44
- Watchmaker.learn :garage, :factories => [:garage] do
39
+ Watchmaker.define :garage, :factories => [:garage] do
45
40
  # Some other post-factory creation setup here.
46
41
  end
47
42
 
@@ -49,36 +44,36 @@ Create a garage using the garage factory.
49
44
 
50
45
  Create a garage using the garage factory.
51
46
 
52
- Watchmaker.learn :garage, :factories => [:garage]
47
+ Watchmaker.define :garage, :factories => [:garage]
53
48
 
54
49
  Create a car using the car factory, and a garage using the garage
55
50
  watchmaker.
56
51
 
57
- Watchmaker.learn :car, :factories => [:car], :watchmakers => [:garage]
52
+ Watchmaker.define :car, :factories => [:car], :watchmakers => [:garage]
58
53
 
59
54
  ==== Inject created objects into the lambda
60
55
 
61
56
  Inject the factory-created garage and car into the block.
62
57
 
63
- Watchmaker.learn :car_in_garage, :factories => [:garage, :car] do |garage, car|
58
+ Watchmaker.define :car_in_garage, :factories => [:garage, :car] do |garage, car|
64
59
  garage.cars << car
65
60
  end
66
61
 
67
- ==== Grab your objects
62
+ === Manufacture objects
68
63
 
69
- Watchmaker returns the objects created.
64
+ Build in-memory objects using the two garages profile.
70
65
 
71
- Watchmaker.construct(:garage).first.class # Garage
66
+ Watchmaker.build :two_garages
72
67
 
73
- === Construct objects
68
+ Build persisted objects using the two garages profile.
74
69
 
75
- Build objects using the two garages profile.
70
+ Watchmaker.create :two_garages
76
71
 
77
- Watchmaker.construct :two_garages
72
+ ==== Get your objects back
78
73
 
79
- Build objects using the garage profile.
74
+ Watchmaker returns the objects created.
80
75
 
81
- Watchmaker.construct :garages
76
+ Watchmaker.create(:garage).first.class # Garage
82
77
 
83
78
  == Inspiration for the name
84
79
 
@@ -2,10 +2,19 @@
2
2
 
3
3
  require "watchmaker/version"
4
4
  require "watchmaker/configuration"
5
+
6
+ require "watchmaker/integrations"
7
+
5
8
  require "watchmaker/learner"
9
+
10
+ require "watchmaker/manufacturer"
6
11
  require "watchmaker/constructor"
12
+ require "watchmaker/assembler"
7
13
 
8
14
  module Watchmaker # :nodoc:
15
+ include Integrations
9
16
  include Learner
17
+ include Manufacturer
10
18
  include Constructor
19
+ include Assembler
11
20
  end
@@ -0,0 +1,19 @@
1
+ # encoding: UTF-8
2
+
3
+ module Watchmaker
4
+ module Assembler
5
+ extend ActiveSupport::Concern
6
+
7
+ module ClassMethods
8
+
9
+ # Assemble a profile, or build in memory only.
10
+ #
11
+ def build(profile)
12
+ manufacture(profile, :build)
13
+ end
14
+
15
+ alias :assemble :build
16
+
17
+ end
18
+ end
19
+ end
@@ -20,29 +20,41 @@ module Watchmaker # :nodoc:
20
20
  @profiles = {}
21
21
  end
22
22
 
23
- def self.learn(name, dependencies, &block)
24
- instance.learn(name, dependencies, &block)
25
- end
23
+ class << self
24
+ def define(name, dependencies, &block)
25
+ instance.define(name, dependencies, &block)
26
+ end
26
27
 
27
- def self.learned(name)
28
- instance.learned(name)
29
- end
28
+ alias :learn :define
29
+
30
+ def defined(name)
31
+ instance.defined(name)
32
+ end
33
+
34
+ alias :learned :defined
30
35
 
31
- def self.learned?(name)
32
- !!learned(name)
36
+ def defined?(name)
37
+ !!defined(name)
38
+ end
39
+
40
+ alias :learned? :defined?
33
41
  end
34
42
 
35
- def learn(name, dependencies, &block) # :nodoc:
43
+ def define(name, dependencies, &block) # :nodoc:
36
44
  @profiles[name] = {
37
45
  :dependencies => dependencies,
38
46
  :block => block
39
47
  }
40
48
  end
41
49
 
42
- def learned(name) # :nodoc:
50
+ alias :learn :define
51
+
52
+ def defined(name) # :nodoc:
43
53
  @profiles[name]
44
54
  end
45
55
 
56
+ alias :learned :defined
57
+
46
58
  end
47
59
 
48
60
  end
@@ -6,77 +6,13 @@ module Watchmaker
6
6
 
7
7
  module ClassMethods
8
8
 
9
- # Construct from a factory.
10
- #
11
- def construct_from_factory(factory)
12
- Factory.create(factory.to_sym)
13
- end
14
-
15
- # Construct from another watchmaker.
9
+ # Contruct a profile, or persist objects.
16
10
  #
17
- def construct_from_watchmaker(watchmaker)
18
- construct(watchmaker.to_sym)
11
+ def create(profile)
12
+ manufacture(profile, :create)
19
13
  end
20
14
 
21
- # Contruct a profile.
22
- #
23
- def construct(profile)
24
-
25
- # Store created objects.
26
- #
27
- objects = []
28
-
29
- # If a profile exists, call the proc we've stored; if not, raise.
30
- #
31
- if selected_profile = Configuration.learned(profile)
32
-
33
- if dependencies = selected_profile[:dependencies]
34
-
35
- # For any abstract dependencies, infer how to create them.
36
- #
37
- if abstracts = dependencies[:abstract]
38
- abstracts.each do |abstract|
39
- if Configuration.learned?(abstract)
40
- objects << construct_from_watchmaker(abstract)
41
- else
42
- objects << construct_from_factory(abstract)
43
- end
44
- end
45
- end
46
-
47
- # For any supplied factories, create them.
48
- #
49
- if factories = dependencies[:factories]
50
- factories.each do |factory|
51
- objects << construct_from_factory(factory)
52
- end
53
- end
54
-
55
- # For any supplied watchmakers, create them.
56
- #
57
- if watchmakers = dependencies[:watchmakers]
58
- watchmakers.each do |watchmaker|
59
- objects << construct_from_watchmaker(watchmaker)
60
- end
61
- end
62
-
63
- end
64
-
65
- # Run the supplied block.
66
- #
67
- if block = selected_profile[:block]
68
- objects << block.call(objects)
69
- end
70
-
71
- # Return objects.
72
- #
73
- objects
74
-
75
- else
76
- raise "#{profile} is not a valid profile"
77
- end
78
-
79
- end
15
+ alias :construct :create
80
16
 
81
17
  end
82
18
  end
@@ -0,0 +1,23 @@
1
+ # encoding: UTF-8
2
+
3
+ module Watchmaker
4
+ module Integrations
5
+ extend ActiveSupport::Concern
6
+
7
+ module ClassMethods
8
+
9
+ # Construct from a factory.
10
+ #
11
+ def from_factory(factory, method = :create)
12
+ Factory.send(method, factory.to_sym)
13
+ end
14
+
15
+ # Construct from another watchmaker.
16
+ #
17
+ def from_watchmaker(watchmaker, method = :construct)
18
+ self.send(method, watchmaker.to_sym)
19
+ end
20
+
21
+ end
22
+ end
23
+ end
@@ -8,7 +8,7 @@ module Watchmaker
8
8
 
9
9
  # Learn a profile by taking explicit dependencies.
10
10
  #
11
- def learn(name, dependencies = {}, &block)
11
+ def define(name, dependencies = {}, &block)
12
12
 
13
13
  if name.is_a?(Hash)
14
14
 
@@ -28,6 +28,8 @@ module Watchmaker
28
28
  Configuration.learn(name, dependencies, &block)
29
29
  end
30
30
 
31
+ alias :learn :define
32
+
31
33
  # Get the profile name out of a dependency hash.
32
34
  #
33
35
  def name_and_dependencies_from_dependency_hash(dependencies)
@@ -0,0 +1,72 @@
1
+ # encoding: UTF-8
2
+
3
+ module Watchmaker
4
+ module Manufacturer
5
+ extend ActiveSupport::Concern
6
+
7
+ module ClassMethods
8
+
9
+ # Create objects, by a specific means, either in memory or in the
10
+ # database.
11
+ #
12
+ def manufacture(profile, method)
13
+
14
+ # Store created objects.
15
+ #
16
+ objects = []
17
+
18
+ # If a profile exists, call the proc we've stored; if not, raise.
19
+ #
20
+ if selected_profile = Configuration.learned(profile)
21
+
22
+ if dependencies = selected_profile[:dependencies]
23
+
24
+ # For any abstract dependencies, infer how to create them.
25
+ #
26
+ if abstracts = dependencies[:abstract]
27
+ abstracts.each do |abstract|
28
+ if Configuration.learned?(abstract)
29
+ objects << from_watchmaker(abstract, method)
30
+ else
31
+ objects << from_factory(abstract, method)
32
+ end
33
+ end
34
+ end
35
+
36
+ # For any supplied factories, create them.
37
+ #
38
+ if factories = dependencies[:factories]
39
+ factories.each do |factory|
40
+ objects << from_factory(factory, method)
41
+ end
42
+ end
43
+
44
+ # For any supplied watchmakers, create them.
45
+ #
46
+ if watchmakers = dependencies[:watchmakers]
47
+ watchmakers.each do |watchmaker|
48
+ objects << from_watchmaker(watchmaker, method)
49
+ end
50
+ end
51
+
52
+ end
53
+
54
+ # Run the supplied block.
55
+ #
56
+ if block = selected_profile[:block]
57
+ objects << block.call(objects)
58
+ end
59
+
60
+ # Return objects.
61
+ #
62
+ objects
63
+
64
+ else
65
+ raise "#{profile} is not a valid profile"
66
+ end
67
+
68
+ end
69
+
70
+ end
71
+ end
72
+ end
@@ -1,5 +1,5 @@
1
1
  # encoding: UTF-8
2
2
 
3
3
  module Watchmaker # :nodoc:
4
- VERSION = "0.1.2"
4
+ VERSION = "0.2.0"
5
5
  end
@@ -3,45 +3,68 @@
3
3
  require 'spec_helper'
4
4
 
5
5
  describe Garage do
6
- it "should create some garages from the lambda based watchmaker" do
7
- Watchmaker.construct(:two_garages)
8
- Garage.all.count.should == 2
9
- end
10
6
 
11
- it "should the result of the lambda evaluation when constructing that way" do
12
- Watchmaker.construct(:two_cars).first.should == 2
13
- Car.all.count.should == 2
7
+ describe "when using the builder" do
8
+ it "should build some garages from the lambda based watchmaker" do
9
+ Watchmaker.build(:two_garages).count.should == 2
10
+ Garage.all.count.should == 0
11
+ end
14
12
  end
15
13
 
16
- it "should create a garage from the factory based watchmaker" do
17
- Watchmaker.construct(:garage)
18
- Garage.all.count.should == 1
19
- end
14
+ describe "when using the creator" do
15
+ it "should create some garages from the lambda based watchmaker" do
16
+ Watchmaker.create(:two_garages)
17
+ Garage.all.count.should == 2
18
+ end
20
19
 
21
- it "return the objects created from a watchmaker" do
22
- Watchmaker.construct(:garage).first.should == Garage.first
23
- end
20
+ it "should the result of the lambda evaluation when constructing that way" do
21
+ Watchmaker.create(:two_cars).first.should == 2
22
+ Car.all.count.should == 2
23
+ end
24
24
 
25
- it "should create a garage and it's from the factory based watchmaker" do
26
- Watchmaker.construct(:car_in_garage).map do |o|
27
- o.class.to_s
28
- end.should == ["Garage", "Car", "Array"]
25
+ it "should create a garage from the factory based watchmaker" do
26
+ Watchmaker.create(:garage)
27
+ Garage.all.count.should == 1
28
+ end
29
29
 
30
- Car.all.count.should == 1
31
- Garage.all.count.should == 1
32
- Garage.first.cars.should include(Car.first)
33
- end
30
+ it "return the objects created from a watchmaker" do
31
+ Watchmaker.create(:garage).first.should == Garage.first
32
+ end
33
+
34
+ it "should create a garage and it's from the factory based watchmaker" do
35
+ Watchmaker.create(:car_in_garage).map do |o|
36
+ o.class.to_s
37
+ end.should == ["Garage", "Car", "Array"]
34
38
 
35
- it "should create a car from the watchmaker based watchmaker" do
36
- Watchmaker.construct(:car_with_garage).first.should be_a_kind_of Car
37
- Car.all.count.should == 1
38
- Garage.all.count.should == 1
39
+ Car.all.count.should == 1
40
+ Garage.all.count.should == 1
41
+ Garage.first.cars.should include(Car.first)
42
+ end
43
+
44
+ it "should create a car from the watchmaker based watchmaker" do
45
+ Watchmaker.create(:car_with_garage).first.should be_a_kind_of Car
46
+ Car.all.count.should == 1
47
+ Garage.all.count.should == 1
48
+ end
49
+
50
+ it "should be able to use the new syntax to build based on factories or watchmakers" do
51
+ Watchmaker.create(:two_cars_and_two_garages)
52
+ Garage.all.count.should == 2
53
+ Car.all.count.should == 2
54
+ Garage.last.cars.count.should == 2
55
+ end
39
56
  end
40
57
 
41
- it "should be able to use the new syntax to build based on factories or watchmakers" do
42
- Watchmaker.construct(:two_cars_and_two_garages)
43
- Garage.all.count.should == 2
44
- Car.all.count.should == 2
45
- Garage.last.cars.count.should == 2
58
+ describe "when using the legacy syntax" do
59
+ it "should build some garages from the lambda based watchmaker" do
60
+ Watchmaker.assemble(:two_garages).count.should == 2
61
+ Garage.all.count.should == 0
62
+ end
63
+
64
+ it "should create some garages from the lambda based watchmaker" do
65
+ Watchmaker.construct(:two_garages)
66
+ Garage.all.count.should == 2
67
+ end
46
68
  end
69
+
47
70
  end
@@ -12,17 +12,17 @@ Watchmaker.learn :two_cars do
12
12
  end
13
13
  end
14
14
 
15
- Watchmaker.learn :garage, :factories => [:garage]
15
+ Watchmaker.define :garage, :factories => [:garage]
16
16
 
17
- Watchmaker.learn :car_with_garage, :factories => [:car], :watchmakers => [:garage]
17
+ Watchmaker.define :car_with_garage, :factories => [:car], :watchmakers => [:garage]
18
18
 
19
- Watchmaker.learn :car_in_garage, :factories => [:garage, :car] do |garage, car|
19
+ Watchmaker.define :car_in_garage, :factories => [:garage, :car] do |garage, car|
20
20
  garage.cars << car
21
21
  end
22
22
 
23
- Watchmaker.learn :two_garages, :factories => [:garage, :garage]
23
+ Watchmaker.define :two_garages, :factories => [:garage, :garage]
24
24
 
25
- Watchmaker.learn :two_cars_and_two_garages => [:two_garages, :car, :car] do |garages, car1, car2|
25
+ Watchmaker.define :two_cars_and_two_garages => [:two_garages, :car, :car] do |garages, car1, car2|
26
26
  garages.each do |garage|
27
27
  garage.cars << car1
28
28
  garage.cars << car2
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watchmaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &7550660 !ruby/object:Gem::Requirement
17
+ requirement: &20782820 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '3.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *7550660
25
+ version_requirements: *20782820
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: factory_girl
28
- requirement: &7550080 !ruby/object:Gem::Requirement
28
+ requirement: &20781980 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *7550080
36
+ version_requirements: *20781980
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: factory_girl_rails
39
- requirement: &7546220 !ruby/object:Gem::Requirement
39
+ requirement: &20781180 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *7546220
47
+ version_requirements: *20781180
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: bundler
50
- requirement: &7544340 !ruby/object:Gem::Requirement
50
+ requirement: &20780160 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.0.15
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *7544340
58
+ version_requirements: *20780160
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: rspec
61
- requirement: &7543720 !ruby/object:Gem::Requirement
61
+ requirement: &20769240 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *7543720
69
+ version_requirements: *20769240
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rspec-rails
72
- requirement: &7543080 !ruby/object:Gem::Requirement
72
+ requirement: &20767800 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *7543080
80
+ version_requirements: *20767800
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: sqlite3
83
- requirement: &7542240 !ruby/object:Gem::Requirement
83
+ requirement: &20766440 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *7542240
91
+ version_requirements: *20766440
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: mocha
94
- requirement: &7541520 !ruby/object:Gem::Requirement
94
+ requirement: &20765820 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *7541520
102
+ version_requirements: *20765820
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: appraisal
105
- requirement: &7540740 !ruby/object:Gem::Requirement
105
+ requirement: &20765000 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ~>
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: 0.3.5
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *7540740
113
+ version_requirements: *20765000
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: horo
116
- requirement: &7540060 !ruby/object:Gem::Requirement
116
+ requirement: &20764480 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: '0'
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *7540060
124
+ version_requirements: *20764480
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov
127
- requirement: &7539460 !ruby/object:Gem::Requirement
127
+ requirement: &20763900 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *7539460
135
+ version_requirements: *20763900
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: diesel
138
- requirement: &7536500 !ruby/object:Gem::Requirement
138
+ requirement: &20763300 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ! '>='
@@ -143,10 +143,10 @@ dependencies:
143
143
  version: '0'
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *7536500
146
+ version_requirements: *20763300
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: guard
149
- requirement: &7535880 !ruby/object:Gem::Requirement
149
+ requirement: &20762780 !ruby/object:Gem::Requirement
150
150
  none: false
151
151
  requirements:
152
152
  - - ! '>='
@@ -154,10 +154,10 @@ dependencies:
154
154
  version: '0'
155
155
  type: :development
156
156
  prerelease: false
157
- version_requirements: *7535880
157
+ version_requirements: *20762780
158
158
  - !ruby/object:Gem::Dependency
159
159
  name: guard-rspec
160
- requirement: &7535180 !ruby/object:Gem::Requirement
160
+ requirement: &20762200 !ruby/object:Gem::Requirement
161
161
  none: false
162
162
  requirements:
163
163
  - - ! '>='
@@ -165,10 +165,10 @@ dependencies:
165
165
  version: '0'
166
166
  type: :development
167
167
  prerelease: false
168
- version_requirements: *7535180
168
+ version_requirements: *20762200
169
169
  - !ruby/object:Gem::Dependency
170
170
  name: rb-inotify
171
- requirement: &7534560 !ruby/object:Gem::Requirement
171
+ requirement: &20738200 !ruby/object:Gem::Requirement
172
172
  none: false
173
173
  requirements:
174
174
  - - ! '>='
@@ -176,10 +176,10 @@ dependencies:
176
176
  version: '0'
177
177
  type: :development
178
178
  prerelease: false
179
- version_requirements: *7534560
179
+ version_requirements: *20738200
180
180
  - !ruby/object:Gem::Dependency
181
181
  name: libnotify
182
- requirement: &7533880 !ruby/object:Gem::Requirement
182
+ requirement: &20737680 !ruby/object:Gem::Requirement
183
183
  none: false
184
184
  requirements:
185
185
  - - ! '>='
@@ -187,7 +187,7 @@ dependencies:
187
187
  version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
- version_requirements: *7533880
190
+ version_requirements: *20737680
191
191
  description: Build complex objects easily for use in integration tests.
192
192
  email:
193
193
  - christopher.meiklejohn@gmail.com
@@ -210,14 +210,15 @@ files:
210
210
  - gemfiles/rails-3.0.9.gemfile.lock
211
211
  - gemfiles/rails-3.1.0.gemfile
212
212
  - gemfiles/rails-3.1.0.gemfile.lock
213
- - gemfiles/rails-3.1.0.rc5.gemfile
214
- - gemfiles/rails-3.1.0.rc5.gemfile.lock
215
213
  - gemfiles/rails-master.gemfile
216
214
  - gemfiles/rails-master.gemfile.lock
217
215
  - lib/watchmaker.rb
216
+ - lib/watchmaker/assembler.rb
218
217
  - lib/watchmaker/configuration.rb
219
218
  - lib/watchmaker/constructor.rb
219
+ - lib/watchmaker/integrations.rb
220
220
  - lib/watchmaker/learner.rb
221
+ - lib/watchmaker/manufacturer.rb
221
222
  - lib/watchmaker/version.rb
222
223
  - spec/database.yml
223
224
  - spec/models/garage_spec.rb
@@ -241,7 +242,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
242
  version: '0'
242
243
  segments:
243
244
  - 0
244
- hash: -4360902260318122818
245
+ hash: -3091043332297961962
245
246
  required_rubygems_version: !ruby/object:Gem::Requirement
246
247
  none: false
247
248
  requirements:
@@ -250,7 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
250
251
  version: '0'
251
252
  segments:
252
253
  - 0
253
- hash: -4360902260318122818
254
+ hash: -3091043332297961962
254
255
  requirements: []
255
256
  rubyforge_project: watchmaker
256
257
  rubygems_version: 1.6.2
@@ -1,7 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "http://rubygems.org"
4
-
5
- gem "rails", "3.1.0.rc5"
6
-
7
- gemspec :path=>"../"
@@ -1,150 +0,0 @@
1
- PATH
2
- remote: /home/cmeiklejohn/Repositories/watchmaker
3
- specs:
4
- watchmaker (0.1.1)
5
- factory_girl
6
- factory_girl_rails
7
- rails (~> 3.0)
8
-
9
- GEM
10
- remote: http://rubygems.org/
11
- specs:
12
- ZenTest (4.6.0)
13
- actionmailer (3.1.0.rc5)
14
- actionpack (= 3.1.0.rc5)
15
- mail (~> 2.3.0)
16
- actionpack (3.1.0.rc5)
17
- activemodel (= 3.1.0.rc5)
18
- activesupport (= 3.1.0.rc5)
19
- builder (~> 3.0.0)
20
- erubis (~> 2.7.0)
21
- i18n (~> 0.6)
22
- rack (~> 1.3.1)
23
- rack-cache (~> 1.0.2)
24
- rack-mount (~> 0.8.1)
25
- rack-test (~> 0.6.0)
26
- sprockets (~> 2.0.0.beta.12)
27
- activemodel (3.1.0.rc5)
28
- activesupport (= 3.1.0.rc5)
29
- bcrypt-ruby (~> 2.1.4)
30
- builder (~> 3.0.0)
31
- i18n (~> 0.6)
32
- activerecord (3.1.0.rc5)
33
- activemodel (= 3.1.0.rc5)
34
- activesupport (= 3.1.0.rc5)
35
- arel (~> 2.1.4)
36
- tzinfo (~> 0.3.29)
37
- activeresource (3.1.0.rc5)
38
- activemodel (= 3.1.0.rc5)
39
- activesupport (= 3.1.0.rc5)
40
- activesupport (3.1.0.rc5)
41
- multi_json (~> 1.0)
42
- appraisal (0.3.8)
43
- bundler
44
- rake
45
- arel (2.1.4)
46
- bcrypt-ruby (2.1.4)
47
- builder (3.0.0)
48
- diesel (0.1.5)
49
- railties
50
- diff-lcs (1.1.2)
51
- erubis (2.7.0)
52
- factory_girl (2.0.3)
53
- factory_girl_rails (1.1.0)
54
- factory_girl (~> 2.0.0)
55
- railties (>= 3.0.0)
56
- ffi (1.0.9)
57
- guard (0.5.1)
58
- thor (~> 0.14.6)
59
- guard-rspec (0.4.1)
60
- guard (>= 0.4.0)
61
- hike (1.2.0)
62
- horo (1.0.3)
63
- rdoc (>= 2.5)
64
- i18n (0.6.0)
65
- libnotify (0.5.7)
66
- ffi (= 1.0.9)
67
- mail (2.3.0)
68
- i18n (>= 0.4.0)
69
- mime-types (~> 1.16)
70
- treetop (~> 1.4.8)
71
- mime-types (1.16)
72
- mocha (0.9.12)
73
- multi_json (1.0.3)
74
- polyglot (0.3.2)
75
- rack (1.3.2)
76
- rack-cache (1.0.2)
77
- rack (>= 0.4)
78
- rack-mount (0.8.2)
79
- rack (>= 1.0.0)
80
- rack-ssl (1.3.2)
81
- rack
82
- rack-test (0.6.1)
83
- rack (>= 1.0)
84
- rails (3.1.0.rc5)
85
- actionmailer (= 3.1.0.rc5)
86
- actionpack (= 3.1.0.rc5)
87
- activerecord (= 3.1.0.rc5)
88
- activeresource (= 3.1.0.rc5)
89
- activesupport (= 3.1.0.rc5)
90
- bundler (~> 1.0)
91
- railties (= 3.1.0.rc5)
92
- railties (3.1.0.rc5)
93
- actionpack (= 3.1.0.rc5)
94
- activesupport (= 3.1.0.rc5)
95
- rack-ssl (~> 1.3.2)
96
- rake (>= 0.8.7)
97
- rdoc (~> 3.4)
98
- thor (~> 0.14.6)
99
- rake (0.9.2)
100
- rb-inotify (0.8.6)
101
- ffi (>= 0.5.0)
102
- rdoc (3.9.2)
103
- rspec (2.6.0)
104
- rspec-core (~> 2.6.0)
105
- rspec-expectations (~> 2.6.0)
106
- rspec-mocks (~> 2.6.0)
107
- rspec-core (2.6.4)
108
- rspec-expectations (2.6.0)
109
- diff-lcs (~> 1.1.2)
110
- rspec-mocks (2.6.0)
111
- rspec-rails (2.6.1)
112
- actionpack (~> 3.0)
113
- activesupport (~> 3.0)
114
- railties (~> 3.0)
115
- rspec (~> 2.6.0)
116
- simplecov (0.4.2)
117
- simplecov-html (~> 0.4.4)
118
- simplecov-html (0.4.5)
119
- sprockets (2.0.0.beta.13)
120
- hike (~> 1.2)
121
- rack (~> 1.0)
122
- tilt (!= 1.3.0, ~> 1.1)
123
- sqlite3 (1.3.4)
124
- thor (0.14.6)
125
- tilt (1.3.2)
126
- treetop (1.4.10)
127
- polyglot
128
- polyglot (>= 0.3.1)
129
- tzinfo (0.3.29)
130
-
131
- PLATFORMS
132
- ruby
133
-
134
- DEPENDENCIES
135
- ZenTest
136
- appraisal (~> 0.3.5)
137
- bundler (~> 1.0.15)
138
- diesel
139
- guard
140
- guard-rspec
141
- horo
142
- libnotify
143
- mocha
144
- rails (= 3.1.0.rc5)
145
- rb-inotify
146
- rspec
147
- rspec-rails
148
- simplecov
149
- sqlite3
150
- watchmaker!