unicorn-ctl 0.1.6 → 0.1.7

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: 9942b7c093975e739c080458689d9878472570f4
4
- data.tar.gz: 15291d5de03286c8d20fffb1806adef9a2f06a9f
3
+ metadata.gz: 86dce2e052a707a74afa9857c12f068f54aad33a
4
+ data.tar.gz: a050a26a43d7cee0f137e56153e4a541cf42d84f
5
5
  SHA512:
6
- metadata.gz: ad78f2f23d649ebde54da12e234bd96057b18e33f367de5a8a909a2c4b4114dc3669ede418f93a4ac92e5dbe0923c3cc59424bae575371d3fee9d5eb72c159f8
7
- data.tar.gz: 73285fb1268571d33589301e695134013ab0e135307e03ae1b3cd0e58f1e78baed5d778cf6723f95ccf0db6b9a15dd4a26118892d64d5062d39823d5c7153429
6
+ metadata.gz: a5735eb7cbade6cc33041d9db908f222fbdfa450452e0fd27196f14c46dc20136967d3b99db83750fb7b7ca429130d62fa3741d5edea752dbdb0f3159096762d
7
+ data.tar.gz: 5e4db3b25dbd53105a4a762a5c1b8cb05004f9a3ed844d3dd2f723b5dd124b9197a82e4c76f2b7b3645f812bb8c2124cbb47b2ebdc0033616dd6cdff82fdbc2a
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## UnicornCtl Changelog
2
2
 
3
+ ### 0.1.7 / 2014-06-19
4
+
5
+ * Add version module and `-v` key to the script allowing users to see what version is installed.
6
+
3
7
  ### 0.1.6 / 2014-06-18
4
8
 
5
9
  * Do not follow recirects when performing a health check and handle all 1xx/2xx/3xx as success.
data/bin/unicornctl CHANGED
@@ -6,6 +6,15 @@ require 'shellwords'
6
6
  require 'getoptlong'
7
7
  require 'httparty'
8
8
 
9
+ #---------------------------------------------------------------------------------------------------
10
+ bin_dir = File.dirname(__FILE__)
11
+ root_dir = File.join(bin_dir, '..')
12
+ lib_dir = File.join(root_dir, 'lib')
13
+
14
+ $LOAD_PATH.push(lib_dir)
15
+ require 'unicorn_ctl/version'
16
+
17
+ #---------------------------------------------------------------------------------------------------
9
18
  VALID_COMMANDS = %w[
10
19
  start
11
20
  stop
@@ -454,6 +463,14 @@ def status!(options)
454
463
  end
455
464
  end
456
465
 
466
+ #---------------------------------------------------------------------------------------------------
467
+ def show_version
468
+ puts
469
+ puts "unicorn-ctl version #{UnicornCtl::Version::STRING}"
470
+ puts
471
+ exit(0)
472
+ end
473
+
457
474
  #---------------------------------------------------------------------------------------------------
458
475
  def show_help(error = nil)
459
476
  puts "ERROR: #{error}\n\n" if error
@@ -473,6 +490,7 @@ def show_help(error = nil)
473
490
  puts ' --pid-file=file | -p file PID-file unicorn is configured to use (default: shared/pids/unicorn.pid)'
474
491
  puts ' --watch-proctitle | -W Watch new master proctitle until it changes, which usually means it has finished loading'
475
492
  puts ' --rainbows | -R Use rainbows to start the app (default: use unicorn)'
493
+ puts ' --version | -v Show version'
476
494
  puts ' --help | -h This help'
477
495
  puts
478
496
  exit(error ? 1 : 0)
@@ -493,6 +511,7 @@ opts = GetoptLong.new(
493
511
  [ '--pid-file', '-p', GetoptLong::REQUIRED_ARGUMENT ],
494
512
  [ '--watch-proctitle', '-W', GetoptLong::NO_ARGUMENT ],
495
513
  [ '--rainbows', '-R', GetoptLong::NO_ARGUMENT ],
514
+ [ '--version', '-v', GetoptLong::NO_ARGUMENT ],
496
515
  [ '--help', '-h', GetoptLong::NO_ARGUMENT ]
497
516
  )
498
517
 
@@ -556,6 +575,9 @@ opts.each do |opt, arg|
556
575
  when "--rainbows"
557
576
  options[:unicorn_bin] = 'rainbows'
558
577
 
578
+ when "--version"
579
+ show_version
580
+
559
581
  when "--help"
560
582
  show_help
561
583
  end
@@ -0,0 +1,10 @@
1
+ module UnicornCtl
2
+ module Version
3
+ MAJOR = 0
4
+ MINOR = 1
5
+ PATCH = 7
6
+ BUILD = nil
7
+
8
+ STRING = [ MAJOR, MINOR, PATCH, BUILD ].compact.join('.')
9
+ end
10
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicorn-ctl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleksiy Kovyrin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-18 00:00:00.000000000 Z
11
+ date: 2014-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -50,6 +50,7 @@ files:
50
50
  - LICENSE.txt
51
51
  - README.md
52
52
  - bin/unicornctl
53
+ - lib/unicorn_ctl/version.rb
53
54
  homepage: https://github.com/swiftype/unicorn-ctl
54
55
  licenses:
55
56
  - MIT