wavefront-client 3.3.0 → 3.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MDNiNGYxMWY3Y2NmNWMzM2YwY2YxNDczZDIxNGU0MGEyN2IwNDQ0MQ==
4
+ YzlmYWM4Y2YyZjljNjE0OTVmNjRlZmU5NDU5YTI1ZWY0MDM1YWUyOQ==
5
5
  data.tar.gz: !binary |-
6
- MWI3YTFiNTc2MWJlOWY3NWMyNDgwNDg1YjlkNWZiNTU0MjdhMGRkNg==
6
+ NmZhNGMyYmZkYjY1NzgwZjI5OTYxMzI4YmVjYjYxNTBhMzEwNzg0MA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NDUwYjRjOWE3MWU4OWUzZTkyN2NiMDhiZWE4ODQ1YWU5ZDA0MWM0Mjc2OWVm
10
- NzMxYjFiMTMzMWRiMWMyMDVkOGJlN2FmZjMyNThhYWY0YzdkMzIzZTczYTcw
11
- ODRkMjJhOWY4M2ZiM2I1NjVhNjBmNDJjMDA4ZmRhNzlhMWEzYzA=
9
+ MmE0OTFjMGU3M2ZiOTFmNDFiNjBhOTZhYTNhZDZiM2JkYTEzZGJhNjkzMDdl
10
+ YzFmODUyMDRmNDVmMGFlYjMzMTgzODFhM2I5MTc3ZDMwYWEyYzgwOTBhZDA1
11
+ ODI3OTI3OGMzODIzZTYwNjMxMWY5Zjc5ZTM3OGQ5YTliMDRhZjg=
12
12
  data.tar.gz: !binary |-
13
- YTUzNTMxMzg1OTIwYzdmYWUzMDNiOTZkOGM3NzI2NTA3OWFkM2E5YzBiOGRm
14
- ODZiNjhiNzNhMjYzODZkMDgwZDJkMGZmNGM0NmQ0NjBmYTEzMWIzNGM1ZDFl
15
- MTU4Njk1NjFkMWRiYjBhMWM1OWEwMjFiYjA3Yzk4OGRiOThiN2E=
13
+ MWFlN2NhZTc2YzNmMzY1MGFhOGI3YTY2NTM0NGJiZGY2NjQxMmUwNDBkNmMx
14
+ OGYwYzExOGFhZmQ0M2YzNmYzMDYyNTM5ZjI3Njc1NTIwMDA5NGFjYWY2MTM5
15
+ N2ExY2M4ZWRiOWRkZDI1YmJmMmJhMTAyNWFiMjMxY2UxMjBjMmQ=
@@ -16,6 +16,7 @@
16
16
 
17
17
  require 'pathname'
18
18
  require 'wavefront/client'
19
+ require 'wavefront/client/version'
19
20
  require 'wavefront/cli'
20
21
  require 'docopt'
21
22
  require 'socket'
@@ -28,7 +29,16 @@ def sanitize_keys(hash)
28
29
  end
29
30
 
30
31
  ME = Pathname.new(__FILE__).basename
31
- DEF_CF = Pathname.new(ENV['HOME']) + '.wavefront'
32
+
33
+ # If we are a normal user, look for wavefront config in our home
34
+ # directory; if not, look in /etc
35
+ #
36
+ DEF_CF = if ENV['HOME']
37
+ Pathname.new(ENV['HOME']) + '.wavefront'
38
+ else
39
+ Pathname.new('/etc/wavefront/client.conf')
40
+ end
41
+
32
42
 
33
43
  # The global_opts are available in every command.
34
44
  #
@@ -156,7 +166,7 @@ Use '#{ME} <command> --help' for further information.)
156
166
  # help/option parser generation.
157
167
  #
158
168
  begin
159
- opts = Docopt.docopt(usage[:default], version: '3.2.0')
169
+ opts = Docopt.docopt(usage[:default], version: Wavefront::Client::VERSION)
160
170
  rescue Docopt::Exit => e
161
171
  cmd = ARGV.length > 0 ? ARGV.first.to_sym : nil
162
172
 
@@ -33,7 +33,12 @@ class Wavefront::Cli::Events < Wavefront::Cli
33
33
  include Wavefront::Mixins
34
34
 
35
35
  def run
36
- @state_dir = EVENT_STATE_DIR + Etc.getlogin
36
+ begin
37
+ @state_dir = EVENT_STATE_DIR + Etc.getlogin
38
+ rescue
39
+ @state_dir = EVENT_STATE_DIR + 'notty'
40
+ end
41
+
37
42
  @hostname = Socket.gethostname
38
43
  @hosts = prep_hosts(options[:host])
39
44
  @t_start = prep_time(:start)
@@ -16,6 +16,6 @@ See the License for the specific language governing permissions and
16
16
 
17
17
  module Wavefront
18
18
  class Client
19
- VERSION = "3.3.0"
19
+ VERSION = "3.3.1"
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wavefront-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.0
4
+ version: 3.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pointer
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2016-08-08 00:00:00.000000000 Z
16
+ date: 2016-08-24 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: bundler