riaction 1.2.6 → 1.2.7

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.
Files changed (51) hide show
  1. data/.yardoc/checksums +11 -0
  2. data/.yardoc/objects/root.dat +0 -0
  3. data/.yardoc/proxy_types +0 -0
  4. data/CHANGELOG.md +5 -0
  5. data/Gemfile.lock +12 -8
  6. data/README.md +6 -1
  7. data/db/riaction.db +0 -0
  8. data/doc/Riaction/ConfigurationError.html +116 -0
  9. data/doc/Riaction/Constants.html +389 -0
  10. data/doc/Riaction/CrudEventCallback.html +402 -0
  11. data/doc/Riaction/EventPerformer.html +250 -0
  12. data/doc/Riaction/NoEventDefined.html +116 -0
  13. data/doc/Riaction/NoProfileDefined.html +116 -0
  14. data/doc/Riaction/ProfileCreationCallback.html +192 -0
  15. data/doc/Riaction/ProfileCreator.html +235 -0
  16. data/doc/Riaction/Railtie.html +116 -0
  17. data/doc/Riaction/Riaction/ClassMethods.html +837 -0
  18. data/doc/Riaction/Riaction/Event/InstanceMethods.html +301 -0
  19. data/doc/Riaction/Riaction/Event.html +108 -0
  20. data/doc/Riaction/Riaction/InstanceMethods.html +198 -0
  21. data/doc/Riaction/Riaction/Profile/InstanceMethods.html +746 -0
  22. data/doc/Riaction/Riaction/Profile.html +108 -0
  23. data/doc/Riaction/Riaction.html +125 -0
  24. data/doc/Riaction/RuntimeError.html +116 -0
  25. data/doc/Riaction.html +124 -0
  26. data/doc/RiactionGenerator.html +188 -0
  27. data/doc/_index.html +263 -0
  28. data/doc/class_list.html +47 -0
  29. data/doc/css/common.css +1 -0
  30. data/doc/css/full_list.css +55 -0
  31. data/doc/css/style.css +322 -0
  32. data/doc/file.README.html +304 -0
  33. data/doc/file_list.html +49 -0
  34. data/doc/frames.html +13 -0
  35. data/doc/index.html +304 -0
  36. data/doc/js/app.js +205 -0
  37. data/doc/js/full_list.js +173 -0
  38. data/doc/js/jquery.js +16 -0
  39. data/doc/method_list.html +294 -0
  40. data/doc/top-level-namespace.html +107 -0
  41. data/lib/riaction/constants.rb +6 -2
  42. data/lib/riaction/crud_event_callback.rb +3 -0
  43. data/lib/riaction/event_performer.rb +10 -5
  44. data/lib/riaction/profile_creation_callback.rb +2 -0
  45. data/lib/riaction/riaction.rb +11 -7
  46. data/lib/riaction/version.rb +1 -1
  47. data/lib/tasks/riaction.rake +25 -22
  48. data/riaction.gemspec +4 -2
  49. data/spec/event_performer_spec.rb +23 -0
  50. data/spec/riaction_spec.rb +33 -4
  51. metadata +79 -19
@@ -692,8 +692,33 @@ describe "Riaction" do
692
692
  @comment = Comment.riactionless{ Comment.create(:user_id => @user.id, :content => 'this is a comment') }
693
693
  end
694
694
 
695
- it "should raise a configuration error" do
696
- lambda{ @comment.riaction_event_params }.should raise_error(Riaction::ConfigurationError)
695
+ it "should not raise a configuration error" do
696
+ lambda{ @comment.riaction_event_params }.should_not raise_error(Riaction::ConfigurationError)
697
+ end
698
+
699
+ it "should return the event params without the event that points to the non-valid profile" do
700
+ hash_including({}).should == @comment.riaction_event_params
701
+ end
702
+
703
+ describe "but other events defined on the same class *do* point to valid profiles" do
704
+ before do
705
+ Comment.class_eval do
706
+ riaction :event, :name => :save_a_comment, :trigger => :update, :profile => :user
707
+ end
708
+ end
709
+
710
+ it "should return the event params with only the events that point to valid profiles" do
711
+ hash_including({
712
+ :save_a_comment => {
713
+ :profile => {
714
+ :type => :player,
715
+ :id_type => :custom,
716
+ :id => @user.id
717
+ },
718
+ :params => {}
719
+ }
720
+ }).should == @comment.riaction_event_params
721
+ end
697
722
  end
