operable 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,9 +9,10 @@ module Operable
9
9
  def operable_values
10
10
  raise "Please specify one or more fields via operable_on in your model definition!" if self.class.operable_fields.nil?
11
11
 
12
- keys = attributes.keys
13
- keys << relations.keys if respond_to?(:associations)
14
- values = attributes.select {|k, v| self.class.operable_fields.include? k }
12
+ values = {}
13
+ attributes.select {|k, v| self.class.operable_fields.include? k }.each do |k, v|
14
+ values[k.to_s] = v
15
+ end
15
16
  if respond_to?(:associations)
16
17
  associations.select {|k, v| self.class.operable_fields.include? k }.each do |k, v|
17
18
  values[k.to_s] = send(k)
@@ -1,3 +1,3 @@
1
1
  module Operable
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: operable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-10-08 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
16
- requirement: &70205376469520 !ruby/object:Gem::Requirement
16
+ requirement: &70222187456640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70205376469520
24
+ version_requirements: *70222187456640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activerecord
27
- requirement: &70205376468940 !ruby/object:Gem::Requirement
27
+ requirement: &70222187455280 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 3.0.0
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70205376468940
35
+ version_requirements: *70222187455280
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: mongoid
38
- requirement: &70205376468340 !ruby/object:Gem::Requirement
38
+ requirement: &70222187453300 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '2.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70205376468340
46
+ version_requirements: *70222187453300
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: bson_ext
49
- requirement: &70205376467760 !ruby/object:Gem::Requirement
49
+ requirement: &70222187452100 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.3'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70205376467760
57
+ version_requirements: *70222187452100
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sqlite3
60
- requirement: &70205376467180 !ruby/object:Gem::Requirement
60
+ requirement: &70222187450200 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1.3'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70205376467180
68
+ version_requirements: *70222187450200
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: growl
71
- requirement: &70205376466680 !ruby/object:Gem::Requirement
71
+ requirement: &70222187448920 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,21 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70205376466680
79
+ version_requirements: *70222187448920
80
+ - !ruby/object:Gem::Dependency
81
+ name: rake
82
+ requirement: &70222187448060 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70222187448060
80
91
  - !ruby/object:Gem::Dependency
81
92
  name: rspec
82
- requirement: &70205376466020 !ruby/object:Gem::Requirement
93
+ requirement: &70222187446480 !ruby/object:Gem::Requirement
83
94
  none: false
84
95
  requirements:
85
96
  - - ~>
@@ -87,10 +98,10 @@ dependencies:
87
98
  version: '2.6'
88
99
  type: :development
89
100
  prerelease: false
90
- version_requirements: *70205376466020
101
+ version_requirements: *70222187446480
91
102
  - !ruby/object:Gem::Dependency
92
103
  name: guard-rspec
93
- requirement: &70205376465400 !ruby/object:Gem::Requirement
104
+ requirement: &70222187445540 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ~>
@@ -98,9 +109,8 @@ dependencies:
98
109
  version: 0.4.3
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *70205376465400
102
- description: Operable is the easiest way to perform common operations on multiple
103
- instances of a model.
112
+ version_requirements: *70222187445540
113
+ description: Perform addition, subtraction, multiplication and division on your models.
104
114
  email:
105
115
  - jcoene@gmail.com
106
116
  executables: []
@@ -138,5 +148,5 @@ rubyforge_project:
138
148
  rubygems_version: 1.8.10
139
149
  signing_key:
140
150
  specification_version: 3
141
- summary: Convenient operations for your models.
151
+ summary: Arithmetic operations on your models.
142
152
  test_files: []