ar_mailer_aws 0.0.3 → 0.0.4
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 +4 -4
- data/bin/ar_mailer_aws +2 -2
- data/lib/ar_mailer_aws.rb +5 -0
- data/lib/ar_mailer_aws/version.rb +1 -1
- data/spec/ar_mailer_aws/parse_options_spec.rb +4 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9adfef61dff172c54ea70efa899faf4aad601259
|
|
4
|
+
data.tar.gz: ae1a8d5225adfc1e9b405cf3cc43af0d5db2cf74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbc40383861fe35ca24d7e64449fa07182b2308cd1ea1f031a7f0c464ee52041a565008553449f06325b9d4ce99ed24787419137f96d852cc7c27f366ca71217
|
|
7
|
+
data.tar.gz: 2ab44794c4737b4cdce57dedcef9cd26e89306e7bcd1c63b7b72cc277fd935537a0a959ba0872bfef97d721d10785381b72819618522aaf9b5b3ad2530617271
|
data/bin/ar_mailer_aws
CHANGED
|
@@ -23,10 +23,10 @@ unless name == 'rspec'
|
|
|
23
23
|
end
|
|
24
24
|
|
|
25
25
|
options = ArMailerAWS.parse_options(ARGV)
|
|
26
|
-
daemon_options = {
|
|
26
|
+
daemon_options = {}
|
|
27
27
|
daemon_options.update(dir_mode: :normal, dir: options.pid_dir) if options.pid_dir
|
|
28
28
|
|
|
29
|
-
Daemons.run_proc('ar_mailer_aws', daemon_options) do
|
|
29
|
+
Daemons.run_proc(options.app_name || 'ar_mailer_aws', daemon_options) do
|
|
30
30
|
# handle log files
|
|
31
31
|
if defined? Rails
|
|
32
32
|
ActiveRecord::Base.establish_connection
|
data/lib/ar_mailer_aws.rb
CHANGED
|
@@ -100,6 +100,11 @@ module ArMailerAWS
|
|
|
100
100
|
options.pid_dir = pid_dir
|
|
101
101
|
end
|
|
102
102
|
|
|
103
|
+
opts.on('--app-name APP_NAME', 'Name for the daemon app',
|
|
104
|
+
'Default: ar_mailer_aws') do |app_name|
|
|
105
|
+
options.app_name = app_name
|
|
106
|
+
end
|
|
107
|
+
|
|
103
108
|
opts.on('-v', '--[no-]verbose', 'Run verbosely') do |v|
|
|
104
109
|
options.verbose = v
|
|
105
110
|
end
|
|
@@ -37,4 +37,8 @@ describe 'command line options parsing' do
|
|
|
37
37
|
it 'pid_dir' do
|
|
38
38
|
ArMailerAWS.parse_options(%w(-p tmp/pids)).pid_dir.should == 'tmp/pids'
|
|
39
39
|
end
|
|
40
|
+
|
|
41
|
+
it 'app_name' do
|
|
42
|
+
ArMailerAWS.parse_options(%w(--app-name my_daemon)).app_name.should == 'my_daemon'
|
|
43
|
+
end
|
|
40
44
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ar_mailer_aws
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Alex Leschenko
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-12-
|
|
11
|
+
date: 2013-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: daemons
|