apipie-bindings 0.0.19 → 0.1.0

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: 1d30b2c120a24152b99526e83b9b913b0e2cda4b
4
- data.tar.gz: 918bb3e69af74ef55f9279dbb70f4ea1a5d33da4
3
+ metadata.gz: 177475068b8dce6f1eabdf990f717306ff7a42b9
4
+ data.tar.gz: 9965d19d825aebeb323199ed2cb4909692f24d2c
5
5
  SHA512:
6
- metadata.gz: 0f64b123b50ae0183bce9d576d37263fff2fc8e0d23ab986befd8971dd0b47cb9ed341636da77dc2e9c56fda3f514744cd7acc1cc58d0f1f20917e32040ac254
7
- data.tar.gz: b4a890d819bead44b94fb8dc916b183b480f6383171d7ba692f64667cbb112e5d081ccef7288048649df22130a75c0e634854f34af8a38d5df8de1076d8077ab
6
+ metadata.gz: f9cf54f46216b7e354d43219646ffc112355d298cc4ef27f23b8d47621e0344a069561deedb549ae78d8f3e5c9afaa85bc31f3c997f59201db060d504ef90e99
7
+ data.tar.gz: f7dd4ec05a1f5e5f664157832c97d3ed07ddb22f248aa9fa3065d385d2fe899b79f268b00ed5b31fe43785482c96359ad61857f9c3bd1e645d771bf2af67905a
data/doc/release_notes.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Release notes
2
2
  =============
3
3
 
4
+ ### 0.1.0 (2017-03-28)
5
+ * Verify SSL by default ([PR #59](https://github.com/Apipie/apipie-bindings/pull/59))
6
+ * Do not hide exceptions during cache retrieval ([PR #57](https://github.com/Apipie/apipie-bindings/pull/57))
7
+ * Legacy auth supports username config key ([PR #54](https://github.com/Apipie/apipie-bindings/pull/54))
8
+
4
9
  ### 0.0.19 (2016-12-09)
5
10
  * Support for more advanced authentication algorithms ([PR #52](https://github.com/theforeman/apipie-bindings/pull/52))
6
11
  * Show resource when inspecting Action ([PR #50](https://github.com/theforeman/apipie-bindings/pull/50))
@@ -101,7 +101,7 @@ module ApipieBindings
101
101
  @resource_config = {
102
102
  :timeout => config[:timeout],
103
103
  :headers => headers,
104
- :verify_ssl => false # keep rest_client >= 1.8.0 setup comaptible
104
+ :verify_ssl => true
105
105
  }.merge(options)
106
106
 
107
107
  @config = config
@@ -277,11 +277,11 @@ module ApipieBindings
277
277
  unless response
278
278
  begin
279
279
  response = retrieve_apidoc_call("/apidoc/v#{@api_version}.json")
280
- rescue
280
+ rescue Exception => e
281
281
  raise ApipieBindings::DocLoadingError.new(
282
- "Could not load data from #{@uri}\n"\
282
+ "Could not load data from #{@uri}: #{e.message}\n"\
283
283
  " - is your server down?\n"\
284
- " - was rake apipie:cache run when using apipie cache? (typical production settings)")
284
+ " - was rake apipie:cache run when using apipie cache? (typical production settings)", e)
285
285
  end
286
286
  end
287
287
  File.open(apidoc_cache_file, "w") { |f| f.write(response.body) }
@@ -296,8 +296,8 @@ module ApipieBindings
296
296
  private
297
297
 
298
298
  def legacy_authenticator(config)
299
- if config[:user] || config[:password]
300
- Authenticators::BasicAuth.new(config[:user], config[:password])
299
+ if config[:user] || config[:username] || config[:password]
300
+ Authenticators::BasicAuth.new(config[:user] || config[:username], config[:password])
301
301
  elsif config[:credentials] && config[:credentials].respond_to?(:to_params)
302
302
  log.warn("Credentials are now deprecated, use custom authenticator instead.")
303
303
  Authenticators::CredentialsLegacy.new(config[:credentials])
@@ -1,7 +1,13 @@
1
1
  module ApipieBindings
2
2
 
3
3
  class ConfigurationError < StandardError; end
4
- class DocLoadingError < StandardError; end
4
+ class DocLoadingError < StandardError
5
+ attr_reader :original_error
6
+ def initialize(msg, original_error)
7
+ super(msg)
8
+ @original_error = original_error
9
+ end
10
+ end
5
11
  class AuthenticatorMissingError < StandardError; end
6
12
 
7
13
  ErrorData = Struct.new(:kind, :argument, :details)
@@ -1,5 +1,5 @@
1
1
  module ApipieBindings
2
2
  def self.version
3
- @version ||= Gem::Version.new '0.0.19'
3
+ @version ||= Gem::Version.new '0.1.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Bačovský
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-09 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  version: '0'
257
257
  requirements: []
258
258
  rubyforge_project:
259
- rubygems_version: 2.5.1
259
+ rubygems_version: 2.5.2
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: The Ruby bindings for Apipie documented APIs