eyemanager 0.3.1 → 0.4.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: b4a280ff75d07920157a282ebd4dbb6c78fbe617
4
- data.tar.gz: df0308bfd09872ab97a40fbd337639b01cffeb47
3
+ metadata.gz: 09736fbc49dc46de38430303894a2264e46873ad
4
+ data.tar.gz: 9d0198418a4105729791a79555daf35fcc295f49
5
5
  SHA512:
6
- metadata.gz: 2f4913e4eee1801458fe07dd5cdb8c307ac56356b7e30fcfcc5e8153d87c5c85b0d0f2970d18dcb68b71284a9e4255a40e869e0d2ec8dad08753d461d03b9ac0
7
- data.tar.gz: 19a0d076889c5c55ea022d42d9084e04d7b0800d0fe817ac08f37e902b97414cab3b691d5c02b8bd1a71432f26e958404eb91e893e81b431efcf8c364309eaa7
6
+ metadata.gz: 71718df92942297a3fd209a015780b655e38df9ac63ed4134e37d270a78a4331c1b5a88c85f48f4c74fa8978c94b2934ef71b8f38c62665bfe70911dcdba9fb0
7
+ data.tar.gz: 1d924cdd0d1e009aebee8fc800470907d12b076cd04a0b54271bbcbb222b8a6d227d15d5a144e9529049726bcdb1865b267bea4cd6f30e22dcac2cbc2d53fa5f
data/README.md CHANGED
@@ -40,10 +40,8 @@ eye start test
40
40
  This:
41
41
 
42
42
  ```ruby
43
- EyeManager.stop application: 'test',
44
- process: 'sample'
45
- EyeManager.stop application: 'test2',
46
- group: 'samples', process: 'sample'
43
+ EyeManager.stop application: 'test', process: 'sample'
44
+ EyeManager.stop application: 'test2', group: 'samples', process: 'sample'
47
45
  ```
48
46
 
49
47
  is equivelant to:
@@ -58,8 +56,7 @@ eye stop test:samples:sample
58
56
  This:
59
57
 
60
58
  ```ruby
61
- EyeManager.status application: 'test',
62
- process: 'sample'
59
+ EyeManager.status application: 'test', process: 'sample'
63
60
  ```
64
61
 
65
62
  will retrieve the state of the `test` application's `sample` process.
@@ -67,8 +64,7 @@ will retrieve the state of the `test` application's `sample` process.
67
64
  If your process is within a `group` block, ensure to include the `group`:
68
65
 
69
66
  ```ruby
70
- EyeManager.stop application: 'test2',
71
- group: 'samples', process: 'sample'
67
+ EyeManager.stop application: 'test2', group: 'samples', process: 'sample'
72
68
  ```
73
69
 
74
70
  ### Destroy
data/eyemanager.gemspec CHANGED
@@ -32,6 +32,6 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency "bundler", "~> 1.14"
33
33
  spec.add_development_dependency "rake", "~> 10.0"
34
34
  spec.add_development_dependency "rspec", "~> 3.0"
35
+ spec.add_development_dependency "gem-release"
35
36
  spec.add_dependency "eye"
36
- spec.add_dependency "gem-release"
37
37
  end
@@ -1,3 +1,3 @@
1
1
  module EyeManager
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
data/lib/eyemanager.rb CHANGED
@@ -2,6 +2,8 @@ require "eyemanager/version"
2
2
  require "json"
3
3
 
4
4
  module EyeManager
5
+ EyeLoadFailed = Class.new(StandardError)
6
+
5
7
  class << self
6
8
  def start params={}
7
9
  validate_start_params params
@@ -49,7 +51,8 @@ module EyeManager
49
51
  def load_config_and_verify config
50
52
  cmd = "eye load #{config}"
51
53
  output = `#{cmd}`
52
- raise "Eye load failed to load config. " +
54
+ raise EyeLoadFailed,
55
+ "Eye load failed to load config. " +
53
56
  "Command: #{cmd}. Output: #{output}." unless
54
57
  /Config loaded/.match(output)
55
58
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eyemanager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - joshweir
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-02 00:00:00.000000000 Z
11
+ date: 2017-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -53,13 +53,13 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: eye
56
+ name: gem-release
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
- type: :runtime
62
+ type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: gem-release
70
+ name: eye
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="