Permalink
Browse files

Bundler rake tasks for gem management

  • Loading branch information...
1 parent cbcb467 commit 588d52fac2be246132c07244155b7017b923c705 @ismasan committed Dec 31, 2011
Showing with 8 additions and 16 deletions.
  1. +1 −1 README.md
  2. +5 −13 Rakefile
  3. +2 −2 spec/proxy_spec.rb
View
@@ -9,7 +9,7 @@ A [warden](http://github.com/hassox/warden) strategy that provides oauth authent
To test it out on localhost set your callback url to 'http://localhost:9292/auth/bootic/callback'
-There's an example app in [spec/app.rb](/atmos/warden-bootic/blob/master/spec/app.rb).
+There's an example app in [spec/app.rb](/ismasan/warden-bootic/blob/master/spec/app.rb).
The Extension in Action
=======================
View
@@ -1,16 +1,8 @@
-require 'rubygems/package_task'
-require 'rubygems/specification'
-require 'date'
require 'bundler'
+Bundler::GemHelper.install_tasks
-require File.join(File.dirname(__FILE__), 'lib', 'warden-bootic','version')
+require 'rspec/core/rake_task'
+RSpec::Core::RakeTask.new('spec')
-task :default => [:spec]
-
-require 'spec/rake/spectask'
-desc "Run specs"
-Spec::Rake::SpecTask.new do |t|
- t.spec_files = FileList['spec/**/*_spec.rb']
- t.spec_opts = %w(-fs --color)
- t.spec_opts << '--loadby' << 'random'
-end
+# If you want to make this the default task
+task :default => :spec
View
@@ -4,7 +4,7 @@
before(:all) do
sha = Digest::SHA1.hexdigest(Time.now.to_s)
@proxy = Warden::Bootic::Oauth::Proxy.new(sha[0..19], sha[0..39],
- 'user,public_repo,repo,gist',
+ 'user',
'http://example.org/auth/bootic/callback')
end
@@ -16,7 +16,7 @@
params = uri.query_values
params['response_type'].should eql('code')
- params['scope'].should eql('user,public_repo,repo,gist')
+ params['scope'].should eql('user')
params['client_id'].should match(/\w{20}/)
params['redirect_uri'].should eql('http://example.org/auth/bootic/callback')
end

0 comments on commit 588d52f

Please sign in to comment.