hutch 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e5cc77d44298bc30b015712a1f15f61cafc5e7c
4
- data.tar.gz: bda636946084243afc740b8754672259ca2e4684
3
+ metadata.gz: fd5acc300bddafcfd792e4c75e5b811a48f629fd
4
+ data.tar.gz: a95a2cd5d6f68eef43366f41a944a97d0ecd69b5
5
5
  SHA512:
6
- metadata.gz: 52c095af05f9d3c5f5a902eff935bf1f5056e539b96e009e656a70ecb287da2d3c771bd42f162fadb2bef9ae7752a4eed7a384b1e24d72e91476e511f70a292f
7
- data.tar.gz: 67fc947889d0ac2d3eaff59164439f2980489aa922693c6ff1c43f83dbf91126c2b1f1e7c23283ff9cf7da4a2ddcc456bfc2f966d0bc2b320120a92e44974437
6
+ metadata.gz: 98826378b6171757012a15807bc0e52b88a692a88aa9c14e864969c5dbef49ea45890c50372e58a5dbb4b5179ee9cd12b992e00a4cb16108134d0603b56a0162
7
+ data.tar.gz: 009ec3387f697af8dd6ea279bbf1260a945d5063d012b7a0970ad7d99a3b5d5a60ca7abc33473f2f494584a77c3a7f63946bea123c7a195e30ef65608dd7c674
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.3.0 - September 24, 2013
2
+
3
+ - Add `--[no-]autoload-rails` flag to optionally disable the autoloading of
4
+ Rails apps in the current directory
5
+
1
6
  ## 0.2.1 - September 17, 2013
2
7
 
3
8
  - Fix inconsistency with `mq-tls` option
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 GoCardless
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -94,12 +94,14 @@ $ hutch -h
94
94
  usage: hutch [options]
95
95
  --mq-host HOST Set the RabbitMQ host
96
96
  --mq-port PORT Set the RabbitMQ port
97
+ --mq-tls Use TLS for the AMQP connection
97
98
  --mq-exchange EXCHANGE Set the RabbitMQ exchange
98
99
  --mq-vhost VHOST Set the RabbitMQ vhost
100
+ --mq-username USERNAME Set the RabbitMQ username
101
+ --mq-password PASSWORD Set the RabbitMQ password
99
102
  --mq-api-host HOST Set the RabbitMQ API host
100
103
  --mq-api-port PORT Set the RabbitMQ API port
101
- --mq-api-username USERNAME Set the RabbitMQ API username
102
- --mq-api-password PASSWORD Set the RabbitMQ API password
104
+ --mq-api-ssl Use SSL for the RabbitMQ API
103
105
  --require PATH Require a Rails app or path
104
106
  -q, --quiet Quiet logging
105
107
  -v, --verbose Verbose logging
data/lib/hutch/cli.rb CHANGED
@@ -25,7 +25,7 @@ module Hutch
25
25
 
26
26
  def load_app
27
27
  # Try to load a Rails app in the current directory
28
- load_rails_app('.')
28
+ load_rails_app('.') if Hutch::Config.autoload_rails
29
29
  Hutch::Config.require_paths.each do |path|
30
30
  # See if each path is a Rails app. If so, try to load it.
31
31
  next if load_rails_app(path)
@@ -96,7 +96,7 @@ module Hutch
96
96
  Hutch::Config.mq_port = port
97
97
  end
98
98
 
99
- opts.on('--mq-tls', 'Set the RabbitMQ connection to use TLS') do |tls|
99
+ opts.on('--mq-tls', 'Use TLS for the AMQP connection') do |tls|
100
100
  Hutch::Config.mq_tls = tls
101
101
  end
102
102
 
@@ -127,7 +127,7 @@ module Hutch
127
127
  Hutch::Config.mq_api_port = port
128
128
  end
129
129
 
130
- opts.on('--mq-api-ssl', 'Set the RabbitMQ API connection to use SSL') do |api_ssl|
130
+ opts.on('--mq-api-ssl', 'Use SSL for the RabbitMQ API') do |api_ssl|
131
131
  Hutch::Config.mq_api_ssl = api_ssl
132
132
  end
133
133
 
@@ -135,6 +135,10 @@ module Hutch
135
135
  Hutch::Config.require_paths << path
136
136
  end
137
137
 
138
+ opts.on('--[no-]autoload-rails', 'Require the current rails app directory') do |autoload_rails|
139
+ Hutch::Config.autoload_rails = autoload_rails
140
+ end
141
+
138
142
  opts.on('-q', '--quiet', 'Quiet logging') do
139
143
  Hutch::Config.log_level = Logger::WARN
140
144
  end
@@ -156,4 +160,3 @@ module Hutch
156
160
  end
157
161
  end
158
162
  end
159
-
data/lib/hutch/config.rb CHANGED
@@ -18,6 +18,7 @@ module Hutch
18
18
  mq_api_ssl: false,
19
19
  log_level: Logger::INFO,
20
20
  require_paths: [],
21
+ autoload_rails: true,
21
22
  error_handlers: [Hutch::ErrorHandlers::Logger.new]
22
23
  }
23
24
  end
data/lib/hutch/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Hutch
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hutch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Harry Marr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-17 00:00:00.000000000 Z
11
+ date: 2013-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bunny
@@ -79,6 +79,7 @@ files:
79
79
  - CHANGELOG.md
80
80
  - Gemfile
81
81
  - Guardfile
82
+ - LICENSE
82
83
  - README.md
83
84
  - Rakefile
84
85
  - bin/hutch