jump_cloud 0.2.0.pre.rc5 → 0.2.0.pre.rc6

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: 8489475886f9bd9f4481cd8718bfe564252501db
4
- data.tar.gz: 83857adb6e804b534211f194b00257624858fe8a
3
+ metadata.gz: 0d7da8bad614b0ee3b5fc3fca9c6b973abe08b5a
4
+ data.tar.gz: 9aee740533a82ba087c76a2026087bb58de6701d
5
5
  SHA512:
6
- metadata.gz: 82c17eb548713e685e35abdfc90ac4c16da7e25c3498e2846409366e27e03666e62394900e1480472a2a26046e5454f95404bc620b56590fe4da670000d3563f
7
- data.tar.gz: 5ac61ec762da37621ecc5af76a7ccc202932bf6c59e727e17340fef1685cc44f5ccf153d47982232c2726f460571a622711018146dcfcf41c477d607d3a3d66b
6
+ metadata.gz: d2f9e8511e8b27322b7f8c7676f3f6b5b74f4f1b57e2a1077e59e654684ee925670d171025b95eb6d41543e3bca613e53b9f17ded849353714c671cd0ca88162
7
+ data.tar.gz: 63183d9e255ef9f1accdb046d7dbba5d824b1bc88d2879c2cce9e3d7474b5ef0f46d2dd526fde2dc985ceba642e8745259d394ef13a450627848c1e9cc48536d
@@ -45,7 +45,8 @@ module JumpCloud
45
45
  api_key: ENV['JUMPCLOUD_API_KEY'],
46
46
  connect_key: ENV['JUMPCLOUD_CONNECT_KEY'],
47
47
  install_sudo: false,
48
- install_command: :curl
48
+ install_command: :curl,
49
+ log_level: :warn
49
50
  }
50
51
 
51
52
  def self.root(*args)
@@ -3,14 +3,23 @@ module JumpCloud
3
3
 
4
4
  class << self
5
5
  def install(fetch: :curl)
6
+ puts "Installing JumpCloud agent"
6
7
  if system(install_cmd(fetch))
7
- puts "Agent installed"
8
+ JumpCloud.logger.info "Agent installed"
8
9
  else
9
- puts "Agent not installed. Check /opt/jc/jcagentInstall.log"
10
- puts `cat /opt/jc/jcagentInstall.log`
10
+ JumpCloud.logger.warn "Agent not installed. Check /opt/jc/jcagentInstall.log"
11
+ JumpCloud.logger.info `cat /opt/jc/jcagentInstall.log`
11
12
  end
12
13
  end
13
14
 
15
+ def wait_for_init
16
+ 30.times do
17
+ return true unless config(cache: false)['systemKey'].nil?
18
+ sleep 5
19
+ end
20
+ return false
21
+ end
22
+
14
23
  def system_id
15
24
  config['systemKey']
16
25
  end
@@ -21,7 +21,7 @@ module JumpCloud
21
21
 
22
22
  def on_complete(env)
23
23
  super.tap do
24
- puts "status: #{env.status}"
24
+ JumpCloud.logger.info "status: #{env.status}"
25
25
  end
26
26
  end
27
27
 
@@ -52,13 +52,13 @@ module JumpCloud
52
52
 
53
53
  # @private
54
54
  def call(env)
55
- puts "#{env.method}: #{env.url.to_s}"
55
+ JumpCloud.logger.debug "#{env.method}: #{env.url.to_s}"
56
56
  add_header(env[:request_headers])
57
57
  unless env.method == :get
58
58
  env[:body] = encode env[:body] unless env[:body].respond_to?(:to_str)
59
59
  end
60
- puts "params: #{env.params}"
61
- puts "body: #{env.body}"
60
+ JumpCloud.logger.debug "params: #{env.params}"
61
+ JumpCloud.logger.debug "body: #{env.body}"
62
62
  @app.call(env)
63
63
  end
64
64
 
@@ -1,3 +1,3 @@
1
1
  module JumpCloud
2
- VERSION = "0.2.0-rc5"
2
+ VERSION = "0.2.0-rc6"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jump_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.pre.rc5
4
+ version: 0.2.0.pre.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dale Stevens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-03 00:00:00.000000000 Z
11
+ date: 2018-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: her
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: '0.10'
19
+ version: 0.10.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: '0.10'
26
+ version: 0.10.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pry-byebug
29
29
  requirement: !ruby/object:Gem::Requirement