mauth-client 4.0.1 → 4.0.2
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/.travis.yml +5 -1
- data/CHANGELOG.md +3 -0
- data/gemfiles/ruby_2.1.gemfile +5 -0
- data/lib/mauth/client.rb +18 -1
- data/lib/mauth/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a21d16b8275a278bf76abd03b2a36c59789ef493
|
|
4
|
+
data.tar.gz: a2a371bfe255763a721f2cc3566865d86264e17d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3a9f889083c41d625ce4783f903b4edb94aefa7ea294aed7b6d1f3b9b6b2cf8d9d65121c3976c0bcb3903b9537bc5f615a09891177151a0734da5f333183a0f2
|
|
7
|
+
data.tar.gz: 4be1f2f77de4305c4b3bdb3dddf64655233b5a9a1779e03fa1b245666c464001acad2b1a4c800edbd5a6d9e3ecc30b03a0e2892729db4e6573b9d782e687bd08
|
data/.travis.yml
CHANGED
|
@@ -3,11 +3,15 @@ cache: bundler
|
|
|
3
3
|
sudo: false
|
|
4
4
|
|
|
5
5
|
rvm:
|
|
6
|
-
- 2.1.10
|
|
7
6
|
- 2.2.5
|
|
8
7
|
- 2.3.1
|
|
9
8
|
|
|
10
9
|
env:
|
|
11
10
|
- MAUTH_CONFIG_YML=`pwd`/spec/config_root/config/mauth.yml
|
|
12
11
|
|
|
12
|
+
matrix:
|
|
13
|
+
include:
|
|
14
|
+
- rvm: 2.1.10
|
|
15
|
+
gemfile: gemfiles/ruby_2.1.gemfile
|
|
16
|
+
|
|
13
17
|
script: "bundle exec rspec"
|
data/CHANGELOG.md
CHANGED
data/lib/mauth/client.rb
CHANGED
|
@@ -58,7 +58,7 @@ module MAuth
|
|
|
58
58
|
default_yml = File.join(app_root, default_loc)
|
|
59
59
|
mauth_config_yml ||= default_yml if File.exist?(default_yml)
|
|
60
60
|
if mauth_config_yml && File.exist?(mauth_config_yml)
|
|
61
|
-
whole_config =
|
|
61
|
+
whole_config = ConfigFile.load(mauth_config_yml)
|
|
62
62
|
errmessage = "#{mauth_config_yml} config has no key #{env} - it has keys #{whole_config.keys.inspect}"
|
|
63
63
|
whole_config[env] || raise(MAuth::Client::ConfigurationError, errmessage)
|
|
64
64
|
else
|
|
@@ -81,6 +81,23 @@ module MAuth
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
end
|
|
84
|
+
|
|
85
|
+
class ConfigFile
|
|
86
|
+
GITHUB_URL = 'https://github.com/mdsol/mauth-client-ruby'.freeze
|
|
87
|
+
@config = {}
|
|
88
|
+
|
|
89
|
+
def self.load(path)
|
|
90
|
+
unless File.exist?(path)
|
|
91
|
+
raise "File #{path} not found. Please visit #{GITHUB_URL} for details."
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
@config[path] ||= YAML.load_file(path)
|
|
95
|
+
unless @config[path]
|
|
96
|
+
raise "File #{path} does not contain proper YAML information. Visit #{GITHUB_URL} for details."
|
|
97
|
+
end
|
|
98
|
+
@config[path]
|
|
99
|
+
end
|
|
100
|
+
end
|
|
84
101
|
end
|
|
85
102
|
|
|
86
103
|
module MAuth
|
data/lib/mauth/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mauth-client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthew Szenher
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
autorequire:
|
|
12
12
|
bindir: exe
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date:
|
|
14
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: faraday
|
|
@@ -247,6 +247,7 @@ files:
|
|
|
247
247
|
- examples/mauth_key
|
|
248
248
|
- exe/mauth-client
|
|
249
249
|
- exe/mauth-proxy
|
|
250
|
+
- gemfiles/ruby_2.1.gemfile
|
|
250
251
|
- lib/mauth-client.rb
|
|
251
252
|
- lib/mauth/autoload.rb
|
|
252
253
|
- lib/mauth/client.rb
|
|
@@ -284,9 +285,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
284
285
|
version: '0'
|
|
285
286
|
requirements: []
|
|
286
287
|
rubyforge_project:
|
|
287
|
-
rubygems_version: 2.
|
|
288
|
+
rubygems_version: 2.6.8
|
|
288
289
|
signing_key:
|
|
289
290
|
specification_version: 4
|
|
290
291
|
summary: Sign and authenticate requests and responses with mAuth authentication.
|
|
291
292
|
test_files: []
|
|
292
|
-
has_rdoc:
|