signauth 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ before_install:
2
+ - gem install bundler
3
+
4
+ rvm:
5
+ - 1.9.3
6
+ - 2.0.0
7
+ - 2.1.2
8
+
9
+ notifications:
10
+ webhooks:
11
+ urls:
12
+ - https://hooker-arukoh.herokuapp.com/travis
13
+ on_success: always
14
+ on_failure: always
15
+ on_start: false
data/README.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  Signature authentication.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/signauth.svg)](http://badge.fury.io/rb/signauth)
6
+ [![Build Status](https://travis-ci.org/arukoh/signauth.svg?branch=master)](https://travis-ci.org/arukoh/signauth)
7
+ [![Dependency Status](https://gemnasium.com/arukoh/signauth.svg)](https://gemnasium.com/arukoh/signauth)
8
+
5
9
  ## Installation
6
10
 
7
11
  Add this line to your application's Gemfile:
data/Rakefile CHANGED
@@ -1,9 +1,20 @@
1
1
  #!/usr/bin/env rake
2
- $:.push File.expand_path("../lib", __FILE__)
2
+ require 'rubygems'
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
+ end
8
+
9
+ require 'bundler'
10
+ Bundler::GemHelper.install_tasks
3
11
 
12
+ require 'rake'
4
13
  require "bundler/gem_tasks"
5
14
  require 'rspec/core/rake_task'
6
15
 
16
+ $:.push File.expand_path("../lib", __FILE__)
17
+
7
18
  task :default => :spec
8
19
 
9
20
  RSpec::Core::RakeTask.new(:spec)
@@ -11,7 +11,7 @@ module Signauth
11
11
 
12
12
  def hmac(key, value, algorithm = 'HMAC-SHA-256')
13
13
  digest = digest_name(algorithm)
14
- OpenSSL::HMAC.digest(OpenSSL::Digest::Digest.new(digest), key, value)
14
+ OpenSSL::HMAC.digest(OpenSSL::Digest.new(digest), key, value)
15
15
  end
16
16
 
17
17
  def slow_string_comparison(given, computed)
@@ -1,3 +1,3 @@
1
1
  module Signauth
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
data/signauth.gemspec CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "signauth"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = Signauth::VERSION
17
+ gem.license = 'MIT'
17
18
 
18
19
  gem.add_development_dependency "rake", ">= 0.8.7"
19
20
  gem.add_development_dependency "rspec", ">= 2.4.0"
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+ describe Signauth::Signer do
4
+ describe "#sign" do
5
+ let(:secret) { "secret" }
6
+ let(:string_to_sign) { "string to sign" }
7
+ subject { Signauth::Signer.sign(secret, string_to_sign) }
8
+
9
+ it { should eq "fis5QmLSbj+hOfuCgndTJdCdp81sZh0GwayU7Y+5Cnw=" }
10
+ end
11
+ end
data/spec/spec_helper.rb CHANGED
@@ -2,7 +2,8 @@
2
2
  $:.unshift(File.dirname(__FILE__) + '/../lib')
3
3
 
4
4
  require 'rubygems'
5
- require 'rspec'
5
+ require 'bundler/setup'
6
+ require 'signauth'
6
7
 
7
8
  RSpec.configure do |config|
8
9
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signauth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-28 00:00:00.000000000 Z
12
+ date: 2014-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -52,6 +52,7 @@ extra_rdoc_files: []
52
52
  files:
53
53
  - .gitignore
54
54
  - .rspec
55
+ - .travis.yml
55
56
  - Gemfile
56
57
  - LICENSE
57
58
  - README.md
@@ -68,10 +69,12 @@ files:
68
69
  - lib/signauth/signer.rb
69
70
  - lib/signauth/version.rb
70
71
  - signauth.gemspec
72
+ - spec/signauth/signer_spec.rb
71
73
  - spec/signauth_spec.rb
72
74
  - spec/spec_helper.rb
73
75
  homepage: https://github.com/arukoh/signauth
74
- licenses: []
76
+ licenses:
77
+ - MIT
75
78
  post_install_message:
76
79
  rdoc_options: []
77
80
  require_paths:
@@ -84,7 +87,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
87
  version: '0'
85
88
  segments:
86
89
  - 0
87
- hash: -89774867
90
+ hash: -784316223
88
91
  required_rubygems_version: !ruby/object:Gem::Requirement
89
92
  none: false
90
93
  requirements:
@@ -93,13 +96,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
96
  version: '0'
94
97
  segments:
95
98
  - 0
96
- hash: -89774867
99
+ hash: -784316223
97
100
  requirements: []
98
101
  rubyforge_project:
99
- rubygems_version: 1.8.24
102
+ rubygems_version: 1.8.25
100
103
  signing_key:
101
104
  specification_version: 3
102
105
  summary: Signature authentication
103
106
  test_files:
107
+ - spec/signauth/signer_spec.rb
104
108
  - spec/signauth_spec.rb
105
109
  - spec/spec_helper.rb