gamification 1.0.0 → 1.0.1

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.
@@ -0,0 +1,15 @@
1
+ require 'spec_helper'
2
+
3
+ describe Gamification::Checksum do
4
+ describe '.generate' do
5
+ it 'generates checksums' do
6
+ expect(subject.generate(['a', 'b', 'c'])).to eq('412ce96f60d05e18445b84f57a23ae22')
7
+ end
8
+ end
9
+
10
+ describe '.verify' do
11
+ it 'verifies checksums' do
12
+ expect(subject.verify('412ce96f60d05e18445b84f57a23ae22', ['a', 'b', 'c'])).to be(true)
13
+ end
14
+ end
15
+ end
@@ -5,9 +5,11 @@ describe Gamification::Concerns::Rewardable do
5
5
  let(:user) { create :user }
6
6
  let(:medal) { create :gamification_medal }
7
7
  let(:goal) { create :gamification_goal, medal: medal }
8
+ let(:goal_without_medal) { create :gamification_goal }
8
9
 
9
10
  before do
10
11
  create :gamification_reward, rewardable: user, goal: goal
12
+ create :gamification_reward, rewardable: user, goal: goal_without_medal
11
13
  end
12
14
 
13
15
  it 'returns medals' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamification
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johannes Gorset
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-15 00:00:00.000000000 Z
11
+ date: 2015-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rspec-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '2.14'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '2.14'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: capybara
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -199,7 +199,10 @@ files:
199
199
  - db/migrate/20140318220723_add_seen_at_to_gamification_rewards.rb
200
200
  - lib/gamification.rb
201
201
  - lib/gamification/activerecord.rb
202
+ - lib/gamification/checksum.rb
202
203
  - lib/gamification/concerns.rb
204
+ - lib/gamification/concerns/controllers.rb
205
+ - lib/gamification/concerns/controllers/rewards_controller.rb
203
206
  - lib/gamification/concerns/models.rb
204
207
  - lib/gamification/concerns/models/goal.rb
205
208
  - lib/gamification/concerns/models/medal.rb
@@ -268,6 +271,7 @@ files:
268
271
  - spec/factories/gamification_rewards.rb
269
272
  - spec/helpers/gamification/application_helper_spec.rb
270
273
  - spec/helpers/gamification/rewards_helper_spec.rb
274
+ - spec/lib/gamification/checksum_spec.rb
271
275
  - spec/lib/gamification/concerns/rewardable_spec.rb
272
276
  - spec/models/gamification/goal_spec.rb
273
277
  - spec/models/gamification/medal_spec.rb
@@ -359,9 +363,11 @@ test_files:
359
363
  - spec/factories/gamification_rewards.rb
360
364
  - spec/helpers/gamification/application_helper_spec.rb
361
365
  - spec/helpers/gamification/rewards_helper_spec.rb
366
+ - spec/lib/gamification/checksum_spec.rb
362
367
  - spec/lib/gamification/concerns/rewardable_spec.rb
363
368
  - spec/models/gamification/goal_spec.rb
364
369
  - spec/models/gamification/medal_spec.rb
365
370
  - spec/models/gamification/reward_spec.rb
366
371
  - spec/spec_helper.rb
367
372
  - spec/views/gamification/rewards/_presentation.html.erb_spec.rb
373
+ has_rdoc: