houdini 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +3 -3
- data/README.markdown +3 -3
- data/lib/houdini/postback_processor.rb +1 -1
- data/lib/houdini/task_manager.rb +1 -0
- data/lib/houdini/version.rb +1 -1
- metadata +4 -4
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
houdini (0.3.
|
4
|
+
houdini (0.3.2)
|
5
5
|
rails (> 3.0.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -113,10 +113,10 @@ GEM
|
|
113
113
|
sqlite3 (>= 1.3.3)
|
114
114
|
thor (0.14.6)
|
115
115
|
tilt (1.3.3)
|
116
|
-
treetop (1.4.
|
116
|
+
treetop (1.4.12)
|
117
117
|
polyglot
|
118
118
|
polyglot (>= 0.3.1)
|
119
|
-
tzinfo (0.3.
|
119
|
+
tzinfo (0.3.35)
|
120
120
|
xpath (0.1.4)
|
121
121
|
nokogiri (~> 1.3)
|
122
122
|
|
data/README.markdown
CHANGED
@@ -34,7 +34,7 @@ Setup Houdini in your ActiveRecord model:
|
|
34
34
|
:on => :after_create,
|
35
35
|
:on_task_completion => :process_image_moderation_answer
|
36
36
|
|
37
|
-
def process_image_moderation_answer(params)
|
37
|
+
def process_image_moderation_answer(params, verbose={})
|
38
38
|
update_attribute :flagged => params[:category] == 'flagged'
|
39
39
|
end
|
40
40
|
end
|
@@ -48,9 +48,9 @@ Setup Houdini in your ActiveRecord model:
|
|
48
48
|
|
49
49
|
## Options
|
50
50
|
* `:input` - Required. Hash: any task specific info needed to populate your blueprint. Keys must match the blueprint's required input, and values must a `Symbol` of the method to call, a lambdas/procs to be called in the model's context, or just a value to send along.
|
51
|
-
* `:on_task_completion` - Method that should be called when the answer is posted back to your app. Can
|
51
|
+
* `:on_task_completion` - Method that should be called when the answer is posted back to your app. Can be a symbol or a lambda/proc. The method will be called with a hash of the returned output from Houdini.
|
52
52
|
* `:on` - Name of a callback to use in order to trigger the submission to Houdini. Must be a symbol/string. If you don't want to use a callback, call the model instance's `houdini_submit_#{blueprint}!` method, where `blueprint` is the first argument you provided for the `houdini` method.
|
53
|
-
* `:after_submit` - Method that should be called after submitting the task to Houdini. Can
|
53
|
+
* `:after_submit` - Method that should be called after submitting the task to Houdini. Can be a symbol or a lambda/proc.
|
54
54
|
* `:id_method` - Method to get an identifier for the object. It is `id` by default, but you may want to use `to_param` with your app. Can be a symbol or lambda/proc. Use this in conjunction with `:finder`.
|
55
55
|
* `:finder` - Method by which to find the model by an identifier. It is `find` by default. Can be a symbol or lambda/proc. Use this in conjunction with `:id_method`.
|
56
56
|
|
@@ -10,7 +10,7 @@ module Houdini
|
|
10
10
|
raise EnvironmentMismatchError, "Environment received does not match Houdini.environment"
|
11
11
|
end
|
12
12
|
|
13
|
-
|
13
|
+
# # Houdini doesn't send the API key back
|
14
14
|
# if params[:api_key] != Houdini.api_key and params[:environment] == "production"
|
15
15
|
# raise APIKeyMistmatchError, "API key received doesn't match our API key."
|
16
16
|
# end
|
data/lib/houdini/task_manager.rb
CHANGED
@@ -13,6 +13,7 @@ module Houdini
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.process(class_name, id, blueprint, output, verbose_output)
|
16
|
+
class_name.constantize # Ensure model is loaded and any Houdini tasks registered
|
16
17
|
task = @tasks[ [class_name, blueprint.to_sym] ]
|
17
18
|
task.process id, output, verbose_output
|
18
19
|
end
|
data/lib/houdini/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: houdini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-11-
|
12
|
+
date: 2012-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
segments:
|
162
162
|
- 0
|
163
|
-
hash:
|
163
|
+
hash: 500041431281319384
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
none: false
|
166
166
|
requirements:
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
segments:
|
171
171
|
- 0
|
172
|
-
hash:
|
172
|
+
hash: 500041431281319384
|
173
173
|
requirements: []
|
174
174
|
rubyforge_project:
|
175
175
|
rubygems_version: 1.8.24
|