paths_of_glory 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or as a gem. Add this to your environment.rb:
22
22
 
23
23
  gem install paths_of_glory
24
24
 
25
- config.gem 'paths_of_glory'
25
+ config.gem 'paths_of_glory', :lib => false
26
26
 
27
27
  Then generate the migration:
28
28
 
data/Rakefile CHANGED
@@ -25,7 +25,7 @@ begin
25
25
  require 'jeweler'
26
26
  Jeweler::Tasks.new do |s|
27
27
  s.name = "paths_of_glory"
28
- s.version = "0.1.0"
28
+ s.version = "0.1.1"
29
29
  s.author = "Paul Campbell"
30
30
  s.email = "paul@rslw.com"
31
31
  s.homepage = "http://www.github.com/paulca/paths_of_glory"
@@ -8,12 +8,21 @@ class <%= class_name %> < Achievement
8
8
 
9
9
  # set_thing_to_check { |user| ... }
10
10
 
11
- def self.award_achievements_for(user)
12
- return unless user
13
- levels.each do |level|
14
- if user.not.has_achievement?(self, level[:level]) and thing_to_check(user) >= level[:quota]
15
- user.award_achievement(self, level[:level])
16
- end
17
- end
18
- end
11
+ # Comment out below for multi-level achievements
12
+ # def self.award_achievements_for(user)
13
+ # return unless user
14
+ # levels.each do |level|
15
+ # if user.not.has_achievement?(self, level[:level]) and thing_to_check(user) >= level[:quota]
16
+ # user.award_achievement(self, level[:level])
17
+ # end
18
+ # end
19
+ # end
20
+
21
+ # Comment out below for once-off achievements
22
+ # def self.award_achievements_for(user)
23
+ # return unless user
24
+ # return if user.has_achievement?(self, level[:level])
25
+ # user.award_achievement(self, level[:level])
26
+ # end
27
+
19
28
  end
@@ -25,6 +25,10 @@ To generate a new Achievement, run:
25
25
 
26
26
  ./script/generate achievement Glory
27
27
 
28
- where 'Glory' is the name of the achievement."
28
+ where 'Glory' is the name of the achievement.
29
+
30
+ Good luck!
31
+
32
+ "
29
33
  end
30
34
  end
@@ -0,0 +1,67 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{paths_of_glory}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Paul Campbell"]
12
+ s.date = %q{2010-05-20}
13
+ s.email = %q{paul@rslw.com}
14
+ s.extra_rdoc_files = [
15
+ "README.md"
16
+ ]
17
+ s.files = [
18
+ "CHANGELOG",
19
+ "README.md",
20
+ "Rakefile",
21
+ "achievement_system.gemspec",
22
+ "app/models/achievement.rb",
23
+ "app/models/achievements.rb",
24
+ "generators/achievement/USAGE",
25
+ "generators/achievement/achievement_generator.rb",
26
+ "generators/achievement/templates/achievement.rb",
27
+ "generators/achievement/templates/achievement_observer.rb",
28
+ "generators/paths_of_glory/USAGE",
29
+ "generators/paths_of_glory/paths_of_glory_generator.rb",
30
+ "generators/paths_of_glory/templates/20100311101933_create_achievements.rb",
31
+ "paths_of_glory.gemspec",
32
+ "rails/init.rb",
33
+ "spec/achievement_generator_spec.rb",
34
+ "spec/achievement_spec.rb",
35
+ "spec/blueprints.rb",
36
+ "spec/database.yml",
37
+ "spec/debug.log",
38
+ "spec/paths_of_glory_generator_spec.rb",
39
+ "spec/schema.rb",
40
+ "spec/spec_helper.rb"
41
+ ]
42
+ s.has_rdoc = false
43
+ s.homepage = %q{http://www.github.com/paulca/paths_of_glory}
44
+ s.rdoc_options = ["--charset=UTF-8"]
45
+ s.require_paths = ["lib"]
46
+ s.rubygems_version = %q{1.3.6}
47
+ s.summary = %q{Getting you started on the road to achievements.}
48
+ s.test_files = [
49
+ "spec/achievement_generator_spec.rb",
50
+ "spec/achievement_spec.rb",
51
+ "spec/blueprints.rb",
52
+ "spec/paths_of_glory_generator_spec.rb",
53
+ "spec/schema.rb",
54
+ "spec/spec_helper.rb"
55
+ ]
56
+
57
+ if s.respond_to? :specification_version then
58
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
59
+ s.specification_version = 3
60
+
61
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
62
+ else
63
+ end
64
+ else
65
+ end
66
+ end
67
+
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Paul Campbell
@@ -40,6 +40,7 @@ files:
40
40
  - generators/paths_of_glory/USAGE
41
41
  - generators/paths_of_glory/paths_of_glory_generator.rb
42
42
  - generators/paths_of_glory/templates/20100311101933_create_achievements.rb
43
+ - paths_of_glory.gemspec
43
44
  - rails/init.rb
44
45
  - spec/achievement_generator_spec.rb
45
46
  - spec/achievement_spec.rb