sinatra_warden 0.2.0 → 0.2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,22 +1,22 @@
1
- source "http://gemcutter.org"
1
+ source :gemcutter
2
2
 
3
- gem 'sinatra', '>= 0.9.4'
4
- gem 'warden', '>= 0.5.3'
3
+ group :runtime do
4
+ gem 'sinatra', '>= 0.9.4'
5
+ gem 'warden', '>= 0.5.0'
6
+ end
5
7
 
6
- only :testing do
8
+ group :test do
7
9
  gem 'rake'
8
- gem 'jeweler'
9
- gem 'bundler'
10
- gem 'rspec', '~> 1.2.9', :require_as => 'spec'
11
- gem 'yard', '~> 0.4.0'
12
- gem 'rack-test', '~> 0.5.0', :require_as => 'rack/test'
10
+ gem 'jeweler', '~> 1.3.0'
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'
13
15
  gem 'rcov'
14
-
16
+
15
17
  gem 'do_sqlite3', '~> 0.10.0'
16
18
  gem 'dm-core', '~> 0.10.1'
17
- gem 'bcrypt-ruby', :require_as => 'bcrypt'
19
+ gem 'bcrypt-ruby', :require => 'bcrypt'
18
20
  gem 'haml'
19
- gem 'rack-flash', :require_as => 'rack/flash'
21
+ gem 'rack-flash', :require => 'rack/flash'
20
22
  end
21
-
22
- disable_system_gems
data/README.rdoc CHANGED
@@ -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,14 +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.has_rdoc = false
23
- gem.executables = nil
24
19
  end
25
20
  Jeweler::GemcutterTasks.new
26
21
  rescue LoadError
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.0.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|
@@ -45,7 +45,7 @@ module Sinatra
45
45
  app.set :auth_failure_path, '/'
46
46
  app.set :auth_success_path, lambda { back }
47
47
 
48
- app.set :auth_error_message, "Could not log you in."
48
+ app.set :auth_error_message, "Could not log you in."
49
49
  app.set :auth_success_message, "You have logged in successfully."
50
50
  app.set :auth_use_erb, false
51
51
  app.set :auth_login_template, :login
@@ -55,7 +55,7 @@ module Sinatra
55
55
 
56
56
  app.post '/unauthenticated/?' do
57
57
  status 401
58
- flash[:error] = options.auth_error_message if defined?(Rack::Flash)
58
+ flash[:error] = (env['warden'].message || options.auth_error_message) if defined?(Rack::Flash)
59
59
  options.auth_use_erb ? erb(options.auth_login_template) : haml(options.auth_login_template)
60
60
  end
61
61
 
@@ -5,13 +5,14 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra_warden}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.0.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-18}
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"
@@ -35,7 +36,6 @@ Gem::Specification.new do |s|
35
36
  "spec/spec.opts",
36
37
  "spec/spec_helper.rb"
37
38
  ]
38
- s.has_rdoc = false
39
39
  s.homepage = %q{http://github.com/jsmestad/sinatra_warden}
40
40
  s.rdoc_options = ["--charset=UTF-8"]
41
41
  s.require_paths = ["lib"]
@@ -55,14 +55,14 @@ Gem::Specification.new do |s|
55
55
 
56
56
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
57
57
  s.add_runtime_dependency(%q<sinatra>, [">= 0.9.4"])
58
- s.add_runtime_dependency(%q<warden>, [">= 0.5.3"])
58
+ s.add_runtime_dependency(%q<warden>, [">= 0.5.0"])
59
59
  else
60
60
  s.add_dependency(%q<sinatra>, [">= 0.9.4"])
61
- s.add_dependency(%q<warden>, [">= 0.5.3"])
61
+ s.add_dependency(%q<warden>, [">= 0.5.0"])
62
62
  end
63
63
  else
64
64
  s.add_dependency(%q<sinatra>, [">= 0.9.4"])
65
- s.add_dependency(%q<warden>, [">= 0.5.3"])
65
+ s.add_dependency(%q<warden>, [">= 0.5.0"])
66
66
  end
67
67
  end
68
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
data/spec/spec_helper.rb CHANGED
@@ -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.2.0
4
+ version: 0.2.0.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-18 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
@@ -31,12 +31,27 @@ dependencies:
31
31
  requirements:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
- version: 0.5.3
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:
@@ -60,7 +75,7 @@ files:
60
75
  - spec/sinatra_warden_spec.rb
61
76
  - spec/spec.opts
62
77
  - spec/spec_helper.rb
63
- has_rdoc: false
78
+ has_rdoc: true
64
79
  homepage: http://github.com/jsmestad/sinatra_warden
65
80
  licenses: []
66
81