watchmaker 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Guardfile +3 -14
- data/LICENSE +1 -1
- data/README.rdoc +8 -0
- data/gemfiles/rails-3.0.9.gemfile.lock +7 -2
- data/gemfiles/rails-3.1.0.rc5.gemfile.lock +7 -2
- data/gemfiles/rails-master.gemfile.lock +7 -2
- data/lib/watchmaker.rb +5 -70
- data/lib/watchmaker/configuration.rb +46 -0
- data/lib/watchmaker/constructor.rb +83 -0
- data/lib/watchmaker/learner.rb +40 -0
- data/lib/watchmaker/version.rb +1 -1
- data/spec/models/garage_spec.rb +18 -4
- data/spec/spec_helper.rb +8 -4
- data/spec/support/watchmakers.rb +16 -1
- data/watchmaker.gemspec +6 -2
- metadata +58 -46
data/Guardfile
CHANGED
@@ -3,19 +3,8 @@
|
|
3
3
|
|
4
4
|
guard 'rspec', :version => 2 do
|
5
5
|
watch(%r{^spec/.+_spec\.rb$})
|
6
|
-
watch(%r{^lib/(.+)\.rb$})
|
7
|
-
watch(
|
8
|
-
|
9
|
-
# Rails example
|
10
|
-
watch(%r{^spec/.+_spec\.rb$})
|
11
|
-
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
12
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
13
|
-
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
|
14
|
-
watch(%r{^spec/support/(.+)\.rb$}) { "spec/" }
|
15
|
-
watch('spec/spec_helper.rb') { "spec/" }
|
16
|
-
watch('config/routes.rb') { "spec/routing" }
|
17
|
-
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
18
|
-
# Capybara request specs
|
19
|
-
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { "spec/" }
|
7
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec/" }
|
8
|
+
watch('spec/spec_helper.rb') { "spec/" }
|
20
9
|
end
|
21
10
|
|
data/LICENSE
CHANGED
data/README.rdoc
CHANGED
@@ -19,6 +19,14 @@ objects are meant for integration tests where persistence is required.
|
|
19
19
|
|
20
20
|
=== Learn profiles
|
21
21
|
|
22
|
+
==== Implicit profiles
|
23
|
+
|
24
|
+
Specify a dependency hash of profile name to objects. The watchmaker
|
25
|
+
will either yield another watchmaker or a factory when resolving those
|
26
|
+
dependencies.
|
27
|
+
|
28
|
+
Watchmaker.learn :lots_of_things => [:car, :garage, :boat]
|
29
|
+
|
22
30
|
==== Lambda-based profiles
|
23
31
|
|
24
32
|
When called, will call the lambda.
|
@@ -51,6 +51,7 @@ GEM
|
|
51
51
|
factory_girl_rails (1.1.0)
|
52
52
|
factory_girl (~> 2.0.0)
|
53
53
|
railties (>= 3.0.0)
|
54
|
+
ffi (1.0.9)
|
54
55
|
guard (0.5.1)
|
55
56
|
thor (~> 0.14.6)
|
56
57
|
guard-rspec (0.4.1)
|
@@ -58,6 +59,8 @@ GEM
|
|
58
59
|
horo (1.0.3)
|
59
60
|
rdoc (>= 2.5)
|
60
61
|
i18n (0.5.0)
|
62
|
+
libnotify (0.5.7)
|
63
|
+
ffi (= 1.0.9)
|
61
64
|
mail (2.2.19)
|
62
65
|
activesupport (>= 2.3.6)
|
63
66
|
i18n (>= 0.4.0)
|
@@ -86,6 +89,8 @@ GEM
|
|
86
89
|
rdoc (~> 3.4)
|
87
90
|
thor (~> 0.14.4)
|
88
91
|
rake (0.9.2)
|
92
|
+
rb-inotify (0.8.6)
|
93
|
+
ffi (>= 0.5.0)
|
89
94
|
rdoc (3.9.2)
|
90
95
|
rspec (2.6.0)
|
91
96
|
rspec-core (~> 2.6.0)
|
@@ -105,7 +110,6 @@ GEM
|
|
105
110
|
simplecov-html (0.4.5)
|
106
111
|
sqlite3 (1.3.4)
|
107
112
|
thor (0.14.6)
|
108
|
-
timecop (0.3.5)
|
109
113
|
treetop (1.4.10)
|
110
114
|
polyglot
|
111
115
|
polyglot (>= 0.3.1)
|
@@ -122,11 +126,12 @@ DEPENDENCIES
|
|
122
126
|
guard
|
123
127
|
guard-rspec
|
124
128
|
horo
|
129
|
+
libnotify
|
125
130
|
mocha
|
126
131
|
rails (= 3.0.9)
|
132
|
+
rb-inotify
|
127
133
|
rspec
|
128
134
|
rspec-rails
|
129
135
|
simplecov
|
130
136
|
sqlite3
|
131
|
-
timecop
|
132
137
|
watchmaker!
|
@@ -53,6 +53,7 @@ GEM
|
|
53
53
|
factory_girl_rails (1.1.0)
|
54
54
|
factory_girl (~> 2.0.0)
|
55
55
|
railties (>= 3.0.0)
|
56
|
+
ffi (1.0.9)
|
56
57
|
guard (0.5.1)
|
57
58
|
thor (~> 0.14.6)
|
58
59
|
guard-rspec (0.4.1)
|
@@ -61,6 +62,8 @@ GEM
|
|
61
62
|
horo (1.0.3)
|
62
63
|
rdoc (>= 2.5)
|
63
64
|
i18n (0.6.0)
|
65
|
+
libnotify (0.5.7)
|
66
|
+
ffi (= 1.0.9)
|
64
67
|
mail (2.3.0)
|
65
68
|
i18n (>= 0.4.0)
|
66
69
|
mime-types (~> 1.16)
|
@@ -94,6 +97,8 @@ GEM
|
|
94
97
|
rdoc (~> 3.4)
|
95
98
|
thor (~> 0.14.6)
|
96
99
|
rake (0.9.2)
|
100
|
+
rb-inotify (0.8.6)
|
101
|
+
ffi (>= 0.5.0)
|
97
102
|
rdoc (3.9.2)
|
98
103
|
rspec (2.6.0)
|
99
104
|
rspec-core (~> 2.6.0)
|
@@ -118,7 +123,6 @@ GEM
|
|
118
123
|
sqlite3 (1.3.4)
|
119
124
|
thor (0.14.6)
|
120
125
|
tilt (1.3.2)
|
121
|
-
timecop (0.3.5)
|
122
126
|
treetop (1.4.10)
|
123
127
|
polyglot
|
124
128
|
polyglot (>= 0.3.1)
|
@@ -135,11 +139,12 @@ DEPENDENCIES
|
|
135
139
|
guard
|
136
140
|
guard-rspec
|
137
141
|
horo
|
142
|
+
libnotify
|
138
143
|
mocha
|
139
144
|
rails (= 3.1.0.rc5)
|
145
|
+
rb-inotify
|
140
146
|
rspec
|
141
147
|
rspec-rails
|
142
148
|
simplecov
|
143
149
|
sqlite3
|
144
|
-
timecop
|
145
150
|
watchmaker!
|
@@ -74,6 +74,7 @@ GEM
|
|
74
74
|
factory_girl_rails (1.1.0)
|
75
75
|
factory_girl (~> 2.0.0)
|
76
76
|
railties (>= 3.0.0)
|
77
|
+
ffi (1.0.9)
|
77
78
|
guard (0.5.1)
|
78
79
|
thor (~> 0.14.6)
|
79
80
|
guard-rspec (0.4.1)
|
@@ -82,6 +83,8 @@ GEM
|
|
82
83
|
horo (1.0.3)
|
83
84
|
rdoc (>= 2.5)
|
84
85
|
i18n (0.6.0)
|
86
|
+
libnotify (0.5.7)
|
87
|
+
ffi (= 1.0.9)
|
85
88
|
mail (2.3.0)
|
86
89
|
i18n (>= 0.4.0)
|
87
90
|
mime-types (~> 1.16)
|
@@ -100,6 +103,8 @@ GEM
|
|
100
103
|
rack-test (0.6.1)
|
101
104
|
rack (>= 1.0)
|
102
105
|
rake (0.9.2)
|
106
|
+
rb-inotify (0.8.6)
|
107
|
+
ffi (>= 0.5.0)
|
103
108
|
rdoc (3.9.2)
|
104
109
|
rspec (2.6.0)
|
105
110
|
rspec-core (~> 2.6.0)
|
@@ -124,7 +129,6 @@ GEM
|
|
124
129
|
sqlite3 (1.3.4)
|
125
130
|
thor (0.14.6)
|
126
131
|
tilt (1.3.2)
|
127
|
-
timecop (0.3.5)
|
128
132
|
treetop (1.4.10)
|
129
133
|
polyglot
|
130
134
|
polyglot (>= 0.3.1)
|
@@ -141,11 +145,12 @@ DEPENDENCIES
|
|
141
145
|
guard
|
142
146
|
guard-rspec
|
143
147
|
horo
|
148
|
+
libnotify
|
144
149
|
mocha
|
145
150
|
rails!
|
151
|
+
rb-inotify
|
146
152
|
rspec
|
147
153
|
rspec-rails
|
148
154
|
simplecov
|
149
155
|
sqlite3
|
150
|
-
timecop
|
151
156
|
watchmaker!
|
data/lib/watchmaker.rb
CHANGED
@@ -1,76 +1,11 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
|
3
3
|
require "watchmaker/version"
|
4
|
+
require "watchmaker/configuration"
|
5
|
+
require "watchmaker/learner"
|
6
|
+
require "watchmaker/constructor"
|
4
7
|
|
5
8
|
module Watchmaker # :nodoc:
|
6
|
-
|
7
|
-
|
8
|
-
#
|
9
|
-
mattr_accessor :profiles
|
10
|
-
|
11
|
-
# Learn a new profile.
|
12
|
-
#
|
13
|
-
def self.learn(profile, options = {}, &block)
|
14
|
-
|
15
|
-
# Initialize the profiles unless they exist.
|
16
|
-
#
|
17
|
-
@@profiles = {} unless @@profiles
|
18
|
-
|
19
|
-
# Add the block to the list of known profiles.
|
20
|
-
#
|
21
|
-
@@profiles[profile] = {
|
22
|
-
:options => options,
|
23
|
-
:block => block
|
24
|
-
}
|
25
|
-
|
26
|
-
end
|
27
|
-
|
28
|
-
# Contruct a profile based on lambda.
|
29
|
-
#
|
30
|
-
def self.construct(profile)
|
31
|
-
|
32
|
-
# Store created objects.
|
33
|
-
#
|
34
|
-
objects = []
|
35
|
-
|
36
|
-
# If a profile exists, call the proc we've stored; if not, raise.
|
37
|
-
#
|
38
|
-
if selected_profile = @@profiles[profile]
|
39
|
-
|
40
|
-
if options = selected_profile[:options]
|
41
|
-
|
42
|
-
# For any supplied factories, create them.
|
43
|
-
#
|
44
|
-
if factories = options[:factories]
|
45
|
-
factories.each do |factory|
|
46
|
-
objects << Factory.create(factory.to_sym)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
# For any supplied watchmakers, create them.
|
51
|
-
#
|
52
|
-
if watchmakers = options[:watchmakers]
|
53
|
-
watchmakers.each do |watchmaker|
|
54
|
-
objects << Watchmaker.construct(watchmaker.to_sym)
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
# Run the supplied block.
|
61
|
-
#
|
62
|
-
if block = selected_profile.delete(:block)
|
63
|
-
objects << block.call(objects)
|
64
|
-
end
|
65
|
-
|
66
|
-
# Return objects.
|
67
|
-
#
|
68
|
-
objects
|
69
|
-
|
70
|
-
else
|
71
|
-
raise "#{profile} is not a valid profile"
|
72
|
-
end
|
73
|
-
|
74
|
-
end
|
75
|
-
|
9
|
+
include Learner
|
10
|
+
include Constructor
|
76
11
|
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module Watchmaker # :nodoc:
|
4
|
+
|
5
|
+
# Singleton configuration class to hold all configured information.
|
6
|
+
#
|
7
|
+
class Configuration
|
8
|
+
|
9
|
+
include Singleton
|
10
|
+
|
11
|
+
# Store list of all profiles.
|
12
|
+
#
|
13
|
+
attr_accessor :profiles
|
14
|
+
|
15
|
+
# Initialize to an empty hash.
|
16
|
+
#
|
17
|
+
def initialize
|
18
|
+
@profiles = {}
|
19
|
+
end
|
20
|
+
|
21
|
+
def self.learn(name, dependencies, &block)
|
22
|
+
instance.learn(name, dependencies, &block)
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.learned(name)
|
26
|
+
instance.learned(name)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.learned?(name)
|
30
|
+
!!learned(name)
|
31
|
+
end
|
32
|
+
|
33
|
+
def learn(name, dependencies, &block) # :nodoc:
|
34
|
+
@profiles[name] = {
|
35
|
+
:dependencies => dependencies,
|
36
|
+
:block => block
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
def learned(name) # :nodoc:
|
41
|
+
@profiles[name]
|
42
|
+
end
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module Watchmaker
|
4
|
+
module Constructor
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
module ClassMethods
|
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.
|
16
|
+
#
|
17
|
+
def construct_from_watchmaker(watchmaker)
|
18
|
+
construct(watchmaker.to_sym)
|
19
|
+
end
|
20
|
+
|
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
|
80
|
+
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
module Watchmaker
|
4
|
+
module Learner
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
module ClassMethods
|
8
|
+
|
9
|
+
# Learn a profile by taking explicit dependencies.
|
10
|
+
#
|
11
|
+
def learn(name, dependencies = {}, &block)
|
12
|
+
|
13
|
+
if name.is_a?(Hash)
|
14
|
+
|
15
|
+
# Convert the hash into a profile name and a list of
|
16
|
+
# dependencies that's either a hash of nested classes or
|
17
|
+
# array.
|
18
|
+
#
|
19
|
+
name, dependencies =
|
20
|
+
name_and_dependencies_from_dependency_hash(name)
|
21
|
+
|
22
|
+
# Specifically store these as abstract dependencies.
|
23
|
+
#
|
24
|
+
dependencies = { :abstract => dependencies }
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
Configuration.learn(name, dependencies, &block)
|
29
|
+
end
|
30
|
+
|
31
|
+
# Get the profile name out of a dependency hash.
|
32
|
+
#
|
33
|
+
def name_and_dependencies_from_dependency_hash(dependencies)
|
34
|
+
name = dependencies.keys.first
|
35
|
+
[name, dependencies[name]]
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/watchmaker/version.rb
CHANGED
data/spec/models/garage_spec.rb
CHANGED
@@ -8,26 +8,40 @@ describe Garage do
|
|
8
8
|
Garage.all.count.should == 2
|
9
9
|
end
|
10
10
|
|
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
|
14
|
+
end
|
15
|
+
|
11
16
|
it "should create a garage from the factory based watchmaker" do
|
12
17
|
Watchmaker.construct(:garage)
|
13
18
|
Garage.all.count.should == 1
|
14
19
|
end
|
15
20
|
|
16
21
|
it "return the objects created from a watchmaker" do
|
17
|
-
Watchmaker.construct(:garage).first.should
|
18
|
-
Garage.all.count.should == 1
|
22
|
+
Watchmaker.construct(:garage).first.should == Garage.first
|
19
23
|
end
|
20
24
|
|
21
25
|
it "should create a garage and it's from the factory based watchmaker" do
|
22
|
-
Watchmaker.construct(:car_in_garage)
|
26
|
+
Watchmaker.construct(:car_in_garage).map do |o|
|
27
|
+
o.class.to_s
|
28
|
+
end.should == ["Garage", "Car", "Array"]
|
29
|
+
|
23
30
|
Car.all.count.should == 1
|
24
31
|
Garage.all.count.should == 1
|
25
32
|
Garage.first.cars.should include(Car.first)
|
26
33
|
end
|
27
34
|
|
28
35
|
it "should create a car from the watchmaker based watchmaker" do
|
29
|
-
Watchmaker.construct(:
|
36
|
+
Watchmaker.construct(:car_with_garage).first.should be_a_kind_of Car
|
30
37
|
Car.all.count.should == 1
|
31
38
|
Garage.all.count.should == 1
|
32
39
|
end
|
40
|
+
|
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
|
46
|
+
end
|
33
47
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -13,16 +13,20 @@ require 'diesel/testing'
|
|
13
13
|
require 'rspec/rails'
|
14
14
|
|
15
15
|
require 'factory_girl_rails'
|
16
|
-
require 'timecop'
|
17
16
|
|
18
17
|
require 'watchmaker'
|
19
18
|
|
20
|
-
|
21
|
-
|
19
|
+
if RUBY_VERSION > "1.9"
|
20
|
+
require 'simplecov'
|
21
|
+
SimpleCov.start
|
22
|
+
end
|
22
23
|
|
23
24
|
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
24
25
|
|
25
|
-
ActiveRecord::Base.establish_connection(
|
26
|
+
ActiveRecord::Base.establish_connection(
|
27
|
+
:adapter => "sqlite3",
|
28
|
+
:database => ":memory:"
|
29
|
+
)
|
26
30
|
|
27
31
|
ActiveRecord::Base.silence do
|
28
32
|
ActiveRecord::Migration.verbose = false
|
data/spec/support/watchmakers.rb
CHANGED
@@ -6,10 +6,25 @@ Watchmaker.learn :two_garages do
|
|
6
6
|
end
|
7
7
|
end
|
8
8
|
|
9
|
+
Watchmaker.learn :two_cars do
|
10
|
+
2.times do
|
11
|
+
Factory.create(:car)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
9
15
|
Watchmaker.learn :garage, :factories => [:garage]
|
10
16
|
|
11
|
-
Watchmaker.learn :
|
17
|
+
Watchmaker.learn :car_with_garage, :factories => [:car], :watchmakers => [:garage]
|
12
18
|
|
13
19
|
Watchmaker.learn :car_in_garage, :factories => [:garage, :car] do |garage, car|
|
14
20
|
garage.cars << car
|
15
21
|
end
|
22
|
+
|
23
|
+
Watchmaker.learn :two_garages, :factories => [:garage, :garage]
|
24
|
+
|
25
|
+
Watchmaker.learn :two_cars_and_two_garages => [:two_garages, :car, :car] do |garages, car1, car2|
|
26
|
+
garages.each do |garage|
|
27
|
+
garage.cars << car1
|
28
|
+
garage.cars << car2
|
29
|
+
end
|
30
|
+
end
|
data/watchmaker.gemspec
CHANGED
@@ -30,11 +30,15 @@ Gem::Specification.new do |s|
|
|
30
30
|
s.add_development_dependency('sqlite3')
|
31
31
|
s.add_development_dependency('mocha')
|
32
32
|
s.add_development_dependency('appraisal', '~> 0.3.5')
|
33
|
-
s.add_development_dependency('timecop')
|
34
33
|
s.add_development_dependency('horo')
|
35
34
|
s.add_development_dependency('simplecov')
|
36
35
|
s.add_development_dependency('diesel')
|
37
36
|
s.add_development_dependency('ZenTest')
|
38
37
|
s.add_development_dependency('guard')
|
39
|
-
s.add_development_dependency('guard-rspec')
|
38
|
+
s.add_development_dependency('guard-rspec')
|
39
|
+
|
40
|
+
if RUBY_PLATFORM =~ /linux/i
|
41
|
+
s.add_development_dependency('rb-inotify')
|
42
|
+
s.add_development_dependency('libnotify')
|
43
|
+
end
|
40
44
|
end
|
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.0
|
4
|
+
version: 0.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-08-
|
13
|
-
default_executable:
|
12
|
+
date: 2011-08-21 00:00:00.000000000Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rails
|
17
|
-
requirement: &
|
16
|
+
requirement: &9725140 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ~>
|
@@ -22,10 +21,10 @@ dependencies:
|
|
22
21
|
version: '3.0'
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *9725140
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
26
|
name: factory_girl
|
28
|
-
requirement: &
|
27
|
+
requirement: &9724420 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
@@ -33,10 +32,10 @@ dependencies:
|
|
33
32
|
version: '0'
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *9724420
|
37
36
|
- !ruby/object:Gem::Dependency
|
38
37
|
name: factory_girl_rails
|
39
|
-
requirement: &
|
38
|
+
requirement: &9723520 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ! '>='
|
@@ -44,10 +43,10 @@ dependencies:
|
|
44
43
|
version: '0'
|
45
44
|
type: :runtime
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
46
|
+
version_requirements: *9723520
|
48
47
|
- !ruby/object:Gem::Dependency
|
49
48
|
name: bundler
|
50
|
-
requirement: &
|
49
|
+
requirement: &9722740 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
51
|
requirements:
|
53
52
|
- - ~>
|
@@ -55,10 +54,10 @@ dependencies:
|
|
55
54
|
version: 1.0.15
|
56
55
|
type: :development
|
57
56
|
prerelease: false
|
58
|
-
version_requirements: *
|
57
|
+
version_requirements: *9722740
|
59
58
|
- !ruby/object:Gem::Dependency
|
60
59
|
name: rspec
|
61
|
-
requirement: &
|
60
|
+
requirement: &9722080 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
62
|
requirements:
|
64
63
|
- - ! '>='
|
@@ -66,10 +65,10 @@ dependencies:
|
|
66
65
|
version: '0'
|
67
66
|
type: :development
|
68
67
|
prerelease: false
|
69
|
-
version_requirements: *
|
68
|
+
version_requirements: *9722080
|
70
69
|
- !ruby/object:Gem::Dependency
|
71
70
|
name: rspec-rails
|
72
|
-
requirement: &
|
71
|
+
requirement: &9721340 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
73
|
requirements:
|
75
74
|
- - ! '>='
|
@@ -77,10 +76,10 @@ dependencies:
|
|
77
76
|
version: '0'
|
78
77
|
type: :development
|
79
78
|
prerelease: false
|
80
|
-
version_requirements: *
|
79
|
+
version_requirements: *9721340
|
81
80
|
- !ruby/object:Gem::Dependency
|
82
81
|
name: sqlite3
|
83
|
-
requirement: &
|
82
|
+
requirement: &9720740 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
84
|
requirements:
|
86
85
|
- - ! '>='
|
@@ -88,10 +87,10 @@ dependencies:
|
|
88
87
|
version: '0'
|
89
88
|
type: :development
|
90
89
|
prerelease: false
|
91
|
-
version_requirements: *
|
90
|
+
version_requirements: *9720740
|
92
91
|
- !ruby/object:Gem::Dependency
|
93
92
|
name: mocha
|
94
|
-
requirement: &
|
93
|
+
requirement: &9719920 !ruby/object:Gem::Requirement
|
95
94
|
none: false
|
96
95
|
requirements:
|
97
96
|
- - ! '>='
|
@@ -99,10 +98,10 @@ dependencies:
|
|
99
98
|
version: '0'
|
100
99
|
type: :development
|
101
100
|
prerelease: false
|
102
|
-
version_requirements: *
|
101
|
+
version_requirements: *9719920
|
103
102
|
- !ruby/object:Gem::Dependency
|
104
103
|
name: appraisal
|
105
|
-
requirement: &
|
104
|
+
requirement: &9719140 !ruby/object:Gem::Requirement
|
106
105
|
none: false
|
107
106
|
requirements:
|
108
107
|
- - ~>
|
@@ -110,10 +109,10 @@ dependencies:
|
|
110
109
|
version: 0.3.5
|
111
110
|
type: :development
|
112
111
|
prerelease: false
|
113
|
-
version_requirements: *
|
112
|
+
version_requirements: *9719140
|
114
113
|
- !ruby/object:Gem::Dependency
|
115
|
-
name:
|
116
|
-
requirement: &
|
114
|
+
name: horo
|
115
|
+
requirement: &9718420 !ruby/object:Gem::Requirement
|
117
116
|
none: false
|
118
117
|
requirements:
|
119
118
|
- - ! '>='
|
@@ -121,10 +120,10 @@ dependencies:
|
|
121
120
|
version: '0'
|
122
121
|
type: :development
|
123
122
|
prerelease: false
|
124
|
-
version_requirements: *
|
123
|
+
version_requirements: *9718420
|
125
124
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
127
|
-
requirement: &
|
125
|
+
name: simplecov
|
126
|
+
requirement: &9644280 !ruby/object:Gem::Requirement
|
128
127
|
none: false
|
129
128
|
requirements:
|
130
129
|
- - ! '>='
|
@@ -132,10 +131,10 @@ dependencies:
|
|
132
131
|
version: '0'
|
133
132
|
type: :development
|
134
133
|
prerelease: false
|
135
|
-
version_requirements: *
|
134
|
+
version_requirements: *9644280
|
136
135
|
- !ruby/object:Gem::Dependency
|
137
|
-
name:
|
138
|
-
requirement: &
|
136
|
+
name: diesel
|
137
|
+
requirement: &9643720 !ruby/object:Gem::Requirement
|
139
138
|
none: false
|
140
139
|
requirements:
|
141
140
|
- - ! '>='
|
@@ -143,10 +142,10 @@ dependencies:
|
|
143
142
|
version: '0'
|
144
143
|
type: :development
|
145
144
|
prerelease: false
|
146
|
-
version_requirements: *
|
145
|
+
version_requirements: *9643720
|
147
146
|
- !ruby/object:Gem::Dependency
|
148
|
-
name:
|
149
|
-
requirement: &
|
147
|
+
name: ZenTest
|
148
|
+
requirement: &9642480 !ruby/object:Gem::Requirement
|
150
149
|
none: false
|
151
150
|
requirements:
|
152
151
|
- - ! '>='
|
@@ -154,10 +153,10 @@ dependencies:
|
|
154
153
|
version: '0'
|
155
154
|
type: :development
|
156
155
|
prerelease: false
|
157
|
-
version_requirements: *
|
156
|
+
version_requirements: *9642480
|
158
157
|
- !ruby/object:Gem::Dependency
|
159
|
-
name:
|
160
|
-
requirement: &
|
158
|
+
name: guard
|
159
|
+
requirement: &9641860 !ruby/object:Gem::Requirement
|
161
160
|
none: false
|
162
161
|
requirements:
|
163
162
|
- - ! '>='
|
@@ -165,10 +164,10 @@ dependencies:
|
|
165
164
|
version: '0'
|
166
165
|
type: :development
|
167
166
|
prerelease: false
|
168
|
-
version_requirements: *
|
167
|
+
version_requirements: *9641860
|
169
168
|
- !ruby/object:Gem::Dependency
|
170
|
-
name: guard
|
171
|
-
requirement: &
|
169
|
+
name: guard-rspec
|
170
|
+
requirement: &9641260 !ruby/object:Gem::Requirement
|
172
171
|
none: false
|
173
172
|
requirements:
|
174
173
|
- - ! '>='
|
@@ -176,10 +175,21 @@ dependencies:
|
|
176
175
|
version: '0'
|
177
176
|
type: :development
|
178
177
|
prerelease: false
|
179
|
-
version_requirements: *
|
178
|
+
version_requirements: *9641260
|
180
179
|
- !ruby/object:Gem::Dependency
|
181
|
-
name:
|
182
|
-
requirement: &
|
180
|
+
name: rb-inotify
|
181
|
+
requirement: &9640760 !ruby/object:Gem::Requirement
|
182
|
+
none: false
|
183
|
+
requirements:
|
184
|
+
- - ! '>='
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
type: :development
|
188
|
+
prerelease: false
|
189
|
+
version_requirements: *9640760
|
190
|
+
- !ruby/object:Gem::Dependency
|
191
|
+
name: libnotify
|
192
|
+
requirement: &9640320 !ruby/object:Gem::Requirement
|
183
193
|
none: false
|
184
194
|
requirements:
|
185
195
|
- - ! '>='
|
@@ -187,7 +197,7 @@ dependencies:
|
|
187
197
|
version: '0'
|
188
198
|
type: :development
|
189
199
|
prerelease: false
|
190
|
-
version_requirements: *
|
200
|
+
version_requirements: *9640320
|
191
201
|
description: Build complex objects easily for use in integration tests.
|
192
202
|
email:
|
193
203
|
- christopher.meiklejohn@gmail.com
|
@@ -213,6 +223,9 @@ files:
|
|
213
223
|
- gemfiles/rails-master.gemfile
|
214
224
|
- gemfiles/rails-master.gemfile.lock
|
215
225
|
- lib/watchmaker.rb
|
226
|
+
- lib/watchmaker/configuration.rb
|
227
|
+
- lib/watchmaker/constructor.rb
|
228
|
+
- lib/watchmaker/learner.rb
|
216
229
|
- lib/watchmaker/version.rb
|
217
230
|
- spec/database.yml
|
218
231
|
- spec/models/garage_spec.rb
|
@@ -221,7 +234,6 @@ files:
|
|
221
234
|
- spec/support/models.rb
|
222
235
|
- spec/support/watchmakers.rb
|
223
236
|
- watchmaker.gemspec
|
224
|
-
has_rdoc: true
|
225
237
|
homepage: https://github.com/cmeiklejohn/watchmaker
|
226
238
|
licenses: []
|
227
239
|
post_install_message:
|
@@ -236,7 +248,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
236
248
|
version: '0'
|
237
249
|
segments:
|
238
250
|
- 0
|
239
|
-
hash:
|
251
|
+
hash: -449342221056611785
|
240
252
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
241
253
|
none: false
|
242
254
|
requirements:
|
@@ -245,10 +257,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
257
|
version: '0'
|
246
258
|
segments:
|
247
259
|
- 0
|
248
|
-
hash:
|
260
|
+
hash: -449342221056611785
|
249
261
|
requirements: []
|
250
262
|
rubyforge_project: watchmaker
|
251
|
-
rubygems_version: 1.6
|
263
|
+
rubygems_version: 1.8.6
|
252
264
|
signing_key:
|
253
265
|
specification_version: 3
|
254
266
|
summary: Build complex objects easily for use in integration tests.
|