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 CHANGED
@@ -1 +1 @@
1
- 0.1.2
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.2"
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"
@@ -55,7 +55,7 @@ class Module
55
55
  end
56
56
 
57
57
  class_eval do
58
- self.my_shared_concerns += concerns.flatten if self.respond_to?(:shared_concerns)
58
+ self.my_shared_concerns += concerns.flatten if self.respond_to?(:my_shared_concerns)
59
59
  end
60
60
  end
61
61
 
@@ -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
@@ -0,0 +1,4 @@
1
+ class FixtureUserNoMeta
2
+ def method_from_scopes_concern
3
+ end
4
+ end
@@ -0,0 +1,12 @@
1
+ class FixtureUserNoMeta
2
+ def method_from_validations_concern
3
+ end
4
+ end
5
+
6
+ class FixtureUserNoMeta
7
+ module Validations
8
+ def validate!
9
+ true
10
+ end
11
+ end
12
+ end
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.2
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: 3508759223266208615
136
+ hash: -974900177566873517
135
137
  required_rubygems_version: !ruby/object:Gem::Requirement
136
138
  none: false
137
139
  requirements: