custom_fields 2.0.0.rc13 → 2.1.0.rc

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/README.textile CHANGED
@@ -12,7 +12,7 @@ The main goals:
12
12
 
13
13
  h2. Requirements
14
14
 
15
- ActiveSupport 3.2.1, MongoDB 2.0 and Mongoid 2.4.3
15
+ ActiveSupport 3.2.9, MongoDB 2.0 and Mongoid 2.4.12
16
16
 
17
17
  h2. Examples
18
18
 
@@ -24,6 +24,9 @@ module Mongoid #:nodoc:
24
24
  end
25
25
 
26
26
  alias_method_chain :build, :custom_fields
27
+
28
+ # new should point to the new build method
29
+ alias :new :build_with_custom_fields
27
30
  end
28
31
 
29
32
  end
@@ -101,6 +101,8 @@ module CustomFields
101
101
 
102
102
  # puts "old_metadata = #{old_metadata.klass.inspect} / #{old_metadata.object_id.inspect}" # DEBUG
103
103
 
104
+ # puts "[CustomFields] refresh_metadata_with_custom_fields, #{name.inspect}, self = #{self.inspect}"
105
+
104
106
  self.send(name).metadata = old_metadata.clone.tap do |metadata|
105
107
  # Rails.logger.debug "[CustomFields] refresh_metadata_with_custom_fields #{metadata.klass}" if defined?(Rails) # DEBUG
106
108
 
@@ -84,7 +84,6 @@ module CustomFields
84
84
 
85
85
  end
86
86
 
87
-
88
87
  end
89
88
 
90
89
  end
@@ -2,7 +2,7 @@ module CustomFields
2
2
 
3
3
  module TargetHelpers
4
4
 
5
- # Returns the list of the getters dynamically based on the
5
+ # Return the list of the getters dynamically based on the
6
6
  # custom_fields recipe in order to get the formatted values
7
7
  # of the custom fields.
8
8
  # If a block is passed, then the list will be filtered accordingly with
@@ -15,7 +15,7 @@ module CustomFields
15
15
  # rule['name] != 'foo'
16
16
  # end
17
17
  #
18
- # @returns [ List ] a list of method names (string)
18
+ # @return [ List ] a list of method names (string)
19
19
  #
20
20
  def custom_fields_methods(&filter)
21
21
  self.custom_fields_recipe['rules'].map do |rule|
@@ -28,12 +28,12 @@ module CustomFields
28
28
  end.compact.flatten
29
29
  end
30
30
 
31
- # Lists all the attributes that are used by the custom_fields
31
+ # List all the setters that are used by the custom_fields
32
32
  # in order to get updated thru a html form for instance.
33
33
  #
34
- # @returns [ List ] a list of attributes (string)
34
+ # @return [ List ] a list of method names (string)
35
35
  #
36
- def custom_fields_safe_attributes
36
+ def custom_fields_safe_setters
37
37
  self.custom_fields_recipe['rules'].map do |rule|
38
38
  case rule['type'].to_sym
39
39
  when :date then "formatted_#{rule['name']}"
@@ -46,12 +46,47 @@ module CustomFields
46
46
  end.compact.flatten
47
47
  end
48
48
 
49
- # Determines if the rule defined by the name is a "many" relationship kind.
49
+ # Build a hash for all the non-relationship fields
50
+ # meaning string, text, date, boolean, select, file types.
51
+ # This hash stores their name and their value.
52
+ #
53
+ # @return [ Hash ] Field name / formatted value
54
+ #
55
+ def custom_fields_basic_attributes
56
+ {}.tap do |hash|
57
+ self.non_relationship_custom_fields.each do |rule|
58
+ name, type = rule['name'], rule['type'].to_sym
59
+
60
+ # method of the custom getter
61
+ method_name = "#{type}_attribute_get"
62
+
63
+ hash.merge!(self.class.send(method_name, self, name))
64
+ end
65
+ end
66
+ end
67
+
68
+ # Set the values (and their related fields) for all the non-relationship fields
69
+ # meaning string, text, date, boolean, select, file types.
70
+ #
71
+ # @param [ Hash ] The attributes for the custom fields and their related fields.
72
+ #
73
+ def custom_fields_basic_attributes=(attributes)
74
+ self.non_relationship_custom_fields.each do |rule|
75
+ name, type = rule['name'], rule['type'].to_sym
76
+
77
+ # method of the custom getter
78
+ method_name = "#{type}_attribute_set"
79
+
80
+ self.class.send(method_name, self, name, attributes)
81
+ end
82
+ end
83
+
84
+ # Check if the rule defined by the name is a "many" relationship kind.
50
85
  # A "many" relationship includes "has_many" and "many_to_many"
51
86
  #
52
- # @params [ String ] name The name of the rule
87
+ # @param [ String ] name The name of the rule
53
88
  #
54
- # @returns [ Boolean ] True if the rule is a "many" relationship kind.
89
+ # @return [ Boolean ] True if the rule is a "many" relationship kind.
55
90
  #
56
91
  def is_a_custom_field_many_relationship?(name)
57
92
  rule = self.custom_fields_recipe['rules'].detect do |rule|
@@ -59,31 +94,59 @@ module CustomFields
59
94
  end
60
95
  end
61
96
 
62
- # Returns the names of all the select fields of this object
97
+ # Return the rules of the custom fields which do not describe a relationship.
98
+ #
99
+ # @return [ Array ] List of rules (Hash)
100
+ #
101
+ def non_relationship_custom_fields
102
+ self.custom_fields_recipe['rules'].find_all do |rule|
103
+ !%w(belongs_to has_many many_to_many).include?(rule['type'])
104
+ end
105
+ end
106
+
107
+ # Return the rules of the custom fields which describe a relationship.
108
+ #
109
+ # @return [ Array ] List of rules (Hash)
110
+ #
111
+ def relationship_custom_fields
112
+ self.custom_fields_recipe['rules'].find_all do |rule|
113
+ %w(belongs_to has_many many_to_many).include?(rule['type'])
114
+ end
115
+ end
116
+
117
+ # Return the names of all the select fields of this object
63
118
  def select_custom_fields
64
119
  group_custom_fields 'select'
65
120
  end
66
121
 
67
- # Returns the names of all the file custom_fields of this object
122
+ # Return the names of all the file custom_fields of this object
68
123
  #
69
- # @returns [ Array ] List of names
124
+ # @return [ Array ] List of names
70
125
  #
71
126
  def file_custom_fields
72
127
  group_custom_fields 'file'
73
128
  end
74
129
 
75
- # Returns the names of all the has_many custom_fields of this object
130
+ # Return the names of all the belongs_to custom_fields of this object
131
+ #
132
+ # @return [ Array ] List of names
133
+ #
134
+ def belongs_to_custom_fields
135
+ group_custom_fields 'belongs_to'
136
+ end
137
+
138
+ # Return the names of all the has_many custom_fields of this object
76
139
  #
77
- # @returns [ Array ] Array of array [name, inverse_of]
140
+ # @return [ Array ] Array of array [name, inverse_of]
78
141
  #
79
142
  def has_many_custom_fields
80
143
  group_custom_fields('has_many') { |rule| [rule['name'], rule['inverse_of']] }
81
144
  end
82
145
 
83
- # Returns the names of all the many_to_many custom_fields of this object.
146
+ # Return the names of all the many_to_many custom_fields of this object.
84
147
  # It also adds the property used to set/get the target ids.
85
148
  #
86
- # @returns [ Array ] Array of array [name, <name in singular>_ids]
149
+ # @return [ Array ] Array of array [name, <name in singular>_ids]
87
150
  #
88
151
  def many_to_many_custom_fields
89
152
  group_custom_fields('many_to_many') { |rule| [rule['name'], "#{rule['name'].singularize}_ids"] }
@@ -91,13 +154,13 @@ module CustomFields
91
154
 
92
155
  protected
93
156
 
94
- # Gets the names of the getter methods for a field.
157
+ # Get the names of the getter methods for a field.
95
158
  # The names depend on the field type.
96
159
  #
97
- # @params [ String ] name Name of the field
98
- # @params [ String ] type Type of the field
160
+ # @param [ String ] name Name of the field
161
+ # @param [ String ] type Type of the field
99
162
  #
100
- # @returns [ Object ] A string or an array of names
163
+ # @return [ Object ] A string or an array of names
101
164
  #
102
165
  def custom_fields_getters_for(name, type)
103
166
  case type.to_sym
@@ -12,17 +12,36 @@ module CustomFields
12
12
 
13
13
  module ClassMethods
14
14
 
15
- # Adds a boolean field
15
+ # Adds a boolean field. It can not be required.
16
16
  #
17
17
  # @param [ Class ] klass The class to modify
18
- # @param [ Hash ] rule It contains the name of the field and if it is required or not
18
+ # @param [ Hash ] rule It contains the name of the field.
19
19
  #
20
20
  def apply_boolean_custom_field(klass, rule)
21
21
  klass.field rule['name'], :type => ::Boolean, :localize => rule['localized'] || false, :default => false
22
+ end
23
+
24
+ # Build a hash storing the boolean value (true / false) for
25
+ # a boolean custom field of an instance.
26
+ #
27
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
28
+ # @param [ String ] name The name of the boolean custom field
29
+ #
30
+ # @return [ Hash ] field name => true / false
31
+ #
32
+ def boolean_attribute_get(instance, name)
33
+ default_attribute_get(instance, name)
34
+ end
22
35
 
23
- if rule['required']
24
- klass.validates_presence_of rule['name']
25
- end
36
+ # Set the value for the instance and the boolean field specified by
37
+ # the 2 params.
38
+ #
39
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
40
+ # @param [ String ] name The name of the boolean custom field
41
+ # @param [ Hash ] attributes The attributes used to fetch the values
42
+ #
43
+ def boolean_attribute_set(instance, name, attributes)
44
+ self.default_attribute_set(instance, name, attributes)
26
45
  end
27
46
 
28
47
  end
@@ -31,6 +31,37 @@ module CustomFields
31
31
  end
32
32
  end
33
33
 
34
+ # Build a hash storing the formatted value for
35
+ # a date custom field of an instance.
36
+ #
37
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
38
+ # @param [ String ] name The name of the date custom field
39
+ #
40
+ # @return [ Hash ] field name => formatted date
41
+ #
42
+ def date_attribute_get(instance, name)
43
+ if value = instance.send(:"formatted_#{name}")
44
+ { name => value, "formatted_#{name}" => value }
45
+ else
46
+ {}
47
+ end
48
+ end
49
+
50
+ # Set the value for the instance and the date field specified by
51
+ # the 2 params.
52
+ #
53
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
54
+ # @param [ String ] name The name of the date custom field
55
+ # @param [ Hash ] attributes The attributes used to fetch the values
56
+ #
57
+ def date_attribute_set(instance, name, attributes)
58
+ return unless attributes.key?(name) || attributes.key?("formatted_#{name}")
59
+
60
+ value = attributes[name] || attributes["formatted_#{name}"]
61
+
62
+ instance.send(:"formatted_#{name}=", value)
63
+ end
64
+
34
65
  end
35
66
 
36
67
  protected
@@ -38,7 +69,7 @@ module CustomFields
38
69
  def _set_formatted_date(name, value)
39
70
  if value.is_a?(::String) && !value.blank?
40
71
  date = ::Date._strptime(value, I18n.t('date.formats.default'))
41
- value = ::Date.new(date[:year], date[:mon], date[:mday])
72
+ value = date ? ::Date.new(date[:year], date[:mon], date[:mday]) : nil
42
73
  end
43
74
 
44
75
  self.send(:"#{name}=", value)
@@ -54,6 +54,45 @@ module CustomFields
54
54
  end
55
55
  end
56
56
 
57
+ # Build a hash storing the formatted (or not) values
58
+ # for a custom field of an instance.
59
+ # Since aliases are accepted, we return a hash. Beside,
60
+ # it is more convenient to use (ex: API).
61
+ # By default, it only returns hash with only one entry
62
+ # whose key is the second parameter and the value the
63
+ # value of the field in the instance given in first parameter.
64
+ #
65
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
66
+ # @param [ String ] name The name of the custom field
67
+ #
68
+ # @return [ Hash ] field name => formatted value or empty hash if no value
69
+ #
70
+ def default_attribute_get(instance, name)
71
+ unless (value = instance.send(name.to_sym)).nil?
72
+ { name => instance.send(name.to_sym) }
73
+ else
74
+ {}
75
+ end
76
+ end
77
+
78
+ # Set the value for the instance and the field specified by
79
+ # the 2 params.
80
+ # Since the value can come from different attributes and other
81
+ # params can modify the instance too, we need to pass a hash
82
+ # instead of a single value.
83
+ #
84
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
85
+ # @param [ String ] name The name of the custom field
86
+ # @param [ Hash ] attributes The attributes used to fetch the values
87
+ #
88
+ def default_attribute_set(instance, name, attributes)
89
+ # do not go further if the name is not one of the attributes keys.
90
+ return unless attributes.key?(name)
91
+
92
+ # simple assign
93
+ instance.send(:"#{name}=", attributes[name])
94
+ end
95
+
57
96
  end
58
97
 
59
98
  end
@@ -31,6 +31,35 @@ module CustomFields
31
31
  end
32
32
  end
33
33
 
34
+ # Build a hash storing the url for a file custom field of an instance.
35
+ #
36
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
37
+ # @param [ String ] name The name of the file custom field
38
+ #
39
+ # @return [ Hash ] field name => url or empty hash if no file
40
+ #
41
+ def file_attribute_get(instance, name)
42
+ if instance.send(:"#{name}?")
43
+ value = instance.send(name.to_sym).url
44
+ { name => value, "#{name}_url" => value }
45
+ else
46
+ {}
47
+ end
48
+ end
49
+
50
+ # Set the value for the instance and the file field specified by
51
+ # the 2 params.
52
+ #
53
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
54
+ # @param [ String ] name The name of the file custom field
55
+ # @param [ Hash ] attributes The attributes used to fetch the values
56
+ #
57
+ def file_attribute_set(instance, name, attributes)
58
+ [name, "remote_#{name}_url", "remove_#{name}"].each do |_name|
59
+ self.default_attribute_set(instance, _name, attributes)
60
+ end.compact
61
+ end
62
+
34
63
  end
35
64
 
36
65
  end
@@ -38,9 +38,10 @@ module CustomFields
38
38
 
39
39
  position_name = "position_in_#{rule['inverse_of']}"
40
40
 
41
- _order_by = rule['order_by'] || position_name.to_sym.asc
41
+ _order_by = rule['order_by'] || position_name.to_sym.asc
42
+ _inverse_of = rule['inverse_of'].blank? ? nil : rule['inverse_of'] # an empty String can cause weird behaviours
42
43
 
43
- klass.has_many rule['name'], :class_name => rule['class_name'], :inverse_of => rule['inverse_of'], :order => _order_by do
44
+ klass.has_many rule['name'], :class_name => rule['class_name'], :inverse_of => _inverse_of, :order => _order_by do
44
45
 
45
46
  def filtered(conditions = {}, order_by = nil)
46
47
  list = conditions.empty? ? self : self.where(conditions)
@@ -89,6 +89,44 @@ module CustomFields
89
89
  end
90
90
  end
91
91
 
92
+ # Build a hash storing the values (id and option name) for
93
+ # a select custom field of an instance.
94
+ #
95
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
96
+ # @param [ String ] name The name of the select custom field
97
+ #
98
+ # @return [ Hash ] fields: <name>: option name, <name>_id: id of the option
99
+ #
100
+ def select_attribute_get(instance, name)
101
+ if value = instance.send(name.to_sym)
102
+ {
103
+ name => value,
104
+ "#{name}_id" => instance.send(:"#{name}_id")
105
+ }
106
+ else
107
+ {}
108
+ end
109
+ end
110
+
111
+ # Set the value for the instance and the select field specified by
112
+ # the 2 params.
113
+ #
114
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
115
+ # @param [ String ] name The name of the select custom field
116
+ # @param [ Hash ] attributes The attributes used to fetch the values
117
+ #
118
+ def select_attribute_set(instance, name, attributes)
119
+ id_or_name = attributes[name] || attributes["#{name}_id"]
120
+
121
+ return if id_or_name.nil?
122
+
123
+ option = _select_options(name).detect do |option|
124
+ [option['_id'], option['name']].include?(id_or_name)
125
+ end
126
+
127
+ instance.send(:"#{name}_id=", option['_id'])
128
+ end
129
+
92
130
  # Returns a list of documents groupes by select values defined in the custom fields recipe
