dispatch-rider 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTkzOGNhMTYyMGFlNzUxMWJjM2MyY2ZmNjRmZTAxZTlkMTk3NDY5Mw==
4
+ ZmQxNzNiMDU5MDE0Mzg2MDBkZjBiNDYxMmU2ODczZjEwYzk2MjE0Mw==
5
5
  data.tar.gz: !binary |-
6
- ZjQxZDVmOTIxYTc3N2U1NWYwYTQzODQ1MDNjZTk2YjFmMmQ1ZjQ3OQ==
6
+ NTUwNzY1NzJlM2I0ODMwYWVjMDdjNmJjMzNmNTFhNTk3MmFmZmU3MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YjE4NTI3OGYzY2MzMzJiODBkZDFjZGU0MDcwNjZkODM2OGViNzY5MGU1YmM5
10
- MTg2Y2RjNTZiYjY4ZGE0N2ViYTYwMDRmYzg5MjYzNTUxODY3MTUyYTg0MDEz
11
- Mjk4ZDA1OGNhY2ZlNTNhODUxNDllNmI1YTUwMWNhNGY0MjIyYjc=
9
+ NDY1OWI3YmZlMGQ4YjM2MzNlZTg4NTJkN2RhYWI3ODVkYzZmZDFmZTgyOWE5
10
+ NzQ3NjFmMmM0NjA0NjVmMWZlOWFjNTAwODdjOTlmZTEyNmNkN2YyYTk1MTNh
11
+ M2NmNTBhMmEzYjViM2U3YTg2MmNhMGUyZjNkYjg3NzVlODZmN2I=
12
12
  data.tar.gz: !binary |-
13
- OTg0OGQxMDYyNWMzYTgyMjg0NWQxYWMyNjI5NzY3M2NmODM4OWQyMjU0ZmEw
14
- YTg2YTJkMTUxZjUyNGZiZTc1NzJjMjVhMzdmZTBhNjIxY2I1N2U4NDI1NWMy
15
- ZDZiZGQ0OTY3MDFiZWY2YzcxMjY5NGZkMmU1M2MxNDdmNDIzYmY=
13
+ NDg3YTNiNjIzMjBmNzkxNDk2ZTIyYjMzMjZlMTZkNjgzMjUzN2E3YWM4MGM1
14
+ MjZlN2Y5OGM1YjVjMzM5NDlkMDIzZDMxYzljOTQ2NzgzNjczNzMxMGRiMjE1
15
+ MzBjZjU4YmZkMDExN2NjZTVjNzk0MDc1MmU5YWFkMjQ5YzViNDA=
data/README.md CHANGED
@@ -23,6 +23,10 @@ Or install it yourself as:
23
23
 
24
24
  $ gem install dispatch-rider
25
25
 
26
+ If you are using DispatchRider with rails, run the installer:
27
+
28
+ $ rails generate dispatch_rider:install
29
+
26
30
  ## Usage
27
31
 
28
32
  ### Publisher
@@ -174,7 +178,7 @@ class NewsPublisher < DispatchRider::Publisher::Base
174
178
  subject "read_news"
175
179
 
176
180
  def self.publish(news)
177
- publish({"headlines" => news.headlines})
181
+ new.publish({"headlines" => news.headlines})
178
182
  end
179
183
 
180
184
  end
@@ -18,7 +18,7 @@ module DispatchRider
18
18
  do_loop do
19
19
  begin
20
20
  handle_next_queue_item
21
- rescue Exception => exception
21
+ rescue => exception
22
22
  error_handler.call(Message.new(subject: "TopLevelError", body: {}), exception)
23
23
  throw :done
24
24
  end
@@ -34,7 +34,7 @@ module DispatchRider
34
34
 
35
35
  def dispatch_message(message)
36
36
  dispatcher.dispatch(message)
37
- rescue Exception => exception
37
+ rescue => exception
38
38
  error_handler.call(message, exception)
39
39
  end
40
40
 
@@ -1,4 +1,4 @@
1
1
  # This file specifies the current version of the gem.
2
2
  module DispatchRider
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
@@ -0,0 +1,12 @@
1
+ module DispatchRider
2
+ class InstallGenerator < ::Rails::Generators::Base
3
+
4
+ source_root File.expand_path("../templates", __FILE__)
5
+
6
+ def create_scripts
7
+ copy_file "script/dispatch_rider", "script/dispatch_rider"
8
+ chmod 'script/dispatch_rider', 0755
9
+ end
10
+
11
+ end
12
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dispatch-rider
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suman Mukherjee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-13 00:00:00.000000000 Z
11
+ date: 2013-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -194,6 +194,7 @@ files:
194
194
  - lib/dispatch-rider/runner.rb
195
195
  - lib/dispatch-rider/subscriber.rb
196
196
  - lib/dispatch-rider/version.rb
197
+ - lib/generators/dispatch_rider/install/install_generator.rb
197
198
  - LICENSE.txt
198
199
  - README.md
199
200
  homepage: ''