spark_api 1.5.6 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/spark_api/authentication/oauth2_impl/cli_provider.rb +2 -2
- data/lib/spark_api/configuration/yaml.rb +3 -1
- data/spec/spec_helper.rb +8 -13
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbd257984db9c6b0321b546eaf34794a8ddd42a0cedb46c284d48305ee1cf5aa
|
4
|
+
data.tar.gz: 3f2c191759d9ac5df0290d1ed2486cd55be3e11dc94b01ab4d779314aa42219e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3aaba4e37303375cd7ffc8149b39d2ed9f3cefb36c987f0c7ed2632a9f4881e1040a41fcc1fd7b3ea8e26bc2d05631ccd92d52f163326f1ac398470749e7719
|
7
|
+
data.tar.gz: a0488169eb021611cb52fc6c75a56d256fcf32963a3923d6bd4ef1b9b7ab4ce25faa7f75e008b3f974bc8c8a6f18868d7f7819a1e6a236bdb4997c8d30c2b97d
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
@@ -82,8 +82,8 @@ module SparkApi
|
|
82
82
|
|
83
83
|
def load_file
|
84
84
|
yaml = {}
|
85
|
-
begin
|
86
|
-
yaml = YAML.load(File.open(filename))
|
85
|
+
begin
|
86
|
+
yaml = YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(File.open(filename)) : YAML.load(File.open(filename))
|
87
87
|
yaml = {} if yaml == false
|
88
88
|
rescue => e
|
89
89
|
puts "no file: #{e.message}"
|
@@ -16,7 +16,9 @@ module SparkApi
|
|
16
16
|
def load_file(file)
|
17
17
|
@file = file
|
18
18
|
@name = File.basename(file, ".yml")
|
19
|
-
|
19
|
+
|
20
|
+
erb_file = ERB.new(File.read(file)).result
|
21
|
+
config = (YAML.respond_to?(:unsafe_load) ? YAML.unsafe_load(erb_file) : YAML.load(erb_file))[api_env]
|
20
22
|
config["oauth2"] == true ? load_oauth2(config) : load_api_auth(config)
|
21
23
|
rescue => e
|
22
24
|
SparkApi.logger().error("Unable to load config file #{file}[#{api_env}]")
|
data/spec/spec_helper.rb
CHANGED
@@ -2,10 +2,12 @@ if ENV['COVERAGE'] == "on"
|
|
2
2
|
require 'simplecov'
|
3
3
|
require 'simplecov-rcov'
|
4
4
|
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
5
|
-
SimpleCov.
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
unless SimpleCov.running # Hack to prevent starting SimpleCov multiple times see: https://github.com/simplecov-ruby/simplecov/issues/1003
|
6
|
+
SimpleCov.start do
|
7
|
+
add_filter '/vendor'
|
8
|
+
add_filter '/spec'
|
9
|
+
add_filter '/test'
|
10
|
+
end
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
@@ -21,13 +23,6 @@ require path + '/spark_api'
|
|
21
23
|
|
22
24
|
require 'spark_api'
|
23
25
|
|
24
|
-
if ENV['COVERAGE'] == "on"
|
25
|
-
require 'simplecov'
|
26
|
-
require 'simplecov-rcov'
|
27
|
-
SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
|
28
|
-
SimpleCov.start { add_filter %w(/vendor /spec /test) }
|
29
|
-
end
|
30
|
-
|
31
26
|
FileUtils.mkdir 'log' unless File.exists? 'log'
|
32
27
|
|
33
28
|
module SparkApi
|
@@ -51,7 +46,7 @@ end
|
|
51
46
|
|
52
47
|
# Requires supporting ruby files with custom matchers and macros, etc,
|
53
48
|
# # in spec/support/ and its subdirectories.
|
54
|
-
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}
|
49
|
+
Dir[File.expand_path(File.join(File.dirname(__FILE__), 'support', '**', '*.rb'))].each { |f| require f }
|
55
50
|
|
56
51
|
RSpec.configure do |config|
|
57
52
|
|
@@ -66,6 +61,6 @@ RSpec.configure do |config|
|
|
66
61
|
config.color = true
|
67
62
|
end
|
68
63
|
|
69
|
-
def jruby?
|
64
|
+
def jruby?
|
70
65
|
RUBY_PLATFORM == "java"
|
71
66
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spark_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Hornseth
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-01-
|
12
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -18,6 +18,9 @@ dependencies:
|
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 0.17.3
|
21
|
+
- - "<"
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: '2.0'
|
21
24
|
type: :runtime
|
22
25
|
prerelease: false
|
23
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -25,6 +28,9 @@ dependencies:
|
|
25
28
|
- - ">="
|
26
29
|
- !ruby/object:Gem::Version
|
27
30
|
version: 0.17.3
|
31
|
+
- - "<"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.0'
|
28
34
|
- !ruby/object:Gem::Dependency
|
29
35
|
name: multi_json
|
30
36
|
requirement: !ruby/object:Gem::Requirement
|