mongoid-tags 0.3.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +7 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile +1 -1
- data/LICENSE.md +20 -0
- data/README.md +8 -21
- data/Rakefile +10 -0
- data/lib/mongoid/tags.rb +132 -9
- data/lib/mongoid/tags.tt +7 -3
- data/lib/mongoid/tags/version.rb +1 -1
- data/mongoid-tags.gemspec +18 -14
- data/test/integration_test.rb +38 -3
- data/test/mongoid.yml +0 -2
- data/test/tags_test.rb +23 -9
- data/test/test_helper.rb +1 -0
- metadata +25 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cddf6fe5b25717c93d1e89b7d9de37b80fb64464
|
4
|
+
data.tar.gz: fd6d7ec565cec4c463023284e10dbf4b33c771ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbbeb676b72c5e002f652b892a1adaad91d9a45702d700e092cf03fcccf66b378ec118917214683fd7fcacd11813b1146f8e40a32680397ac90d58b630a31e17
|
7
|
+
data.tar.gz: d49e6435a96626e5f4415c3595b318cbec2e3cd606e93f4727bd824d61bb40c096877852642889e1270eba77eaa44721154ce7039fb2246b9072eb5f640019bc
|
data/.yardopts
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/LICENSE.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2012-2014 Mario Uher
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -19,9 +19,7 @@ class Document
|
|
19
19
|
include Mongoid::Document
|
20
20
|
include Mongoid::Tags
|
21
21
|
end
|
22
|
-
```
|
23
22
|
|
24
|
-
```ruby
|
25
23
|
# Documents tagged foo || bar
|
26
24
|
Document.tagged('foo bar')
|
27
25
|
|
@@ -30,9 +28,15 @@ Document.tagged('+foo bar')
|
|
30
28
|
|
31
29
|
# Documents tagged foo, but !bar
|
32
30
|
Document.tagged('foo -bar')
|
31
|
+
|
32
|
+
# Documents tagged foo and bar or baz
|
33
|
+
Document.tagged('(+foo +bar) baz')
|
34
|
+
|
35
|
+
# Documents tagged foo and bar, or foo and baz
|
36
|
+
Document.tagged('(+foo +bar)(+foo +baz)')
|
33
37
|
```
|
34
38
|
|
35
|
-
Be sure to checkout
|
39
|
+
Be sure to checkout test/integration_test.rb for more examples. By the way, `tagged` returns a `Mongoid::Criteria` object so you can chain it to your existing criteria, e.g: `Document.where(published: true).tagged('foo').desc(:created_at)`
|
36
40
|
|
37
41
|
## Contributing
|
38
42
|
|
@@ -48,21 +52,4 @@ Be sure to checkout spec/integration_spec.rb for more examples. By the way, `tag
|
|
48
52
|
|
49
53
|
Copyright (c) 2012-2014 Mario Uher
|
50
54
|
|
51
|
-
|
52
|
-
a copy of this software and associated documentation files (the
|
53
|
-
"Software"), to deal in the Software without restriction, including
|
54
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
55
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
56
|
-
permit persons to whom the Software is furnished to do so, subject to
|
57
|
-
the following conditions:
|
58
|
-
|
59
|
-
The above copyright notice and this permission notice shall be
|
60
|
-
included in all copies or substantial portions of the Software.
|
61
|
-
|
62
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
63
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
64
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
65
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
66
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
67
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
68
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
55
|
+
See LICENSE.md.
|
data/Rakefile
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
Bundler.require
|
5
|
+
rescue LoadError
|
6
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
7
|
+
end
|
8
|
+
|
9
|
+
YARD::Rake::YardocTask.new(:doc)
|
10
|
+
|
1
11
|
require 'rake/testtask'
|
2
12
|
|
3
13
|
Rake::TestTask.new do |t|
|
data/lib/mongoid/tags.rb
CHANGED
@@ -6,20 +6,45 @@ module Mongoid
|
|
6
6
|
module Tags
|
7
7
|
extend ActiveSupport::Concern
|
8
8
|
|
9
|
+
# @!attribute tags
|
10
|
+
# @return [Array] all tags of the current document
|
9
11
|
included do |base|
|
10
12
|
field :tags, type: Array, default: []
|
11
13
|
index tags: 1
|
12
14
|
end
|
13
15
|
|
14
16
|
module ClassMethods
|
17
|
+
##
|
18
|
+
# Returns a hash representing a Mongoid criteria
|
19
|
+
# for the given tag query.
|
20
|
+
#
|
21
|
+
# @example
|
22
|
+
# hash = Document.selector('foo bar')
|
23
|
+
# hash # => {"tags"=>{"$in"=>["foo", "bar"]}}
|
24
|
+
#
|
25
|
+
# @param [String] query The query you're searching for
|
26
|
+
#
|
27
|
+
# @return [Hash] Hash which can be used as a Mongoid criteria
|
15
28
|
def selector(query)
|
16
|
-
parser.parse(query)
|
17
|
-
|
18
|
-
|
29
|
+
parsed_query = parser.parse(query)
|
30
|
+
raise Mongoid::Tags::Error, parser.failure_reason unless parsed_query
|
31
|
+
|
32
|
+
parsed_query.to_criteria
|
19
33
|
end
|
20
34
|
|
35
|
+
##
|
36
|
+
# Returns a chainable criteria for all documents
|
37
|
+
# found by the given tag query.
|
38
|
+
#
|
39
|
+
# @example
|
40
|
+
# documents = Document.tagged('foo bar')
|
41
|
+
# documents # all documents tagged foo OR bar
|
42
|
+
#
|
43
|
+
# @param [String] query The query you're searching for
|
44
|
+
#
|
45
|
+
# @return [Mongoid::Criteria] Mongoid criteria to retrieve all matching documents
|
21
46
|
def tagged(query)
|
22
|
-
where(
|
47
|
+
where(selector(query))
|
23
48
|
end
|
24
49
|
|
25
50
|
private
|
@@ -28,37 +53,135 @@ module Mongoid
|
|
28
53
|
end
|
29
54
|
end
|
30
55
|
|
56
|
+
##
|
57
|
+
# Representation class for a tag query, e.g. `foo bar`.
|
58
|
+
#
|
59
|
+
# @api private
|
31
60
|
class Query < Treetop::Runtime::SyntaxNode
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
61
|
+
##
|
62
|
+
# Returns a hash representing a Mongoid criteria
|
63
|
+
# for the current query.
|
64
|
+
#
|
65
|
+
# @api private
|
66
|
+
#
|
67
|
+
# @param elements
|
68
|
+
#
|
69
|
+
# @return [Hash] Hash which can be used as a Mongoid criteria
|
70
|
+
def to_criteria(elements = nil)
|
71
|
+
elements ||= self.elements
|
72
|
+
|
73
|
+
criteria = { 'tags' => Hash.new { |h, k| h[k] = [] } }
|
74
|
+
|
75
|
+
elements.each do |element|
|
76
|
+
criteria['tags'][element.operator.selector] << element.to_criteria if element.is_a?(Tag)
|
77
|
+
|
78
|
+
criteria['tags'].merge! to_criteria(Array(element.elements))['tags'] do |_, first, second|
|
79
|
+
first + second
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
criteria
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Representation class for a subquery, e.g. `(foo bar)`.
|
89
|
+
#
|
90
|
+
# @api private
|
91
|
+
class SubQuery < Treetop::Runtime::SyntaxNode
|
92
|
+
##
|
93
|
+
# Returns a hash representing a Mongoid criteria
|
94
|
+
# for the current query.
|
95
|
+
#
|
96
|
+
# @api private
|
97
|
+
#
|
98
|
+
# @param elements
|
99
|
+
#
|
100
|
+
# @return [Hash] Hash which can be used as a Mongoid criteria
|
101
|
+
def to_criteria(elements = nil)
|
102
|
+
elements ||= self.elements
|
103
|
+
|
104
|
+
criteria = []
|
105
|
+
subcriteria = { '$or' => [] }
|
36
106
|
|
37
|
-
|
107
|
+
elements.each do |element|
|
108
|
+
case element
|
109
|
+
when Query
|
110
|
+
criteria << element.to_criteria
|
111
|
+
when SubQuery
|
112
|
+
element.to_criteria['$or'].each do |criterion|
|
113
|
+
criteria << criterion
|
114
|
+
end
|
38
115
|
end
|
39
116
|
end
|
117
|
+
|
118
|
+
criteria.each do |criterion|
|
119
|
+
subcriteria['$or'] << criterion
|
120
|
+
end
|
121
|
+
|
122
|
+
subcriteria
|
40
123
|
end
|
41
124
|
end
|
42
125
|
|
126
|
+
##
|
127
|
+
# Representation class for a tag, e.g. `foo`.
|
128
|
+
#
|
129
|
+
# @api private
|
43
130
|
class Tag < Treetop::Runtime::SyntaxNode
|
131
|
+
##
|
132
|
+
# Returns a string for using this tag in a Mongoid criteria.
|
133
|
+
#
|
134
|
+
# @api private
|
135
|
+
#
|
136
|
+
# @return [String] String representing this tag for a Mongoid criteria
|
44
137
|
def to_criteria
|
45
138
|
tag.text_value
|
46
139
|
end
|
47
140
|
end
|
48
141
|
|
142
|
+
##
|
143
|
+
# Representation class for "or" operator, e.g. ` `.
|
144
|
+
#
|
145
|
+
# @api private
|
49
146
|
class OrOperator < Treetop::Runtime::SyntaxNode
|
147
|
+
##
|
148
|
+
# Returns a string for using this operator in a Mongoid criteria.
|
149
|
+
#
|
150
|
+
# @api private
|
151
|
+
#
|
152
|
+
# @return [String] String representing this operator for a Mongoid criteria
|
50
153
|
def selector
|
51
154
|
'$in'
|
52
155
|
end
|
53
156
|
end
|
54
157
|
|
158
|
+
##
|
159
|
+
# Representation class for "and" operator, e.g. `+`.
|
160
|
+
#
|
161
|
+
# @api private
|
55
162
|
class AndOperator < Treetop::Runtime::SyntaxNode
|
163
|
+
##
|
164
|
+
# Returns a string for using this operator in a Mongoid criteria.
|
165
|
+
#
|
166
|
+
# @api private
|
167
|
+
#
|
168
|
+
# @return [String] String representing this operator for a Mongoid criteria
|
56
169
|
def selector
|
57
170
|
'$all'
|
58
171
|
end
|
59
172
|
end
|
60
173
|
|
174
|
+
##
|
175
|
+
# Representation class for "not" operator, e.g. `-`.
|
176
|
+
#
|
177
|
+
# @api private
|
61
178
|
class NotOperator < Treetop::Runtime::SyntaxNode
|
179
|
+
##
|
180
|
+
# Returns a string for using this operator in a Mongoid criteria.
|
181
|
+
#
|
182
|
+
# @api private
|
183
|
+
#
|
184
|
+
# @return [String] String representing this operator for a Mongoid criteria
|
62
185
|
def selector
|
63
186
|
'$nin'
|
64
187
|
end
|
data/lib/mongoid/tags.tt
CHANGED
@@ -2,15 +2,19 @@ module Mongoid
|
|
2
2
|
module Tags
|
3
3
|
grammar Tags
|
4
4
|
rule query
|
5
|
-
tag (space tag)* <Query>
|
5
|
+
subquery / tag (space tag)* <Query>
|
6
|
+
end
|
7
|
+
|
8
|
+
rule subquery
|
9
|
+
'(' space? query space? ')' space? query? <SubQuery>
|
6
10
|
end
|
7
11
|
|
8
12
|
rule tag
|
9
|
-
operator tag:([a-zA-Z0-
|
13
|
+
operator tag:([a-zA-Z0-9_]+) <Tag>
|
10
14
|
end
|
11
15
|
|
12
16
|
rule operator
|
13
|
-
|
17
|
+
and_operator / not_operator / or_operator
|
14
18
|
end
|
15
19
|
|
16
20
|
rule or_operator
|
data/lib/mongoid/tags/version.rb
CHANGED
data/mongoid-tags.gemspec
CHANGED
@@ -1,19 +1,23 @@
|
|
1
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
2
4
|
require 'mongoid/tags/version'
|
3
5
|
|
4
|
-
Gem::Specification.new do |
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "mongoid-tags"
|
8
|
+
spec.version = Mongoid::Tags::VERSION
|
9
|
+
spec.authors = "Mario Uher"
|
10
|
+
spec.email = "uher.mario@gmail.com"
|
11
|
+
spec.homepage = "https://github.com/haihappen/mongoid-tags"
|
12
|
+
spec.summary = "Simple tagging system with boolean search."
|
13
|
+
spec.description = "Mongoid::Tags adds a simple tagging system to your Mongoid documents, and allows you to query them using a boolean search syntax."
|
14
|
+
spec.license = "MIT"
|
12
15
|
|
13
|
-
|
14
|
-
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
+
spec.require_paths = ["lib"]
|
15
19
|
|
16
|
-
|
17
|
-
|
18
|
-
|
20
|
+
spec.add_dependency 'activesupport', '~> 4'
|
21
|
+
spec.add_dependency 'mongoid', '~> 4'
|
22
|
+
spec.add_dependency 'treetop', '~> 1'
|
19
23
|
end
|
data/test/integration_test.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require_relative 'test_helper'
|
2
2
|
|
3
3
|
# Create all possible combinations of tags.
|
4
|
-
|
5
|
-
%w[foo bar baz].combination(i + 1).each do |tags|
|
4
|
+
4.times do |i|
|
5
|
+
%w[foo bar baz qux].combination(i + 1).each do |tags|
|
6
6
|
Document.create tags: tags
|
7
7
|
end
|
8
8
|
end
|
@@ -16,8 +16,16 @@ def include?(*tags)
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
+
def include_all?(*tags)
|
20
|
+
proc do |document|
|
21
|
+
tags.all? do |tag|
|
22
|
+
document.tags.include?(tag)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
19
26
|
|
20
|
-
|
27
|
+
|
28
|
+
class IntegrationTest < Minitest::Test
|
21
29
|
def test_documents_including_foo
|
22
30
|
assert Document.tagged('foo').all? &include?('foo')
|
23
31
|
end
|
@@ -117,4 +125,31 @@ class IntegrationTest < Minitest::Unit::TestCase
|
|
117
125
|
assert documents.none? &include?('bar')
|
118
126
|
assert documents.none? &include?('baz')
|
119
127
|
end
|
128
|
+
|
129
|
+
|
130
|
+
def test_documents_including_both_foo_and_bar_and_or_baz
|
131
|
+
documents = Document.tagged('(+foo +bar) baz').to_a
|
132
|
+
|
133
|
+
assert documents.any? &include_all?('foo', 'bar')
|
134
|
+
documents.delete_if &include_all?('foo', 'bar')
|
135
|
+
assert documents.all? &include?('baz')
|
136
|
+
end
|
137
|
+
|
138
|
+
|
139
|
+
def test_documents_including_both_foo_and_bar_and_or_baz_or_qux
|
140
|
+
documents = Document.tagged('(+foo +bar) baz qux').to_a
|
141
|
+
|
142
|
+
assert documents.any? &include_all?('foo', 'bar')
|
143
|
+
documents.delete_if &include_all?('foo', 'bar')
|
144
|
+
assert documents.any? &include?('baz', 'qux')
|
145
|
+
end
|
146
|
+
|
147
|
+
|
148
|
+
def test_documents_including_foo_and_bar_or_baz_and_qux
|
149
|
+
documents = Document.tagged('(+foo +bar)(+baz +qux)').to_a
|
150
|
+
|
151
|
+
assert documents.any? &include_all?('foo', 'bar')
|
152
|
+
documents.delete_if &include_all?('foo', 'bar')
|
153
|
+
assert documents.any? &include_all?('baz', 'qux')
|
154
|
+
end
|
120
155
|
end
|
data/test/mongoid.yml
CHANGED
data/test/tags_test.rb
CHANGED
@@ -1,19 +1,33 @@
|
|
1
1
|
require_relative 'test_helper'
|
2
2
|
|
3
|
-
class TagsTest < Minitest::
|
3
|
+
class TagsTest < Minitest::Test
|
4
4
|
def assert_selector(query, selector)
|
5
5
|
assert_equal selector, Document.selector(query)
|
6
6
|
end
|
7
7
|
|
8
8
|
def test_valid_queries
|
9
|
-
assert_selector 'foo', '$in' => %w[foo]
|
10
|
-
assert_selector '+foo', '$all' => %w[foo]
|
11
|
-
assert_selector '-foo', '$nin' => %w[foo]
|
12
|
-
assert_selector 'foo bar', '$in' => %w[foo bar]
|
13
|
-
assert_selector 'foo +bar', '$in' => %w[foo], '$all' => %w[bar]
|
14
|
-
assert_selector 'foo +bar +baz', '$in' => %w[foo], '$all' => %w[bar baz]
|
15
|
-
assert_selector 'foo +bar baz', '$in' => %w[foo baz], '$all' => %w[bar]
|
16
|
-
assert_selector 'foo +bar -baz', '$in' => %w[foo], '$all' => %w[bar], '$nin' => %w[baz]
|
9
|
+
assert_selector 'foo', { 'tags' => { '$in' => %w[foo] }}
|
10
|
+
assert_selector '+foo', { 'tags' => { '$all' => %w[foo] }}
|
11
|
+
assert_selector '-foo', { 'tags' => { '$nin' => %w[foo] }}
|
12
|
+
assert_selector 'foo bar', { 'tags' => { '$in' => %w[foo bar] }}
|
13
|
+
assert_selector 'foo +bar', { 'tags' => { '$in' => %w[foo], '$all' => %w[bar] }}
|
14
|
+
assert_selector 'foo +bar +baz', { 'tags' => { '$in' => %w[foo], '$all' => %w[bar baz] }}
|
15
|
+
assert_selector 'foo +bar baz', { 'tags' => { '$in' => %w[foo baz], '$all' => %w[bar] }}
|
16
|
+
assert_selector 'foo +bar -baz', { 'tags' => { '$in' => %w[foo], '$all' => %w[bar], '$nin' => %w[baz] }}
|
17
|
+
|
18
|
+
assert_selector '(foo)', { '$or' => [{ 'tags' => { '$in' => %w[foo] } }] }
|
19
|
+
assert_selector '(foo bar)', { '$or' => [{ 'tags' => { '$in' => %w[foo bar] } }] }
|
20
|
+
assert_selector '( foo bar )', { '$or' => [{ 'tags' => { '$in' => %w[foo bar] } }] }
|
21
|
+
assert_selector '(foo)(bar)', { '$or' => [{ 'tags' => { '$in' => %w[foo] } }, { 'tags' => { '$in' => %w[bar] } }] }
|
22
|
+
assert_selector '(foo)(bar)(baz)', { '$or' => [{ 'tags' => { '$in' => %w[foo] } }, { 'tags' => { '$in' => %w[bar] } }, { 'tags' => { '$in' => %w[baz] } }] }
|
23
|
+
assert_selector '(+foo)(-bar)', { '$or' => [{ 'tags' => { '$all' => %w[foo] } }, { 'tags' => { '$nin' => %w[bar] } }] }
|
24
|
+
|
25
|
+
assert_selector '(+foo +bar)(+foo +baz)', { '$or' => [{ 'tags' => { '$all' => %w[foo bar] } }, { 'tags' => { '$all' => %w[foo baz] } }] }
|
26
|
+
assert_selector '(+foo +bar)(+foo +baz)(+foo +qux)', { '$or' => [{ 'tags' => { '$all' => %w[foo bar] } }, { 'tags' => { '$all' => %w[foo baz] } }, { 'tags' => { '$all' => %w[foo qux] } }] }
|
27
|
+
|
28
|
+
assert_selector '(+foo +bar) baz qux', { '$or' => [{ 'tags' => { '$all' => %w[foo bar] } }, { 'tags' => { '$in' => %w[baz qux] } } ]}
|
29
|
+
|
30
|
+
assert_selector '_foo _bar', { 'tags' => { '$in' => %w[_foo _bar] }}
|
17
31
|
end
|
18
32
|
|
19
33
|
def test_invalid_queries
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid-tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mario Uher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: treetop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '1'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '1'
|
55
55
|
description: Mongoid::Tags adds a simple tagging system to your Mongoid documents,
|
56
56
|
and allows you to query them using a boolean search syntax.
|
57
57
|
email: uher.mario@gmail.com
|
@@ -60,8 +60,10 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- ".yardopts"
|
63
64
|
- CHANGELOG.md
|
64
65
|
- Gemfile
|
66
|
+
- LICENSE.md
|
65
67
|
- README.md
|
66
68
|
- Rakefile
|
67
69
|
- lib/mongoid/tags.rb
|
@@ -73,7 +75,8 @@ files:
|
|
73
75
|
- test/tags_test.rb
|
74
76
|
- test/test_helper.rb
|
75
77
|
homepage: https://github.com/haihappen/mongoid-tags
|
76
|
-
licenses:
|
78
|
+
licenses:
|
79
|
+
- MIT
|
77
80
|
metadata: {}
|
78
81
|
post_install_message:
|
79
82
|
rdoc_options: []
|
@@ -91,8 +94,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
91
94
|
version: '0'
|
92
95
|
requirements: []
|
93
96
|
rubyforge_project:
|
94
|
-
rubygems_version: 2.2.
|
97
|
+
rubygems_version: 2.2.2
|
95
98
|
signing_key:
|
96
99
|
specification_version: 4
|
97
100
|
summary: Simple tagging system with boolean search.
|
98
|
-
test_files:
|
101
|
+
test_files:
|
102
|
+
- test/integration_test.rb
|
103
|
+
- test/mongoid.yml
|
104
|
+
- test/tags_test.rb
|
105
|
+
- test/test_helper.rb
|
106
|
+
has_rdoc:
|