signature 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source :rubygems
2
+
3
+ gemspec
@@ -0,0 +1,29 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ signature (0.1.2)
5
+ ruby-hmac
6
+
7
+ GEM
8
+ remote: http://rubygems.org/
9
+ specs:
10
+ diff-lcs (1.1.2)
11
+ rspec (2.0.1)
12
+ rspec-core (~> 2.0.1)
13
+ rspec-expectations (~> 2.0.1)
14
+ rspec-mocks (~> 2.0.1)
15
+ rspec-core (2.0.1)
16
+ rspec-expectations (2.0.1)
17
+ diff-lcs (>= 1.1.2)
18
+ rspec-mocks (2.0.1)
19
+ rspec-core (~> 2.0.1)
20
+ rspec-expectations (~> 2.0.1)
21
+ ruby-hmac (0.4.0)
22
+
23
+ PLATFORMS
24
+ ruby
25
+
26
+ DEPENDENCIES
27
+ rspec (~> 2.0.0)
28
+ ruby-hmac
29
+ signature!
data/README.md CHANGED
@@ -43,6 +43,12 @@ Server example (sinatra)
43
43
  # Do whatever you need to do
44
44
  end
45
45
 
46
+ Developing
47
+ ----------
48
+
49
+ bundle
50
+ bundle exec rspec spec/*_spec.rb
51
+
46
52
  Copyright
47
53
  ---------
48
54
 
data/Rakefile CHANGED
@@ -1,46 +1,2 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "signature"
8
- gem.summary = %Q{Simple key/secret based authentication for apis}
9
- gem.description = %Q{Simple key/secret based authentication for apis}
10
- gem.email = "me@mloughran.com"
11
- gem.homepage = "http://github.com/mloughran/signature"
12
- gem.authors = ["Martyn Loughran"]
13
- gem.add_dependency "ruby-hmac"
14
- gem.add_development_dependency "rspec", ">= 1.2.9"
15
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
- end
17
- Jeweler::GemcutterTasks.new
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
20
- end
21
-
22
- require 'spec/rake/spectask'
23
- Spec::Rake::SpecTask.new(:spec) do |spec|
24
- spec.libs << 'lib' << 'spec'
25
- spec.spec_files = FileList['spec/**/*_spec.rb']
26
- end
27
-
28
- Spec::Rake::SpecTask.new(:rcov) do |spec|
29
- spec.libs << 'lib' << 'spec'
30
- spec.pattern = 'spec/**/*_spec.rb'
31
- spec.rcov = true
32
- end
33
-
34
- task :spec => :check_dependencies
35
-
36
- task :default => :spec
37
-
38
- require 'rake/rdoctask'
39
- Rake::RDocTask.new do |rdoc|
40
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
41
-
42
- rdoc.rdoc_dir = 'rdoc'
43
- rdoc.title = "signature #{version}"
44
- rdoc.rdoc_files.include('README*')
45
- rdoc.rdoc_files.include('lib/**/*.rb')
46
- end
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
@@ -40,7 +40,7 @@ module Signature
40
40
  @auth_hash = {
41
41
  :auth_version => "1.0",
42
42
  :auth_key => token.key,
43
- :auth_timestamp => Time.now.to_i
43
+ :auth_timestamp => Time.now.to_i.to_s
44
44
  }
45
45
 
46
46
  @auth_hash[:auth_signature] = signature(token)
@@ -0,0 +1,3 @@
1
+ module Signature
2
+ VERSION = "0.1.2"
3
+ end
@@ -1,58 +1,22 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "signature/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{signature}
8
- s.version = "0.1.1"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Martyn Loughran"]
12
- s.date = %q{2010-07-20}
6
+ s.name = "signature"
7
+ s.version = Signature::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Martyn Loughran"]
10
+ s.email = ["me@mloughran.com"]
11
+ s.homepage = "http://github.com/mloughran/signature"
12
+ s.summary = %q{Simple key/secret based authentication for apis}
13
13
  s.description = %q{Simple key/secret based authentication for apis}
