plugair_sdk 1.0.0 → 1.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aef2d261d9799145fc319cf54718cd1b9853f23d
4
- data.tar.gz: bec9405b0689f335d55a3062cb4906ddd506ab0f
3
+ metadata.gz: 4bdac5e858183bff6cadce519880e153b152f77a
4
+ data.tar.gz: 271fe7e637e818811a555600ded1049e21a91c11
5
5
  SHA512:
6
- metadata.gz: 046f65601bf1c81160b63fd74b42bc8b4e032ad077351c6507fd67692a06a300de95a462bb237ad4f63fa0483789c7a21b70eba50bd9e50d5ea3685647e002f8
7
- data.tar.gz: 56c59adc96b6cab19796e208a16ff642136262b8b7ff2532ad61f7cdc9a73f8052a6190c0a11f2d6978b39b6d3e002aa6f5fa47e1bf9c089882b33b931219bea
6
+ metadata.gz: cb8fa56f2a5518090ec179e00bcaf3c162dd2075e675ceead8c18a1487ace8b08bdf895aa47b9c674fbb823e1886b87fd18129f3ed3f53af559ecd8b6bc7d1d4
7
+ data.tar.gz: a23388f8b1e7cf2d1d8ce70c28241fa800f90f69671c4de29c644f4966e17eadff95b87c3649ebf04c9dd6727f89e20d5dfe7b547208c63cdbab19e42158fd12
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Plugair SDK for Ruby
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/plugair_sdk.svg)](https://badge.fury.io/rb/plugair_sdk)
4
+
3
5
  ## Installation
4
6
 
5
7
  Add this line to your application's Gemfile:
@@ -51,7 +53,7 @@ rescue PlugAirUnkownError => e
51
53
  end
52
54
  ```
53
55
 
54
- ## Usage: API Documents
56
+ ## API Documents
55
57
 
56
58
  ### Initialize
57
59
 
@@ -1,4 +1,4 @@
1
1
  # vim:fileencoding=utf-8
2
2
  class PlugAir
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
data/lib/plugair_sdk.rb CHANGED
@@ -29,7 +29,7 @@ class PlugAir
29
29
 
30
30
 
31
31
  def initialize(api_key=ENV['PLUGAIR_API_KEY'], shared_secret=ENV['PLUGAIR_SHARED_SECRET'])
32
- validate_api_key_shared_secret(api_key, shared_secret)
32
+ validate_api_key_and_shared_secret(api_key, shared_secret)
33
33
 
34
34
  @api_key = api_key
35
35
  @shared_secret = shared_secret
@@ -37,7 +37,7 @@ class PlugAir
37
37
 
38
38
 
39
39
  def generate_challenge
40
- validate_api_key_shared_secret(@api_key, @shared_secret)
40
+ validate_api_key_and_shared_secret(@api_key, @shared_secret)
41
41
 
42
42
  resource_path = BASE_RESOURCE_PATH + PATH_CHALLENGE
43
43
  query_params = API_KEY_PARAMETER + @api_key
@@ -69,7 +69,7 @@ class PlugAir
69
69
 
70
70
 
71
71
  def verify(credential_key, auth_key, auth_data)
72
- validate_api_key_shared_secret(@api_key, @shared_secret)
72
+ validate_api_key_and_shared_secret(@api_key, @shared_secret)
73
73
 
74
74
  resource_path = BASE_RESOURCE_PATH + PATH_VERIFY
75
75
  query_params = API_KEY_PARAMETER + @api_key
@@ -107,7 +107,7 @@ class PlugAir
107
107
 
108
108
  private
109
109
 
110
- def validate_api_key_shared_secret(api_key, shared_secret)
110
+ def validate_api_key_and_shared_secret(api_key, shared_secret)
111
111
  if api_key then
112
112
  if not api_key.is_a?(String) or api_key.length != API_KEY_LENGTH then
113
113
  raise PlugAirApiKeyError.new('API key length is invalid.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plugair_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hideyuki Takei