concerned 0.1.2 → 0.1.3
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/VERSION +1 -1
- data/concerned.gemspec +3 -1
- data/lib/concerned/module_ext.rb +1 -1
- data/spec/concerned_spec.rb +18 -0
- data/spec/fixture_user_no_meta/scopes.rb +4 -0
- data/spec/fixture_user_no_meta/validations.rb +12 -0
- metadata +4 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/concerned.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "concerned"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
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"]
|
@@ -31,6 +31,8 @@ Gem::Specification.new do |s|
|
|
31
31
|
"spec/concerned_spec.rb",
|
32
32
|
"spec/fixture_user/scopes.rb",
|
33
33
|
"spec/fixture_user/validations.rb",
|
34
|
+
"spec/fixture_user_no_meta/scopes.rb",
|
35
|
+
"spec/fixture_user_no_meta/validations.rb",
|
34
36
|
"spec/shared/associations.rb",
|
35
37
|
"spec/shared/caching.rb",
|
36
38
|
"spec/spec_helper.rb"
|
data/lib/concerned/module_ext.rb
CHANGED
data/spec/concerned_spec.rb
CHANGED
@@ -15,6 +15,24 @@ class FixtureUser
|
|
15
15
|
include_concerns :validations
|
16
16
|
end
|
17
17
|
|
18
|
+
class FixtureUserNoMeta
|
19
|
+
concerned_with :scopes, :validations
|
20
|
+
shared_concerns :associations
|
21
|
+
include_shared_concerns :caching
|
22
|
+
include_concerns :validations
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
describe "Concerned" do
|
27
|
+
describe "no meta" do
|
28
|
+
it 'should not have meta info' do
|
29
|
+
FixtureUserNoMeta.should_not respond_to(:my_concerns)
|
30
|
+
FixtureUserNoMeta.should_not respond_to(:my_shared_concerns)
|
31
|
+
FixtureUserNoMeta.should_not respond_to(:all_my_concerns)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
18
36
|
describe "Concerned" do
|
19
37
|
describe "#concerned_with" do
|
20
38
|
it 'should require files from #{name.underscore}/#{concern}' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concerned
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -113,6 +113,8 @@ files:
|
|
113
113
|
- spec/concerned_spec.rb
|
114
114
|
- spec/fixture_user/scopes.rb
|
115
115
|
- spec/fixture_user/validations.rb
|
116
|
+
- spec/fixture_user_no_meta/scopes.rb
|
117
|
+
- spec/fixture_user_no_meta/validations.rb
|
116
118
|
- spec/shared/associations.rb
|
117
119
|
- spec/shared/caching.rb
|
118
120
|
- spec/spec_helper.rb
|
@@ -131,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
131
133
|
version: '0'
|
132
134
|
segments:
|
133
135
|
- 0
|
134
|
-
hash:
|
136
|
+
hash: -974900177566873517
|
135
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
138
|
none: false
|
137
139
|
requirements:
|