wavefront-client 1.0.2 → 1.0.3

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
- YWVmNGM2NDQ4ZGQwNmMzZmIzN2JkZGJjMzllYTY2ZmE3NmY3MzkxMw==
4
+ ZTRlNTkwNWI5ODhjNTRiOWNjMTEyZGZiZGQ0Y2ZlZmRjNzM3NzMyNg==
5
5
  data.tar.gz: !binary |-
6
- MTFiMTczNWUxOWMzNTk3OTljNmMyMzg1YTUyZDJhMGQxN2ZkNzI5YQ==
6
+ NTZlODRjMDBmY2UzNTYwZTNmZDRlZmFmNmY4N2NhZTU5ZTg3ZmJjMw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDYwMzRiZTY0NjBhNjcyNzQwNWZmNDQ4NzI1OThlZmQyODhhMjYzNGExN2E2
10
- YTY3NGNmN2RhYWIwYmVhMmQyN2ZhM2E0MTI1MDRkMjQ1NjhlYTYyYTFiOTkw
11
- MTRlMjdiMjhkMjA3OWJhYTQ2YzU4OGUwYmQzZGU4NzczMzZiMDk=
9
+ YTUxZjkzNjAwMDBlNTU4MmMwNTc4ZmMwM2E2N2MyMjk4MjRhYzRiZDNjZGM1
10
+ NmZkYmJiOTA3MTY0MDkxMDQ3ZmU2MjAxMDgyOTJhMmZiOTcwYjIwODQ2ZGM1
11
+ N2FiMTBhMWU1OGMxMjdhODNhZDNiYmVhZjE4OGY0ZjRmZTNmZjk=
12
12
  data.tar.gz: !binary |-
13
- YWE4ZmE0MWFlODcxZTg4NzE2YWY5MjFjYjc1MTRiM2E0YTJlZDE5NjYwY2Qx
14
- Y2E4Nzg1MmY2ZjNjMWNmZjAzZWNiMzBhYzNjMTgyMmQxNDRhYzU3OTZkMzNj
15
- MmMyNjAwYzQ4NDI2NTUzYTgwNjJjNTkzNTZhOWVkZjdiMzllZGM=
13
+ ZGUyMDFhMzc3YjdkNzFhMmZiMGQxM2E2YmRlMGU4ZjUzMTM3MjFmNGU1NDM5
14
+ ZGU1OTUyNTU4NWM1MmNiOTdiZmU4OTU2MGE1ZjlhZjQxZjAzMWM3MTIyMjU2
15
+ NDk2OTcyNTU5ZjNkYjI3NjIwODM2NDNhOTcwMGE5MGYxZmNhMzg=
data/bin/wavefront-client CHANGED
@@ -27,7 +27,7 @@ require 'json'
27
27
  on 't', 'token=', 'Wavefront authentication token'
28
28
  on 'e', 'end=', 'Time in UNIX epoch seconds to query to'
29
29
  on 'f', 'format=', "Output format (#{Wavefront::Client::FORMATS.join(', ')})", default: Wavefront::Client::DEFAULT_FORMAT.to_s
30
- on 'p', 'prefixlength=', 'The number of path elements to treat as a prefix when doing schema manipulations', default: 1
30
+ on 'p', 'prefixlength=', 'The number of path elements to treat as a prefix when doing schema manipulations', default: Wavefront::Client::DEFAULT_PREFIX_LENGTH
31
31
  on 'h', 'help', 'Display this message'
32
32
  end
33
33
 
@@ -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 = "1.0.2"
19
+ VERSION = "1.0.3"
20
20
  end
21
21
  end
@@ -27,6 +27,7 @@ module Wavefront
27
27
  DEFAULT_PERIOD_SECONDS = 600
28
28
  DEFAULT_PATH = '/chart/api'
29
29
  DEFAULT_FORMAT = :raw
30
+ DEFAULT_PREFIX_LENGTH = 1
30
31
  FORMATS = [ :raw, :ruby, :graphite, :highcharts ]
31
32
  GRANULARITIES = %w( s m h d )
32
33
 
@@ -43,7 +44,7 @@ module Wavefront
43
44
  options[:end_time] ||= Time.now
44
45
  options[:start_time] ||= options[:end_time] - DEFAULT_PERIOD_SECONDS
45
46
  options[:response_format] ||= DEFAULT_FORMAT
46
- options[:prefix_length] ||= 1
47
+ options[:prefix_length] ||= DEFAULT_PREFIX_LENGTH
47
48
 
48
49
  [ options[:start_time], options[:end_time] ].each { |o| raise Wavefront::Exception::InvalidTimeFormat unless o.is_a?(Time) }
49
50
  raise Wavefront::Exception::InvalidGranularity unless GRANULARITIES.include?(granularity)
@@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
14
14
 
15
15
  =end
16
16
 
17
+ require 'wavefront/client'
17
18
  require 'wavefront/client/version'
18
19
  require 'wavefront/exception'
19
20
  require 'wavefront/mixins'
@@ -57,7 +58,7 @@ module Wavefront
57
58
 
58
59
  def initialize(response, options={})
59
60
  super
60
- options[:prefix_length] ||= 1 # See also Wavefront::Client
61
+ options[:prefix_length] ||= Wavefront::Client::DEFAULT_PREFIX_LENGTH
61
62
 
62
63
  @graphite = Array.new
63
64
  self.timeseries.each do |ts|
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: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pointer
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2015-08-31 00:00:00.000000000 Z
15
+ date: 2015-09-02 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: bundler