ey_api_hmac 0.0.2 → 0.0.3

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.
data/Gemfile CHANGED
@@ -4,6 +4,7 @@ source "http://rubygems.org"
4
4
  gemspec
5
5
 
6
6
  gem 'rake'
7
+ gem 'json'
7
8
 
8
9
  group :test, :development do
9
10
  gem 'halorgium-auth-hmac'
data/Gemfile.lock CHANGED
@@ -30,5 +30,6 @@ PLATFORMS
30
30
  DEPENDENCIES
31
31
  ey_api_hmac!
32
32
  halorgium-auth-hmac
33
+ json
33
34
  rake
34
35
  rspec
data/Rakefile CHANGED
@@ -1,4 +1,3 @@
1
- require 'bundler/gem_tasks'
2
1
  require 'rspec/core/rake_task'
3
2
 
4
3
  desc 'Default: run specs.'
@@ -1,5 +1,6 @@
1
1
  require 'rack/client'
2
2
  require 'json'
3
+ require 'time'
3
4
 
4
5
  module EY
5
6
  module ApiHMAC
@@ -11,8 +12,8 @@ module EY
11
12
  @auth_key = auth_key
12
13
  @standard_headers = {
13
14
  'CONTENT_TYPE' => 'application/json',
14
- 'Accept'=> 'application/json',
15
- "Date" => Time.now.to_s, #TODO: what is the right way to format this header?
15
+ 'Accept' => 'application/json',
16
+ 'Date' => Time.now.httpdate,
16
17
  'USER_AGENT' => user_agent || default_user_agent
17
18
  }
18
19
  end
@@ -50,11 +51,11 @@ module EY
50
51
  def post(url, body, &block)
51
52
  request(:post, url, body, &block)
52
53
  end
53
-
54
+
54
55
  def put(url, body, &block)
55
56
  request(:put, url, body, &block)
56
57
  end
57
-
58
+
58
59
  def delete(url, &block)
59
60
  request(:delete, url, &block)
60
61
  end
@@ -100,4 +101,4 @@ module EY
100
101
  end
101
102
  end
102
103
  end
103
- end
104
+ end
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module ApiHMAC
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
data/lib/ey_api_hmac.rb CHANGED
@@ -80,4 +80,4 @@ module EY
80
80
  end
81
81
 
82
82
  end
83
- end
83
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_api_hmac
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Jacob Burkhart & Thorben Schr\xC3\xB6der & David Calavera & others"
@@ -113,7 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
113
  requirements: []
114
114
 
115
115
  rubyforge_project: ey_api_hmac
116
- rubygems_version: 1.5.2
116
+ rubygems_version: 1.4.2
117
117
  signing_key:
118
118
  specification_version: 3
119
119
  summary: HMAC Rack basic implementation for Engine Yard services