machinery 0.9.3 → 0.9.4
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/MIT-LICENSE +1 -1
- data/README.markdown +1 -1
- data/lib/machinery/active_record.rb +7 -5
- data/lib/machinery.rb +4 -1
- metadata +17 -5
data/MIT-LICENSE
CHANGED
data/README.markdown
CHANGED
@@ -10,11 +10,13 @@ module Machinery
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.clear
|
13
|
-
@@toys.each do |toy|
|
14
|
-
toy.
|
15
|
-
|
16
|
-
|
17
|
-
"#{
|
13
|
+
@@toys.each do |toy|
|
14
|
+
clazz = toy.class
|
15
|
+
conn = toy.connection
|
16
|
+
conn.delete(
|
17
|
+
"DELETE FROM #{clazz.quoted_table_name} " +
|
18
|
+
"WHERE #{conn.quote_column_name(clazz.primary_key)} = #{toy.quoted_id}",
|
19
|
+
"#{clazz.name} Destroy"
|
18
20
|
)
|
19
21
|
end
|
20
22
|
@@toys = []
|
data/lib/machinery.rb
CHANGED
@@ -73,7 +73,10 @@ if defined? Test::Unit::TestCase
|
|
73
73
|
Test::Unit::TestCase.send('include', Machinery::Helpers)
|
74
74
|
end
|
75
75
|
|
76
|
-
if defined?
|
76
|
+
if defined? RSpec
|
77
|
+
RSpec.configure { |c| c.include Machinery::Helpers }
|
78
|
+
RSpec::Core::ExampleGroup.extend Machinery::ExampleGroupMacros
|
79
|
+
elsif defined? Spec::Example::ExampleGroup
|
77
80
|
Spec::Example::ExampleGroup.extend Machinery::ExampleGroupMacros
|
78
81
|
Spec::Example::ExampleGroupFactory[nil].send('include', Machinery::Helpers)
|
79
82
|
end
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: machinery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 51
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 9
|
9
|
+
- 4
|
10
|
+
version: 0.9.4
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- Lawrence Pit
|
@@ -9,7 +15,7 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2011-03-16 00:00:00 +11:00
|
13
19
|
default_executable:
|
14
20
|
dependencies: []
|
15
21
|
|
@@ -36,21 +42,27 @@ rdoc_options: []
|
|
36
42
|
require_paths:
|
37
43
|
- lib
|
38
44
|
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
none: false
|
39
46
|
requirements:
|
40
47
|
- - ">="
|
41
48
|
- !ruby/object:Gem::Version
|
49
|
+
hash: 3
|
50
|
+
segments:
|
51
|
+
- 0
|
42
52
|
version: "0"
|
43
|
-
version:
|
44
53
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
45
55
|
requirements:
|
46
56
|
- - ">="
|
47
57
|
- !ruby/object:Gem::Version
|
58
|
+
hash: 3
|
59
|
+
segments:
|
60
|
+
- 0
|
48
61
|
version: "0"
|
49
|
-
version:
|
50
62
|
requirements: []
|
51
63
|
|
52
64
|
rubyforge_project:
|
53
|
-
rubygems_version: 1.
|
65
|
+
rubygems_version: 1.5.2
|
54
66
|
signing_key:
|
55
67
|
specification_version: 3
|
56
68
|
summary: Machinery to create object graphs and speed up tests. No fixtures, no funny magic, just easy and fast plain old ruby.
|