keen-cli 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -21,6 +21,7 @@ Commands:
21
21
  keen average # Alias for queries:run -a average
22
22
  keen count # Alias for queries:run -a count
23
23
  keen count-unique # Alias for queries:run -a count_unique
24
+ keen docs # Open the full Keen IO documentation in a browser
24
25
  keen events:add # Add one or more events and print the result
25
26
  keen extraction # Alias for queries:run -a extraction
26
27
  keen help [COMMAND] # Describe available commands or one specific command
@@ -82,7 +83,8 @@ $ keen projects:describe -p XXXXXXXXXXXXXXX -k AAAAAAAAAAAAAA
82
83
 
83
84
  keen-cli has a variety of commands, and most are namespaced for clarity.
84
85
 
85
- * `version` - Print version information
86
+ * `version` - Print version information.
87
+ * `docs` - Open the full [Keen IO docs](https://keen.io/docs) in a browser window. Pass `--reference` to go straight to the [API Technical Reference](https://keen.io/docs/api/reference/).
86
88
 
87
89
  ##### Projects
88
90
 
@@ -259,6 +261,7 @@ Parameters that apply to most commands include:
259
261
 
260
262
  ### Changelog
261
263
 
264
+ + 0.1.7 - Add docs command
262
265
  + 0.1.6 - Big refactoring to make importing events much cleaner and batching happen automatically. Also adds `queries:url`.
263
266
  + 0.1.5 – Support adding events from files with `--file`. Optionally add from CSV with `--csv`.
264
267
  + 0.1.4 – Support absolute timeframes via `--start` and `--end` flags
data/lib/keen-cli/cli.rb CHANGED
@@ -26,6 +26,20 @@ module KeenCli
26
26
  end
27
27
  end
28
28
 
29
+ desc 'docs', 'Open the full Keen IO documentation in a browser'
30
+ map %w(--docs) => :docs
31
+
32
+ shared_options
33
+ option :reference
34
+
35
+ def docs
36
+ docs_url = options[:reference] ? 'https://keen.io/docs/api/reference/' :
37
+ 'https://keen.io/docs'
38
+ docs_url.tap do |url|
39
+ `open #{url}`
40
+ end
41
+ end
42
+
29
43
  end
30
44
 
31
45
  end
@@ -1,3 +1,3 @@
1
1
  module KeenCli
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: keen-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
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: 2014-08-09 00:00:00.000000000 Z
12
+ date: 2014-08-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: keen