openapply 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f9aaca0a532ad6fbcaa083f722bd35a72e620961ae1dd3c541a73ae08915eed
4
- data.tar.gz: 14ac6d5821f44120c824db2d4ffef12cb503a9dc76e7cc39ba8886d31cad95b0
3
+ metadata.gz: 7f5f9e9dffcc5d31464293631392d8cfca4c89c462f588e9271b9d9975fc585d
4
+ data.tar.gz: 50b2a66cc01a5d017246799febb2cde80b905db8f18f33c223cf2531b30f07f9
5
5
  SHA512:
6
- metadata.gz: 571bf0b2b81c714215de94da28bfb0e8c906555a5efc5411f93766b9e74a923e2a88b04957c280fc9d3347c5f4bfee607cfc3988f7bcd55d98d4715bbf3445c6
7
- data.tar.gz: 25d6edea4e4b7434e09995ea0ba004ad20ac467f02308e66c43e949530b83117e6ff462909b1f20edc9b445e4ffd316935c8f97468bb8ac8bd7fd3194fbfa524
6
+ metadata.gz: 8aeab600b2b9fb214bdc75b927f83a4ea0d8a64b070cec1193ced7bfdaf7d70538e146259c48239f40994d623a024f55042b5dec87eb586fdbb3df70afb3a1a8
7
+ data.tar.gz: c45b4d9b269d2d39ea785236f82bf2df7c964bd2c23959bcbf8061a381806238011009a496b8361bd59729569cb390c9a908d79e4758a367fbe290c0f368c997
data/CHANGE_LOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  ### Openapply CHANGE LOG
2
2
 
3
+ * **v0.3.3** - compatible with 0.3.x - 2018-04-20
4
+ - add more exceptions to catch misconfigs and alert coder
5
+
3
6
  * **v0.3.2** - compatible with 0.3.x - 2018-04-11
4
7
  - add another break condition (prevent nil)
5
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openapply (0.3.2)
4
+ openapply (0.3.3)
5
5
  httparty (~> 0.15)
6
6
  json (~> 2.1)
7
7
 
@@ -16,7 +16,7 @@ GEM
16
16
  crack (0.4.3)
17
17
  safe_yaml (~> 1.0.0)
18
18
  diff-lcs (1.3)
19
- docile (1.1.5)
19
+ docile (1.3.0)
20
20
  hashdiff (0.3.7)
21
21
  httparty (0.16.2)
22
22
  multi_xml (>= 0.5.2)
@@ -26,8 +26,8 @@ GEM
26
26
  pry (0.11.3)
27
27
  coderay (~> 1.1.0)
28
28
  method_source (~> 0.9.0)
29
- public_suffix (3.0.1)
30
- rake (12.3.0)
29
+ public_suffix (3.0.2)
30
+ rake (12.3.1)
31
31
  rspec (3.7.0)
32
32
  rspec-core (~> 3.7.0)
33
33
  rspec-expectations (~> 3.7.0)
@@ -42,8 +42,8 @@ GEM
42
42
  rspec-support (~> 3.7.0)
43
43
  rspec-support (3.7.1)
44
44
  safe_yaml (1.0.4)
45
- simplecov (0.15.1)
46
- docile (~> 1.1.0)
45
+ simplecov (0.16.1)
46
+ docile (~> 1.1)
47
47
  json (>= 1.8, < 3)
48
48
  simplecov-html (~> 0.10.0)
49
49
  simplecov-html (0.10.2)
@@ -23,8 +23,14 @@ module Openapply
23
23
  api_url = ENV['OA_BASE_URI']
24
24
  api_key = ENV['OA_AUTH_TOKEN']
25
25
 
26
- raise ArgumentError, 'OA_BASE_URI is missing' if api_url.nil? or api_url.empty?
27
- raise ArgumentError, 'OA_AUTH_TOKEN is missing' if api_key.nil? or api_key.empty?
26
+ raise ArgumentError, 'OA_TIMEOUT is missing' if api_timeout.nil? or
27
+ not api_timeout.is_a? Integer
28
+ raise ArgumentError, 'OA_API_PATH is missing' if api_path.nil? or
29
+ api_path.empty?
30
+ raise ArgumentError, 'OA_BASE_URI is missing' if api_url.nil? or
31
+ api_url.empty?
32
+ raise ArgumentError, 'OA_AUTH_TOKEN is missing' if api_key.nil? or
33
+ api_key.empty?
28
34
  end
29
35
 
30
36
  def api_url
@@ -71,9 +77,9 @@ module Openapply
71
77
  # @param options - see httparty options [http://www.rubydoc.info/github/jnunemaker/httparty]
72
78
  def oa_answer(url, options={})
73
79
  return { error: 'no url given' } if url.nil? or url.to_s.eql? ""
74
- return { error: 'bad url - has space' } if url.include? " "
75
- return { error: 'bad api_path' } unless url.include? "#{api_path}"
76
- return { error: 'bad auth_token' } unless url.include? "auth_token=#{api_key}"
80
+ return { error: 'bad url - has space' } if url&.include? " "
81
+ return { error: 'bad api_path' } unless url&.include? "#{api_path}"
82
+ return { error: 'bad auth_token' } unless url&.include? "auth_token=#{api_key}"
77
83
 
78
84
  api_answer = oa_api_call(url, options)
79
85
 
@@ -1,5 +1,5 @@
1
1
  module Openapply
2
2
  module Version
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  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.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Tihen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-04-11 00:00:00.000000000 Z
11
+ date: 2018-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty