mauth-client 4.0.1 → 4.0.2

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
  SHA1:
3
- metadata.gz: f27f6dad85f629877f36f460275190d895e44721
4
- data.tar.gz: 8364f1553ceac1fc4597ef129f4d79519b91377e
3
+ metadata.gz: a21d16b8275a278bf76abd03b2a36c59789ef493
4
+ data.tar.gz: a2a371bfe255763a721f2cc3566865d86264e17d
5
5
  SHA512:
6
- metadata.gz: c1aef4d031f1b021cba88e85620cca6d5678acc5362fe6aa1b145f1b42c0b820ae41dd0bc7a7823c0f183cc0b615c7f9c6ac6cadeb64570ee4be0ad004144940
7
- data.tar.gz: 83d8c5ae60b118c66c795e98986ef86565ed0b07ccd3ec3aa808fb77b7faa8e17ebc6e88fbd4a14b23167336fdca85f9105e3293da87265c6cf49cc63f818bd1
6
+ metadata.gz: 3a9f889083c41d625ce4783f903b4edb94aefa7ea294aed7b6d1f3b9b6b2cf8d9d65121c3976c0bcb3903b9537bc5f615a09891177151a0734da5f333183a0f2
7
+ data.tar.gz: 4be1f2f77de4305c4b3bdb3dddf64655233b5a9a1779e03fa1b245666c464001acad2b1a4c800edbd5a6d9e3ecc30b03a0e2892729db4e6573b9d782e687bd08
@@ -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"
@@ -1,5 +1,8 @@
1
1
  # MAuth-Client History
2
2
 
3
+ ## v4.0.2
4
+ - Store the config data to not load the config file multiple times
5
+
3
6
  ## v4.0.1
4
7
  - Open source and publish this gem on rubygems.org, no functionality changes
5
8
 
@@ -0,0 +1,5 @@
1
+ source "https://rubygems.org"
2
+
3
+ gem "rack", "1.6.5"
4
+
5
+ gemspec :path => "../"
@@ -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 = YAML.load_file(mauth_config_yml)
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
@@ -1,3 +1,3 @@
1
1
  module MAuth
2
- VERSION = '4.0.1'.freeze
2
+ VERSION = '4.0.2'.freeze
3
3
  end
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.1
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: 2016-08-09 00:00:00.000000000 Z
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.5.1
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: