acme-client 0.3.3 → 0.3.4

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: 7149aaa59b176b7cd8ca16a63a01b19e05ae5f27
4
- data.tar.gz: 9e39681f8a54fe85d2c4d25ea70f1ec637935566
3
+ metadata.gz: 67915cb47841b3a55198b9630e1fd75199475941
4
+ data.tar.gz: 977b3f6200b5838ba8efd62f1c18416467c4f029
5
5
  SHA512:
6
- metadata.gz: 563bc325556f6f75e14cafa441cf2cdb774299bb564e8a9bd1515d83bd2899c24f78bcdd317df70b7ac0123627248f2db69bdbca5186cfd0683ba3f81e460b61
7
- data.tar.gz: 7d07ae139a53449ac656c56bc166985174ea882ff0bfb9d03de558d9beafdf40da7a051ac23e8fd09478eee70793008637383ed2a79b15965e6cc5d75a7e0def
6
+ metadata.gz: 40a523d0fa5466f150468ac8bb0095fc4bba60d12dd5b0504d2dee6d03410bbe3521df8b120a93196192248c29520764813e2d5b1de9319fe215b59cb230dc44
7
+ data.tar.gz: e5f037113d4f1976108027a95310d8c01d4422becc9f535596f2a37893d95d342bcdefd4abb924c3b81cf9339885297329ed74bdcf7ace7d1003580bde5ba37e
data/lib/acme/client.rb CHANGED
@@ -66,7 +66,12 @@ class Acme::Client
66
66
  end
67
67
  end
68
68
 
69
- def challenge_from_hash(attributes)
69
+ def challenge_from_hash(arguments)
70
+ attributes = arguments.to_h
71
+ %w(type uri token).each do |key|
72
+ raise ArgumentError, "missing key: #{key}" unless attributes.key?(key)
73
+ end
74
+
70
75
  case attributes.fetch('type')
71
76
  when 'http-01'
72
77
  Acme::Client::Resources::Challenges::HTTP01.new(self, attributes)
@@ -74,6 +79,8 @@ class Acme::Client
74
79
  Acme::Client::Resources::Challenges::DNS01.new(self, attributes)
75
80
  when 'tls-sni-01'
76
81
  Acme::Client::Resources::Challenges::TLSSNI01.new(self, attributes)
82
+ else
83
+ raise 'Unsupported resource type'
77
84
  end
78
85
  end
79
86
 
@@ -1,5 +1,5 @@
1
1
  module Acme
2
2
  class Client
3
- VERSION = '0.3.3'.freeze
3
+ VERSION = '0.3.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acme-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Barbier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler