global_hotkeys_manager 0.1.1 → 0.1.2

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: 8f33dcdf7c131d43bce15e8959bb794f2c225b69
4
- data.tar.gz: 0ac7dcf523b1d63e34f647abdb3888e62a3bd4db
3
+ metadata.gz: d61ace4dfdc9e4d6d1615d00b87c1ba16f2b8236
4
+ data.tar.gz: b2c8c1d16ecf29bc46c3151fe59ad5aff0cf1cf2
5
5
  SHA512:
6
- metadata.gz: 3e0652002f2039f5c8e0846da0251dcea9d2e8f29271cb26443a0dd6a8bb0db4d4595e453010d4d818af329b487ead0d173c5e757061966931534589497394fd
7
- data.tar.gz: 58763dc39c2da0ce589921f3472940007cfa3069c1a35218a54c17effcb788d9bd4eab3952b7b3a62f2e3e4bf247f8fd0bf89232ef2b70a6e2cbf25ee9323b7b
6
+ metadata.gz: 26af94ac42f815043d6aeb86d8d6c19a23d6058f2df02a5bf4fb03bd6ca22d38e4abe4525a68f501bb3098d864b9b3cee18d09cc773570b660569d91d6ea3717
7
+ data.tar.gz: ba167724570649b1025269aae5768f6d3dc3e75c2a533e096819a0895954fdd834a76a80efd28b8d85c991ba4429a772a2351e287dd00f3731d113ab57115cc9
@@ -36,14 +36,15 @@ end
36
36
 
37
37
  def start
38
38
  exit 0 if running?
39
- Process.daemon unless ARGV[0] == 'debug'
39
+ Process.daemon unless (debug_mode = ARGV[0] == 'debug')
40
40
  File.write PID_FILE, Process.pid
41
41
  at_exit{ File.delete PID_FILE }
42
42
  GlobalHotkeysManager.ensure_running
43
- GlobalHotkeysManager::WebApp.run! environment: 'production'
43
+ GlobalHotkeysManager::WebApp.run! environment: (debug_mode ? 'development' : 'production')
44
44
  end
45
45
 
46
46
  case ARGV[0]
47
+ when 'version' then puts GlobalHotkeysManager::VERSION
47
48
  when 'help'
48
49
  puts %q{running without arguments will start the application daemons. Available commands:
49
50
  status - report current status
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
 
22
22
  spec.add_dependency 'sinatra', '1.4.7'
23
- spec.add_dependency 'sinatra-contrib', '1.4.7'
23
+ spec.add_development_dependency 'sinatra-contrib', '1.4.7'
24
24
 
25
25
  spec.add_development_dependency 'bundler', '~> 1.11'
26
26
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -1,3 +1,3 @@
1
1
  module GlobalHotkeysManager
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
@@ -1,5 +1,4 @@
1
1
  require 'sinatra/base'
2
- require 'sinatra/reloader'
3
2
  require 'tilt/erb'
4
3
 
5
4
  require_relative '../global_hotkeys_manager'
@@ -7,7 +6,12 @@ require_relative '../global_hotkeys_manager'
7
6
  module GlobalHotkeysManager
8
7
  class WebApp < Sinatra::Base
9
8
  configure :development do
10
- register Sinatra::Reloader
9
+ begin
10
+ require 'sinatra/reloader'
11
+ register Sinatra::Reloader
12
+ rescue Exception => e
13
+ puts 'For auto-reload to work sinatra-contrib gem must be installed'
14
+ end
11
15
  end
12
16
 
13
17
  configure do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: global_hotkeys_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
@@ -31,7 +31,7 @@ dependencies:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.4.7
34
- type: :runtime
34
+ type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements: