holistics 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +26 -10
- data/lib/holistics/api_client.rb +11 -2
- data/lib/holistics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 114373ad7051e71b16023f4bf4c403c9b60f096a
|
|
4
|
+
data.tar.gz: 4721ff8e289dd7b5346ef003421c1df4acefd177
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c918746d29c213cb690b23ddba29b17e72011efc2aa9aea48fbf5ecfdaa418a5c457b6493fd9692bc54712af4d532729619e1373e628214b3488bbbd555b09e
|
|
7
|
+
data.tar.gz: 5b9010a3731094037580e75023b2a64e82ab77f35761571eb44966af51f089b4cd50e644b180ad53a45159beabdb5e1cecfe1f8e3c219737c7bdb0e9b1a6c564
|
data/README.md
CHANGED
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
Command-line interface to Holistics API
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Build and Publish
|
|
7
|
+
|
|
8
|
+
$ gem build holistics.gemspec
|
|
9
|
+
WARNING: description and summary are identical
|
|
10
|
+
WARNING: See http://guides.rubygems.org/specification-reference/ for help
|
|
11
|
+
Successfully built RubyGem
|
|
12
|
+
Name: holistics
|
|
13
|
+
Version: 0.0.3
|
|
14
|
+
File: holistics-0.0.3.gem
|
|
15
|
+
|
|
16
|
+
$ gem publish holistics-0.0.3.gem
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## Installation (for public facing)
|
|
7
20
|
|
|
8
21
|
Install gem from RubyGems
|
|
9
22
|
|
|
10
23
|
$ gem install holistics
|
|
11
24
|
|
|
12
|
-
|
|
13
25
|
Then perform authentication:
|
|
14
26
|
|
|
15
27
|
$ holistics login [token]
|
|
@@ -18,6 +30,18 @@ Then perform authentication:
|
|
|
18
30
|
- ID: 1
|
|
19
31
|
- Email: admin@taxibooking.com
|
|
20
32
|
|
|
33
|
+
### To change remote server for testing purpose
|
|
34
|
+
|
|
35
|
+
$ DEV=1 holistics ...
|
|
36
|
+
# Will point to http://localhost:3000
|
|
37
|
+
|
|
38
|
+
$ STAGING=1 holistics ...
|
|
39
|
+
# Will point to https://staging.holistics.io
|
|
40
|
+
|
|
41
|
+
# or custom host
|
|
42
|
+
$ HOST=https://blah.com holistics ...
|
|
43
|
+
|
|
44
|
+
|
|
21
45
|
## Data Transport commands
|
|
22
46
|
|
|
23
47
|
### List existing data sources:
|
|
@@ -57,11 +81,3 @@ See `samples/clicks_mysql_to_redshift.json` for details of transport configs.
|
|
|
57
81
|
|
|
58
82
|
$ holistics mysql_to_redshift -c samples/clicks_mysql_to_redshift.json
|
|
59
83
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
### Mechanism:
|
|
64
|
-
|
|
65
|
-
* Submit a POST request to `/transports`. Will check and return a Job ID.
|
|
66
|
-
* Keep pinging
|
|
67
|
-
|
data/lib/holistics/api_client.rb
CHANGED
|
@@ -90,7 +90,16 @@ class ApiClient
|
|
|
90
90
|
end
|
|
91
91
|
|
|
92
92
|
def server_url
|
|
93
|
-
host =
|
|
93
|
+
host =
|
|
94
|
+
if ENV['DEV']
|
|
95
|
+
'http://localhost:3000'
|
|
96
|
+
elsif ENV['STAGING']
|
|
97
|
+
'https://staging.holistics.io'
|
|
98
|
+
elsif ENV['HOST']
|
|
99
|
+
ENV['HOST']
|
|
100
|
+
else
|
|
101
|
+
SERVER_URL
|
|
102
|
+
end
|
|
94
103
|
host += '/' if host[-1] != '/'
|
|
95
104
|
host
|
|
96
105
|
end
|
|
@@ -100,7 +109,7 @@ class ApiClient
|
|
|
100
109
|
|
|
101
110
|
configs = {}
|
|
102
111
|
if options[:config_path]
|
|
103
|
-
config_filepath = File.join(
|
|
112
|
+
config_filepath = File.join(Dir.pwd, options[:config_path])
|
|
104
113
|
configs = parse_transport_config(config_filepath)
|
|
105
114
|
end
|
|
106
115
|
|
data/lib/holistics/version.rb
CHANGED