Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use Bundler to manage dependencies.

  • Loading branch information...
commit 473bf3e6305f89b30d03266a4d24cdd4c2c21510 1 parent 3aa628b
@jcoglan jcoglan authored
View
1  .gitignore
@@ -1,5 +1,6 @@
.redcar
*.sqlite3
*.db
+Gemfile.lock
pkg
rdoc
View
3  Gemfile
@@ -0,0 +1,3 @@
+source "http://rubygems.org"
+gemspec
+
View
71 Rakefile
@@ -1,70 +1,7 @@
require "rubygems"
-require "rake/gempackagetask"
-require "rake/rdoctask"
-
-require File.dirname(__FILE__) + '/lib/oauth2/provider'
-
-# This builds the actual gem. For details of what all these options
-# mean, and other ones you can add, check the documentation here:
-#
-# http://rubygems.org/read/chapter/20
-#
-spec = Gem::Specification.new do |s|
-
- # Change these as appropriate
- s.name = "oauth2-provider"
- s.version = OAuth2::Provider::VERSION
- s.summary = "Simple OAuth 2.0 provider toolkit"
- s.author = "James Coglan"
- s.email = "james@songkick.com"
- s.homepage = "http://www.songkick.com"
-
- s.has_rdoc = true
- s.extra_rdoc_files = %w(README.rdoc)
- s.rdoc_options = %w(--main README.rdoc)
-
- # Add any extra files to include in the gem
- s.files = %w(README.rdoc) + Dir.glob("{spec,lib,example}/**/*")
- s.require_paths = ["lib"]
-
- # If you want to depend on other gems, add them here, along with any
- # relevant versions
- s.add_dependency("bcrypt-ruby")
- s.add_dependency("activerecord")
- s.add_dependency("json")
-
- # If your tests use any gems, include them here
- s.add_development_dependency("rspec")
- s.add_development_dependency("sinatra")
- s.add_development_dependency("thin")
- s.add_development_dependency("factory_girl")
-end
-
-# This task actually builds the gem. We also regenerate a static
-# .gemspec file, which is useful if something (i.e. GitHub) will
-# be automatically building a gem for this project. If you're not
-# using GitHub, edit as appropriate.
-#
-# To publish your gem online, install the 'gemcutter' gem; Read more
-# about that here: http://gemcutter.org/pages/gem_docs
-Rake::GemPackageTask.new(spec) do |pkg|
- pkg.gem_spec = spec
-end
-
-desc "Build the gemspec file #{spec.name}.gemspec"
-task :gemspec do
- file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
- File.open(file, "w") {|f| f << spec.to_ruby }
-end
-
-# If you don't want to generate the .gemspec file, just remove this line. Reasons
-# why you might want to generate a gemspec:
-# - using bundler with a git source
-# - building the gem without rake (i.e. gem build blah.gemspec)
-# - maybe others?
-task :package => :gemspec
-# Generate documentation
+require "rake/rdoctask"
+desc "Generate documentation"
Rake::RDocTask.new do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
@@ -77,7 +14,3 @@ RSpec::Core::RakeTask.new("spec") do |t|
t.pattern = 'spec/**/*_spec.rb'
end
-desc 'Clear out RDoc and generated packages'
-task :clean => [:clobber_rdoc, :clobber_package] do
- rm "#{spec.name}.gemspec"
-end
View
2  lib/oauth2/provider.rb
@@ -60,8 +60,6 @@ def self.hashify(token)
ACCESS_DENIED = 'access_denied'
class Provider
- VERSION = '0.1.0'
-
class << self
attr_accessor :realm, :enforce_ssl
end
View
26 oauth2-provider.gemspec
@@ -0,0 +1,26 @@
+spec = Gem::Specification.new do |s|
+ s.name = "oauth2-provider"
+ s.version = "0.1.0"
+ s.summary = "Simple OAuth 2.0 provider toolkit"
+ s.author = "James Coglan"
+ s.email = "james@songkick.com"
+ s.homepage = "http://www.songkick.com"
+
+ s.has_rdoc = true
+ s.extra_rdoc_files = %w(README.rdoc)
+ s.rdoc_options = %w(--main README.rdoc)
+
+ s.files = %w(README.rdoc) + Dir.glob("{spec,lib,example}/**/*")
+ s.require_paths = ["lib"]
+
+ s.add_dependency("bcrypt-ruby")
+ s.add_dependency("activerecord")
+ s.add_dependency("json")
+
+ s.add_development_dependency("rspec")
+ s.add_development_dependency("sqlite3-ruby")
+ s.add_development_dependency("sinatra")
+ s.add_development_dependency("thin")
+ s.add_development_dependency("factory_girl")
+end
+
View
1  spec/spec_helper.rb
@@ -3,6 +3,7 @@
$:.unshift(dir)
require 'rubygems'
+require 'bundler/setup'
require 'active_record'
require 'oauth2/provider'
Please sign in to comment.
Something went wrong with that request. Please try again.