14
- s.email = %q{me@mloughran.com}
15
- s.extra_rdoc_files = [
16
- "LICENSE",
17
- "README.md"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".gitignore",
22
- "LICENSE",
23
- "README.md",
24
- "Rakefile",
25
- "VERSION",
26
- "lib/signature.rb",
27
- "signature.gemspec",
28
- "spec/signature_spec.rb",
29
- "spec/spec.opts",
30
- "spec/spec_helper.rb"
31
- ]
32
- s.homepage = %q{http://github.com/mloughran/signature}
33
- s.rdoc_options = ["--charset=UTF-8"]
34
- s.require_paths = ["lib"]
35
- s.rubygems_version = %q{1.3.6}
36
- s.summary = %q{Simple key/secret based authentication for apis}
37
- s.test_files = [
38
- "spec/signature_spec.rb",
39
- "spec/spec_helper.rb"
40
- ]
41
14
 
42
- if s.respond_to? :specification_version then
43
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
44
- s.specification_version = 3
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
45
19
 
46
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
47
- s.add_runtime_dependency(%q<ruby-hmac>, [">= 0"])
48
- s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
49
- else
50
- s.add_dependency(%q<ruby-hmac>, [">= 0"])
51
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
52
- end
53
- else
54
- s.add_dependency(%q<ruby-hmac>, [">= 0"])
55
- s.add_dependency(%q<rspec>, [">= 1.2.9"])
56
- end
20
+ s.add_dependency "ruby-hmac"
21
+ s.add_development_dependency "rspec", "~> 2.0.0"
57
22
  end
58
-
@@ -31,7 +31,7 @@ describe Signature do
31
31
  :auth_signature => "da078fcedd72941b6c873caa40d0d6b2000ebfc700cee802b128dd20f72e74e9",
32
32
  :auth_version => "1.0",
33
33
  :auth_key => "key",
34
- :auth_timestamp => 1234
34
+ :auth_timestamp => '1234'
35
35
  }
36
36
  end
37
37
 
@@ -3,9 +3,8 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
 
4
4
  require 'rubygems'
5
5
  require 'signature'
6
- require 'spec'
7
- require 'spec/autorun'
6
+ require 'rspec'
8
7
 
9
- Spec::Runner.configure do |config|
8
+ RSpec.configure do |config|
10
9
 
11
10
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 1
9
- version: 0.1.1
8
+ - 2
9
+ version: 0.1.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Martyn Loughran
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-20 00:00:00 +01:00
17
+ date: 2010-10-29 00:00:00 +01:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -34,43 +34,45 @@ dependencies:
34
34
  prerelease: false
35
35
  requirement: &id002 !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  segments:
40
- - 1
41
40
  - 2
42
- - 9
43
- version: 1.2.9
41
+ - 0
42
+ - 0
43
+ version: 2.0.0
44
44
  type: :development
45
45
  version_requirements: *id002
46
46
  description: Simple key/secret based authentication for apis
47
- email: me@mloughran.com
47
+ email:
48
+ - me@mloughran.com
48
49
  executables: []
49
50
 
50
51
  extensions: []
51
52
 
52
- extra_rdoc_files:
53
- - LICENSE
54
- - README.md
53
+ extra_rdoc_files: []
54
+
55
55
  files:
56
56
  - .document
57
57
  - .gitignore
58
+ - Gemfile
59
+ - Gemfile.lock
58
60
  - LICENSE
59
61
  - README.md
60
62
  - Rakefile
61
63
  - VERSION
62
64
  - lib/signature.rb
65
+ - lib/signature/version.rb
63
66
  - signature.gemspec
64
67
  - spec/signature_spec.rb
65
- - spec/spec.opts
66
68
  - spec/spec_helper.rb
67
69
  has_rdoc: true
68
70
  homepage: http://github.com/mloughran/signature
69
71
  licenses: []
70
72
 
71
73
  post_install_message:
72
- rdoc_options:
73
- - --charset=UTF-8
74
+ rdoc_options: []
75
+
74
76
  require_paths:
75
77
  - lib
76
78
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -1 +0,0 @@
1
- --color