tagging_along 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 26857c168a4c15d18dca13557b75e7d48c672ad7
4
- data.tar.gz: 0732720c73f970c9c97802fa8d53f2cd44ba3684
3
+ metadata.gz: 75da0cec20f8d7a9bd898635aa261715d9501603
4
+ data.tar.gz: 05a6a225060fb45ad51a4c19322d699eee5c1311
5
5
  SHA512:
6
- metadata.gz: cf769d17def1348562d9a87244112ca2208ce030042b3d37ff1d7604113384ac688802f7fc4f5d449533712aba38abb4a97b95764fac2abc41fef0cee6071651
7
- data.tar.gz: 9ecd6504d8b335574393b8db91e9122528b280655d799dea21deb3a9685fd520ecfbeb444d11bb7476691fba5c8c6962e343305d5076936de08270be853cc8be
6
+ metadata.gz: d51a006be2b3b4e750106770588fb196419974a2d9923f61ea1f7e4204f86f80801515119c8a21bd74245eca80403aa6b6f95aaef31fad650e52fb95c3d60573
7
+ data.tar.gz: dc1e7854feabef243b8b4bcc0a3bf6d791b530271d97a6b31888a2b0823a7768aae7274ca2c17c93be9c3068b995034df4a206e2f09c45646fb414e5c9522d30
@@ -1,3 +1,3 @@
1
1
  module TaggingAlong
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
data/lib/tagging_along.rb CHANGED
@@ -21,22 +21,19 @@ module TaggingAlong
21
21
  end
22
22
  end
23
23
  end
24
- end
25
24
 
26
- module InstanceMethods
27
25
  def taggable_on?(attribute)
28
26
  begin
29
- send(:"#{attribute}_tags")
30
- send(:"#{attribute}_list")
27
+ new.send(:"#{attribute}_tags")
28
+ new.send(:"#{attribute}_list")
31
29
  true
32
30
  rescue Exception => e
33
31
  false
34
32
  end
35
33
  end
36
34
  end
37
-
35
+
38
36
  def self.included(receiver)
39
37
  receiver.extend ClassMethods
40
- receiver.send(:include, InstanceMethods)
41
38
  end
42
39
  end
@@ -11,7 +11,7 @@ describe TaggingAlong do
11
11
  instance.taggable_attribute = 'one,two'
12
12
  klass.is_taggable_on(:taggable_attribute)
13
13
 
14
- expect(instance).to be_taggable_on :taggable_attribute
14
+ expect(klass).to be_taggable_on :taggable_attribute
15
15
  expect(instance.taggable_attribute_tags).to eq ['one', 'two']
16
16
  expect(instance.taggable_attribute_list).to eq 'one, two'
17
17
  end
@@ -20,7 +20,7 @@ describe TaggingAlong do
20
20
  instance.taggable_attribute = 'one:two'
21
21
  klass.is_taggable_on(:taggable_attribute, separator: ':')
22
22
 
23
- expect(instance).to be_taggable_on :taggable_attribute
23
+ expect(klass).to be_taggable_on :taggable_attribute
24
24
  expect(instance.taggable_attribute_tags).to eq ['one', 'two']
25
25
  expect(instance.taggable_attribute_list).to eq 'one: two'
26
26
  end
@@ -28,7 +28,7 @@ describe TaggingAlong do
28
28
 
29
29
  context 'not taggable' do
30
30
  it 'is not taggable on untaggable_attribute' do
31
- expect(instance).not_to be_taggable_on :untaggable_attribute
31
+ expect(klass).not_to be_taggable_on :untaggable_attribute
32
32
  end
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tagging_along
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dennis Charles Hackethal