Permalink
Browse files

update to modern bundler packaging

  • Loading branch information...
1 parent 69dcabb commit d155d38a23bbdb111fa86608b77ce3f158152e51 @atmos committed Apr 8, 2011
Showing with 37 additions and 55 deletions.
  1. +1 −0 .gitignore
  2. +3 −15 Gemfile
  3. +0 −40 Rakefile
  4. +2 −0 lib/sinatra/auth/github.rb
  5. +31 −0 sinatra_auth_github.gemspec
View
@@ -2,3 +2,4 @@ coverage
.bundle
pkg
.DS_Store
+Gemfile.lock
View
@@ -1,18 +1,6 @@
-source 'http://rubygems.org'
+source "http://rubygems.org"
-group :runtime do
- gem 'sinatra', '~>1.0', :require => nil
- gem 'warden-github', '~>0.0.7', :require => nil
- gem 'rest-client', '~>1.5.1', :require => nil
-end
-
-group :test do
- gem 'rake'
- gem 'rspec', '~>1.3.0', :require => 'spec'
- gem 'bundler', '~>1.0'
- gem 'randexp', '~>0.1.5'
- gem 'rack-test', '~>0.5.3', :require => 'rack/test'
- gem 'ruby-debug'
-end
+# Specify your gem's dependencies in sinatra_auth_github.gemspec
+gemspec
# vim:ft=ruby
View
@@ -17,43 +17,3 @@ Spec::Rake::SpecTask.new do |t|
t.rcov_opts << '--text-summary'
t.rcov_opts << '--sort' << 'coverage' << '--sort-reverse'
end
-
-GEM = "sinatra_auth_github"
-GEM_VERSION = "0.0.12"
-AUTHOR = "Corey Donohoe"
-EMAIL = "atmos@atmos.org"
-HOMEPAGE = "http://www.github.com/atmos/sinatra_auth_github"
-SUMMARY = "A sinatra extension for easy oauth integration with github"
-
-spec = Gem::Specification.new do |s|
- s.name = GEM
- s.version = GEM_VERSION
- s.platform = Gem::Platform::RUBY
- s.has_rdoc = true
- s.extra_rdoc_files = ["LICENSE"]
- s.summary = SUMMARY
- s.description = s.summary
- s.author = AUTHOR
- s.email = EMAIL
- s.homepage = HOMEPAGE
-
- bundle = Bundler::Definition.build('Gemfile', 'Gemfile.lock', { })
- bundle.dependencies.each do |dep|
- next unless dep.groups.include?(:runtime)
- s.add_dependency(dep.name, dep.version_requirements.to_s)
- end
-
- s.require_path = 'lib'
- s.files = %w(LICENSE README.md) + Dir.glob("{lib,features}/**/*")
-end
-
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
-
-desc "create a gemspec file"
-task :make_spec do
- File.open("#{GEM}.gemspec", "w") do |file|
- file.puts spec.to_ruby
- end
-end
@@ -5,6 +5,8 @@
module Sinatra
module Auth
module Github
+ VERSION = "0.0.13"
+
class BadAuthentication < Sinatra::Base
get '/unauthenticated' do
status 403
@@ -0,0 +1,31 @@
+# -*- encoding: utf-8 -*-
+$:.push File.expand_path("../lib", __FILE__)
+
+Gem::Specification.new do |s|
+ s.name = "sinatra_auth_github"
+ s.version = "0.0.13"
+ s.platform = Gem::Platform::RUBY
+ s.authors = ["Corey Donohoe"]
+ s.email = ["atmos@atmos.org"]
+ s.homepage = "http://github.com/atmos/sinatra_auth_github"
+ s.summary = "A sinatra extension for easy oauth integration with github"
+ s.description = s.summary
+
+ s.rubyforge_project = "sinatra_auth_github"
+
+ s.add_dependency "sinatra", "~>1.0"
+ s.add_dependency "rest-client", "~>1.5.1"
+ s.add_dependency "warden-github", "~>0.0.7"
+
+ s.add_development_dependency "rake"
+ s.add_development_dependency "rspec", "~>1.3.0"
+ s.add_development_dependency "bundler", "~>1.0"
+ s.add_development_dependency "randexp", "~>0.1.5"
+ s.add_development_dependency "rack-test", "~>0.5.3"
+ s.add_development_dependency "ruby-debug"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+end

0 comments on commit d155d38

Please sign in to comment.