sinatra_warden 0.1.5 → 0.1.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,20 +1,22 @@
1
1
  source "http://gemcutter.org"
2
2
 
3
- gem 'sinatra', '>= 0.9.4'
4
- gem 'warden', '~> 0.5.0'
3
+ group :runtime do
4
+ gem 'sinatra', '>= 0.9.4'
5
+ gem 'warden', '>= 0.5.0'
6
+ end
5
7
 
6
- gem 'rake', :only => :testing
7
- gem 'jeweler', :only => :testing
8
- gem 'bundler', :only => :testing
9
- gem 'rspec', '~> 1.2.9', :only => :testing, :require_as => 'spec'
10
- gem 'yard', :only => :testing
11
- gem 'rack-test', '~> 0.5.0', :only => :testing, :require_as => 'rack/test'
12
- gem 'rcov', :only => :testing
8
+ group :test do
9
+ gem 'rake'
10
+ gem 'jeweler'
11
+ gem 'bundler', '~> 0.9.7'
12
+ gem 'rspec', '~> 1.2.9', :require => 'spec'
13
+ gem 'yard'
14
+ gem 'rack-test', '~> 0.5.0', :require => 'rack/test'
15
+ gem 'rcov'
13
16
 
14
- gem 'do_sqlite3', '~> 0.10.0', :only => :testing
15
- gem 'dm-core', '~> 0.10.1', :only => :testing
16
- gem 'bcrypt-ruby', :only => :testing, :require_as => 'bcrypt'
17
- gem 'haml', :only => :testing
18
- gem 'rack-flash', :only => :testing, :require_as => 'rack/flash'
19
-
20
- disable_system_gems
17
+ gem 'do_sqlite3', '~> 0.10.0'
18
+ gem 'dm-core', '~> 0.10.1'
19
+ gem 'bcrypt-ruby', :require => 'bcrypt'
20
+ gem 'haml'
21
+ gem 'rack-flash', :require => 'rack/flash'
22
+ end
@@ -27,12 +27,10 @@ Please read the wiki (http://wiki.github.com/jsmestad/sinatra_warden) for more i
27
27
 
28
28
  == Note on Patches/Pull Requests
29
29
 
30
- We use bundler on this project and disable system gems. Contributers should do the following:
31
-
32
30
  $ git clone git://github.com/jsmestad/sinatra_warden.git
33
31
  $ cd sinatra_warden
34
- $ gem bundle
35
- $ ./bin/rake
32
+ $ bundle install
33
+ $ bundle exec rake
36
34
 
37
35
  * Fork the project.
38
36
  * Make your feature addition or bug fix.
data/Rakefile CHANGED
@@ -1,5 +1,3 @@
1
- require File.join(File.expand_path(File.dirname(__FILE__)), 'vendor', 'gems', 'environment')
2
- Bundler.require_env
3
1
  require 'rake'
4
2
  require 'bundler'
5
3
 
@@ -13,13 +11,11 @@ begin
13
11
  gem.homepage = "http://github.com/jsmestad/sinatra_warden"
14
12
  gem.authors = ["Justin Smestad", "Daniel Neighman"]
15
13
 
16
- manifest = Bundler::Environment.load(File.dirname(__FILE__) + '/Gemfile')
17
- manifest.dependencies.each do |d|
18
- next if d.only
19
- gem.add_dependency(d.name, d.version)
14
+ bundle = Bundler::Definition.from_gemfile('Gemfile')
15
+ bundle.dependencies.each do |dep|
16
+ next unless dep.groups.include?(:runtime)
17
+ gem.add_dependency(dep.name, dep.version_requirements.to_s)
20
18
  end
21
-
22
- gem.executables = nil
23
19
  end
24
20
  Jeweler::GemcutterTasks.new
25
21
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.5
1
+ 0.1.5.1
@@ -1,3 +1,4 @@
1
+ require 'warden'
1
2
  require File.join(File.dirname(__FILE__), 'sinatra_warden', 'sinatra')
2
3
 
3
4
  Warden::Manager.before_failure do |env, opts|
@@ -41,14 +41,14 @@ module Sinatra
41
41
  app.set :auth_failure_path, '/'
42
42
  app.set :auth_success_path, lambda { back }
43
43
 
44
- app.set :auth_error_message, "Could not log you in."
44
+ app.set :auth_error_message, "Could not log you in."
45
45
  app.set :auth_success_message, "You have logged in successfully."
46
46
  app.set :auth_use_erb, false
47
47
  app.set :auth_login_template, :login
48
48
 
49
49
  app.post '/unauthenticated/?' do
50
50
  status 401
51
- flash[:error] = options.auth_error_message if defined?(Rack::Flash)
51
+ flash[:error] = (env['warden'].message || options.auth_error_message) if defined?(Rack::Flash)
52
52
  options.auth_use_erb ? erb(options.auth_login_template) : haml(options.auth_login_template)
53
53
  end
54
54
 
@@ -5,13 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra_warden}
8
- s.version = "0.1.5"
8
+ s.version = "0.1.5.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Smestad", "Daniel Neighman"]
12
- s.date = %q{2009-12-08}
12
+ s.date = %q{2010-03-02}
13
13
  s.description = %q{basic helpers and authentication methods for using warden with sinatra also providing some hooks into Rack::Flash}
