catchpoint 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/catchpoint-get-waterfall +7 -0
- data/bin/catchpoint-list-waterfalls +14 -0
- metadata +6 -2
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'catchpoint'
|
3
|
+
require 'uri'
|
4
|
+
# List waterfalls for the previous hour given a test ID
|
5
|
+
c = Catchpoint.new()
|
6
|
+
now = DateTime.now
|
7
|
+
seconds_ago = 3600
|
8
|
+
start = (now.to_time - seconds_ago).to_datetime
|
9
|
+
start_str = start.strftime('%m-%d-%Y %H:%M')
|
10
|
+
testid = ARGV.shift
|
11
|
+
data = c.get("/waterfall/intervals/#{testid}?date=" + URI.escape(start_str))
|
12
|
+
waterfalls = data['items']
|
13
|
+
waterfall_tokens = waterfalls.map { |m| m['intervals'] }.flatten.map { |m| m['waterfall_token'] }.flatten
|
14
|
+
puts waterfall_tokens.join("\n")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catchpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-06-
|
12
|
+
date: 2015-06-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|
@@ -31,10 +31,14 @@ description: Wrapper and CLI for Catchpoint API
|
|
31
31
|
email: david-vv@nicklay.com
|
32
32
|
executables:
|
33
33
|
- catchpoint-list-products
|
34
|
+
- catchpoint-get-waterfall
|
35
|
+
- catchpoint-list-waterfalls
|
34
36
|
extensions: []
|
35
37
|
extra_rdoc_files: []
|
36
38
|
files:
|
37
39
|
- lib/catchpoint.rb
|
40
|
+
- bin/catchpoint-get-waterfall
|
41
|
+
- bin/catchpoint-list-waterfalls
|
38
42
|
- bin/catchpoint-list-products
|
39
43
|
homepage: https://github.com/venturaville/catchpoint-api
|
40
44
|
licenses:
|