reputation 0.0.4 → 0.0.5

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.
@@ -11,12 +11,13 @@ class ReputationIntermediateValue < ActiveRecord::Base
11
11
 
12
12
  attr_accessible :user, :rule, :name, :value
13
13
 
14
- def initialize(args = {})
15
- options = {
14
+ def initialize(*args)
15
+ args[0] = {
16
16
  :value => 0
17
- }.merge(args)
17
+ }.merge(args.first || {})
18
18
 
19
- super options
19
+ super *args
20
20
  end
21
+
21
22
 
22
23
  end
@@ -28,4 +28,8 @@ describe ReputationBehaviour do
28
28
  ReputationBehaviour.create!(:user => User.create!, :rule => @rule, :metric => 0).rule.should eql @rule
29
29
  end
30
30
 
31
+ it "should be possible to recalculate a rule without raising an ArgumentError in Rails 3.1" do
32
+ expect { @user.behaviours.first.send :recalculate_rule }.should_not raise_error(ArgumentError)
33
+ end
34
+
31
35
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reputation
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 4
10
- version: 0.0.4
9
+ - 5
10
+ version: 0.0.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Theo Cushion
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-24 00:00:00 +01:00
18
+ date: 2011-10-19 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency