Skip to content

Commit

Permalink
Update to modern gem structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Hanlon committed Jun 1, 2012
1 parent d530dbb commit f076b56
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 116 deletions.
18 changes: 15 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
*.sw?
.DS_Store
*.gem
*.rbc
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
rdoc
doc/
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp
4 changes: 4 additions & 0 deletions CHANGELOG.markdown
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.0.5
-----
* Ensure that results are the same on 1.8.x and 1.9.x.
* Update to modern gem structure.
1.0.4
-----
* Added the ability to pass an additional path to be signed as part of the
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gemspec
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Copyright (c) 2009 Evri, Inc
Authored by David Balatero
Copyright (c) 2009-2012 David Balatero, Rob Hanlon

MIT License

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
2 changes: 1 addition & 1 deletion README.rdoc → README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
= signed_request

A simple 25-line gem for signing/verifying an HTTP request that has gone over the wire.
A simple gem for signing/verifying an HTTP request that has gone over the wire.

The sender and receiver must share the same secret key between them.

Expand Down
52 changes: 2 additions & 50 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,50 +1,2 @@
require 'rubygems'
require 'rake'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "signed_request"
gem.summary = %Q{A simple gem that allows you to sign HTTP requests between two parties with a shared secret key.}
gem.email = "dbalatero@gmail.com"
gem.homepage = "http://github.com/dbalatero/signed_request"
gem.authors = ["David Balatero"]
gem.rubyforge_project = 'evrigems'
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end

rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end

require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |spec|
spec.libs << 'lib' << 'spec'
spec.spec_files = FileList['spec/**/*_spec.rb']
end

Spec::Rake::SpecTask.new(:rcov) do |spec|
spec.libs << 'lib' << 'spec'
spec.pattern = 'spec/**/*_spec.rb'
spec.rcov = true
end


task :default => :spec

require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
if File.exist?('VERSION.yml')
config = YAML.load(File.read('VERSION.yml'))
version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
else
version = ""
end

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "signed_request #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end

Jeweler::GemcutterTasks.new
#!/usr/bin/env rake
require "bundler/gem_tasks"
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

1 change: 0 additions & 1 deletion init.rb

This file was deleted.

3 changes: 2 additions & 1 deletion lib/signed_request.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
require 'signed_request/version'

require 'base64'
require 'openssl'
require 'openssl/digest'

module SignedRequest

class << self
# Sign a request on the sending end.
def sign(params, secret_key, options = {})
Expand Down
3 changes: 3 additions & 0 deletions lib/signed_request/version.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module SignedRequest
VERSION = '1.0.5' unless defined? SignedRequest::VERSION
end
61 changes: 14 additions & 47 deletions signed_request.gemspec
Original file line number Diff line number Diff line change
@@ -1,52 +1,19 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# -*- encoding: utf-8 -*-
require File.expand_path('../lib/signed_request/version', __FILE__)

Gem::Specification.new do |s|
s.name = %q{signed_request}
s.version = "1.0.4"
Gem::Specification.new do |gem|
gem.authors = ["David Balatero", "Rob Hanlon"]
gem.email = ["david@mediapiston.com", "rob@mediapiston.com"]
gem.description = %q{A simple gem for signing/verifying an HTTP request that has gone over the wire.}
gem.summary = %q{A simple gem for signing/verifying an HTTP request that has gone over the wire.}
gem.homepage = "http://www.mediapiston.com/"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["David Balatero"]
s.date = %q{2010-07-12}
s.email = %q{dbalatero@gmail.com}
s.extra_rdoc_files = [
"LICENSE",
"README.rdoc"
]
s.files = [
".document",
".gitignore",
"LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"init.rb",
"lib/signed_request.rb",
"signed_request.gemspec",
"spec/signed_request_spec.rb",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/dbalatero/signed_request}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubyforge_project = %q{evrigems}
s.rubygems_version = %q{1.3.6}
s.summary = %q{A simple gem that allows you to sign HTTP requests between two parties with a shared secret key.}
s.test_files = [
"spec/signed_request_spec.rb",
"spec/spec_helper.rb"
]
gem.files = `git ls-files`.split($\)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^spec/})
gem.name = "signed_request"
gem.require_paths = ["lib"]
gem.version = SignedRequest::VERSION

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
else
end
else
end
gem.add_development_dependency 'rspec', '2.10.0'
end

2 changes: 1 addition & 1 deletion spec/signed_request_spec.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
require 'signed_request'

describe SignedRequest do
before(:each) do
Expand Down
9 changes: 0 additions & 9 deletions spec/spec_helper.rb

This file was deleted.

0 comments on commit f076b56

Please sign in to comment.