polytag 0.0.4 → 0.1.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.
- data/.DS_Store +0 -0
- data/.pryrc +27 -0
- data/.rspec +3 -1
- data/README.md +26 -4
- data/lib/.DS_Store +0 -0
- data/lib/generators/polytag/.DS_Store +0 -0
- data/lib/generators/polytag/install/.DS_Store +0 -0
- data/lib/generators/polytag/install/templates/create_polytag_tables.rb +25 -11
- data/lib/polytag.rb +221 -58
- data/lib/polytag/concerns/tag_owner.rb +31 -0
- data/lib/polytag/concerns/tag_owner/association_extensions.rb +15 -0
- data/lib/polytag/concerns/tag_owner/association_extensions/owned_tags.rb +16 -0
- data/lib/polytag/concerns/tag_owner/class_helpers.rb +25 -0
- data/lib/polytag/concerns/tag_owner/model_helpers.rb +78 -0
- data/lib/polytag/concerns/taggable.rb +24 -0
- data/lib/polytag/concerns/taggable/association_extensions.rb +15 -0
- data/lib/polytag/concerns/taggable/class_helpers.rb +16 -0
- data/lib/polytag/concerns/taggable/model_helpers.rb +60 -0
- data/lib/polytag/connection.rb +27 -0
- data/lib/polytag/exceptions.rb +7 -0
- data/lib/polytag/tag.rb +6 -24
- data/lib/polytag/tag_group.rb +8 -46
- data/lib/polytag/version.rb +1 -1
- data/polytag.gemspec +7 -3
- data/spec/spec_helper.rb +15 -10
- data/spec/specs/owner_spec.rb +104 -0
- data/spec/specs/taggable_with_owner_spec.rb +120 -0
- data/spec/specs/taggable_without_owner_spec.rb +59 -0
- data/spec/support/active_record.rb +6 -6
- data/spec/support/owner.rb +1 -1
- data/spec/support/taggable.rb +3 -0
- metadata +115 -46
- checksums.yaml +0 -7
- data/circle.yml +0 -3
- data/lib/polytag/tag_group/owner.rb +0 -17
- data/lib/polytag/tag_relation.rb +0 -15
- data/spec/specs/polytag_querying_spec.rb +0 -56
- data/spec/specs/polytag_test_taggable_four_spec.rb +0 -54
- data/spec/specs/polytag_test_taggable_one_spec.rb +0 -47
- data/spec/specs/polytag_test_taggable_three_spec.rb +0 -51
- data/spec/specs/polytag_test_taggable_two_spec.rb +0 -51
- data/spec/support/test_taggable_four.rb +0 -7
- data/spec/support/test_taggable_one.rb +0 -3
- data/spec/support/test_taggable_three.rb +0 -8
- data/spec/support/test_taggable_two.rb +0 -7
data/spec/spec_helper.rb
CHANGED
@@ -3,8 +3,10 @@ GEM_DIR = File.dirname(SPEC_DIR)
|
|
3
3
|
|
4
4
|
# Load dependencies
|
5
5
|
require 'rspec/rails/extensions/active_record/base'
|
6
|
+
require 'active_support'
|
6
7
|
require 'active_record'
|
7
8
|
require 'awesome_print'
|
9
|
+
require 'database_cleaner'
|
8
10
|
|
9
11
|
# Load in the support for AR
|
10
12
|
require 'support/active_record'
|
@@ -14,10 +16,7 @@ require 'polytag'
|
|
14
16
|
|
15
17
|
# The test models
|
16
18
|
require 'support/owner'
|
17
|
-
require 'support/
|
18
|
-
require 'support/test_taggable_two'
|
19
|
-
require 'support/test_taggable_three'
|
20
|
-
require 'support/test_taggable_four'
|
19
|
+
require 'support/taggable'
|
21
20
|
|
22
21
|
# This file was generated by the `rspec --init` command. Conventionally, all
|
23
22
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
@@ -31,12 +30,18 @@ RSpec.configure do |config|
|
|
31
30
|
config.run_all_when_everything_filtered = true
|
32
31
|
config.filter_run :focus
|
33
32
|
|
34
|
-
#
|
35
|
-
config.
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
33
|
+
# Use DatabaseCleaner for testing
|
34
|
+
config.before(:suite) do
|
35
|
+
DatabaseCleaner.strategy = :transaction
|
36
|
+
DatabaseCleaner.clean_with(:truncation)
|
37
|
+
end
|
38
|
+
|
39
|
+
config.before(:each) do
|
40
|
+
DatabaseCleaner.start
|
41
|
+
end
|
42
|
+
|
43
|
+
config.after(:each) do
|
44
|
+
DatabaseCleaner.clean
|
40
45
|
end
|
41
46
|
|
42
47
|
# Run specs in random order to surface order dependencies. If you find an
|
@@ -0,0 +1,104 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Owner ::" do
|
4
|
+
let!(:time) { Time.now.to_i }
|
5
|
+
let(:owner) { Owner.create(name: "test_#{time}") }
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
owner.tag_group.add_tag(:pizza)
|
9
|
+
owner.tag_group.add_tag(:apple, "Fruit")
|
10
|
+
end
|
11
|
+
|
12
|
+
it "Should create a model of Owner" do
|
13
|
+
owner.name.should eq("test_#{time}")
|
14
|
+
owner.should be_a(Owner)
|
15
|
+
end
|
16
|
+
|
17
|
+
context "Tag Groups ::" do
|
18
|
+
it "Should find the \"default\" group" do
|
19
|
+
tag_group = owner.tag_groups.default
|
20
|
+
tag_group.should be_a(::Polytag::TagGroup)
|
21
|
+
tag_group.owner.should eq(owner)
|
22
|
+
tag_group.name.should eq("default")
|
23
|
+
end
|
24
|
+
|
25
|
+
it "Should find the \"Fruit\" tag group" do
|
26
|
+
tag_group = owner.tag_groups.get("Fruit")
|
27
|
+
tag_group.should be_a(::Polytag::TagGroup)
|
28
|
+
tag_group.owner.should eq(owner)
|
29
|
+
tag_group.name.should eq("Fruit")
|
30
|
+
end
|
31
|
+
|
32
|
+
it "Should allow a tag group with the same name on other owners" do
|
33
|
+
other_owner = Owner.create
|
34
|
+
|
35
|
+
# Create a tag (which also creates a tag group)
|
36
|
+
other_owner.tag_group.add_tag(:sub)
|
37
|
+
|
38
|
+
tag_group = owner.tag_groups.default
|
39
|
+
tag_group.should be_a(::Polytag::TagGroup)
|
40
|
+
|
41
|
+
other_tag_group = other_owner.tag_groups.default
|
42
|
+
other_tag_group.should be_a(::Polytag::TagGroup)
|
43
|
+
|
44
|
+
tag_group.should_not eq(other_tag_group)
|
45
|
+
|
46
|
+
tag_group.owner.should eq(owner)
|
47
|
+
tag_group.name.should eq("default")
|
48
|
+
tag_group.tags.map(&:name).should eq(['pizza'])
|
49
|
+
|
50
|
+
other_tag_group.owner.should eq(other_owner)
|
51
|
+
other_tag_group.name.should eq("default")
|
52
|
+
other_tag_group.tags.map(&:name).should eq(['sub'])
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "Owned Tags ::" do
|
57
|
+
it "Should find the tag in the \"default\" group" do
|
58
|
+
tag_group = owner.tag_groups.default
|
59
|
+
tag_group.should be_a(::Polytag::TagGroup)
|
60
|
+
tag_group.owner.should eq(owner)
|
61
|
+
tag_group.tags.map(&:name).should eq(['pizza'])
|
62
|
+
end
|
63
|
+
|
64
|
+
it "Should find the tag in the \"Fruit\" group" do
|
65
|
+
tag_group = owner.tag_groups.get("Fruit")
|
66
|
+
tag_group.should be_a(::Polytag::TagGroup)
|
67
|
+
tag_group.owner.should eq(owner)
|
68
|
+
tag_group.tags.map(&:name).should eq(['apple'])
|
69
|
+
end
|
70
|
+
|
71
|
+
# Adding this spec because it was a problem in testing
|
72
|
+
it "Should allow tags with the same name in other groups" do
|
73
|
+
owner.tag_group.add_tag(:apple)
|
74
|
+
|
75
|
+
tag_group = owner.tag_groups.get("Fruit")
|
76
|
+
tag_group.should be_a(::Polytag::TagGroup)
|
77
|
+
tag_group.owner.should eq(owner)
|
78
|
+
tag_group.tags.map(&:name).should eq(['apple'])
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
context "Finder Methods ::" do
|
83
|
+
it "Should find the owner by Tag Group" do
|
84
|
+
@owners = Owner.has_tag_group('default')
|
85
|
+
end
|
86
|
+
|
87
|
+
it "Should find the owner by Tag without Tag Group (even if the tag is in a group)" do
|
88
|
+
@owners = Owner.has_tag('apple')
|
89
|
+
end
|
90
|
+
|
91
|
+
it "Should find the owner by Tag with Tag Group" do
|
92
|
+
@owners = Owner.has_tag('apple', 'Fruit')
|
93
|
+
end
|
94
|
+
|
95
|
+
after(:each) do
|
96
|
+
@owners.should include(owner)
|
97
|
+
@owners.first.tag_group.exist?('Fruit').should be_true
|
98
|
+
@owners.first.tag_group.exist?('default').should be_true
|
99
|
+
@owners.first.tag_group.owns_tag?('pizza').should be_true
|
100
|
+
@owners.first.tag_group.owns_tag?('apple').should be_false
|
101
|
+
@owners.first.tag_group.owns_tag?('apple', 'Fruit').should be_true
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Taggable With Owner ::" do
|
4
|
+
let!(:time) { Time.now.to_i }
|
5
|
+
let(:owner) { Owner.create }
|
6
|
+
let(:taggable) { Taggable.create(name: "test_#{time}") }
|
7
|
+
|
8
|
+
before(:each) do
|
9
|
+
taggable.tag.add(:apple, tag_group_owner: owner)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "Should create a model of Taggable" do
|
13
|
+
taggable.name.should eq("test_#{time}")
|
14
|
+
taggable.should be_a(Taggable)
|
15
|
+
end
|
16
|
+
|
17
|
+
context "Add a tag ::" do
|
18
|
+
it "Should find the tag with the right owner and group" do
|
19
|
+
tags = taggable.tags(true)
|
20
|
+
|
21
|
+
tags.size.should eq(1)
|
22
|
+
tags.first.name.should eq('apple')
|
23
|
+
tags.first.tag_group.name.should eq('default')
|
24
|
+
tags.first.tag_group.owner.should eq(owner)
|
25
|
+
end
|
26
|
+
|
27
|
+
it "Should find the tag via has_tag?" do
|
28
|
+
taggable.tag.has_tag?(:apple, tag_group_owner: owner).should be_true
|
29
|
+
end
|
30
|
+
|
31
|
+
context "Add another tag ::" do
|
32
|
+
before(:each) do
|
33
|
+
taggable.tag.add(:peach)
|
34
|
+
end
|
35
|
+
|
36
|
+
it "Should not conflict with model only tags" do
|
37
|
+
taggable.tag.add(:apple)
|
38
|
+
tags = taggable.tags(true)
|
39
|
+
|
40
|
+
# Peach, Apple, Apple (where one of the apples is in a tag group)
|
41
|
+
tags.size.should be(3)
|
42
|
+
tags.map(&:name).should eq(['apple', 'peach', 'apple'])
|
43
|
+
end
|
44
|
+
|
45
|
+
it "Should find only one due to a owner constraint" do
|
46
|
+
tags = taggable.tags(true)
|
47
|
+
tags.size.should eq(2) # Should see both
|
48
|
+
|
49
|
+
# Get only the tags attached to the owner
|
50
|
+
tags = tags.tag_group(tag_group_owner: owner)
|
51
|
+
tags.size.should eq(1) # Now the constainst is applied we should see less.
|
52
|
+
tags.map(&:name).should eq(['apple'])
|
53
|
+
tags.first.tag_group.owner.should eq(owner)
|
54
|
+
tags.first.tag_group.should eq(owner.tag_groups.default)
|
55
|
+
end
|
56
|
+
|
57
|
+
it "and find both tags" do
|
58
|
+
tags = taggable.tags(true)
|
59
|
+
tags.size.should eq(2)
|
60
|
+
tags.map(&:name).should eq(['apple', 'peach'])
|
61
|
+
end
|
62
|
+
|
63
|
+
it "and it Should not delete the original without an owner constraint" do
|
64
|
+
taggable.tag.del(:apple)
|
65
|
+
|
66
|
+
tags = taggable.tags(true)
|
67
|
+
tags.size.should eq(2)
|
68
|
+
tags.map(&:name).should eq(['apple', 'peach'])
|
69
|
+
end
|
70
|
+
|
71
|
+
it "and it Should delete the original with an owner constraint" do
|
72
|
+
taggable.tag.del(:apple, tag_group_owner: owner)
|
73
|
+
|
74
|
+
tags = taggable.tags(true)
|
75
|
+
tags.size.should eq(1)
|
76
|
+
tags.map(&:name).should eq(['peach'])
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
it "Should find model by tag" do
|
82
|
+
taggables = Taggable.has_tag(:apple, tag_group_owner: owner)
|
83
|
+
taggables.size.should eq(1)
|
84
|
+
taggables.should include(taggable)
|
85
|
+
tags = taggables.first.tags
|
86
|
+
tags.size.should eq(1)
|
87
|
+
tags.first.name.should eq('apple')
|
88
|
+
end
|
89
|
+
|
90
|
+
context "Many2Many2Many Connection Hopping ::" do
|
91
|
+
it "Should find Owner by Tag" do
|
92
|
+
tag = taggable.tag.get(:apple, tag_group: :default)
|
93
|
+
tag.should be_a(Polytag::Connection)
|
94
|
+
tag.name.should eq('apple')
|
95
|
+
tag.tag_group.name.should eq('default')
|
96
|
+
tag.owner.should eq(owner)
|
97
|
+
end
|
98
|
+
|
99
|
+
it "Should find Tag by Owner" do
|
100
|
+
tag = owner.owned_tags.get(:apple).first
|
101
|
+
tag.should be_a(Polytag::Connection)
|
102
|
+
tag.name.should eq('apple')
|
103
|
+
tag.tag_group.name.should eq('default')
|
104
|
+
tag.owner.should eq(owner)
|
105
|
+
end
|
106
|
+
|
107
|
+
it "Should find Tag by Owner wiht a Group" do
|
108
|
+
taggable.tag.add(:orange, tag_group: "Fruit", tag_group_owner: owner)
|
109
|
+
|
110
|
+
tags = owner.owned_tags.get(:orange, tag_group: "Fruit")
|
111
|
+
tags.size.should eq(1)
|
112
|
+
|
113
|
+
tag = tags.first
|
114
|
+
tag.should be_a(Polytag::Connection)
|
115
|
+
tag.name.should eq('orange')
|
116
|
+
tag.tag_group.name.should eq('Fruit')
|
117
|
+
tag.owner.should eq(owner)
|
118
|
+
end
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe "Taggable Without Owner ::" do
|
4
|
+
let!(:time) { Time.now.to_i }
|
5
|
+
let(:taggable) { Taggable.create(name: "test_#{time}") }
|
6
|
+
|
7
|
+
before(:each) do
|
8
|
+
taggable.tag.new(:apple)
|
9
|
+
end
|
10
|
+
|
11
|
+
it "Should create a model of Taggable" do
|
12
|
+
taggable.name.should eq("test_#{time}")
|
13
|
+
taggable.should be_a(Taggable)
|
14
|
+
end
|
15
|
+
|
16
|
+
context "Add a tag ::" do
|
17
|
+
it "Should have a tag" do
|
18
|
+
tags = taggable.tags(true)
|
19
|
+
|
20
|
+
tags.size.should eq(1)
|
21
|
+
tags.first.name.should eq('apple')
|
22
|
+
end
|
23
|
+
|
24
|
+
it "Should be able to find tag via has_tag?" do
|
25
|
+
taggable.tag.has_tag?(:apple).should be_true
|
26
|
+
end
|
27
|
+
|
28
|
+
it "Should delete the tag" do
|
29
|
+
taggable.tag.del(:apple)
|
30
|
+
taggable.tags(true).should be_empty
|
31
|
+
end
|
32
|
+
|
33
|
+
it "Should add an another tag" do
|
34
|
+
taggable.tag.new(:peach)
|
35
|
+
tags = taggable.tags(true)
|
36
|
+
|
37
|
+
tags.size.should eq(2)
|
38
|
+
tags.map(&:name).should eq(['apple', 'peach'])
|
39
|
+
end
|
40
|
+
|
41
|
+
it "Should add an another tag and delete the original" do
|
42
|
+
taggable.tag.new(:peach)
|
43
|
+
taggable.tag.del(:apple)
|
44
|
+
tags = taggable.tags(true)
|
45
|
+
|
46
|
+
tags.size.should eq(1)
|
47
|
+
tags.first.name.should eq('peach')
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
it "Should find model by tag" do
|
52
|
+
taggables = Taggable.has_tag(:apple)
|
53
|
+
taggables.size.should eq(1)
|
54
|
+
taggables.should include(taggable)
|
55
|
+
tags = taggables.first.tags
|
56
|
+
tags.size.should eq(1)
|
57
|
+
tags.first.name.should eq('apple')
|
58
|
+
end
|
59
|
+
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
ActiveRecord::Base.establish_connection adapter: "sqlite3", database: ":memory:"
|
2
|
-
|
2
|
+
|
3
|
+
# require 'logger'
|
3
4
|
# ActiveRecord::Base.logger = Logger.new(STDOUT)
|
5
|
+
# ActiveRecord::Base.connection.disable_query_cache!
|
4
6
|
|
5
7
|
# Where is the migration file
|
6
8
|
migration_path = 'lib/generators/polytag/install/templates'
|
@@ -10,11 +12,9 @@ require(migration_file)
|
|
10
12
|
# Run the migration file
|
11
13
|
CreatePolytagTables.up
|
12
14
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
t.timestamps
|
17
|
-
end
|
15
|
+
ActiveRecord::Migration.create_table :taggables do |t|
|
16
|
+
t.string :name
|
17
|
+
t.timestamps
|
18
18
|
end
|
19
19
|
|
20
20
|
ActiveRecord::Migration.create_table :owners do |t|
|
data/spec/support/owner.rb
CHANGED
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polytag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Kelly Becker
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-
|
12
|
+
date: 2013-11-21 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,106 +22,169 @@ dependencies:
|
|
20
22
|
type: :development
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '1.3'
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
31
|
+
name: awesome_print
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- - '>='
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: '0'
|
34
38
|
type: :development
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- - '>='
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: database_cleaner
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ! '>='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
39
60
|
- !ruby/object:Gem::Version
|
40
61
|
version: '0'
|
41
62
|
- !ruby/object:Gem::Dependency
|
42
63
|
name: rspec
|
43
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
44
66
|
requirements:
|
45
|
-
- - '>='
|
67
|
+
- - ! '>='
|
46
68
|
- !ruby/object:Gem::Version
|
47
69
|
version: '0'
|
48
70
|
type: :development
|
49
71
|
prerelease: false
|
50
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
51
74
|
requirements:
|
52
|
-
- - '>='
|
75
|
+
- - ! '>='
|
53
76
|
- !ruby/object:Gem::Version
|
54
77
|
version: '0'
|
55
78
|
- !ruby/object:Gem::Dependency
|
56
79
|
name: rspec-rails
|
57
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
58
82
|
requirements:
|
59
|
-
- - '>='
|
83
|
+
- - ! '>='
|
60
84
|
- !ruby/object:Gem::Version
|
61
85
|
version: '0'
|
62
86
|
type: :development
|
63
87
|
prerelease: false
|
64
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
65
90
|
requirements:
|
66
|
-
- - '>='
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: fuubar
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
67
108
|
- !ruby/object:Gem::Version
|
68
109
|
version: '0'
|
69
110
|
- !ruby/object:Gem::Dependency
|
70
111
|
name: sqlite3
|
71
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
72
114
|
requirements:
|
73
|
-
- - '>='
|
115
|
+
- - ! '>='
|
74
116
|
- !ruby/object:Gem::Version
|
75
117
|
version: '0'
|
76
118
|
type: :development
|
77
119
|
prerelease: false
|
78
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
79
122
|
requirements:
|
80
|
-
- - '>='
|
123
|
+
- - ! '>='
|
81
124
|
- !ruby/object:Gem::Version
|
82
125
|
version: '0'
|
83
126
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
127
|
+
name: rake
|
85
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
86
130
|
requirements:
|
87
|
-
- - '>='
|
131
|
+
- - ! '>='
|
88
132
|
- !ruby/object:Gem::Version
|
89
133
|
version: '0'
|
90
134
|
type: :development
|
91
135
|
prerelease: false
|
92
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
93
138
|
requirements:
|
94
|
-
- - '>='
|
139
|
+
- - ! '>='
|
95
140
|
- !ruby/object:Gem::Version
|
96
141
|
version: '0'
|
97
142
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
143
|
+
name: pry
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ! '>='
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: '0'
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ! '>='
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: activesupport
|
99
160
|
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
100
162
|
requirements:
|
101
|
-
- - '>='
|
163
|
+
- - ! '>='
|
102
164
|
- !ruby/object:Gem::Version
|
103
165
|
version: 3.2.13
|
104
166
|
type: :runtime
|
105
167
|
prerelease: false
|
106
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
107
170
|
requirements:
|
108
|
-
- - '>='
|
171
|
+
- - ! '>='
|
109
172
|
- !ruby/object:Gem::Version
|
110
173
|
version: 3.2.13
|
111
174
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
175
|
+
name: activerecord
|
113
176
|
requirement: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
114
178
|
requirements:
|
115
|
-
- - '>='
|
179
|
+
- - ! '>='
|
116
180
|
- !ruby/object:Gem::Version
|
117
181
|
version: 3.2.13
|
118
182
|
type: :runtime
|
119
183
|
prerelease: false
|
120
184
|
version_requirements: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
121
186
|
requirements:
|
122
|
-
- - '>='
|
187
|
+
- - ! '>='
|
123
188
|
- !ruby/object:Gem::Version
|
124
189
|
version: 3.2.13
|
125
190
|
description: Provides really easy tagging for rails and ActiveRecord models
|
@@ -129,69 +194,73 @@ executables: []
|
|
129
194
|
extensions: []
|
130
195
|
extra_rdoc_files: []
|
131
196
|
files:
|
197
|
+
- .DS_Store
|
132
198
|
- .gitignore
|
199
|
+
- .pryrc
|
133
200
|
- .rspec
|
134
201
|
- Gemfile
|
135
202
|
- LICENSE.txt
|
136
203
|
- README.md
|
137
204
|
- Rakefile
|
138
|
-
-
|
205
|
+
- lib/.DS_Store
|
206
|
+
- lib/generators/polytag/.DS_Store
|
207
|
+
- lib/generators/polytag/install/.DS_Store
|
139
208
|
- lib/generators/polytag/install/install_generator.rb
|
140
209
|
- lib/generators/polytag/install/templates/create_polytag_tables.rb
|
141
210
|
- lib/polytag.rb
|
211
|
+
- lib/polytag/concerns/tag_owner.rb
|
212
|
+
- lib/polytag/concerns/tag_owner/association_extensions.rb
|
213
|
+
- lib/polytag/concerns/tag_owner/association_extensions/owned_tags.rb
|
214
|
+
- lib/polytag/concerns/tag_owner/class_helpers.rb
|
215
|
+
- lib/polytag/concerns/tag_owner/model_helpers.rb
|
216
|
+
- lib/polytag/concerns/taggable.rb
|
217
|
+
- lib/polytag/concerns/taggable/association_extensions.rb
|
218
|
+
- lib/polytag/concerns/taggable/class_helpers.rb
|
219
|
+
- lib/polytag/concerns/taggable/model_helpers.rb
|
220
|
+
- lib/polytag/connection.rb
|
221
|
+
- lib/polytag/exceptions.rb
|
142
222
|
- lib/polytag/tag.rb
|
143
223
|
- lib/polytag/tag_group.rb
|
144
|
-
- lib/polytag/tag_group/owner.rb
|
145
|
-
- lib/polytag/tag_relation.rb
|
146
224
|
- lib/polytag/version.rb
|
147
225
|
- polytag.gemspec
|
148
226
|
- spec/spec_helper.rb
|
149
|
-
- spec/specs/
|
150
|
-
- spec/specs/
|
151
|
-
- spec/specs/
|
152
|
-
- spec/specs/polytag_test_taggable_three_spec.rb
|
153
|
-
- spec/specs/polytag_test_taggable_two_spec.rb
|
227
|
+
- spec/specs/owner_spec.rb
|
228
|
+
- spec/specs/taggable_with_owner_spec.rb
|
229
|
+
- spec/specs/taggable_without_owner_spec.rb
|
154
230
|
- spec/support/active_record.rb
|
155
231
|
- spec/support/owner.rb
|
156
|
-
- spec/support/
|
157
|
-
- spec/support/test_taggable_one.rb
|
158
|
-
- spec/support/test_taggable_three.rb
|
159
|
-
- spec/support/test_taggable_two.rb
|
232
|
+
- spec/support/taggable.rb
|
160
233
|
homepage: http://github.com/JIFFinc/polytag
|
161
234
|
licenses:
|
162
235
|
- MIT
|
163
|
-
metadata: {}
|
164
236
|
post_install_message:
|
165
237
|
rdoc_options: []
|
166
238
|
require_paths:
|
167
239
|
- lib
|
168
240
|
required_ruby_version: !ruby/object:Gem::Requirement
|
241
|
+
none: false
|
169
242
|
requirements:
|
170
|
-
- - '>='
|
243
|
+
- - ! '>='
|
171
244
|
- !ruby/object:Gem::Version
|
172
245
|
version: '0'
|
173
246
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
247
|
+
none: false
|
174
248
|
requirements:
|
175
|
-
- - '>='
|
249
|
+
- - ! '>='
|
176
250
|
- !ruby/object:Gem::Version
|
177
251
|
version: '0'
|
178
252
|
requirements: []
|
179
253
|
rubyforge_project:
|
180
|
-
rubygems_version:
|
254
|
+
rubygems_version: 1.8.23
|
181
255
|
signing_key:
|
182
|
-
specification_version:
|
256
|
+
specification_version: 3
|
183
257
|
summary: Provides really easy tagging for rails and ActiveRecord models
|
184
258
|
test_files:
|
185
259
|
- spec/spec_helper.rb
|
186
|
-
- spec/specs/
|
187
|
-
- spec/specs/
|
188
|
-
- spec/specs/
|
189
|
-
- spec/specs/polytag_test_taggable_three_spec.rb
|
190
|
-
- spec/specs/polytag_test_taggable_two_spec.rb
|
260
|
+
- spec/specs/owner_spec.rb
|
261
|
+
- spec/specs/taggable_with_owner_spec.rb
|
262
|
+
- spec/specs/taggable_without_owner_spec.rb
|
191
263
|
- spec/support/active_record.rb
|
192
264
|
- spec/support/owner.rb
|
193
|
-
- spec/support/
|
194
|
-
- spec/support/test_taggable_one.rb
|
195
|
-
- spec/support/test_taggable_three.rb
|
196
|
-
- spec/support/test_taggable_two.rb
|
265
|
+
- spec/support/taggable.rb
|
197
266
|
has_rdoc:
|