mini_auth 0.3.0.beta → 0.3.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,7 +1,8 @@
1
1
  ## 0.3.0
2
2
 
3
3
  * Add the class method `token` that defines "generate_#{name}_token" and
4
- "verify_#{name}_token" methods dynamically.
4
+ "verify_#{name}_token" methods dynamically.
5
+ * Remove the deprecation warnings in Rails 3.2.0.rc1
5
6
 
6
7
  ## 0.2.0 (2011-12-19)
7
8
 
data/Gemfile CHANGED
@@ -1,3 +1,23 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gemspec
3
+ rails_version = ENV['MINI_AUTH_RAILS_VERSION']
4
+
5
+ if rails_version == "edge"
6
+ gem "rails", :git => "git://github.com/rails/rails.git"
7
+ elsif rails_version && rails_version.strip != ""
8
+ gem "rails", rails_version
9
+ else
10
+ gem "rails", "~> 3.1.0"
11
+ end
12
+
13
+ gem "bcrypt-ruby", "~> 3.0.0"
14
+
15
+ group :test do
16
+ if rails_version && rails_version.strip == "3.2.0.rc1"
17
+ gem "rspec-rails", "~> 2.8.0.rc2"
18
+ else
19
+ gem "rspec-rails", "~> 2.7.0"
20
+ end
21
+ gem "sqlite3", "~> 1.3.4"
22
+ gem "database_cleaner", "~> 0.7.0"
23
+ end
data/README.md CHANGED
@@ -20,7 +20,7 @@ or install as a plugin
20
20
  Requirements
21
21
  ------------
22
22
 
23
- * Ruby on Rails 3.1 or higher
23
+ * Ruby on Rails 3.1 or 3.2
24
24
 
25
25
 
26
26
  Synopsis
@@ -1,3 +1,3 @@
1
1
  module MiniAuth
2
- VERSION = "0.3.0.beta"
2
+ VERSION = "0.3.0.beta2"
3
3
  end
data/lib/mini_auth.rb CHANGED
@@ -52,22 +52,20 @@ module MiniAuth
52
52
  end
53
53
  end
54
54
 
55
- module InstanceMethods
56
- def authenticate(raw_password)
57
- if password_digest && BCrypt::Password.new(password_digest) == raw_password
58
- self
59
- else
60
- false
61
- end
55
+ def authenticate(raw_password)
56
+ if password_digest && BCrypt::Password.new(password_digest) == raw_password
57
+ self
58
+ else
59
+ false
62
60
  end
61
+ end
62
+
63
+ def changing_password?
64
+ !!changing_password
65
+ end
63
66
 
64
- def changing_password?
65
- !!changing_password
66
- end
67
-
68
- def setting_password?
69
- !!setting_password
70
- end
67
+ def setting_password?
68
+ !!setting_password
71
69
  end
72
70
 
73
71
  module ClassMethods
data/mini_auth.gemspec CHANGED
@@ -18,8 +18,8 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ["lib"]
19
19
 
20
20
  s.add_runtime_dependency "rails", "~> 3.1.0"
21
- s.add_runtime_dependency "bcrypt-ruby"
21
+ s.add_runtime_dependency "bcrypt-ruby", "~> 3.0.0"
22
22
  s.add_development_dependency "rspec-rails", "~> 2.7.0"
23
- s.add_development_dependency "sqlite3"
24
- s.add_development_dependency "database_cleaner"
23
+ s.add_development_dependency "sqlite3", "~> 1.3.4"
24
+ s.add_development_dependency "database_cleaner", "~> 0.7.0"
25
25
  end
@@ -0,0 +1,30 @@
1
+ #!/bin/bash
2
+
3
+ set -e
4
+
5
+ if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
6
+ source "$HOME/.rvm/scripts/rvm"
7
+ elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
8
+ source "/usr/local/rvm/scripts/rvm"
9
+ else
10
+ printf "ERROR: An RVM installation was not found.\n"
11
+ fi
12
+
13
+ function run {
14
+ gem list --local bundler | grep bundler || gem install bundler --no-ri --no-rdoc
15
+
16
+ for version in 3.1.3 3.2.0.rc1
17
+ do
18
+ echo "Running bundle exec rspec spec against rails $version..."
19
+ MINI_AUTH_RAILS_VERSION=$version bundle update rails
20
+ MINI_AUTH_RAILS_VERSION=$version bundle exec rspec spec
21
+ done
22
+ }
23
+
24
+ rvm use ruby-1.8.7@mini_auth --create
25
+ run
26
+
27
+ rvm use ruby-1.9.3@mini_auth --create
28
+ run
29
+
30
+ echo 'Success!'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.beta
4
+ version: 0.3.0.beta2
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &21780380 !ruby/object:Gem::Requirement
16
+ requirement: &16960700 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,21 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *21780380
24
+ version_requirements: *16960700
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: bcrypt-ruby
27
- requirement: &21779500 !ruby/object:Gem::Requirement
27
+ requirement: &19818020 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
- - - ! '>='
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
- version: '0'
32
+ version: 3.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *21779500
35
+ version_requirements: *19818020
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rspec-rails
38
- requirement: &21778600 !ruby/object:Gem::Requirement
38
+ requirement: &19816960 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,29 +43,29 @@ dependencies:
43
43
  version: 2.7.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *21778600
46
+ version_requirements: *19816960
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sqlite3
49
- requirement: &21778080 !ruby/object:Gem::Requirement
49
+ requirement: &19816000 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ! '>='
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.3.4
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *21778080
57
+ version_requirements: *19816000
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: database_cleaner
60
- requirement: &21777360 !ruby/object:Gem::Requirement
60
+ requirement: &19815200 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
- - - ! '>='
63
+ - - ~>
64
64
  - !ruby/object:Gem::Version
65
- version: '0'
65
+ version: 0.7.0
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *21777360
68
+ version_requirements: *19815200
69
69
  description: A minimal authentication module for Rails
70
70
  email:
71
71
  - t-kuroda@oiax.jp
@@ -89,6 +89,7 @@ files:
89
89
  - spec/mini_auth/setting_password_spec.rb
90
90
  - spec/mini_auth/token_spec.rb
91
91
  - spec/spec_helper.rb
92
+ - test_on_multiple_environments.sh
92
93
  homepage: ''
93
94
  licenses: []
94
95
  post_install_message: