achievements 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -33,7 +33,7 @@ module Achievements
|
|
33
33
|
# Binds an achievement with a specific counter threshold. Use as
|
34
34
|
# many as you'd like.
|
35
35
|
#
|
36
|
-
#
|
36
|
+
# achievement :context, :name, threshold
|
37
37
|
#
|
38
38
|
def achievement(context, name, threshold)
|
39
39
|
make_engine if !@engine
|
@@ -46,12 +46,12 @@ module Achievements
|
|
46
46
|
#
|
47
47
|
# For example, when using with rails:
|
48
48
|
#
|
49
|
-
#
|
49
|
+
# achievements Achievement.all
|
50
50
|
#
|
51
51
|
def achievements(object_array)
|
52
52
|
object_array.each do |object|
|
53
53
|
make_engine if !@engine
|
54
|
-
@engine.achievement(object.context, object.
|
54
|
+
@engine.achievement(object.context, object.achievement_slug, object.threshold)
|
55
55
|
end
|
56
56
|
end
|
57
57
|
|
@@ -59,7 +59,7 @@ module Achievements
|
|
59
59
|
# level method, you must include the agent id along with the
|
60
60
|
# method call
|
61
61
|
#
|
62
|
-
#
|
62
|
+
# achieve agent_id, context, name
|
63
63
|
#
|
64
64
|
def achieve(context, agent_id, name)
|
65
65
|
@engine.achieve context, agent_id, name
|
data/lib/achievements/version.rb
CHANGED
data/test/achievements_test.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: achievements
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 5
|
10
|
+
version: 0.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Michael R. Bernstein
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-11-
|
18
|
+
date: 2010-11-04 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|