r3_plugin_toolbox 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -3
- data/VERSION +1 -1
- data/lib/r3_plugin_toolbox.rb +4 -2
- data/lib/r3_plugin_toolbox/rspec/config.rb +1 -1
- data/lib/r3_plugin_toolbox/rspec/matchers/be_extended_with.rb +5 -2
- data/r3_plugin_toolbox.gemspec +8 -11
- data/spec/spec_helper.rb +1 -3
- metadata +12 -27
data/Rakefile
CHANGED
@@ -7,11 +7,10 @@ begin
|
|
7
7
|
gem.email = "kmandrup@gmail.com"
|
8
8
|
gem.homepage = "http://github.com/kristianmandrup/rails3_plugin_toolbox"
|
9
9
|
gem.authors = ["Kristian Mandrup"]
|
10
|
-
gem.add_development_dependency "rspec", "~> 2.0.0"
|
11
10
|
|
12
|
-
gem.add_development_dependency "rspec", "
|
11
|
+
gem.add_development_dependency "rspec", "~> 2.0.0.beta.22"
|
13
12
|
gem.add_dependency "rails", "~> 3.0.0"
|
14
|
-
gem.add_dependency "require_all", "~> 1.
|
13
|
+
gem.add_dependency "require_all", "~> 1.2.0"
|
15
14
|
|
16
15
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
17
16
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.7
|
data/lib/r3_plugin_toolbox.rb
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
module Rails3
|
2
2
|
end
|
3
3
|
|
4
|
+
require 'require_all'
|
4
5
|
require 'active_support/inflector'
|
5
|
-
require '
|
6
|
+
require 'r3_plugin_toolbox/main'
|
6
7
|
|
7
|
-
|
8
|
+
|
9
|
+
require_all File.dirname(__FILE__) + '/r3_plugin_toolbox'
|
@@ -35,12 +35,15 @@ module Rails3
|
|
35
35
|
def match_submodules?
|
36
36
|
submodules.each do |name|
|
37
37
|
@bad_const = make_constant(module_const, name)
|
38
|
-
|
38
|
+
if !methods_included? get_methods(name)
|
39
|
+
return false
|
40
|
+
end
|
39
41
|
end
|
40
42
|
true
|
41
43
|
end
|
42
44
|
|
43
45
|
def methods_included? methods
|
46
|
+
@diff_methods = base_class_methods - methods
|
44
47
|
(base_class_methods & methods) == methods
|
45
48
|
end
|
46
49
|
|
@@ -49,7 +52,7 @@ module Rails3
|
|
49
52
|
end
|
50
53
|
|
51
54
|
def failure_message
|
52
|
-
"Expected the rails class #{rails_const_name} to be extended with the methods in #{bad_const}#{cause}"
|
55
|
+
"Expected the rails class #{rails_const_name} to be extended with the methods in #{bad_const}#{cause}\n#{@diff_methods}"
|
53
56
|
end
|
54
57
|
|
55
58
|
def negative_failure_message
|
data/r3_plugin_toolbox.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{r3_plugin_toolbox}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Kristian Mandrup"]
|
12
|
-
s.date = %q{2010-09-
|
12
|
+
s.date = %q{2010-09-25}
|
13
13
|
s.description = %q{Provides a more intuitive DSL for Rails 3 plugin configuration and a specialized RSpec 2 matcher. Makes it much easier to develop Rails 3 plugins!}
|
14
14
|
s.email = %q{kmandrup@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -73,21 +73,18 @@ Gem::Specification.new do |s|
|
|
73
73
|
s.specification_version = 3
|
74
74
|
|
75
75
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
76
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.0.0"])
|
77
|
-
s.add_development_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
|
76
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.0.0.beta.22"])
|
78
77
|
s.add_runtime_dependency(%q<rails>, ["~> 3.0.0"])
|
79
|
-
s.add_runtime_dependency(%q<require_all>, ["~> 1.
|
78
|
+
s.add_runtime_dependency(%q<require_all>, ["~> 1.2.0"])
|
80
79
|
else
|
81
|
-
s.add_dependency(%q<rspec>, ["~> 2.0.0"])
|
82
|
-
s.add_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
|
80
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.22"])
|
83
81
|
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
84
|
-
s.add_dependency(%q<require_all>, ["~> 1.
|
82
|
+
s.add_dependency(%q<require_all>, ["~> 1.2.0"])
|
85
83
|
end
|
86
84
|
else
|
87
|
-
s.add_dependency(%q<rspec>, ["~> 2.0.0"])
|
88
|
-
s.add_dependency(%q<rspec>, [">= 2.0.0.beta.19"])
|
85
|
+
s.add_dependency(%q<rspec>, ["~> 2.0.0.beta.22"])
|
89
86
|
s.add_dependency(%q<rails>, ["~> 3.0.0"])
|
90
|
-
s.add_dependency(%q<require_all>, ["~> 1.
|
87
|
+
s.add_dependency(%q<require_all>, ["~> 1.2.0"])
|
91
88
|
end
|
92
89
|
end
|
93
90
|
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,8 @@
|
|
1
|
-
require 'rspec'
|
2
|
-
require 'rspec/autorun'
|
1
|
+
require 'rspec/core'
|
3
2
|
require 'r3_plugin_toolbox'
|
4
3
|
|
5
4
|
# See http://www.igvita.com/2010/08/04/rails-3-internals-railtie-creating-plugins/
|
6
5
|
|
7
|
-
|
8
6
|
# require 'active_support'
|
9
7
|
require 'action_controller'
|
10
8
|
require 'action_view'
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 7
|
9
|
+
version: 0.3.7
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Kristian Mandrup
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-09-
|
17
|
+
date: 2010-09-25 00:00:00 +02:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -24,35 +24,20 @@ dependencies:
|
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
26
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
segments:
|
29
|
-
- 2
|
30
|
-
- 0
|
31
|
-
- 0
|
32
|
-
version: 2.0.0
|
33
|
-
type: :development
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rspec
|
37
|
-
prerelease: false
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
27
|
- !ruby/object:Gem::Version
|
43
28
|
segments:
|
44
29
|
- 2
|
45
30
|
- 0
|
46
31
|
- 0
|
47
32
|
- beta
|
48
|
-
-
|
49
|
-
version: 2.0.0.beta.
|
33
|
+
- 22
|
34
|
+
version: 2.0.0.beta.22
|
50
35
|
type: :development
|
51
|
-
version_requirements: *
|
36
|
+
version_requirements: *id001
|
52
37
|
- !ruby/object:Gem::Dependency
|
53
38
|
name: rails
|
54
39
|
prerelease: false
|
55
|
-
requirement: &
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
56
41
|
none: false
|
57
42
|
requirements:
|
58
43
|
- - ~>
|
@@ -63,22 +48,22 @@ dependencies:
|
|
63
48
|
- 0
|
64
49
|
version: 3.0.0
|
65
50
|
type: :runtime
|
66
|
-
version_requirements: *
|
51
|
+
version_requirements: *id002
|
67
52
|
- !ruby/object:Gem::Dependency
|
68
53
|
name: require_all
|
69
54
|
prerelease: false
|
70
|
-
requirement: &
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
71
56
|
none: false
|
72
57
|
requirements:
|
73
58
|
- - ~>
|
74
59
|
- !ruby/object:Gem::Version
|
75
60
|
segments:
|
76
61
|
- 1
|
77
|
-
-
|
62
|
+
- 2
|
78
63
|
- 0
|
79
|
-
version: 1.
|
64
|
+
version: 1.2.0
|
80
65
|
type: :runtime
|
81
|
-
version_requirements: *
|
66
|
+
version_requirements: *id003
|
82
67
|
description: Provides a more intuitive DSL for Rails 3 plugin configuration and a specialized RSpec 2 matcher. Makes it much easier to develop Rails 3 plugins!
|
83
68
|
email: kmandrup@gmail.com
|
84
69
|
executables: []
|