watership 0.2.6 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56677c57d836c14527c4f17df9988561f3972c27
4
- data.tar.gz: 27ea7ce1bd196216472f2140a2fa4367ae01ef18
3
+ metadata.gz: e31ac67a5096eb488ad4e96d1ee7a7cacf73f968
4
+ data.tar.gz: b3133ac1edd479d1424e9f0cdc4dcbf25a333c05
5
5
  SHA512:
6
- metadata.gz: ba65da99ea01c47e4b1da2cc9fde44f094c68178a028ec54301ea029eddf4e6a0de94da296e452c7fdce87d0635f9313ae9e03fc34702c3b30e5e19d533d0158
7
- data.tar.gz: 97eed4dccb8d43e852fd196dd9bbcc0d9faabd859a6d8f2bf9c4c0c9e9ab7fa6a6839115f32e26239fe965324723896b522df3aaee36afa67e27757960ba820e
6
+ metadata.gz: 0ca4e4c3ec252205655b9cbdf1e0a2c72ae21161f2fe47e4a1734d1ca9e9d6be008135a2282e34846dd94f9a947247eaa1c95c125afafa812a6d78b11f97b6c6
7
+ data.tar.gz: c656ce8aa5f048ba6d74e571618824a6b7b8937bd60aaf748db3cd2bc8ad343e9d4055adff168bbc5a194a05c5953fb1f5062d5c24c2a2181964f3e04b7b171f
data/CHANGELOG.md ADDED
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ ## 0.3.0 - 2014-03-27
4
+ * `Watership.config=` now takes a string representing an AMQP URI, not a path.
5
+
6
+ ## 0.2.6 - 2014-02-26
7
+ * Exceptions are now only pushed to Airbrake from the `production` environment.
8
+ * You can set Watership's environment with `Watership.environment = [env]`
9
+ * You can set Watership's logger with `Watership.logger = [logger]`
data/README.md CHANGED
@@ -22,25 +22,19 @@ Or install it yourself as:
22
22
 
23
23
  This is meant for our specific use case, but if you want to give it a go....
24
24
 
25
- Watership gives you channels. Instead of
25
+ Once you've `require`d it, you configure Watership with:
26
26
 
27
- client = Bunny.new([options])
28
- channel = client.create_channel
27
+ Watership.config = '[AMQP URI]'
29
28
 
30
- You just do
29
+ Optionally, you can set a logger (`Watership.logger = ...`) and specify the environment (`Watership.environment = ...`).
31
30
 
32
- channel = Watership::Inle.connect([options])
31
+ Then, connect to your RabbitMQ instance with:
33
32
 
34
- Watership doesn't automatically try to reconnect, but it does provide a couple of "helpful" methods:
33
+ Watership.reconnect
35
34
 
36
- * `Watership::Inle.ensure_connection` looks to see if you have a connection (that says it's connected), and if not will try to build one (pace some throttling). Note that the included fake client always reports that it's not connected.
37
- * `Watership::Inle.reconnect([boolean])` calls connect with the options originally provided, but allows you to pass `true` to force a connection to the fake.
35
+ Finally, you push messages like this:
38
36
 
39
- ## Naming
40
-
41
- Inlé is the Grim Reaper of rabbits in *Watership Down*.
42
-
43
- I always hear "rabbit" when someone refers to Welsh rarebit, so I think of it as a fake rabbit.
37
+ Watership.enqueue(name: 'queue name', message: 'message to enqueue')
44
38
 
45
39
  ## Contributing
46
40
 
@@ -1,3 +1,3 @@
1
1
  module Watership
2
- VERSION = "0.2.6"
2
+ VERSION = "0.3.0"
3
3
  end
data/lib/watership.rb CHANGED
@@ -15,8 +15,8 @@ module Watership
15
15
  @env = env
16
16
  end
17
17
 
18
- def config=(path)
19
- @config = IO.read(path).chomp
18
+ def config=(uri)
19
+ @config = uri
20
20
  end
21
21
 
22
22
  def enqueue(options = {})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: watership
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Scofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
11
+ date: 2014-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -74,6 +74,7 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - ".gitignore"
77
+ - CHANGELOG.md
77
78
  - Gemfile
78
79
  - LICENSE.txt
79
80
  - README.md
@@ -102,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
103
  version: '0'
103
104
  requirements: []
104
105
  rubyforge_project:
105
- rubygems_version: 2.2.0
106
+ rubygems_version: 2.2.2
106
107
  signing_key:
107
108
  specification_version: 4
108
109
  summary: Wrapper around Bunny to better handle connection issues