hdcore 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmQzMGRjZGIzMzZjMDdlMGNhYjMyZjAwYmVhODM0MWNiYjVmNTc1Mg==
4
+ MmY2YWFmY2IwMjZhYjcwOTZjZmRkMWExNTMyYTQ2NjA2MzY3OTY4Mw==
5
5
  data.tar.gz: !binary |-
6
- MTRlYWQxYzk2NGZmYzllYzk0ZmNlNWU2YzQ2ZGMxZTZhOTE2ZGIzNQ==
6
+ Y2Y1MWMxZTg5ZjUyZTBmZmNmMmQ4M2IxNGJhY2M0YjZiYmQzNTU1ZQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjQwZmFkNTU1ZTk0MWZjODUzNDdkOTk2MDYwNDcwOTMzNWQ4MDJiOWFhYWI5
10
- MzI0YjlkZGNkYjY5MmZkY2Y4YjBjNTYzM2FmNTM4YjUwYTc2NWI1ZmY5MWE2
11
- MTU3NzJlNDZiM2QzY2IxY2IwMTAyNTg2YmQ5ZTcyZjQ4Mzc0YjY=
9
+ OGE1ODNkNTUwNmQ4YjhmMTQ3NWI2ZGQ4MWJlZGI2YWM4MWNjZjYxOGQ3Nzlk
10
+ NDEwYWQ4ZjA4ZDc2MTFkZjg5NTMzMjM4Mzk3MjZmM2FkZDU5NmYzZGZhMGRk
11
+ MWRkMGYzMmYyMzFmZTc4NTJjOGI2ZDA0MzI4NzUzNzAyZGI2MGU=
12
12
  data.tar.gz: !binary |-
13
- MjE4Njc5MDI5MTE1MTY4YmZmZjY1MTUxMTdhNDllYWRjOWM4M2Q1YjA1NmNm
14
- MmQxNzMyNTY0MWY3Zjg2OTdkNjI3YjgyZjEwNDhlMzYzODZiYmYzNGZiNDQx
15
- ODk1MDlhZDMxZTdkNWJjOTYxYTFlMzJhNWU4OWUyYWFiNTZjN2E=
13
+ YWM4ODFjYTQwNjY4NGVmMDBiOWI5Yjk3OTAyOTRhM2E3NmI0MTU4NDI5MTM2
14
+ Y2QwOTcwMTBjYjJkZDNhZWM2MGYzZTM2OGU4ODdmZTc4MGZlOTIxNjEzOTAy
15
+ MjM0ODdhZDQyOGZlMGY2MjJmMzkxN2ZjMTM5NDA0Nzg5YzRhZDE=
data/hdcore.gemspec CHANGED
@@ -23,5 +23,4 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency "rspec", "~> 2.13"
24
24
  spec.add_dependency "httparty", "~> 0.11"
25
25
  spec.add_dependency "json", "~> 1.5"
26
- spec.add_dependency "active_support", "~> 3.0"
27
26
  end
data/lib/hdcore/hdcore.rb CHANGED
@@ -6,8 +6,7 @@ module Hdcore
6
6
  @config = {
7
7
  :api_endpoint => 'https://api.hostdime.com/v1',
8
8
  :public_key => nil,
9
- :private_key => nil,
10
- :time_zone => 'US/Eastern'
9
+ :private_key => nil
11
10
  }
12
11
  @valid_config_keys = @config.keys
13
12
 
@@ -59,7 +59,7 @@ module Hdcore
59
59
  {
60
60
  :api_key => public_key,
61
61
  :api_unique => uuid = generate_uuid,
62
- :api_timestamp => timestamp = generate_timestamp,
62
+ :api_timestamp => timestamp = Time.now.to_i,
63
63
  :api_hash => generate_hash( timestamp,
64
64
  uuid,
65
65
  private_key,
@@ -68,13 +68,6 @@ module Hdcore
68
68
  }
69
69
  end
70
70
 
71
-
72
- #
73
- def generate_timestamp
74
- zone = Hdcore.config[:time_zone]
75
- Time.use_zone(zone) { Time.now.to_i }
76
- end
77
-
78
71
  # @private
79
72
  # @return [String] SHA256 hash of all the arguments "joined:with:colons"
80
73
  def generate_hash(*args)
@@ -1,3 +1,3 @@
1
1
  module Hdcore
2
- VERSION = "0.0.13"
2
+ VERSION = "0.0.14"
3
3
  end
data/lib/hdcore.rb CHANGED
@@ -6,7 +6,6 @@ require 'rubygems'
6
6
  require 'json'
7
7
  require 'digest/sha2' # to generate SHA256 hash
8
8
  require 'securerandom' # to generate v4 UUID
9
- require 'active_support/time'
10
9
 
11
10
  Dir[File.dirname(__FILE__) + '/hdcore/*.rb'].each do |file|
12
11
  require file
@@ -3,8 +3,8 @@ require 'spec_helper'
3
3
  describe Hdcore do
4
4
 
5
5
  describe '.config' do
6
- it 'returns hash with expected keys [:api_endpoint, :public_key, :private_key, :time_zone]' do
7
- Hdcore.config.keys.should == [:api_endpoint, :public_key, :private_key, :time_zone]
6
+ it 'returns hash with expected keys [:api_endpoint, :public_key, :private_key]' do
7
+ Hdcore.config.keys.should == [:api_endpoint, :public_key, :private_key]
8
8
  end
9
9
 
10
10
  it 'returns default [:api_endpoint] => "https://api.hostdime.com/v1"' do
@@ -18,10 +18,6 @@ describe Hdcore do
18
18
  it 'returns default [:private_key] => nil' do
19
19
  Hdcore.config[:private_key].should == nil
20
20
  end
21
-
22
- it 'returns default [:time_zone] => US/Eastern' do
23
- Hdcore.config[:time_zone].should == 'US/Eastern'
24
- end
25
21
  end
26
22
 
27
23
  describe '.configure' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hdcore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan Pemble
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ~>
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.5'
83
- - !ruby/object:Gem::Dependency
84
- name: active_support
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: '3.0'
90
- type: :runtime
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ~>
95
- - !ruby/object:Gem::Version
96
- version: '3.0'
97
83
  description: A basic wrapper for HostDime's customer portal 'Core' API
98
84
  email:
99
85
  - ethan.p@hostdime.com