93
131
  #
94
132
  # @param [ Class ] klass The class to modify
@@ -12,7 +12,7 @@ module CustomFields
12
12
 
13
13
  module ClassMethods
14
14
 
15
- # Adds a string field
15
+ # Add a string field
16
16
  #
17
17
  # @param [ Class ] klass The class to modify
18
18
  # @param [ Hash ] rule It contains the name of the field and if it is required or not
@@ -21,6 +21,29 @@ module CustomFields
21
21
  apply_custom_field(klass, rule)
22
22
  end
23
23
 
24
+ # Build a hash storing the raw value for
25
+ # a string custom field of an instance.
26
+ #
27
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
28
+ # @param [ String ] name The name of the string custom field
29
+ #
30
+ # @return [ Hash ] field name => raw value
31
+ #
32
+ def string_attribute_get(instance, name)
33
+ self.default_attribute_get(instance, name)
34
+ end
35
+
36
+ # Set the value for the instance and the string field specified by
37
+ # the 2 params.
38
+ #
39
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
40
+ # @param [ String ] name The name of the string custom field
41
+ # @param [ Hash ] attributes The attributes used to fetch the values
42
+ #
43
+ def string_attribute_set(instance, name, attributes)
44
+ self.default_attribute_set(instance, name, attributes)
45
+ end
46
+
24
47
  end
25
48
 
26
49
  end
@@ -31,6 +31,29 @@ module CustomFields
31
31
  apply_custom_field(klass, rule)
32
32
  end
33
33
 
34
+ # Build a hash storing the raw value for
35
+ # a string custom field of an instance.
36
+ #
37
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
38
+ # @param [ String ] name The name of the string custom field
39
+ #
40
+ # @return [ Hash ] field name => raw value
41
+ #
42
+ def text_attribute_get(instance, name)
43
+ default_attribute_get(instance, name)
44
+ end
45
+
46
+ # Set the value for the instance and the text field specified by
47
+ # the 2 params.
48
+ #
49
+ # @param [ Object ] instance An instance of the class enhanced by the custom_fields
50
+ # @param [ String ] name The name of the text custom field
51
+ # @param [ Hash ] attributes The attributes used to fetch the values
52
+ #
53
+ def text_attribute_set(instance, name, attributes)
54
+ self.default_attribute_set(instance, name, attributes)
55
+ end
56
+
34
57
  end
35
58
 
36
59
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module CustomFields #:nodoc
3
3
 
4
- VERSION = '2.0.0.rc13'
4
+ VERSION = '2.1.0.rc'
5
5
 
6
6
  end
metadata CHANGED
@@ -1,203 +1,203 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: custom_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.rc13
5
4
  prerelease: 6
5
+ version: 2.1.0.rc
6
6
  platform: ruby
7
7
  authors:
8
8
  - Didier Lafforgue
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-28 00:00:00.000000000 Z
12
+ date: 2012-12-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
+ type: :runtime
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.4.12
15
22
  name: mongoid
23
+ prerelease: false
16
24
  requirement: !ruby/object:Gem::Requirement
17
25
  none: false
18
26
  requirements:
19
27
  - - ~>
20
28
  - !ruby/object:Gem::Version
21
- version: 2.4.9
29
+ version: 2.4.12
30
+ - !ruby/object:Gem::Dependency
22
31
  type: :runtime
23
- prerelease: false
24
32
  version_requirements: !ruby/object:Gem::Requirement
25
33
  none: false
26
34
  requirements:
27
35
  - - ~>
28
36
  - !ruby/object:Gem::Version
29
- version: 2.4.9
30
- - !ruby/object:Gem::Dependency
37
+ version: 3.2.9
31
38
  name: activesupport
39
+ prerelease: false
32
40
  requirement: !ruby/object:Gem::Requirement
33
41
  none: false
34
42
  requirements:
35
43
  - - ~>
36
44
  - !ruby/object:Gem::Version
37
- version: 3.2.1
45
+ version: 3.2.9
46
+ - !ruby/object:Gem::Dependency
38
47
  type: :runtime
39
- prerelease: false
40
48
  version_requirements: !ruby/object:Gem::Requirement
41
49
  none: false
42
50
  requirements:
43
51
  - - ~>
44
52
  - !ruby/object:Gem::Version
45
- version: 3.2.1
46
- - !ruby/object:Gem::Dependency
53
+ version: 0.2.1
47
54
  name: carrierwave-mongoid
55
+ prerelease: false
48
56
  requirement: !ruby/object:Gem::Requirement
49
57
  none: false
50
58
  requirements:
51
59
  - - ~>
52
60
  - !ruby/object:Gem::Version
53
61
  version: 0.2.1
54
- type: :runtime
55
- prerelease: false
62
+ - !ruby/object:Gem::Dependency
63
+ type: :development
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
65
  none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
61
- version: 0.2.1
62
- - !ruby/object:Gem::Dependency
69
+ version: 0.7.3
63
70
  name: yard
71
+ prerelease: false
64
72
  requirement: !ruby/object:Gem::Requirement
65
73
  none: false
66
74
  requirements:
67
75
  - - ~>
68
76
  - !ruby/object:Gem::Version
69
77
  version: 0.7.3
78
+ - !ruby/object:Gem::Dependency
70
79
  type: :development
71
- prerelease: false
72
80
  version_requirements: !ruby/object:Gem::Requirement
73
81
  none: false
74
82
  requirements:
75
83
  - - ~>
76
84
  - !ruby/object:Gem::Version
77
- version: 0.7.3
78
- - !ruby/object:Gem::Dependency
85
+ version: 1.3.1
79
86
  name: bson
87
+ prerelease: false
80
88
  requirement: !ruby/object:Gem::Requirement
81
89
  none: false
82
90
  requirements:
83
91
  - - ~>
84
92
  - !ruby/object:Gem::Version
85
93
  version: 1.3.1
94
+ - !ruby/object:Gem::Dependency
86
95
  type: :development
87
- prerelease: false
88
96
  version_requirements: !ruby/object:Gem::Requirement
89
97
  none: false
90
98
  requirements:
91
99
  - - ~>
92
100
  - !ruby/object:Gem::Version
93
101
  version: 1.3.1
94
- - !ruby/object:Gem::Dependency
95
102
  name: mongo
103
+ prerelease: false
96
104
  requirement: !ruby/object:Gem::Requirement
97
105
  none: false
98
106
  requirements:
99
107
  - - ~>
100
108
  - !ruby/object:Gem::Version
101
109
  version: 1.3.1
110
+ - !ruby/object:Gem::Dependency
102
111
  type: :development
103
- prerelease: false
104
112
  version_requirements: !ruby/object:Gem::Requirement
105
113
  none: false
106
114
  requirements:
107
115
  - - ~>
108
116
  - !ruby/object:Gem::Version
109
117
  version: 1.3.1
110
- - !ruby/object:Gem::Dependency
111
118
  name: bson_ext
119
+ prerelease: false
112
120
  requirement: !ruby/object:Gem::Requirement
113
121
  none: false
114
122
  requirements:
115
123
  - - ~>
116
124
  - !ruby/object:Gem::Version
117
125
  version: 1.3.1
126
+ - !ruby/object:Gem::Dependency
118
127
  type: :development
119
- prerelease: false
120
128
  version_requirements: !ruby/object:Gem::Requirement
121
129
  none: false
122
130
  requirements:
123
131
  - - ~>
124
132
  - !ruby/object:Gem::Version
125
- version: 1.3.1
126
- - !ruby/object:Gem::Dependency
133
+ version: 0.9.12
127
134
  name: mocha
135
+ prerelease: false
128
136
  requirement: !ruby/object:Gem::Requirement
129
137
  none: false
130
138
  requirements:
131
139
  - - ~>
132
140
  - !ruby/object:Gem::Version
133
141
  version: 0.9.12
142
+ - !ruby/object:Gem::Dependency
134
143
  type: :development
135
- prerelease: false
136
144
  version_requirements: !ruby/object:Gem::Requirement
137
145
  none: false
138
146
  requirements:
139
147
  - - ~>
140
148
  - !ruby/object:Gem::Version
141
- version: 0.9.12
142
- - !ruby/object:Gem::Dependency
149
+ version: '2.6'
143
150
  name: rspec
151
+ prerelease: false
144
152
  requirement: !ruby/object:Gem::Requirement
145
153
  none: false
146
154
  requirements:
147
155
  - - ~>
148
156
  - !ruby/object:Gem::Version
149
157
  version: '2.6'
158
+ - !ruby/object:Gem::Dependency
150
159
  type: :development
151
- prerelease: false
152
160
  version_requirements: !ruby/object:Gem::Requirement
153
161
  none: false
154
162
  requirements:
155
163
  - - ~>
156
164
  - !ruby/object:Gem::Version
157
- version: '2.6'
158
- - !ruby/object:Gem::Dependency
165
+ version: 0.6.1
159
166
  name: simplecov
167
+ prerelease: false
160
168
  requirement: !ruby/object:Gem::Requirement
161
169
  none: false
162
170
  requirements:
163
171
  - - ~>
164
172
  - !ruby/object:Gem::Version
165
173
  version: 0.6.1
174
+ - !ruby/object:Gem::Dependency
166
175
  type: :development
167
- prerelease: false
168
176
  version_requirements: !ruby/object:Gem::Requirement
169
177
  none: false
170
178
  requirements:
171
179
  - - ~>
172
180
  - !ruby/object:Gem::Version
173
- version: 0.6.1
174
- - !ruby/object:Gem::Dependency
181
+ version: 0.6.7
175
182
  name: database_cleaner
183
+ prerelease: false
176
184
  requirement: !ruby/object:Gem::Requirement
177
185
  none: false
178
186
  requirements:
179
187
  - - ~>
180
188
  - !ruby/object:Gem::Version
181
189
  version: 0.6.7
190
+ - !ruby/object:Gem::Dependency
182
191
  type: :development
183
- prerelease: false
184
192
  version_requirements: !ruby/object:Gem::Requirement
185
- none: false
186
- requirements:
187
- - - ~>
188
- - !ruby/object:Gem::Version
189
- version: 0.6.7
190
- - !ruby/object:Gem::Dependency
191
- name: RedCloth
192
- requirement: !ruby/object:Gem::Requirement
193
193
  none: false
194
194
  requirements:
195
195
  - - ~>
196
196
  - !ruby/object:Gem::Version
197
197
  version: 4.2.8
198
- type: :development
198
+ name: RedCloth
199
199
  prerelease: false
200
- version_requirements: !ruby/object:Gem::Requirement
200
+ requirement: !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements:
203
203
  - - ~>
@@ -256,10 +256,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
256
256
  requirements:
257
257
  - - ! '>='
258
258
  - !ruby/object:Gem::Version
259
- version: '0'
260
259
  segments:
261
260
  - 0
262
- hash: 4293513692852653419
261
+ hash: -612963602801593079
262
+ version: '0'
263
263
  required_rubygems_version: !ruby/object:Gem::Requirement
264
264
  none: false
265
265
  requirements:
@@ -268,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
268
268
  version: 1.3.6
269
269
  requirements: []
270
270
  rubyforge_project: nowarning
271
- rubygems_version: 1.8.24
271
+ rubygems_version: 1.8.23
272
272
  signing_key:
273
273
  specification_version: 3
274
274
  summary: Custom fields extension for Mongoid