intrinio 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +4 -4
- data/bin/intrinio +3 -1
- data/lib/intrinio/command_line.rb +16 -35
- data/lib/intrinio/version.rb +1 -1
- metadata +6 -104
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 18234aa89c6a0ff78d05615331f6a8c031f81d35cd51d7a57f4a741bde134000
|
4
|
+
data.tar.gz: 4003e2aa98f3f43cea1e994130c93a5e15ca9d6b1261308674951dcecbe4eb5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d84c4106892a6ae1e4fb89178f2a91604c7f92a8ccea7fea9ff68fdae7a09a0f6b35a919b91182bdd44f0d097cf7b838f43b8e485501798c159d9931bd2bc8ce
|
7
|
+
data.tar.gz: d4525a046cb3924bb2a7aa8d45b45085fdbf65c6cbce5fa0852701887f6c3c3fab334d7e28361c76c69c4800332503d6e2193de70bf14b57f06c148b9debd214
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
Intrinio API Library and Command Line
|
2
2
|
==================================================
|
3
3
|
|
4
|
-
[![Gem](https://
|
5
|
-
[![
|
6
|
-
[![
|
7
|
-
[![
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/intrinio.svg)](https://badge.fury.io/rb/intrinio)
|
5
|
+
[![Build Status](https://travis-ci.com/DannyBen/intrinio.svg?branch=master)](https://travis-ci.com/DannyBen/intrinio)
|
6
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/7428200a61a9203d2084/maintainability)](https://codeclimate.com/github/DannyBen/intrinio/maintainability)
|
7
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/7428200a61a9203d2084/test_coverage)](https://codeclimate.com/github/DannyBen/intrinio/test_coverage)
|
8
8
|
|
9
9
|
---
|
10
10
|
|
data/bin/intrinio
CHANGED
@@ -1,41 +1,18 @@
|
|
1
|
-
require '
|
2
|
-
require 'docopt'
|
1
|
+
require 'super_docopt'
|
3
2
|
require 'json'
|
4
3
|
require 'awesome_print'
|
5
4
|
|
6
5
|
module Intrinio
|
7
6
|
|
8
7
|
# Handles the command line interface
|
9
|
-
class CommandLine
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
# and shows usage patterns / help otherwise.
|
14
|
-
def execute(argv=[])
|
15
|
-
doc = File.read File.dirname(__FILE__) + '/docopt.txt'
|
16
|
-
begin
|
17
|
-
args = Docopt::docopt(doc, argv: argv, version: VERSION)
|
18
|
-
handle args
|
19
|
-
rescue Docopt::Exit, Intrinio::MissingAuth => e
|
20
|
-
puts e.message
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def intrinio
|
25
|
-
@intrinio ||= intrinio!
|
26
|
-
end
|
27
|
-
|
28
|
-
private
|
8
|
+
class CommandLine < SuperDocopt::Base
|
9
|
+
version VERSION
|
10
|
+
docopt File.expand_path 'docopt.txt', __dir__
|
11
|
+
subcommands ['get', 'pretty', 'see', 'url', 'save']
|
29
12
|
|
30
13
|
attr_reader :path, :params, :file, :csv
|
31
14
|
|
32
|
-
def
|
33
|
-
Intrinio::API.new options
|
34
|
-
end
|
35
|
-
|
36
|
-
# Called when the arguments match one of the usage patterns. Will
|
37
|
-
# delegate action to other, more specialized methods.
|
38
|
-
def handle(args)
|
15
|
+
def before_execute
|
39
16
|
@path = args['PATH']
|
40
17
|
@params = translate_params args['PARAMS']
|
41
18
|
@file = args['FILE']
|
@@ -44,12 +21,6 @@ module Intrinio
|
|
44
21
|
if intrinio_auth.empty?
|
45
22
|
raise Intrinio::MissingAuth, "Missing Authentication\nPlease set INTRINIO_AUTH=username:password"
|
46
23
|
end
|
47
|
-
|
48
|
-
return get if args['get']
|
49
|
-
return pretty if args['pretty']
|
50
|
-
return see if args['see']
|
51
|
-
return url if args['url']
|
52
|
-
return save if args['save']
|
53
24
|
end
|
54
25
|
|
55
26
|
def get
|
@@ -95,6 +66,16 @@ module Intrinio
|
|
95
66
|
result
|
96
67
|
end
|
97
68
|
|
69
|
+
def intrinio
|
70
|
+
@intrinio ||= intrinio!
|
71
|
+
end
|
72
|
+
|
73
|
+
private
|
74
|
+
|
75
|
+
def intrinio!
|
76
|
+
Intrinio::API.new options
|
77
|
+
end
|
78
|
+
|
98
79
|
def options
|
99
80
|
result = { username: username, password: password }
|
100
81
|
return result unless cache_dir || cache_life
|
data/lib/intrinio/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intrinio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: super_docopt
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0.
|
26
|
+
version: '0.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: awesome_print
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,104 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.1'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: runfile
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.8'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.8'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: runfile-tasks
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0.4'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0.4'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rspec
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '3.5'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '3.5'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rdoc
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - "~>"
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '5.0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - "~>"
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '5.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: byebug
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '9.0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '9.0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: simplecov
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0.13'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0.13'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: yard
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0.8'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0.8'
|
153
55
|
description: Easy to use API for Intrinio data service with a command line interface
|
154
56
|
email: db@dannyben.com
|
155
57
|
executables:
|
@@ -185,7 +87,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
87
|
version: '0'
|
186
88
|
requirements: []
|
187
89
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
90
|
+
rubygems_version: 2.7.6
|
189
91
|
signing_key:
|
190
92
|
specification_version: 4
|
191
93
|
summary: Intrinio API Library and Command Line
|