ripple-rails 0.1.0 → 0.2.0
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.
- data/README +2 -0
- data/bin/ripple-rails +2 -2
- data/lib/ripple-rails.rb +2 -1
- data/ripple-rails.gemspec +1 -1
- metadata +2 -2
data/README
CHANGED
@@ -10,3 +10,5 @@ The action key should specify a particular action on a controller in your app.
|
|
10
10
|
If you do not specify an address, then all transactions on the Ripple network will be reported to your app.
|
11
11
|
|
12
12
|
You may optionally specify the websocket address of a Ripple server as :websocket, otherwise the default will be the server at ripple.com. Only transactions that have been validated by the server are reported, so if you trust the server than you can trust that the transactions are real.
|
13
|
+
|
14
|
+
To start monitoring for transactions, simply run ripple-rails from the root of your app.
|
data/bin/ripple-rails
CHANGED
@@ -16,9 +16,9 @@ controller, action = config && config[:action] ? config[:action].split(/#/, 2) :
|
|
16
16
|
err 'Ripple action not properly configured.' unless controller && action
|
17
17
|
err "No class #{controller} found for Ripple action." unless Module::const_defined?(controller)
|
18
18
|
|
19
|
-
controller =
|
19
|
+
controller = Module::const_get(controller)
|
20
20
|
|
21
|
-
err "Ripple action #{controller}##{action} found." unless controller.respond_to?(action)
|
21
|
+
err "Ripple action #{controller}##{action} not found." unless controller.new.respond_to?(action)
|
22
22
|
|
23
23
|
EM.run {
|
24
24
|
ws = Faye::WebSocket::Client.new(config[:websocket] || Rippler::RIPPLE_URI)
|
data/lib/ripple-rails.rb
CHANGED
@@ -31,7 +31,8 @@ def load_config(file = '.')
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def run_action(controller, action, params)
|
34
|
-
|
34
|
+
controller = controller.new
|
35
|
+
req = ActionDispatch::Request.new({'rack.input' => ''})
|
35
36
|
params.each do |(k,v)|
|
36
37
|
req[k] = v
|
37
38
|
end
|
data/ripple-rails.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "ripple-rails"
|
7
|
-
gem.version = '0.
|
7
|
+
gem.version = '0.2.0'
|
8
8
|
gem.authors = ["singpolyma"]
|
9
9
|
gem.email = ["singpolyma@singpolyma.net"]
|
10
10
|
gem.description = %q{Rails integration for Ripple payment notifications.}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ripple-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
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: 2013-04-
|
12
|
+
date: 2013-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faye-websocket
|