openapply 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -1
- data/README.md +12 -2
- data/lib/openapply/convert.rb +10 -4
- data/lib/openapply/version.rb +1 -1
- data/openapply.gemspec +5 -3
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b93c4f55575610cef31739e94b05342210d4b84ab3a83aab348731dd972610b
|
4
|
+
data.tar.gz: 6bd9b5abecfd5fe56da2c840ddee1de81b177a89b2dc24eed9c415a4e75b85b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee824ba665e7e30e061443bfa4a464e2549390b332dff591ca4b1c9f58ac68b7aff89ef7f1e554fe90fee57be1ddcd79c767e6618e842a971d76aace88304530
|
7
|
+
data.tar.gz: ea96157ed83ba97ae242adcf6c73592d515bf37b4c73b2ef9b061e2642c633e915d40e959736bb554e9225685bdea6fcba64cd219c74f0c1e0ea3b9330593874
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
openapply (0.2.
|
4
|
+
openapply (0.2.6)
|
5
5
|
httparty (~> 0.15)
|
6
6
|
json (~> 2.1)
|
7
7
|
net-scp (~> 1.2)
|
@@ -12,6 +12,7 @@ GEM
|
|
12
12
|
specs:
|
13
13
|
addressable (2.5.2)
|
14
14
|
public_suffix (>= 2.0.2, < 4.0)
|
15
|
+
coderay (1.1.2)
|
15
16
|
crack (0.4.3)
|
16
17
|
safe_yaml (~> 1.0.0)
|
17
18
|
diff-lcs (1.3)
|
@@ -20,10 +21,14 @@ GEM
|
|
20
21
|
httparty (0.15.6)
|
21
22
|
multi_xml (>= 0.5.2)
|
22
23
|
json (2.1.0)
|
24
|
+
method_source (0.9.0)
|
23
25
|
multi_xml (0.6.0)
|
24
26
|
net-scp (1.2.1)
|
25
27
|
net-ssh (>= 2.6.5)
|
26
28
|
net-ssh (4.2.0)
|
29
|
+
pry (0.11.3)
|
30
|
+
coderay (~> 1.1.0)
|
31
|
+
method_source (~> 0.9.0)
|
27
32
|
public_suffix (3.0.1)
|
28
33
|
rake (10.5.0)
|
29
34
|
rspec (3.7.0)
|
@@ -56,6 +61,7 @@ PLATFORMS
|
|
56
61
|
DEPENDENCIES
|
57
62
|
bundler (~> 1.15)
|
58
63
|
openapply!
|
64
|
+
pry (~> 0.11)
|
59
65
|
rake (~> 10.0)
|
60
66
|
rspec (~> 3.7)
|
61
67
|
simplecov (~> 0.15)
|
data/README.md
CHANGED
@@ -5,16 +5,26 @@ This gem allows ruby access to the OpenApply API v1 - and supports the GET featu
|
|
5
5
|
|
6
6
|
### Still TODO
|
7
7
|
|
8
|
+
* **add google sheets to convert**
|
9
|
+
* **update axlsx with rubyzip 1.2.1**
|
8
10
|
* make tests for scp / ssh (at least data type conversions)
|
9
11
|
* allow csv and xlsx reports with default summary info only?
|
10
12
|
* write PUTS methods - *currently api only allows status update*
|
11
|
-
* allow flattening and reject to work at any depth (with recursion?)
|
12
13
|
* write a recursive custom query - when results are more than one page
|
13
|
-
*
|
14
|
+
* **allow flattening and reject to work at any depth (with recursion?)**
|
15
|
+
* speed up response when returning large number of records? - **looks like API**
|
14
16
|
|
15
17
|
|
16
18
|
### CHANGE LOG
|
17
19
|
|
20
|
+
* **v0.2.7** - compatible with 0.2.x - 2017-12-xx
|
21
|
+
- allow flattening to work with arrays
|
22
|
+
- allow flattening and reject to work at 2 levels of depth
|
23
|
+
- allow flattening and reject to work at any depth (with recursion?)
|
24
|
+
|
25
|
+
* **v0.2.6** - compatible with 0.2.x - 2017-12-08
|
26
|
+
- allow ssh/scp options to be passed
|
27
|
+
|
18
28
|
* **v0.2.5** - compatible with 0.2.x - 2017-11-30
|
19
29
|
- removed a reference to AXLSX in scp transfers *(haven't figured out how to test that yet!)*
|
20
30
|
|
data/lib/openapply/convert.rb
CHANGED
@@ -296,8 +296,11 @@ module Convert
|
|
296
296
|
# * +srv_hostname+ - username to access the remote host
|
297
297
|
# * +srv_path_file+ - full path and file name of the file on the remote host
|
298
298
|
# * +file_permissions+ - permissions to make the file on the remote host (default is: 0750)
|
299
|
+
# * +options+ - allow ssh start options to be passed in
|
299
300
|
def send_data_to_remote_server( data, srv_hostname, srv_username,
|
300
|
-
srv_path_file,
|
301
|
+
srv_path_file, srv_file_permissions="0750",
|
302
|
+
ssl_options={}
|
303
|
+
)
|
301
304
|
# https://www.safaribooksonline.com/library/view/ruby-cookbook/0596523696/ch06s15.html
|
302
305
|
# convert the string to a stringio object (which can act as a file)
|
303
306
|
|
@@ -314,17 +317,20 @@ module Convert
|
|
314
317
|
# be sure its a file type that can be sent
|
315
318
|
return "Unrecognized Object" unless known_transfer_object?(data)
|
316
319
|
|
320
|
+
# verify_host_key = {verify_host_key: false} if options[:verify_host_key].eql? false
|
321
|
+
# verify_host_key ||= {verify_host_key: true}
|
322
|
+
|
317
323
|
# http://www.rubydoc.info/github/delano/net-scp/Net/SCP
|
318
324
|
# send the stringio object to the remote host via scp
|
319
|
-
Net::SCP.start(srv_hostname, srv_username) do |scp|
|
325
|
+
Net::SCP.start(srv_hostname, srv_username, ssl_options) do |scp|
|
320
326
|
# asynchronous upload; call returns immediately
|
321
327
|
channel = scp.upload( xfer, srv_path_file )
|
322
328
|
channel.wait
|
323
329
|
end
|
324
330
|
# ensure file has desired permissions (via remote ssh command)
|
325
|
-
Net::SSH.start(srv_hostname, srv_username) do |ssh|
|
331
|
+
Net::SSH.start(srv_hostname, srv_username, ssl_options) do |ssh|
|
326
332
|
# Capture all stderr and stdout output from a remote process
|
327
|
-
output = ssh.exec!("chmod #{
|
333
|
+
output = ssh.exec!("chmod #{srv_file_permissions} #{srv_path_file}")
|
328
334
|
end
|
329
335
|
end
|
330
336
|
alias_method :send_string_to_server_file, :send_data_to_remote_server
|
data/lib/openapply/version.rb
CHANGED
data/openapply.gemspec
CHANGED
@@ -32,18 +32,20 @@ Gem::Specification.new do |spec|
|
|
32
32
|
|
33
33
|
spec.add_dependency "httparty", "~> 0.15"
|
34
34
|
spec.add_dependency "json" , "~> 2.1"
|
35
|
+
spec.add_dependency "net-ssh", "~> 4.2"
|
36
|
+
spec.add_dependency "net-scp", "~> 1.2"
|
37
|
+
|
35
38
|
# # need this version of axlsx to match roo's rubyzip needs
|
36
39
|
# # axlsx 2.1.0.pre uses rubyzip 1.1.7 - which has a security flaw
|
37
40
|
# # using the newest version of rubyzip 1.2.1 or larger
|
38
41
|
# spec.add_dependency "axlsx", "2.1.0.pre"
|
39
42
|
# spec.add_dependency "rubyzip", "~> 1.2"
|
40
|
-
spec.
|
41
|
-
spec.add_dependency "net-scp", "~> 1.2"
|
43
|
+
# spec.add_development_dependency "roo", "~> 2.7"
|
42
44
|
|
43
45
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
44
46
|
spec.add_development_dependency "webmock" , "~> 3.1"
|
45
47
|
spec.add_development_dependency "bundler", "~> 1.15"
|
46
48
|
spec.add_development_dependency "rake", "~> 10.0"
|
47
49
|
spec.add_development_dependency "rspec", "~> 3.7"
|
48
|
-
|
50
|
+
spec.add_development_dependency "pry", "~> 0.11"
|
49
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: openapply
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill Tihen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '3.7'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.11'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.11'
|
139
153
|
description:
|
140
154
|
email:
|
141
155
|
- btihen@gmail.com
|