mongoid_taggable_with_context 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +11 -10
- data/VERSION +1 -1
- data/lib/mongoid/taggable_with_context.rb +50 -35
- data/lib/mongoid/taggable_with_context/aggregation_strategy/map_reduce.rb +10 -39
- data/lib/mongoid/taggable_with_context/aggregation_strategy/real_time.rb +31 -56
- data/mongoid_taggable_with_context.gemspec +35 -39
- metadata +44 -48
data/Gemfile
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
gem 'mongoid', '
|
3
|
+
gem 'mongoid', '>= 2.0.0'
|
4
4
|
|
5
5
|
# Add dependencies to develop your gem here.
|
6
6
|
# Include everything needed to run rake, tests, features, etc.
|
7
7
|
group :development do
|
8
8
|
gem 'database_cleaner'
|
9
|
-
gem 'bson'
|
10
|
-
gem 'bson_ext'
|
11
|
-
gem 'rspec'
|
12
|
-
gem 'yard'
|
13
|
-
gem 'bundler', '
|
14
|
-
gem 'jeweler'
|
15
|
-
gem 'rcov'
|
16
|
-
gem 'reek'
|
17
|
-
gem 'roodi'
|
9
|
+
gem 'bson'
|
10
|
+
gem 'bson_ext'
|
11
|
+
gem 'rspec'
|
12
|
+
gem 'yard'
|
13
|
+
gem 'bundler', '>= 1.0.0'
|
14
|
+
gem 'jeweler'
|
15
|
+
gem 'rcov'
|
16
|
+
gem 'reek'
|
17
|
+
gem 'roodi'
|
18
18
|
end
|
19
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.8.0
|
@@ -1,16 +1,20 @@
|
|
1
1
|
module Mongoid::TaggableWithContext
|
2
2
|
extend ActiveSupport::Concern
|
3
|
-
|
3
|
+
|
4
4
|
class AggregationStrategyMissing < Exception; end
|
5
5
|
|
6
6
|
included do
|
7
7
|
class_attribute :taggable_with_context_options
|
8
|
+
class_attribute :context_array_to_context_hash
|
8
9
|
self.taggable_with_context_options = {}
|
9
|
-
|
10
|
-
delegate "
|
11
|
-
delegate "
|
12
|
-
delegate "
|
13
|
-
delegate "
|
10
|
+
self.context_array_to_context_hash = {}
|
11
|
+
delegate "convert_string_to_array", :to => 'self.class'
|
12
|
+
delegate "convert_array_to_string", :to => 'self.class'
|
13
|
+
delegate "get_tag_separator_for", :to => 'self.class'
|
14
|
+
delegate "tag_contexts", :to => 'self.class'
|
15
|
+
delegate "tag_options_for", :to => 'self.class'
|
16
|
+
delegate "tag_array_attributes", :to => 'self.class'
|
17
|
+
delegate "context_array_to_context_hash", :to => 'self.class'
|
14
18
|
end
|
15
19
|
|
16
20
|
module ClassMethods
|
@@ -44,60 +48,63 @@ module Mongoid::TaggableWithContext
|
|
44
48
|
:array_field => "#{tags_field}_array".to_sym
|
45
49
|
)
|
46
50
|
tags_array_field = options[:array_field]
|
47
|
-
|
51
|
+
|
48
52
|
# register / update settings
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
+
self.taggable_with_context_options[tags_field] = options
|
54
|
+
self.context_array_to_context_hash[options[:array_field]] = tags_field
|
55
|
+
|
53
56
|
# setup fields & indexes
|
54
|
-
field tags_field, :default => ""
|
55
57
|
field tags_array_field, :type => Array, :default => []
|
56
|
-
index tags_array_field
|
57
|
-
|
58
|
+
index tags_array_field
|
59
|
+
|
58
60
|
# singleton methods
|
59
61
|
class_eval <<-END
|
60
62
|
class << self
|
63
|
+
# retrieve all tags ever created for the model
|
61
64
|
def #{tags_field}
|
62
65
|
tags_for(:"#{tags_field}")
|
63
66
|
end
|
64
|
-
|
67
|
+
|
68
|
+
# retrieve all tags ever created for the model with weights
|
65
69
|
def #{tags_field}_with_weight
|
66
70
|
tags_with_weight_for(:"#{tags_field}")
|
67
71
|
end
|
68
|
-
|
72
|
+
|
69
73
|
def #{tags_field}_separator
|
70
74
|
get_tag_separator_for(:"#{tags_field}")
|
71
75
|
end
|
72
|
-
|
76
|
+
|
73
77
|
def #{tags_field}_separator=(value)
|
74
78
|
set_tag_separator_for(:"#{tags_field}", value)
|
75
79
|
end
|
76
|
-
|
80
|
+
|
77
81
|
def #{tags_field}_tagged_with(tags)
|
78
82
|
tagged_with(:"#{tags_field}", tags)
|
79
83
|
end
|
80
84
|
end
|
81
85
|
END
|
82
|
-
|
86
|
+
|
83
87
|
# instance methods
|
84
88
|
class_eval <<-END
|
89
|
+
def #{tags_field}
|
90
|
+
convert_array_to_string(#{tags_array_field}, get_tag_separator_for(:"#{tags_field}"))
|
91
|
+
end
|
85
92
|
def #{tags_field}=(s)
|
86
|
-
super
|
87
93
|
write_attribute(:#{tags_array_field}, convert_string_to_array(s, get_tag_separator_for(:"#{tags_field}")))
|
88
94
|
end
|
89
|
-
|
90
|
-
def #{tags_array_field}=(a)
|
91
|
-
super
|
92
|
-
write_attribute(:#{tags_field}, convert_array_to_string(a, get_tag_separator_for(:"#{tags_field}")))
|
93
|
-
end
|
94
95
|
END
|
95
96
|
end
|
96
|
-
|
97
|
+
|
97
98
|
def tag_contexts
|
98
99
|
self.taggable_with_context_options.keys
|
99
100
|
end
|
100
101
|
|
102
|
+
def tag_array_attributes
|
103
|
+
self.taggable_with_context_options.keys.map do |context|
|
104
|
+
tag_options_for(context)[:array_field]
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
101
108
|
def tag_options_for(context)
|
102
109
|
self.taggable_with_context_options[context]
|
103
110
|
end
|
@@ -105,11 +112,11 @@ module Mongoid::TaggableWithContext
|
|
105
112
|
def tags_for(context, conditions={})
|
106
113
|
raise AggregationStrategyMissing
|
107
114
|
end
|
108
|
-
|
115
|
+
|
109
116
|
def tags_with_weight_for(context, conditions={})
|
110
117
|
raise AggregationStrategyMissing
|
111
118
|
end
|
112
|
-
|
119
|
+
|
113
120
|
def get_tag_separator_for(context)
|
114
121
|
self.taggable_with_context_options[context][:separator]
|
115
122
|
end
|
@@ -117,7 +124,7 @@ module Mongoid::TaggableWithContext
|
|
117
124
|
def set_tag_separator_for(context, value)
|
118
125
|
self.taggable_with_context_options[context][:separator] = value.nil? ? " " : value.to_s
|
119
126
|
end
|
120
|
-
|
127
|
+
|
121
128
|
# Find documents tagged with all tags passed as a parameter, given
|
122
129
|
# as an Array or a String using the configured separator.
|
123
130
|
#
|
@@ -134,15 +141,23 @@ module Mongoid::TaggableWithContext
|
|
134
141
|
array_field = tag_options_for(context)[:array_field]
|
135
142
|
all_in(array_field => tags)
|
136
143
|
end
|
137
|
-
|
144
|
+
|
138
145
|
# Helper method to convert a String to an Array based on the
|
139
146
|
# configured tag separator.
|
140
|
-
def convert_string_to_array(str = "",
|
141
|
-
str.split(
|
147
|
+
def convert_string_to_array(str = "", separator = " ")
|
148
|
+
clean_up_array(str.split(separator))
|
142
149
|
end
|
143
|
-
|
144
|
-
def convert_array_to_string(ary = [],
|
145
|
-
ary.
|
150
|
+
|
151
|
+
def convert_array_to_string(ary = [], separator = " ")
|
152
|
+
clean_up_array(ary).join(separator)
|
153
|
+
end
|
154
|
+
|
155
|
+
def clean_up_array(ary = [])
|
156
|
+
# 0). remove all nil values
|
157
|
+
# 1). strip all white spaces. Could leave blank strings (e.g. foo, , bar, baz)
|
158
|
+
# 2). remove all blank strings
|
159
|
+
# 3). remove duplicate
|
160
|
+
ary.compact.map(&:strip).reject(&:blank?).uniq
|
146
161
|
end
|
147
162
|
end
|
148
163
|
end
|
@@ -2,9 +2,8 @@ module Mongoid::TaggableWithContext::AggregationStrategy
|
|
2
2
|
module MapReduce
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
included do
|
5
|
-
set_callback :
|
6
|
-
set_callback :
|
7
|
-
set_callback :destroy, :after, :update_tags_aggregation_on_destroy
|
5
|
+
set_callback :save, :after, :map_reduce_all_contexts!, :if => :tags_changed?
|
6
|
+
set_callback :destroy, :after, :map_reduce_all_contexts!
|
8
7
|
delegate :aggregation_collection_for, :to => "self.class"
|
9
8
|
end
|
10
9
|
|
@@ -28,50 +27,22 @@ module Mongoid::TaggableWithContext::AggregationStrategy
|
|
28
27
|
end
|
29
28
|
|
30
29
|
protected
|
31
|
-
|
32
|
-
def
|
33
|
-
changes.
|
34
|
-
end
|
35
|
-
|
36
|
-
def trigger_update_tags_aggregation_on_update?
|
37
|
-
!changed_contexts.empty?
|
30
|
+
|
31
|
+
def changed_tag_arrays
|
32
|
+
tag_array_attributes & changes.keys.map(&:to_sym)
|
38
33
|
end
|
39
34
|
|
40
|
-
def
|
41
|
-
|
35
|
+
def tags_changed?
|
36
|
+
!changed_tag_arrays.empty?
|
42
37
|
end
|
43
38
|
|
44
|
-
def
|
45
|
-
return unless trigger_update_tags_aggregation_on_create?
|
46
|
-
|
39
|
+
def map_reduce_all_contexts!
|
47
40
|
tag_contexts.each do |context|
|
48
|
-
|
49
|
-
end
|
50
|
-
end
|
51
|
-
|
52
|
-
def update_tags_aggregation_on_update
|
53
|
-
return unless trigger_update_tags_aggregation_on_update?
|
54
|
-
|
55
|
-
changed_contexts.each do |context|
|
56
|
-
map_reduce_context_tags!(context)
|
41
|
+
map_reduce_context!(context)
|
57
42
|
end
|
58
43
|
end
|
59
|
-
|
60
|
-
def update_tags_aggregation_on_destroy
|
61
|
-
return unless trigger_update_tags_aggregation_on_destroy?
|
62
|
-
|
63
|
-
tag_contexts.each do |context|
|
64
|
-
map_reduce_context_tags!(context)
|
65
|
-
end
|
66
|
-
end
|
67
|
-
|
68
|
-
private
|
69
|
-
|
70
|
-
def changed_contexts
|
71
|
-
tag_contexts & changes.keys.map(&:to_sym)
|
72
|
-
end
|
73
44
|
|
74
|
-
def
|
45
|
+
def map_reduce_context!(context)
|
75
46
|
field = tag_options_for(context)[:array_field]
|
76
47
|
|
77
48
|
map = <<-END
|
@@ -3,9 +3,8 @@ module Mongoid::TaggableWithContext::AggregationStrategy
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
-
set_callback :
|
7
|
-
set_callback :
|
8
|
-
set_callback :destroy, :after, :decrement_tags_aggregation
|
6
|
+
set_callback :save, :after, :update_tags_aggregations_on_save
|
7
|
+
set_callback :destroy, :after, :update_tags_aggregations_on_destroy
|
9
8
|
end
|
10
9
|
|
11
10
|
module ClassMethods
|
@@ -27,66 +26,42 @@ module Mongoid::TaggableWithContext::AggregationStrategy
|
|
27
26
|
end
|
28
27
|
end
|
29
28
|
|
30
|
-
|
31
|
-
def need_update_tags_aggregation?
|
32
|
-
!changed_contexts.empty?
|
33
|
-
end
|
34
|
-
|
35
|
-
def changed_contexts
|
36
|
-
tag_contexts & changes.keys.map(&:to_sym)
|
37
|
-
end
|
29
|
+
protected
|
38
30
|
|
39
|
-
def
|
40
|
-
|
41
|
-
|
42
|
-
# #changes won't be empty and aggregation
|
43
|
-
# is updated in after_save, so we simply skip it.
|
44
|
-
return unless changes.empty?
|
31
|
+
def update_tags_aggregation(context_array_field, old_tags=[], new_tags=[])
|
32
|
+
context = context_array_to_context_hash[context_array_field]
|
33
|
+
coll = self.class.db.collection(self.class.aggregation_collection_for(context))
|
45
34
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
end
|
35
|
+
old_tags ||= []
|
36
|
+
new_tags ||= []
|
37
|
+
unchanged_tags = old_tags & new_tags
|
38
|
+
tags_removed = old_tags - unchanged_tags
|
39
|
+
tags_added = new_tags - unchanged_tags
|
40
|
+
|
41
|
+
tags_removed.each do |tag|
|
42
|
+
coll.update({:_id => tag}, {'$inc' => {:value => -1}}, :upsert => true)
|
55
43
|
end
|
56
|
-
end
|
57
44
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
field_name = self.class.tag_options_for(context)[:array_field]
|
62
|
-
tags = self.send field_name || []
|
63
|
-
tags.each do |t|
|
64
|
-
coll.update({:_id => t}, {'$inc' => {:value => -1}}, :upsert => true)
|
65
|
-
end
|
66
|
-
end
|
45
|
+
tags_added.each do |tag|
|
46
|
+
coll.update({:_id => tag}, {'$inc' => {:value => 1}}, :upsert => true)
|
47
|
+
end
|
67
48
|
end
|
49
|
+
|
50
|
+
def update_tags_aggregations_on_save
|
51
|
+
tag_array_attributes.each do |context_array|
|
52
|
+
next if changes[context_array].nil?
|
68
53
|
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
changed_contexts.each do |context|
|
73
|
-
coll = self.class.db.collection(self.class.aggregation_collection_for(context))
|
74
|
-
field_name = self.class.tag_options_for(context)[:array_field]
|
75
|
-
old_tags, new_tags = changes["#{field_name}"]
|
76
|
-
old_tags ||= []
|
77
|
-
new_tags ||= []
|
78
|
-
unchanged_tags = old_tags & new_tags
|
79
|
-
tags_removed = old_tags - unchanged_tags
|
80
|
-
tags_added = new_tags - unchanged_tags
|
81
|
-
|
82
|
-
tags_removed.each do |t|
|
83
|
-
coll.update({:_id => t}, {'$inc' => {:value => -1}}, :upsert => true)
|
84
|
-
end
|
85
|
-
|
86
|
-
tags_added.each do |t|
|
87
|
-
coll.update({:_id => t}, {'$inc' => {:value => 1}}, :upsert => true)
|
88
|
-
end
|
54
|
+
old_tags, new_tags = changes[context_array]
|
55
|
+
update_tags_aggregation(context_array, old_tags, new_tags)
|
89
56
|
end
|
90
57
|
end
|
58
|
+
|
59
|
+
def update_tags_aggregations_on_destroy
|
60
|
+
tag_array_attributes.each do |context_array|
|
61
|
+
old_tags = send context_array
|
62
|
+
new_tags = []
|
63
|
+
update_tags_aggregation(context_array, old_tags, new_tags)
|
64
|
+
end
|
65
|
+
end
|
91
66
|
end
|
92
67
|
end
|
@@ -4,14 +4,14 @@
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version = "0.
|
7
|
+
s.name = "mongoid_taggable_with_context"
|
8
|
+
s.version = "0.8.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Aaron Qian"]
|
12
|
-
s.date =
|
13
|
-
s.description =
|
14
|
-
s.email =
|
12
|
+
s.date = "2011-12-20"
|
13
|
+
s.description = "It provides some helpers to create taggable documents with context."
|
14
|
+
s.email = "aq1018@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE.txt",
|
17
17
|
"README.rdoc"
|
@@ -32,56 +32,52 @@ Gem::Specification.new do |s|
|
|
32
32
|
"spec/mongoid_taggable_with_context_spec.rb",
|
33
33
|
"spec/spec_helper.rb"
|
34
34
|
]
|
35
|
-
s.homepage =
|
35
|
+
s.homepage = "http://github.com/aq1018/mongoid_taggable_with_context"
|
36
36
|
s.licenses = ["MIT"]
|
37
37
|
s.require_paths = ["lib"]
|
38
|
-
s.rubygems_version =
|
39
|
-
s.summary =
|
40
|
-
s.test_files = [
|
41
|
-
"spec/mongoid_taggable_with_context_spec.rb",
|
42
|
-
"spec/spec_helper.rb"
|
43
|
-
]
|
38
|
+
s.rubygems_version = "1.8.10"
|
39
|
+
s.summary = "Mongoid taggable behaviour"
|
44
40
|
|
45
41
|
if s.respond_to? :specification_version then
|
46
42
|
s.specification_version = 3
|
47
43
|
|
48
44
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
49
|
-
s.add_runtime_dependency(%q<mongoid>, ["
|
45
|
+
s.add_runtime_dependency(%q<mongoid>, [">= 2.0.0"])
|
50
46
|
s.add_development_dependency(%q<database_cleaner>, [">= 0"])
|
51
|
-
s.add_development_dependency(%q<bson>, ["
|
52
|
-
s.add_development_dependency(%q<bson_ext>, ["
|
53
|
-
s.add_development_dependency(%q<rspec>, ["
|
54
|
-
s.add_development_dependency(%q<yard>, ["
|
55
|
-
s.add_development_dependency(%q<bundler>, ["
|
56
|
-
s.add_development_dependency(%q<jeweler>, ["
|
47
|
+
s.add_development_dependency(%q<bson>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<bson_ext>, [">= 0"])
|
49
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
50
|
+
s.add_development_dependency(%q<yard>, [">= 0"])
|
51
|
+
s.add_development_dependency(%q<bundler>, [">= 1.0.0"])
|
52
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
57
53
|
s.add_development_dependency(%q<rcov>, [">= 0"])
|
58
|
-
s.add_development_dependency(%q<reek>, ["
|
59
|
-
s.add_development_dependency(%q<roodi>, ["
|
54
|
+
s.add_development_dependency(%q<reek>, [">= 0"])
|
55
|
+
s.add_development_dependency(%q<roodi>, [">= 0"])
|
60
56
|
else
|
61
|
-
s.add_dependency(%q<mongoid>, ["
|
57
|
+
s.add_dependency(%q<mongoid>, [">= 2.0.0"])
|
62
58
|
s.add_dependency(%q<database_cleaner>, [">= 0"])
|
63
|
-
s.add_dependency(%q<bson>, ["
|
64
|
-
s.add_dependency(%q<bson_ext>, ["
|
65
|
-
s.add_dependency(%q<rspec>, ["
|
66
|
-
s.add_dependency(%q<yard>, ["
|
67
|
-
s.add_dependency(%q<bundler>, ["
|
68
|
-
s.add_dependency(%q<jeweler>, ["
|
59
|
+
s.add_dependency(%q<bson>, [">= 0"])
|
60
|
+
s.add_dependency(%q<bson_ext>, [">= 0"])
|
61
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
62
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
63
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
64
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
69
65
|
s.add_dependency(%q<rcov>, [">= 0"])
|
70
|
-
s.add_dependency(%q<reek>, ["
|
71
|
-
s.add_dependency(%q<roodi>, ["
|
66
|
+
s.add_dependency(%q<reek>, [">= 0"])
|
67
|
+
s.add_dependency(%q<roodi>, [">= 0"])
|
72
68
|
end
|
73
69
|
else
|
74
|
-
s.add_dependency(%q<mongoid>, ["
|
70
|
+
s.add_dependency(%q<mongoid>, [">= 2.0.0"])
|
75
71
|
s.add_dependency(%q<database_cleaner>, [">= 0"])
|
76
|
-
s.add_dependency(%q<bson>, ["
|
77
|
-
s.add_dependency(%q<bson_ext>, ["
|
78
|
-
s.add_dependency(%q<rspec>, ["
|
79
|
-
s.add_dependency(%q<yard>, ["
|
80
|
-
s.add_dependency(%q<bundler>, ["
|
81
|
-
s.add_dependency(%q<jeweler>, ["
|
72
|
+
s.add_dependency(%q<bson>, [">= 0"])
|
73
|
+
s.add_dependency(%q<bson_ext>, [">= 0"])
|
74
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
75
|
+
s.add_dependency(%q<yard>, [">= 0"])
|
76
|
+
s.add_dependency(%q<bundler>, [">= 1.0.0"])
|
77
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
82
78
|
s.add_dependency(%q<rcov>, [">= 0"])
|
83
|
-
s.add_dependency(%q<reek>, ["
|
84
|
-
s.add_dependency(%q<roodi>, ["
|
79
|
+
s.add_dependency(%q<reek>, [">= 0"])
|
80
|
+
s.add_dependency(%q<roodi>, [">= 0"])
|
85
81
|
end
|
86
82
|
end
|
87
83
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_taggable_with_context
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,23 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
13
|
-
default_executable:
|
12
|
+
date: 2011-12-20 00:00:00.000000000 Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: mongoid
|
17
|
-
requirement: &
|
16
|
+
requirement: &70248022449940 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
|
-
- -
|
19
|
+
- - ! '>='
|
21
20
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.
|
21
|
+
version: 2.0.0
|
23
22
|
type: :runtime
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *70248022449940
|
26
25
|
- !ruby/object:Gem::Dependency
|
27
26
|
name: database_cleaner
|
28
|
-
requirement: &
|
27
|
+
requirement: &70248022449440 !ruby/object:Gem::Requirement
|
29
28
|
none: false
|
30
29
|
requirements:
|
31
30
|
- - ! '>='
|
@@ -33,76 +32,76 @@ dependencies:
|
|
33
32
|
version: '0'
|
34
33
|
type: :development
|
35
34
|
prerelease: false
|
36
|
-
version_requirements: *
|
35
|
+
version_requirements: *70248022449440
|
37
36
|
- !ruby/object:Gem::Dependency
|
38
37
|
name: bson
|
39
|
-
requirement: &
|
38
|
+
requirement: &70248022448940 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
|
-
- -
|
41
|
+
- - ! '>='
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
version:
|
43
|
+
version: '0'
|
45
44
|
type: :development
|
46
45
|
prerelease: false
|
47
|
-
version_requirements: *
|
46
|
+
version_requirements: *70248022448940
|
48
47
|
- !ruby/object:Gem::Dependency
|
49
48
|
name: bson_ext
|
50
|
-
requirement: &
|
49
|
+
requirement: &70248022448420 !ruby/object:Gem::Requirement
|
51
50
|
none: false
|
52
51
|
requirements:
|
53
|
-
- -
|
52
|
+
- - ! '>='
|
54
53
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
54
|
+
version: '0'
|
56
55
|
type: :development
|
57
56
|
prerelease: false
|
58
|
-
version_requirements: *
|
57
|
+
version_requirements: *70248022448420
|
59
58
|
- !ruby/object:Gem::Dependency
|
60
59
|
name: rspec
|
61
|
-
requirement: &
|
60
|
+
requirement: &70248022447920 !ruby/object:Gem::Requirement
|
62
61
|
none: false
|
63
62
|
requirements:
|
64
|
-
- -
|
63
|
+
- - ! '>='
|
65
64
|
- !ruby/object:Gem::Version
|
66
|
-
version:
|
65
|
+
version: '0'
|
67
66
|
type: :development
|
68
67
|
prerelease: false
|
69
|
-
version_requirements: *
|
68
|
+
version_requirements: *70248022447920
|
70
69
|
- !ruby/object:Gem::Dependency
|
71
70
|
name: yard
|
72
|
-
requirement: &
|
71
|
+
requirement: &70248022447420 !ruby/object:Gem::Requirement
|
73
72
|
none: false
|
74
73
|
requirements:
|
75
|
-
- -
|
74
|
+
- - ! '>='
|
76
75
|
- !ruby/object:Gem::Version
|
77
|
-
version: 0
|
76
|
+
version: '0'
|
78
77
|
type: :development
|
79
78
|
prerelease: false
|
80
|
-
version_requirements: *
|
79
|
+
version_requirements: *70248022447420
|
81
80
|
- !ruby/object:Gem::Dependency
|
82
81
|
name: bundler
|
83
|
-
requirement: &
|
82
|
+
requirement: &70248022446920 !ruby/object:Gem::Requirement
|
84
83
|
none: false
|
85
84
|
requirements:
|
86
|
-
- -
|
85
|
+
- - ! '>='
|
87
86
|
- !ruby/object:Gem::Version
|
88
87
|
version: 1.0.0
|
89
88
|
type: :development
|
90
89
|
prerelease: false
|
91
|
-
version_requirements: *
|
90
|
+
version_requirements: *70248022446920
|
92
91
|
- !ruby/object:Gem::Dependency
|
93
92
|
name: jeweler
|
94
|
-
requirement: &
|
93
|
+
requirement: &70248022446440 !ruby/object:Gem::Requirement
|
95
94
|
none: false
|
96
95
|
requirements:
|
97
|
-
- -
|
96
|
+
- - ! '>='
|
98
97
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
98
|
+
version: '0'
|
100
99
|
type: :development
|
101
100
|
prerelease: false
|
102
|
-
version_requirements: *
|
101
|
+
version_requirements: *70248022446440
|
103
102
|
- !ruby/object:Gem::Dependency
|
104
103
|
name: rcov
|
105
|
-
requirement: &
|
104
|
+
requirement: &70248022445860 !ruby/object:Gem::Requirement
|
106
105
|
none: false
|
107
106
|
requirements:
|
108
107
|
- - ! '>='
|
@@ -110,29 +109,29 @@ dependencies:
|
|
110
109
|
version: '0'
|
111
110
|
type: :development
|
112
111
|
prerelease: false
|
113
|
-
version_requirements: *
|
112
|
+
version_requirements: *70248022445860
|
114
113
|
- !ruby/object:Gem::Dependency
|
115
114
|
name: reek
|
116
|
-
requirement: &
|
115
|
+
requirement: &70248022445360 !ruby/object:Gem::Requirement
|
117
116
|
none: false
|
118
117
|
requirements:
|
119
|
-
- -
|
118
|
+
- - ! '>='
|
120
119
|
- !ruby/object:Gem::Version
|
121
|
-
version:
|
120
|
+
version: '0'
|
122
121
|
type: :development
|
123
122
|
prerelease: false
|
124
|
-
version_requirements: *
|
123
|
+
version_requirements: *70248022445360
|
125
124
|
- !ruby/object:Gem::Dependency
|
126
125
|
name: roodi
|
127
|
-
requirement: &
|
126
|
+
requirement: &70248022444840 !ruby/object:Gem::Requirement
|
128
127
|
none: false
|
129
128
|
requirements:
|
130
|
-
- -
|
129
|
+
- - ! '>='
|
131
130
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
131
|
+
version: '0'
|
133
132
|
type: :development
|
134
133
|
prerelease: false
|
135
|
-
version_requirements: *
|
134
|
+
version_requirements: *70248022444840
|
136
135
|
description: It provides some helpers to create taggable documents with context.
|
137
136
|
email: aq1018@gmail.com
|
138
137
|
executables: []
|
@@ -155,7 +154,6 @@ files:
|
|
155
154
|
- mongoid_taggable_with_context.gemspec
|
156
155
|
- spec/mongoid_taggable_with_context_spec.rb
|
157
156
|
- spec/spec_helper.rb
|
158
|
-
has_rdoc: true
|
159
157
|
homepage: http://github.com/aq1018/mongoid_taggable_with_context
|
160
158
|
licenses:
|
161
159
|
- MIT
|
@@ -171,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
171
169
|
version: '0'
|
172
170
|
segments:
|
173
171
|
- 0
|
174
|
-
hash:
|
172
|
+
hash: -3893883792332336136
|
175
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
174
|
none: false
|
177
175
|
requirements:
|
@@ -180,10 +178,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
178
|
version: '0'
|
181
179
|
requirements: []
|
182
180
|
rubyforge_project:
|
183
|
-
rubygems_version: 1.
|
181
|
+
rubygems_version: 1.8.10
|
184
182
|
signing_key:
|
185
183
|
specification_version: 3
|
186
184
|
summary: Mongoid taggable behaviour
|
187
|
-
test_files:
|
188
|
-
- spec/mongoid_taggable_with_context_spec.rb
|
189
|
-
- spec/spec_helper.rb
|
185
|
+
test_files: []
|