14
14
  s.email = %q{justin.smestad@gmail.com}
15
+ s.executables = ["autospec", "css2sass", "edit_json.rb", "haml", "html2haml", "jeweler", "prettify_json.rb", "rackup", "rake", "rcov", "rubyforge", "sass", "spec", "yard-graph", "yardoc", "yri"]
15
16
  s.extra_rdoc_files = [
16
17
  "LICENSE",
17
18
  "README.rdoc"
@@ -54,14 +55,14 @@ Gem::Specification.new do |s|
54
55
 
55
56
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
56
57
  s.add_runtime_dependency(%q<sinatra>, [">= 0.9.4"])
57
- s.add_runtime_dependency(%q<warden>, ["~> 0.5.0"])
58
+ s.add_runtime_dependency(%q<warden>, [">= 0.5.0"])
58
59
  else
59
60
  s.add_dependency(%q<sinatra>, [">= 0.9.4"])
60
- s.add_dependency(%q<warden>, ["~> 0.5.0"])
61
+ s.add_dependency(%q<warden>, [">= 0.5.0"])
61
62
  end
62
63
  else
63
64
  s.add_dependency(%q<sinatra>, [">= 0.9.4"])
64
- s.add_dependency(%q<warden>, ["~> 0.5.0"])
65
+ s.add_dependency(%q<warden>, [">= 0.5.0"])
65
66
  end
66
67
  end
67
68
 
@@ -5,6 +5,6 @@ Warden::Strategies.add(:password) do
5
5
 
6
6
  def authenticate!
7
7
  u = User.authenticate(params['email'], params['password'])
8
- u.nil? ? fail!("Could not log in") : success!(u)
8
+ u.nil? ? fail!("Could not log you in.") : success!(u)
9
9
  end
10
10
  end
@@ -1,10 +1,8 @@
1
+ Bundler.require(:default, :runtime, :test)
1
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
4
 
4
5
  ENV['RACK_ENV'] ||= 'test'
5
- project_root = File.expand_path(File.dirname(__FILE__))
6
- require File.join(project_root, '..', 'vendor', 'gems', 'environment')
7
- Bundler.require_env(:testing)
8
6
 
9
7
  require 'sinatra_warden'
10
8
  require 'spec'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra_warden
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Smestad
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-12-08 00:00:00 -07:00
13
+ date: 2010-03-02 00:00:00 -07:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -29,14 +29,29 @@ dependencies:
29
29
  version_requirement:
30
30
  version_requirements: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 0.5.0
35
35
  version:
36
36
  description: basic helpers and authentication methods for using warden with sinatra also providing some hooks into Rack::Flash
37
37
  email: justin.smestad@gmail.com
38
- executables: []
39
-
38
+ executables:
39
+ - autospec
40
+ - css2sass
41
+ - edit_json.rb
42
+ - haml
43
+ - html2haml
44
+ - jeweler
45
+ - prettify_json.rb
46
+ - rackup
47
+ - rake
48
+ - rcov
49
+ - rubyforge
50
+ - sass
51
+ - spec
52
+ - yard-graph
53
+ - yardoc
54
+ - yri
40
55
  extensions: []
41
56
 
42
57
  extra_rdoc_files: