acts-as-taggable-on 3.2.3 → 3.3.0
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.
- checksums.yaml +4 -4
- data/.travis.yml +8 -7
- data/Appraisals +0 -4
- data/Gemfile +0 -1
- data/README.md +1 -1
- data/acts-as-taggable-on.gemspec +6 -8
- data/db/migrate/4_add_missing_taggable_index.rb +9 -0
- data/gemfiles/activerecord_3.2.gemfile +0 -2
- data/gemfiles/activerecord_4.0.gemfile +0 -2
- data/gemfiles/activerecord_4.1.gemfile +0 -2
- data/gemfiles/activerecord_edge.gemfile +0 -2
- data/lib/acts-as-taggable-on.rb +28 -20
- data/lib/acts_as_taggable_on/tag_list.rb +13 -77
- data/lib/acts_as_taggable_on/tag_list_parser.rb +78 -0
- data/lib/acts_as_taggable_on/{acts_as_taggable_on → taggable}/core.rb +46 -23
- data/lib/acts_as_taggable_on/{acts_as_taggable_on → taggable}/ownership.rb +1 -1
- data/lib/acts_as_taggable_on/taggable.rb +7 -6
- data/lib/acts_as_taggable_on/tagging.rb +1 -1
- data/lib/acts_as_taggable_on/tags_helper.rb +2 -2
- data/lib/acts_as_taggable_on/utils.rb +2 -26
- data/lib/acts_as_taggable_on/version.rb +1 -1
- data/spec/acts_as_taggable_on/acts_as_taggable_on_spec.rb +1 -1
- data/spec/acts_as_taggable_on/acts_as_tagger_spec.rb +1 -0
- data/spec/acts_as_taggable_on/caching_spec.rb +1 -0
- data/spec/acts_as_taggable_on/related_spec.rb +1 -0
- data/spec/acts_as_taggable_on/single_table_inheritance_spec.rb +1 -0
- data/spec/acts_as_taggable_on/tag_list_parser_spec.rb +46 -0
- data/spec/acts_as_taggable_on/tag_list_spec.rb +3 -40
- data/spec/acts_as_taggable_on/tag_spec.rb +29 -35
- data/spec/acts_as_taggable_on/taggable/dirty_spec.rb +127 -0
- data/spec/acts_as_taggable_on/taggable_spec.rb +76 -163
- data/spec/acts_as_taggable_on/tagger_spec.rb +1 -1
- data/spec/acts_as_taggable_on/tagging_spec.rb +13 -1
- data/spec/acts_as_taggable_on/tags_helper_spec.rb +1 -0
- data/spec/acts_as_taggable_on/utils_spec.rb +1 -0
- data/spec/internal/app/models/cached_model_with_array.rb +1 -1
- data/spec/internal/app/models/models.rb +2 -2
- data/spec/internal/db/schema.rb +2 -2
- data/spec/spec_helper.rb +0 -1
- data/spec/support/0-helpers.rb +32 -0
- metadata +39 -67
- data/spec/schema.rb +0 -82
- /data/lib/acts_as_taggable_on/{acts_as_taggable_on/compatibility.rb → compatibility.rb} +0 -0
- /data/lib/acts_as_taggable_on/{acts_as_taggable_on → taggable}/cache.rb +0 -0
- /data/lib/acts_as_taggable_on/{acts_as_taggable_on → taggable}/collection.rb +0 -0
- /data/lib/acts_as_taggable_on/{acts_as_taggable_on → taggable}/dirty.rb +0 -0
- /data/lib/acts_as_taggable_on/{acts_as_taggable_on → taggable}/related.rb +0 -0
|
@@ -208,6 +208,14 @@ describe 'Taggable' do
|
|
|
208
208
|
expect(TaggableModel.tagged_with('ruby').group(:created_at).count.count).to eq(1)
|
|
209
209
|
end
|
|
210
210
|
|
|
211
|
+
it 'can be used as scope' do
|
|
212
|
+
@taggable.skill_list = 'ruby'
|
|
213
|
+
@taggable.save
|
|
214
|
+
untaggable_model = @taggable.untaggable_models.create!(name:'foobar')
|
|
215
|
+
scope_tag = TaggableModel.tagged_with('ruby', any: 'distinct', order: 'taggable_models.name asc')
|
|
216
|
+
expect(UntaggableModel.joins(:taggable_model).merge(scope_tag).except(:select)).to eq([untaggable_model])
|
|
217
|
+
end
|
|
218
|
+
|
|
211
219
|
it "shouldn't generate a query with DISTINCT by default" do
|
|
212
220
|
@taggable.skill_list = 'ruby, rails, css'
|
|
213
221
|
@taggable.save
|
|
@@ -215,6 +223,20 @@ describe 'Taggable' do
|
|
|
215
223
|
expect(TaggableModel.tagged_with('ruby').to_sql).to_not match /DISTINCT/
|
|
216
224
|
end
|
|
217
225
|
|
|
226
|
+
it "should be able to find a tag using dates" do
|
|
227
|
+
@taggable.skill_list = "ruby"
|
|
228
|
+
@taggable.save
|
|
229
|
+
|
|
230
|
+
expect(TaggableModel.tagged_with("ruby", :start_at => Date.today, :end_at => Date.tomorrow).count).to eq(1)
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
it "shouldn't be able to find a tag outside date range" do
|
|
234
|
+
@taggable.skill_list = "ruby"
|
|
235
|
+
@taggable.save
|
|
236
|
+
|
|
237
|
+
expect(TaggableModel.tagged_with("ruby", :start_at => Date.today - 2.days, :end_at => Date.today - 1.day).count).to eq(0)
|
|
238
|
+
end
|
|
239
|
+
|
|
218
240
|
it 'should be able to find by tag with context' do
|
|
219
241
|
@taggable.skill_list = 'ruby, rails, css'
|
|
220
242
|
@taggable.tag_list = 'bob, charlie'
|
|
@@ -255,16 +277,14 @@ describe 'Taggable' do
|
|
|
255
277
|
expect(TaggableModel.select('distinct(taggable_models.id), taggable_models.*').joins(:untaggable_models).tagged_with(['rails', 'ruby'], :any => false).to_a.sort).to eq([bob, frank].sort)
|
|
256
278
|
end
|
|
257
279
|
|
|
258
|
-
unless
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
TaggableModel.create(name: 'Katia', tag_list: 'ПРИВЕТ')
|
|
280
|
+
it 'should not care about case for unicode names', unless: using_sqlite? do
|
|
281
|
+
ActsAsTaggableOn.strict_case_match = false
|
|
282
|
+
TaggableModel.create(name: 'Anya', tag_list: 'ПРИВЕТ')
|
|
283
|
+
TaggableModel.create(name: 'Igor', tag_list: 'привет')
|
|
284
|
+
TaggableModel.create(name: 'Katia', tag_list: 'ПРИВЕТ')
|
|
264
285
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
end
|
|
286
|
+
expect(ActsAsTaggableOn::Tag.all.size).to eq(1)
|
|
287
|
+
expect(TaggableModel.tagged_with('привет').to_a).to eq(TaggableModel.tagged_with('ПРИВЕТ').to_a)
|
|
268
288
|
end
|
|
269
289
|
|
|
270
290
|
context 'should be able to create and find tags in languages without capitalization :' do
|
|
@@ -500,6 +520,13 @@ describe 'Taggable' do
|
|
|
500
520
|
expect(options).to eq({:exclude => true})
|
|
501
521
|
end
|
|
502
522
|
|
|
523
|
+
it 'should not delete tags if not updated' do
|
|
524
|
+
model = TaggableModel.create(name: 'foo', tag_list: 'ruby, rails, programming')
|
|
525
|
+
model.update_attributes(name: 'bar')
|
|
526
|
+
model.reload
|
|
527
|
+
expect(model.tag_list.sort).to eq(%w(ruby rails programming).sort)
|
|
528
|
+
end
|
|
529
|
+
|
|
503
530
|
context 'Duplicates' do
|
|
504
531
|
context 'should not create duplicate taggings' do
|
|
505
532
|
let(:bob) { TaggableModel.create(name: 'Bob') }
|
|
@@ -586,28 +613,26 @@ describe 'Taggable' do
|
|
|
586
613
|
|
|
587
614
|
end
|
|
588
615
|
|
|
589
|
-
if
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
connor.save
|
|
606
|
-
end
|
|
616
|
+
xit 'should not duplicate tags added on different threads', if: supports_concurrency?, skip: 'FIXME, Deadlocks in travis' do
|
|
617
|
+
#TODO, try with more threads and fix deadlock
|
|
618
|
+
thread_count = 4
|
|
619
|
+
barrier = Barrier.new thread_count
|
|
620
|
+
|
|
621
|
+
expect {
|
|
622
|
+
thread_count.times.map do |idx|
|
|
623
|
+
Thread.start do
|
|
624
|
+
connor = TaggableModel.first_or_create(name: 'Connor')
|
|
625
|
+
connor.tag_list = 'There, can, be, only, one'
|
|
626
|
+
barrier.wait
|
|
627
|
+
begin
|
|
628
|
+
connor.save
|
|
629
|
+
rescue ActsAsTaggableOn::DuplicateTagError
|
|
630
|
+
# second save should succeed
|
|
631
|
+
connor.save
|
|
607
632
|
end
|
|
608
|
-
end
|
|
609
|
-
|
|
610
|
-
|
|
633
|
+
end
|
|
634
|
+
end.map(&:join)
|
|
635
|
+
}.to change(ActsAsTaggableOn::Tag, :count).by(5)
|
|
611
636
|
end
|
|
612
637
|
end
|
|
613
638
|
|
|
@@ -699,114 +724,6 @@ describe 'Taggable' do
|
|
|
699
724
|
end
|
|
700
725
|
end
|
|
701
726
|
|
|
702
|
-
describe 'Dirty Objects' do
|
|
703
|
-
context 'with un-contexted tags' do
|
|
704
|
-
before(:each) do
|
|
705
|
-
@taggable = TaggableModel.create(tag_list: 'awesome, epic')
|
|
706
|
-
end
|
|
707
|
-
|
|
708
|
-
context 'when tag_list changed' do
|
|
709
|
-
before(:each) do
|
|
710
|
-
expect(@taggable.changes).to be_empty
|
|
711
|
-
@taggable.tag_list = 'one'
|
|
712
|
-
end
|
|
713
|
-
|
|
714
|
-
it 'should show changes of dirty object' do
|
|
715
|
-
expect(@taggable.changes).to eq({'tag_list' => ['awesome, epic', ['one']]})
|
|
716
|
-
end
|
|
717
|
-
|
|
718
|
-
it 'flags tag_list as changed' do
|
|
719
|
-
expect(@taggable.tag_list_changed?).to be_truthy
|
|
720
|
-
end
|
|
721
|
-
|
|
722
|
-
it 'preserves original value' do
|
|
723
|
-
expect(@taggable.tag_list_was).to eq('awesome, epic')
|
|
724
|
-
end
|
|
725
|
-
|
|
726
|
-
it 'shows what the change was' do
|
|
727
|
-
expect(@taggable.tag_list_change).to eq(['awesome, epic', ['one']])
|
|
728
|
-
end
|
|
729
|
-
end
|
|
730
|
-
|
|
731
|
-
context 'when tag_list is the same' do
|
|
732
|
-
before(:each) do
|
|
733
|
-
@taggable.tag_list = 'awesome, epic'
|
|
734
|
-
end
|
|
735
|
-
|
|
736
|
-
it 'is not flagged as changed' do
|
|
737
|
-
expect(@taggable.tag_list_changed?).to be_falsy
|
|
738
|
-
end
|
|
739
|
-
|
|
740
|
-
it 'does not show any changes to the taggable item' do
|
|
741
|
-
expect(@taggable.changes).to be_empty
|
|
742
|
-
end
|
|
743
|
-
|
|
744
|
-
context "and using a delimiter different from a ','" do
|
|
745
|
-
before do
|
|
746
|
-
@old_delimiter = ActsAsTaggableOn.delimiter
|
|
747
|
-
ActsAsTaggableOn.delimiter = ';'
|
|
748
|
-
end
|
|
749
|
-
|
|
750
|
-
after do
|
|
751
|
-
ActsAsTaggableOn.delimiter = @old_delimiter
|
|
752
|
-
end
|
|
753
|
-
|
|
754
|
-
it 'does not show any changes to the taggable item when using array assignments' do
|
|
755
|
-
@taggable.tag_list = %w(awesome epic)
|
|
756
|
-
expect(@taggable.changes).to be_empty
|
|
757
|
-
end
|
|
758
|
-
end
|
|
759
|
-
end
|
|
760
|
-
end
|
|
761
|
-
|
|
762
|
-
context 'with context tags' do
|
|
763
|
-
before(:each) do
|
|
764
|
-
@taggable = TaggableModel.create('language_list' => 'awesome, epic')
|
|
765
|
-
end
|
|
766
|
-
|
|
767
|
-
context 'when language_list changed' do
|
|
768
|
-
before(:each) do
|
|
769
|
-
expect(@taggable.changes).to be_empty
|
|
770
|
-
@taggable.language_list = 'one'
|
|
771
|
-
end
|
|
772
|
-
|
|
773
|
-
it 'should show changes of dirty object' do
|
|
774
|
-
expect(@taggable.changes).to eq({'language_list' => ['awesome, epic', ['one']]})
|
|
775
|
-
end
|
|
776
|
-
|
|
777
|
-
it 'flags language_list as changed' do
|
|
778
|
-
expect(@taggable.language_list_changed?).to be_truthy
|
|
779
|
-
end
|
|
780
|
-
|
|
781
|
-
it 'preserves original value' do
|
|
782
|
-
expect(@taggable.language_list_was).to eq('awesome, epic')
|
|
783
|
-
end
|
|
784
|
-
|
|
785
|
-
it 'shows what the change was' do
|
|
786
|
-
expect(@taggable.language_list_change).to eq(['awesome, epic', ['one']])
|
|
787
|
-
end
|
|
788
|
-
|
|
789
|
-
it 'shows what the changes were' do
|
|
790
|
-
expect(@taggable.language_list_changes).to eq(['awesome, epic', ['one']])
|
|
791
|
-
end
|
|
792
|
-
end
|
|
793
|
-
|
|
794
|
-
context 'when language_list is the same' do
|
|
795
|
-
before(:each) do
|
|
796
|
-
@taggable.language_list = 'awesome, epic'
|
|
797
|
-
end
|
|
798
|
-
|
|
799
|
-
it 'is not flagged as changed' do
|
|
800
|
-
expect(@taggable.language_list_changed?).to be_falsy
|
|
801
|
-
end
|
|
802
|
-
|
|
803
|
-
it 'does not show any changes to the taggable item' do
|
|
804
|
-
expect(@taggable.changes).to be_empty
|
|
805
|
-
end
|
|
806
|
-
end
|
|
807
|
-
end
|
|
808
|
-
end
|
|
809
|
-
|
|
810
727
|
describe 'Autogenerated methods' do
|
|
811
728
|
it 'should be overridable' do
|
|
812
729
|
expect(TaggableModel.create(tag_list: 'woo').tag_list_submethod_called).to be_truthy
|
|
@@ -853,34 +770,30 @@ describe 'Taggable' do
|
|
|
853
770
|
end
|
|
854
771
|
end
|
|
855
772
|
|
|
856
|
-
if
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
@taggables = [@taggable, TaggableModelWithJson.new(:name => 'John Doe')]
|
|
862
|
-
end
|
|
773
|
+
describe 'Taggable model with json columns', if: postgresql_support_json? do
|
|
774
|
+
before(:each) do
|
|
775
|
+
@taggable = TaggableModelWithJson.new(:name => 'Bob Jones')
|
|
776
|
+
@taggables = [@taggable, TaggableModelWithJson.new(:name => 'John Doe')]
|
|
777
|
+
end
|
|
863
778
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
779
|
+
it 'should be able to find by tag with context' do
|
|
780
|
+
@taggable.skill_list = 'ruby, rails, css'
|
|
781
|
+
@taggable.tag_list = 'bob, charlie'
|
|
782
|
+
@taggable.save
|
|
868
783
|
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
784
|
+
expect(TaggableModelWithJson.tagged_with('ruby').first).to eq(@taggable)
|
|
785
|
+
expect(TaggableModelWithJson.tagged_with('ruby, css').first).to eq(@taggable)
|
|
786
|
+
expect(TaggableModelWithJson.tagged_with('bob', :on => :skills).first).to_not eq(@taggable)
|
|
787
|
+
expect(TaggableModelWithJson.tagged_with('bob', :on => :tags).first).to eq(@taggable)
|
|
788
|
+
end
|
|
874
789
|
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
790
|
+
it 'should be able to find tagged with any tag' do
|
|
791
|
+
bob = TaggableModelWithJson.create(:name => 'Bob', :tag_list => 'fitter, happier, more productive', :skill_list => 'ruby, rails, css')
|
|
792
|
+
frank = TaggableModelWithJson.create(:name => 'Frank', :tag_list => 'weaker, depressed, inefficient', :skill_list => 'ruby, rails, css')
|
|
793
|
+
steve = TaggableModelWithJson.create(:name => 'Steve', :tag_list => 'fitter, happier, more productive', :skill_list => 'c++, java, ruby')
|
|
879
794
|
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
end
|
|
884
|
-
end
|
|
795
|
+
expect(TaggableModelWithJson.tagged_with(%w(ruby java), :order => 'taggable_model_with_jsons.name', :any => true).to_a).to eq([bob, frank, steve])
|
|
796
|
+
expect(TaggableModelWithJson.tagged_with(%w(c++ fitter), :order => 'taggable_model_with_jsons.name', :any => true).to_a).to eq([bob, steve])
|
|
797
|
+
expect(TaggableModelWithJson.tagged_with(%w(depressed css), :order => 'taggable_model_with_jsons.name', :any => true).to_a).to eq([bob, frank])
|
|
885
798
|
end
|
|
886
799
|
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
1
2
|
require 'spec_helper'
|
|
2
3
|
|
|
3
4
|
describe 'Tagger' do
|
|
@@ -43,7 +44,6 @@ describe 'Tagger' do
|
|
|
43
44
|
tags = TaggableModel.tagged_with(%w(ruby java), owned_by: @user, any: true)
|
|
44
45
|
expect(tags).to include(@taggable, @taggable2)
|
|
45
46
|
expect(tags.size).to eq(2)
|
|
46
|
-
|
|
47
47
|
end
|
|
48
48
|
|
|
49
49
|
it 'only returns objects tagged by owned_by when exclude is true' do
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
|
1
2
|
require 'spec_helper'
|
|
2
3
|
|
|
3
4
|
describe ActsAsTaggableOn::Tagging do
|
|
@@ -37,6 +38,17 @@ describe ActsAsTaggableOn::Tagging do
|
|
|
37
38
|
expect(another_taggable.tag_list.sort).to eq(%w(very serious bug).sort)
|
|
38
39
|
end
|
|
39
40
|
|
|
41
|
+
it 'should destroy unused tags after tagging destroyed' do
|
|
42
|
+
previous_setting = ActsAsTaggableOn.remove_unused_tags
|
|
43
|
+
ActsAsTaggableOn.remove_unused_tags = true
|
|
44
|
+
ActsAsTaggableOn::Tag.destroy_all
|
|
45
|
+
@taggable = TaggableModel.create(name: 'Bob Jones')
|
|
46
|
+
@taggable.update_attribute :tag_list, 'aaa,bbb,ccc'
|
|
47
|
+
@taggable.update_attribute :tag_list, ''
|
|
48
|
+
expect(ActsAsTaggableOn::Tag.count).to eql(0)
|
|
49
|
+
ActsAsTaggableOn.remove_unused_tags = previous_setting
|
|
50
|
+
end
|
|
51
|
+
|
|
40
52
|
pending 'context scopes' do
|
|
41
53
|
describe '.by_context'
|
|
42
54
|
|
|
@@ -48,4 +60,4 @@ describe ActsAsTaggableOn::Tagging do
|
|
|
48
60
|
|
|
49
61
|
end
|
|
50
62
|
|
|
51
|
-
end
|
|
63
|
+
end
|
|
@@ -77,11 +77,11 @@ class OrderedTaggableModel < ActiveRecord::Base
|
|
|
77
77
|
acts_as_ordered_taggable_on :colours
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
-
if
|
|
80
|
+
if using_postgresql?
|
|
81
81
|
class CachedModelWithArray < ActiveRecord::Base
|
|
82
82
|
acts_as_taggable
|
|
83
83
|
end
|
|
84
|
-
if
|
|
84
|
+
if postgresql_support_json?
|
|
85
85
|
class TaggableModelWithJson < ActiveRecord::Base
|
|
86
86
|
acts_as_taggable
|
|
87
87
|
acts_as_taggable_on :skills
|
data/spec/internal/db/schema.rb
CHANGED
|
@@ -76,7 +76,7 @@ ActiveRecord::Schema.define version: 0 do
|
|
|
76
76
|
|
|
77
77
|
|
|
78
78
|
# Special cases for postgresql
|
|
79
|
-
if
|
|
79
|
+
if using_postgresql?
|
|
80
80
|
|
|
81
81
|
create_table :other_cached_with_array_models, force: true do |t|
|
|
82
82
|
t.column :name, :string
|
|
@@ -86,7 +86,7 @@ ActiveRecord::Schema.define version: 0 do
|
|
|
86
86
|
t.column :cached_glass_list, :string, array: true
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
-
if
|
|
89
|
+
if postgresql_support_json?
|
|
90
90
|
create_table :taggable_model_with_jsons, :force => true do |t|
|
|
91
91
|
t.column :name, :string
|
|
92
92
|
t.column :type, :string
|
data/spec/spec_helper.rb
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
def using_sqlite?
|
|
2
|
+
ActsAsTaggableOn::Utils.connection && ActsAsTaggableOn::Utils.connection.adapter_name == 'SQLite'
|
|
3
|
+
end
|
|
4
|
+
|
|
5
|
+
def supports_concurrency?
|
|
6
|
+
!using_sqlite?
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def using_postgresql?
|
|
10
|
+
ActsAsTaggableOn::Utils.using_postgresql?
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def postgresql_version
|
|
14
|
+
if using_postgresql?
|
|
15
|
+
ActsAsTaggableOn::Utils.connection.execute('SHOW SERVER_VERSION').first['server_version'].to_f
|
|
16
|
+
else
|
|
17
|
+
0.0
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def postgresql_support_json?
|
|
22
|
+
postgresql_version >= 9.2
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def using_mysql?
|
|
27
|
+
ActsAsTaggableOn::Utils.using_mysql?
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def using_case_insensitive_collation?
|
|
31
|
+
using_mysql? && ActsAsTaggableOn::Utils.connection.collation =~ /_ci\Z/
|
|
32
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: acts-as-taggable-on
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Bleigh
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activerecord
|
|
@@ -31,26 +31,6 @@ dependencies:
|
|
|
31
31
|
- - "<"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
33
|
version: '5'
|
|
34
|
-
- !ruby/object:Gem::Dependency
|
|
35
|
-
name: actionpack
|
|
36
|
-
requirement: !ruby/object:Gem::Requirement
|
|
37
|
-
requirements:
|
|
38
|
-
- - ">="
|
|
39
|
-
- !ruby/object:Gem::Version
|
|
40
|
-
version: '3'
|
|
41
|
-
- - "<"
|
|
42
|
-
- !ruby/object:Gem::Version
|
|
43
|
-
version: '5'
|
|
44
|
-
type: :runtime
|
|
45
|
-
prerelease: false
|
|
46
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
47
|
-
requirements:
|
|
48
|
-
- - ">="
|
|
49
|
-
- !ruby/object:Gem::Version
|
|
50
|
-
version: '3'
|
|
51
|
-
- - "<"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '5'
|
|
54
34
|
- !ruby/object:Gem::Dependency
|
|
55
35
|
name: sqlite3
|
|
56
36
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -69,16 +49,16 @@ dependencies:
|
|
|
69
49
|
name: mysql2
|
|
70
50
|
requirement: !ruby/object:Gem::Requirement
|
|
71
51
|
requirements:
|
|
72
|
-
- - "
|
|
52
|
+
- - "~>"
|
|
73
53
|
- !ruby/object:Gem::Version
|
|
74
|
-
version:
|
|
54
|
+
version: 0.3.7
|
|
75
55
|
type: :development
|
|
76
56
|
prerelease: false
|
|
77
57
|
version_requirements: !ruby/object:Gem::Requirement
|
|
78
58
|
requirements:
|
|
79
|
-
- - "
|
|
59
|
+
- - "~>"
|
|
80
60
|
- !ruby/object:Gem::Version
|
|
81
|
-
version:
|
|
61
|
+
version: 0.3.7
|
|
82
62
|
- !ruby/object:Gem::Dependency
|
|
83
63
|
name: pg
|
|
84
64
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -99,84 +79,70 @@ dependencies:
|
|
|
99
79
|
requirements:
|
|
100
80
|
- - "~>"
|
|
101
81
|
- !ruby/object:Gem::Version
|
|
102
|
-
version: 3.0.0.
|
|
82
|
+
version: 3.0.0.beta
|
|
103
83
|
type: :development
|
|
104
84
|
prerelease: false
|
|
105
85
|
version_requirements: !ruby/object:Gem::Requirement
|
|
106
86
|
requirements:
|
|
107
87
|
- - "~>"
|
|
108
88
|
- !ruby/object:Gem::Version
|
|
109
|
-
version: 3.0.0.
|
|
89
|
+
version: 3.0.0.beta
|
|
110
90
|
- !ruby/object:Gem::Dependency
|
|
111
91
|
name: rspec-its
|
|
112
92
|
requirement: !ruby/object:Gem::Requirement
|
|
113
93
|
requirements:
|
|
114
|
-
- - "
|
|
94
|
+
- - ">="
|
|
115
95
|
- !ruby/object:Gem::Version
|
|
116
|
-
version: '
|
|
96
|
+
version: '0'
|
|
117
97
|
type: :development
|
|
118
98
|
prerelease: false
|
|
119
99
|
version_requirements: !ruby/object:Gem::Requirement
|
|
120
100
|
requirements:
|
|
121
|
-
- - "
|
|
101
|
+
- - ">="
|
|
122
102
|
- !ruby/object:Gem::Version
|
|
123
|
-
version: '
|
|
103
|
+
version: '0'
|
|
124
104
|
- !ruby/object:Gem::Dependency
|
|
125
105
|
name: rspec
|
|
126
106
|
requirement: !ruby/object:Gem::Requirement
|
|
127
107
|
requirements:
|
|
128
|
-
- -
|
|
129
|
-
- !ruby/object:Gem::Version
|
|
130
|
-
version: 3.0.0.beta2
|
|
131
|
-
type: :development
|
|
132
|
-
prerelease: false
|
|
133
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
134
|
-
requirements:
|
|
135
|
-
- - '='
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: 3.0.0.beta2
|
|
138
|
-
- !ruby/object:Gem::Dependency
|
|
139
|
-
name: ammeter
|
|
140
|
-
requirement: !ruby/object:Gem::Requirement
|
|
141
|
-
requirements:
|
|
142
|
-
- - "~>"
|
|
108
|
+
- - ">="
|
|
143
109
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: '
|
|
110
|
+
version: '0'
|
|
145
111
|
type: :development
|
|
146
112
|
prerelease: false
|
|
147
113
|
version_requirements: !ruby/object:Gem::Requirement
|
|
148
114
|
requirements:
|
|
149
|
-
- - "
|
|
115
|
+
- - ">="
|
|
150
116
|
- !ruby/object:Gem::Version
|
|
151
|
-
version: '
|
|
117
|
+
version: '0'
|
|
152
118
|
- !ruby/object:Gem::Dependency
|
|
153
119
|
name: barrier
|
|
154
120
|
requirement: !ruby/object:Gem::Requirement
|
|
155
121
|
requirements:
|
|
156
|
-
- - "
|
|
122
|
+
- - ">="
|
|
157
123
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: '
|
|
124
|
+
version: '0'
|
|
159
125
|
type: :development
|
|
160
126
|
prerelease: false
|
|
161
127
|
version_requirements: !ruby/object:Gem::Requirement
|
|
162
128
|
requirements:
|
|
163
|
-
- - "
|
|
129
|
+
- - ">="
|
|
164
130
|
- !ruby/object:Gem::Version
|
|
165
|
-
version: '
|
|
131
|
+
version: '0'
|
|
166
132
|
- !ruby/object:Gem::Dependency
|
|
167
133
|
name: database_cleaner
|
|
168
134
|
requirement: !ruby/object:Gem::Requirement
|
|
169
135
|
requirements:
|
|
170
|
-
- - "
|
|
136
|
+
- - ">="
|
|
171
137
|
- !ruby/object:Gem::Version
|
|
172
|
-
version: '
|
|
138
|
+
version: '0'
|
|
173
139
|
type: :development
|
|
174
140
|
prerelease: false
|
|
175
141
|
version_requirements: !ruby/object:Gem::Requirement
|
|
176
142
|
requirements:
|
|
177
|
-
- - "
|
|
143
|
+
- - ">="
|
|
178
144
|
- !ruby/object:Gem::Version
|
|
179
|
-
version: '
|
|
145
|
+
version: '0'
|
|
180
146
|
description: With ActsAsTaggableOn, you can tag a single model on several contexts,
|
|
181
147
|
such as skills, interests, and awards. It also provides other advanced functionality.
|
|
182
148
|
email:
|
|
@@ -202,23 +168,25 @@ files:
|
|
|
202
168
|
- db/migrate/1_acts_as_taggable_on_migration.rb
|
|
203
169
|
- db/migrate/2_add_missing_unique_indices.rb
|
|
204
170
|
- db/migrate/3_add_taggings_counter_cache_to_tags.rb
|
|
171
|
+
- db/migrate/4_add_missing_taggable_index.rb
|
|
205
172
|
- gemfiles/activerecord_3.2.gemfile
|
|
206
173
|
- gemfiles/activerecord_4.0.gemfile
|
|
207
174
|
- gemfiles/activerecord_4.1.gemfile
|
|
208
175
|
- gemfiles/activerecord_edge.gemfile
|
|
209
176
|
- lib/acts-as-taggable-on.rb
|
|
210
177
|
- lib/acts_as_taggable_on.rb
|
|
211
|
-
- lib/acts_as_taggable_on/
|
|
212
|
-
- lib/acts_as_taggable_on/acts_as_taggable_on/collection.rb
|
|
213
|
-
- lib/acts_as_taggable_on/acts_as_taggable_on/compatibility.rb
|
|
214
|
-
- lib/acts_as_taggable_on/acts_as_taggable_on/core.rb
|
|
215
|
-
- lib/acts_as_taggable_on/acts_as_taggable_on/dirty.rb
|
|
216
|
-
- lib/acts_as_taggable_on/acts_as_taggable_on/ownership.rb
|
|
217
|
-
- lib/acts_as_taggable_on/acts_as_taggable_on/related.rb
|
|
178
|
+
- lib/acts_as_taggable_on/compatibility.rb
|
|
218
179
|
- lib/acts_as_taggable_on/engine.rb
|
|
219
180
|
- lib/acts_as_taggable_on/tag.rb
|
|
220
181
|
- lib/acts_as_taggable_on/tag_list.rb
|
|
182
|
+
- lib/acts_as_taggable_on/tag_list_parser.rb
|
|
221
183
|
- lib/acts_as_taggable_on/taggable.rb
|
|
184
|
+
- lib/acts_as_taggable_on/taggable/cache.rb
|
|
185
|
+
- lib/acts_as_taggable_on/taggable/collection.rb
|
|
186
|
+
- lib/acts_as_taggable_on/taggable/core.rb
|
|
187
|
+
- lib/acts_as_taggable_on/taggable/dirty.rb
|
|
188
|
+
- lib/acts_as_taggable_on/taggable/ownership.rb
|
|
189
|
+
- lib/acts_as_taggable_on/taggable/related.rb
|
|
222
190
|
- lib/acts_as_taggable_on/tagger.rb
|
|
223
191
|
- lib/acts_as_taggable_on/tagging.rb
|
|
224
192
|
- lib/acts_as_taggable_on/tags_helper.rb
|
|
@@ -229,8 +197,10 @@ files:
|
|
|
229
197
|
- spec/acts_as_taggable_on/caching_spec.rb
|
|
230
198
|
- spec/acts_as_taggable_on/related_spec.rb
|
|
231
199
|
- spec/acts_as_taggable_on/single_table_inheritance_spec.rb
|
|
200
|
+
- spec/acts_as_taggable_on/tag_list_parser_spec.rb
|
|
232
201
|
- spec/acts_as_taggable_on/tag_list_spec.rb
|
|
233
202
|
- spec/acts_as_taggable_on/tag_spec.rb
|
|
203
|
+
- spec/acts_as_taggable_on/taggable/dirty_spec.rb
|
|
234
204
|
- spec/acts_as_taggable_on/taggable_spec.rb
|
|
235
205
|
- spec/acts_as_taggable_on/tagger_spec.rb
|
|
236
206
|
- spec/acts_as_taggable_on/tagging_spec.rb
|
|
@@ -253,8 +223,8 @@ files:
|
|
|
253
223
|
- spec/internal/app/models/user.rb
|
|
254
224
|
- spec/internal/config/database.yml.sample
|
|
255
225
|
- spec/internal/db/schema.rb
|
|
256
|
-
- spec/schema.rb
|
|
257
226
|
- spec/spec_helper.rb
|
|
227
|
+
- spec/support/0-helpers.rb
|
|
258
228
|
- spec/support/array.rb
|
|
259
229
|
- spec/support/database.rb
|
|
260
230
|
- spec/support/database_cleaner.rb
|
|
@@ -301,8 +271,10 @@ test_files:
|
|
|
301
271
|
- spec/acts_as_taggable_on/caching_spec.rb
|
|
302
272
|
- spec/acts_as_taggable_on/related_spec.rb
|
|
303
273
|
- spec/acts_as_taggable_on/single_table_inheritance_spec.rb
|
|
274
|
+
- spec/acts_as_taggable_on/tag_list_parser_spec.rb
|
|
304
275
|
- spec/acts_as_taggable_on/tag_list_spec.rb
|
|
305
276
|
- spec/acts_as_taggable_on/tag_spec.rb
|
|
277
|
+
- spec/acts_as_taggable_on/taggable/dirty_spec.rb
|
|
306
278
|
- spec/acts_as_taggable_on/taggable_spec.rb
|
|
307
279
|
- spec/acts_as_taggable_on/tagger_spec.rb
|
|
308
280
|
- spec/acts_as_taggable_on/tagging_spec.rb
|
|
@@ -325,8 +297,8 @@ test_files:
|
|
|
325
297
|
- spec/internal/app/models/user.rb
|
|
326
298
|
- spec/internal/config/database.yml.sample
|
|
327
299
|
- spec/internal/db/schema.rb
|
|
328
|
-
- spec/schema.rb
|
|
329
300
|
- spec/spec_helper.rb
|
|
301
|
+
- spec/support/0-helpers.rb
|
|
330
302
|
- spec/support/array.rb
|
|
331
303
|
- spec/support/database.rb
|
|
332
304
|
- spec/support/database_cleaner.rb
|