sun_gem 0.2.4 → 0.2.5

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: 5bc4f1d0bf1f156a59dc063948be938a700d5309
4
- data.tar.gz: 8598f9ab89fdf9b92e1c48f932faf189c4bcb251
3
+ metadata.gz: fd4e92a1e726171bd08739c38b962f66cd287633
4
+ data.tar.gz: 60e8065f70dc34f532d62f1da25cdd3cd39f5b53
5
5
  SHA512:
6
- metadata.gz: 954418fb7a6d16a342a52f3a100ee8a89431776df8193b2d65bd407999fc8f9c945d574e84a801f9ab169ac3fe72f9062c98c317f3a1d6231415b7851685309c
7
- data.tar.gz: c3aebc913dad6b7f8c9249c2a872df45dc7de3b9733d42dd33196b41f32c706006666cf94b493201f92c318ba635a98c04161df3ef430384163c1a2f42f21fd4
6
+ metadata.gz: fda9cd94c1e79f79e5590c0f695b9011ec86eac2f801de65dddef5a89e5aece450f391df013e8a1dd805cf590b8e1e1984cce66883b34bb98dffc37928dbca91
7
+ data.tar.gz: 6bfd8511f6bfddd1863abf337817080d3054d7603f5074cbdbfa4f902b6be84090a85478d6b05d6badaef7b7a94604aa92575ef6fbf362a13247d52bb3c1c423
@@ -1,3 +1,3 @@
1
1
  module SunGem
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
data/lib/sun_gem.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require "sun_gem/version"
2
+ require 'active_support'
2
3
 
3
4
  module SunGem
4
5
  class << self
@@ -12,7 +13,6 @@ module SunGem
12
13
 
13
14
  def authenticate(params, optional_params = {})
14
15
  return false, 'invalid_parameter', 400 unless params[:signature]
15
- puts params
16
16
  required_params = ActiveSupport::HashWithIndifferentAccess.new(params).slice(*REQUIRED_KEYS)
17
17
  return false, 'invalid_parameter', 400 if required_params.size != REQUIRED_KEYS.size
18
18
  return false, 'expired_signature', 400 if expired_signature?(required_params[:time])
@@ -26,6 +26,7 @@ module SunGem
26
26
  end
27
27
  end
28
28
 
29
+
29
30
  def secret_key
30
31
  data = YAML.load_file("#{Rails.root}/config/sun_gem.yml")
31
32
  data["secret_key"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sun_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - frozenapr