genspec 0.2.0.prerails3.1 → 0.2.0.prerails3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/genspec.gemspec +7 -3
- data/lib/genspec/matchers.rb +1 -1
- data/lib/genspec/matchers/base.rb +1 -1
- data/lib/genspec/matchers/generation_method_matcher.rb +1 -1
- data/pkg/genspec-0.2.0.prerails3.1.gem +0 -0
- data/pkg/genspec-0.2.0.prerails3.2.gem +0 -0
- data/spec/generators/migration_spec.rb +8 -0
- data/spec/support/generators/my_migration/my_migration_generator.rb +11 -0
- metadata +8 -9
- data/pkg/genspec-0.2.0.pre1.gem +0 -0
data/Rakefile
CHANGED
@@ -42,7 +42,7 @@ begin
|
|
42
42
|
gem.homepage = "http://www.thoughtsincomputation.com"
|
43
43
|
gem.authors = ["Colin MacKenzie IV"]
|
44
44
|
gem.files = FileList['**/*']
|
45
|
-
gem.add_dependency "rspec", ">= 2.0.0.beta.14"
|
45
|
+
gem.add_dependency "rspec", ">= 2.0.0.beta.14"
|
46
46
|
gem.add_dependency "sc-core-ext", ">= 1.2.1"
|
47
47
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
48
48
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.0.prerails3.
|
1
|
+
0.2.0.prerails3.2
|
data/genspec.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{genspec}
|
8
|
-
s.version = "0.2.0.prerails3.
|
8
|
+
s.version = "0.2.0.prerails3.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Colin MacKenzie IV"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-08}
|
13
13
|
s.description = %q{Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.}
|
14
14
|
s.email = %q{sinisterchipmunk@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -32,13 +32,15 @@ Gem::Specification.new do |s|
|
|
32
32
|
"lib/genspec/matchers/result_matcher.rb",
|
33
33
|
"lib/genspec/shell.rb",
|
34
34
|
"pkg/genspec-0.1.1.gem",
|
35
|
-
"pkg/genspec-0.2.0.pre1.gem",
|
36
35
|
"pkg/genspec-0.2.0.prerails3.1.gem",
|
36
|
+
"pkg/genspec-0.2.0.prerails3.2.gem",
|
37
37
|
"spec/environment_spec.rb",
|
38
|
+
"spec/generators/migration_spec.rb",
|
38
39
|
"spec/generators/test_rails3_spec.rb",
|
39
40
|
"spec/rcov.opts",
|
40
41
|
"spec/rspec.opts",
|
41
42
|
"spec/spec_helper.rb",
|
43
|
+
"spec/support/generators/my_migration/my_migration_generator.rb",
|
42
44
|
"spec/support/generators/test_rails3/USAGE",
|
43
45
|
"spec/support/generators/test_rails3/templates/file",
|
44
46
|
"spec/support/generators/test_rails3/test_rails3_generator.rb"
|
@@ -50,8 +52,10 @@ Gem::Specification.new do |s|
|
|
50
52
|
s.summary = %q{Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.}
|
51
53
|
s.test_files = [
|
52
54
|
"spec/environment_spec.rb",
|
55
|
+
"spec/generators/migration_spec.rb",
|
53
56
|
"spec/generators/test_rails3_spec.rb",
|
54
57
|
"spec/spec_helper.rb",
|
58
|
+
"spec/support/generators/my_migration/my_migration_generator.rb",
|
55
59
|
"spec/support/generators/test_rails3/test_rails3_generator.rb"
|
56
60
|
]
|
57
61
|
|
data/lib/genspec/matchers.rb
CHANGED
@@ -19,7 +19,7 @@ module GenSpec
|
|
19
19
|
unless matcher = GenSpec::Matchers::GenerationMethodMatcher.for_method(kind, *args, &block)
|
20
20
|
raise "Could not find a matcher for '#{kind.inspect}'!\n\n" \
|
21
21
|
"If this is a custom action, try adding the Thor Action module to GenSpec:\n\n" \
|
22
|
-
"GenSpec::Matchers::GenerationMethodMatcher
|
22
|
+
"GenSpec::Matchers::GenerationMethodMatcher::GENERATION_CLASSES << 'My::Actions'"
|
23
23
|
end
|
24
24
|
matcher
|
25
25
|
end
|
@@ -116,7 +116,7 @@ module GenSpec
|
|
116
116
|
def invoke_with_genspec_error_handler(*names, &block)
|
117
117
|
invoke_without_genspec_error_handler(*names, &block)
|
118
118
|
rescue Thor::Error => err
|
119
|
-
interceptor.error = err
|
119
|
+
self.class.interceptor.error = err
|
120
120
|
raise err
|
121
121
|
end
|
122
122
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class GenSpec::Matchers::GenerationMethodMatcher < GenSpec::Matchers::Base
|
2
|
-
GENERATION_CLASSES = [ 'Thor::Actions', 'Rails::Generators::Actions' ]
|
2
|
+
GENERATION_CLASSES = [ 'Thor::Actions', 'Rails::Generators::Actions', 'Rails::Generators::Migration' ]
|
3
3
|
|
4
4
|
attr_reader :method_name, :method_args
|
5
5
|
|
Binary file
|
Binary file
|
@@ -0,0 +1,8 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe :my_migration do
|
4
|
+
it "should run migration template" do
|
5
|
+
# bug, raising NameError: undefined local variable or method `interceptor'
|
6
|
+
proc { subject.should generate(:migration_template, "1", "2") }.should_not raise_error(NameError)
|
7
|
+
end
|
8
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: genspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -3738369098
|
5
4
|
prerelease: true
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 2
|
9
8
|
- 0
|
10
9
|
- prerails3
|
11
|
-
-
|
12
|
-
version: 0.2.0.prerails3.
|
10
|
+
- 2
|
11
|
+
version: 0.2.0.prerails3.2
|
13
12
|
platform: ruby
|
14
13
|
authors:
|
15
14
|
- Colin MacKenzie IV
|
@@ -17,7 +16,7 @@ autorequire:
|
|
17
16
|
bindir: bin
|
18
17
|
cert_chain: []
|
19
18
|
|
20
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-08 00:00:00 -04:00
|
21
20
|
default_executable:
|
22
21
|
dependencies:
|
23
22
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +27,6 @@ dependencies:
|
|
28
27
|
requirements:
|
29
28
|
- - ">="
|
30
29
|
- !ruby/object:Gem::Version
|
31
|
-
hash: 4053856191
|
32
30
|
segments:
|
33
31
|
- 2
|
34
32
|
- 0
|
@@ -46,7 +44,6 @@ dependencies:
|
|
46
44
|
requirements:
|
47
45
|
- - ">="
|
48
46
|
- !ruby/object:Gem::Version
|
49
|
-
hash: 29
|
50
47
|
segments:
|
51
48
|
- 1
|
52
49
|
- 2
|
@@ -79,13 +76,15 @@ files:
|
|
79
76
|
- lib/genspec/matchers/result_matcher.rb
|
80
77
|
- lib/genspec/shell.rb
|
81
78
|
- pkg/genspec-0.1.1.gem
|
82
|
-
- pkg/genspec-0.2.0.pre1.gem
|
83
79
|
- pkg/genspec-0.2.0.prerails3.1.gem
|
80
|
+
- pkg/genspec-0.2.0.prerails3.2.gem
|
84
81
|
- spec/environment_spec.rb
|
82
|
+
- spec/generators/migration_spec.rb
|
85
83
|
- spec/generators/test_rails3_spec.rb
|
86
84
|
- spec/rcov.opts
|
87
85
|
- spec/rspec.opts
|
88
86
|
- spec/spec_helper.rb
|
87
|
+
- spec/support/generators/my_migration/my_migration_generator.rb
|
89
88
|
- spec/support/generators/test_rails3/USAGE
|
90
89
|
- spec/support/generators/test_rails3/templates/file
|
91
90
|
- spec/support/generators/test_rails3/test_rails3_generator.rb
|
@@ -103,7 +102,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
103
102
|
requirements:
|
104
103
|
- - ">="
|
105
104
|
- !ruby/object:Gem::Version
|
106
|
-
hash: 3
|
107
105
|
segments:
|
108
106
|
- 0
|
109
107
|
version: "0"
|
@@ -112,7 +110,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
110
|
requirements:
|
113
111
|
- - ">"
|
114
112
|
- !ruby/object:Gem::Version
|
115
|
-
hash: 25
|
116
113
|
segments:
|
117
114
|
- 1
|
118
115
|
- 3
|
@@ -127,6 +124,8 @@ specification_version: 3
|
|
127
124
|
summary: Simple, expressive Rails 3 generator testing for RSpec. For the Rails 2.3 version, use genspec 0.1.x.
|
128
125
|
test_files:
|
129
126
|
- spec/environment_spec.rb
|
127
|
+
- spec/generators/migration_spec.rb
|
130
128
|
- spec/generators/test_rails3_spec.rb
|
131
129
|
- spec/spec_helper.rb
|
130
|
+
- spec/support/generators/my_migration/my_migration_generator.rb
|
132
131
|
- spec/support/generators/test_rails3/test_rails3_generator.rb
|
data/pkg/genspec-0.2.0.pre1.gem
DELETED
Binary file
|