minimal_feedback 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -42,7 +42,7 @@ What would happen with this configuration:
42
42
 
43
43
  ```ruby
44
44
  issue = Issue.create
45
- issue.condition = proc { true }
45
+ issue.condition = true
46
46
  issue.give_feedback(:positive)
47
47
  issue.feedbacks.first.type
48
48
  => :positive
@@ -10,7 +10,7 @@ module MinimalFeedback
10
10
  validates :rating, :inclusion => { :in => [1, -1] }
11
11
 
12
12
  validate do
13
- if rateable.class.feedback_condition && !rateable.instance_eval(&rateable.class.feedback_condition).call
13
+ if rateable.class.feedback_condition && !rateable.instance_eval(&rateable.class.feedback_condition)
14
14
  errors.add(:base, 'feedback is not allowed')
15
15
  end
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module MinimalFeedback
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -40,7 +40,7 @@ describe Issue do
40
40
 
41
41
  it 'assigns positive feedback' do
42
42
  user = User.create
43
- @issue.condition = proc { true }
43
+ @issue.condition = true
44
44
  @issue.give_feedback(:positive, :user => user)
45
45
 
46
46
  @issue.feedbacks.first.type.should == :positive
@@ -48,14 +48,14 @@ describe Issue do
48
48
 
49
49
  it 'assigns negative feedback' do
50
50
  user = User.create
51
- @issue.condition = proc { true }
51
+ @issue.condition = true
52
52
  @issue.give_feedback(:negative, :user => user)
53
53
 
54
54
  @issue.feedbacks.first.type.should == :negative
55
55
  end
56
56
 
57
57
  it 'cannot assign feedback if the condition is false' do
58
- @issue.condition = proc { false }
58
+ @issue.condition = false
59
59
  expect { @issue.give_feedback(:positive, :user => @user) }.to raise_error
60
60
  end
61
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minimal_feedback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -143,7 +143,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
143
  version: '0'
144
144
  segments:
145
145
  - 0
146
- hash: -2381872170530731746
146
+ hash: 2275794220295144819
147
147
  required_rubygems_version: !ruby/object:Gem::Requirement
148
148
  none: false
149
149
  requirements:
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
152
  version: '0'
153
153
  segments:
154
154
  - 0
155
- hash: -2381872170530731746
155
+ hash: 2275794220295144819
156
156
  requirements: []
157
157
  rubyforge_project:
158
158
  rubygems_version: 1.8.24