oauth2_mac_client 0.0.1 → 0.0.2

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/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011 Tom Brown
1
+ Copyright (c) 2012 Tom Brown
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.rdoc CHANGED
@@ -1,13 +1,18 @@
1
+ {<img src="https://secure.travis-ci.org/herestomwiththeweather/oauth2_mac_client.png" alt="Build Status" />}[http://travis-ci.org/herestomwiththeweather/oauth2_mac_client]
2
+
1
3
  = oauth2_mac_client
2
4
 
3
5
  OAuth 2.0 MAC Client Library.
4
6
 
7
+ This library does not include an HTTP client so that the choice is left to the developer. Thanks to nov for rack-oauth2 library! You can quickly try out the code: https://gist.github.com/2024309
8
+
5
9
  == Installation
6
10
 
7
11
  gem install oauth2_mac_client
8
12
 
9
13
  == Resources
10
14
 
15
+ * Sample code using Net::HTTP (https://gist.github.com/2024309)
11
16
  * View Source on GitHub (https://github.com/herestomwiththeweather/oauth2_mac_client)
12
17
  * Report Issues on GitHub (https://github.com/herestomwiththeweather/oauth2_mac_client/issues)
13
18
 
@@ -1,5 +1,6 @@
1
1
  require "oauth2_mac_client/version"
2
- require "active_support/core_ext"
2
+ require "base64"
3
+ require "openssl"
3
4
 
4
5
  module Oauth2MacClient
5
6
  class Token
@@ -1,3 +1,3 @@
1
1
  module Oauth2MacClient
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -19,5 +19,6 @@ Gem::Specification.new do |s|
19
19
  s.require_paths = ["lib"]
20
20
 
21
21
  s.add_runtime_dependency "activesupport", ">= 2.3"
22
+ s.add_development_dependency "rake"
22
23
  s.add_development_dependency "rspec"
23
24
  end
@@ -4,10 +4,10 @@ module Oauth2MacClient
4
4
  describe Token do
5
5
  let :token do
6
6
  Token.new(
7
- access_token: 'access_token',
8
- mac_key: 'secret',
9
- mac_algorithm: 'hmac-sha-256',
10
- issued_at: issued_at
7
+ :access_token => 'access_token',
8
+ :mac_key => 'secret',
9
+ :mac_algorithm => 'hmac-sha-256',
10
+ :issued_at => issued_at
11
11
  )
12
12
  end
13
13
 
@@ -19,7 +19,7 @@ module Oauth2MacClient
19
19
 
20
20
  describe '.calculate_hmac' do
21
21
  it "produces the hmac expected from the spec" do
22
- @token = Token.new(access_token:'abc',mac_key:'8yfrufh348h',mac_algorithm:'hmac-sha-1')
22
+ @token = Token.new(:access_token => 'abc',:mac_key => '8yfrufh348h',:mac_algorithm => 'hmac-sha-1')
23
23
  @token.nonce = '273156:di3hvdf8'
24
24
  @token.method = 'POST'
25
25
  @token.request_uri = '/request'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oauth2_mac_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-12 00:00:00.000000000 Z
12
+ date: 2012-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &78598890 !ruby/object:Gem::Requirement
16
+ requirement: &84457880 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,21 @@ dependencies:
21
21
  version: '2.3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *78598890
24
+ version_requirements: *84457880
25
+ - !ruby/object:Gem::Dependency
26
+ name: rake
27
+ requirement: &84457670 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *84457670
25
36
  - !ruby/object:Gem::Dependency
26
37
  name: rspec
27
- requirement: &78598680 !ruby/object:Gem::Requirement
38
+ requirement: &84457400 !ruby/object:Gem::Requirement
28
39
  none: false
29
40
  requirements:
30
41
  - - ! '>='
@@ -32,7 +43,7 @@ dependencies:
32
43
  version: '0'
33
44
  type: :development
34
45
  prerelease: false
35
- version_requirements: *78598680
46
+ version_requirements: *84457400
36
47
  description: Send requests to OAuth 2 provider with MAC authentication
37
48
  email:
38
49
  - herestomwiththeweather@gmail.com
@@ -42,6 +53,7 @@ extra_rdoc_files: []
42
53
  files:
43
54
  - .gitignore
44
55
  - .rspec
56
+ - .travis.yml
45
57
  - Gemfile
46
58
  - LICENSE
47
59
  - README.rdoc