698
723
  end
699
724
 
@@ -705,8 +730,12 @@ describe "Riaction" do
705
730
  @comment = Comment.riactionless{ Comment.create(:content => 'this is a comment') }
706
731
  end
707
732
 
708
- it "should raise a runtime error" do
709
- lambda{ @comment.riaction_event_params }.should raise_error(Riaction::RuntimeError)
733
+ it "should not raise a configuration error" do
734
+ lambda{ @comment.riaction_event_params }.should_not raise_error(Riaction::ConfigurationError)
735
+ end
736
+
737
+ it "should return the event params without the event that points to the non-valid profile" do
738
+ hash_including({}).should == @comment.riaction_event_params
710
739
  end
711
740
  end
712
741
 
metadata CHANGED
@@ -1,19 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: riaction
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.6
4
+ version: 1.2.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Chris Eberz
9
+ - Katie Miller
10
+ - Nicholas Audo
9
11
  autorequire:
10
12
  bindir: bin
11
13
  cert_chain: []
12
- date: 2012-03-06 00:00:00.000000000Z
14
+ date: 2012-03-08 00:00:00.000000000Z
13
15
  dependencies:
14
16
  - !ruby/object:Gem::Dependency
15
17
  name: rspec
16
- requirement: &2165342760 !ruby/object:Gem::Requirement
18
+ requirement: &2153231060 !ruby/object:Gem::Requirement
17
19
  none: false
18
20
  requirements:
19
21
  - - ! '>='
@@ -21,10 +23,10 @@ dependencies:
21
23
  version: '2.8'
22
24
  type: :development
23
25
  prerelease: false
24
- version_requirements: *2165342760
26
+ version_requirements: *2153231060
25
27
  - !ruby/object:Gem::Dependency
26
28
  name: sqlite3
27
- requirement: &2165342180 !ruby/object:Gem::Requirement
29
+ requirement: &2153230620 !ruby/object:Gem::Requirement
28
30
  none: false
29
31
  requirements:
30
32
  - - ! '>='
@@ -32,10 +34,10 @@ dependencies:
32
34
  version: '0'
33
35
  type: :development
34
36
  prerelease: false
35
- version_requirements: *2165342180
37
+ version_requirements: *2153230620
36
38
  - !ruby/object:Gem::Dependency
37
39
  name: ruby-debug19
38
- requirement: &2165341600 !ruby/object:Gem::Requirement
40
+ requirement: &2153230160 !ruby/object:Gem::Requirement
39
41
  none: false
40
42
  requirements:
41
43
  - - ! '>='
@@ -43,10 +45,32 @@ dependencies:
43
45
  version: '0'
44
46
  type: :development
45
47
  prerelease: false
46
- version_requirements: *2165341600
48
+ version_requirements: *2153230160
49
+ - !ruby/object:Gem::Dependency
50
+ name: yard
51
+ requirement: &2153229740 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>='
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ type: :development
58
+ prerelease: false
59
+ version_requirements: *2153229740
60
+ - !ruby/object:Gem::Dependency
61
+ name: redcarpet
62
+ requirement: &2153229320 !ruby/object:Gem::Requirement
63
+ none: false
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: *2153229320
47
71
  - !ruby/object:Gem::Dependency
48
72
  name: rake
49
- requirement: &2165341020 !ruby/object:Gem::Requirement
73
+ requirement: &2153228860 !ruby/object:Gem::Requirement
50
74
  none: false
51
75
  requirements:
52
76
  - - ! '>='
@@ -54,10 +78,10 @@ dependencies:
54
78
  version: '0'
55
79
  type: :runtime
56
80
  prerelease: false
57
- version_requirements: *2165341020
81
+ version_requirements: *2153228860
58
82
  - !ruby/object:Gem::Dependency
59
83
  name: activerecord
60
- requirement: &2165340240 !ruby/object:Gem::Requirement
84
+ requirement: &2153228200 !ruby/object:Gem::Requirement
61
85
  none: false
62
86
  requirements:
63
87
  - - ! '>='
@@ -65,10 +89,10 @@ dependencies:
65
89
  version: 3.0.0
66
90
  type: :runtime
67
91
  prerelease: false
68
- version_requirements: *2165340240
92
+ version_requirements: *2153228200
69
93
  - !ruby/object:Gem::Dependency
70
94
  name: activesupport
71
- requirement: &2165339740 !ruby/object:Gem::Requirement
95
+ requirement: &2153227560 !ruby/object:Gem::Requirement
72
96
  none: false
73
97
  requirements:
74
98
  - - ! '>='
@@ -76,10 +100,10 @@ dependencies:
76
100
  version: 3.0.0
77
101
  type: :runtime
78
102
  prerelease: false
79
- version_requirements: *2165339740
103
+ version_requirements: *2153227560
80
104
  - !ruby/object:Gem::Dependency
81
105
  name: resque
82
- requirement: &2165339280 !ruby/object:Gem::Requirement
106
+ requirement: &2153226980 !ruby/object:Gem::Requirement
83
107
  none: false
84
108
  requirements:
85
109
  - - ! '>='
@@ -87,10 +111,10 @@ dependencies:
87
111
  version: '0'
88
112
  type: :runtime
89
113
  prerelease: false
90
- version_requirements: *2165339280
114
+ version_requirements: *2153226980
91
115
  - !ruby/object:Gem::Dependency
92
116
  name: ruby-iactionable
93
- requirement: &2165338400 !ruby/object:Gem::Requirement
117
+ requirement: &2153226140 !ruby/object:Gem::Requirement
94
118
  none: false
95
119
  requirements:
96
120
  - - ! '>='
@@ -98,7 +122,7 @@ dependencies:
98
122
  version: 0.0.2
99
123
  type: :runtime
100
124
  prerelease: false
101
- version_requirements: *2165338400
125
+ version_requirements: *2153226140
102
126
  description: Wrapper for IActionable's restful API and an "acts-as" style interface
103
127
  for models to behave as profiles and drive game events.
104
128
  email:
@@ -108,6 +132,9 @@ extensions: []
108
132
  extra_rdoc_files: []
109
133
  files:
110
134
  - .gitignore
135
+ - .yardoc/checksums
136
+ - .yardoc/objects/root.dat
137
+ - .yardoc/proxy_types
111
138
  - CHANGELOG.md
112
139
  - Gemfile
113
140
  - Gemfile.lock
@@ -115,6 +142,39 @@ files:
115
142
  - README.md
116
143
  - Rakefile
117
144
  - db/riaction.db
145
+ - doc/Riaction.html
146
+ - doc/Riaction/ConfigurationError.html
147
+ - doc/Riaction/Constants.html
148
+ - doc/Riaction/CrudEventCallback.html
149
+ - doc/Riaction/EventPerformer.html
150
+ - doc/Riaction/NoEventDefined.html
151
+ - doc/Riaction/NoProfileDefined.html
152
+ - doc/Riaction/ProfileCreationCallback.html
153
+ - doc/Riaction/ProfileCreator.html
154
+ - doc/Riaction/Railtie.html
155
+ - doc/Riaction/Riaction.html
156
+ - doc/Riaction/Riaction/ClassMethods.html
157
+ - doc/Riaction/Riaction/Event.html
158
+ - doc/Riaction/Riaction/Event/InstanceMethods.html
159
+ - doc/Riaction/Riaction/InstanceMethods.html
160
+ - doc/Riaction/Riaction/Profile.html
161
+ - doc/Riaction/Riaction/Profile/InstanceMethods.html
162
+ - doc/Riaction/RuntimeError.html
163
+ - doc/RiactionGenerator.html
164
+ - doc/_index.html
165
+ - doc/class_list.html
166
+ - doc/css/common.css
167
+ - doc/css/full_list.css
168
+ - doc/css/style.css
169
+ - doc/file.README.html
170
+ - doc/file_list.html
171
+ - doc/frames.html
172
+ - doc/index.html
173
+ - doc/js/app.js
174
+ - doc/js/full_list.js
175
+ - doc/js/jquery.js
176
+ - doc/method_list.html
177
+ - doc/top-level-namespace.html
118
178
  - lib/generators/riaction/USAGE
119
179
  - lib/generators/riaction/riaction_generator.rb
120
180
  - lib/generators/riaction/templates/i_actionable.yml
@@ -135,7 +195,7 @@ files:
135
195
  - spec/profile_creation_spec.rb
136
196
  - spec/riaction_spec.rb
137
197
  - spec/spec_helper.rb
138
- homepage: ''
198
+ homepage: https://github.com/zortnac/riaction/
139
199
  licenses: []
140
200
  post_install_message:
141
201
  rdoc_options: []