authn-rails 1.1.0 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,20 +1,22 @@
1
- AuthN (Rails)
2
- -------------
1
+ AuthN Rails
2
+ -----------
3
3
 
4
- authn-rails is an extention of the AuthN library.
4
+ authn-rails is an extention of the AuthN library to give easy integration into Rails framework.
5
5
 
6
- Using AuthN
7
- ===========
6
+
7
+ Using AuthN Rails
8
+ =================
8
9
 
9
10
  To start using authn you simply need to install and hook up to your existing "user" model:
10
11
 
11
12
  ``` ruby
12
13
  # create_table :accounts do |t|
13
- # t.string :email, null: false, default: nil
14
- # t.binary :password_digest, null: false, default: nil
14
+ # t.string :email
15
+ # t.binary :password_digest
16
+ #
15
17
  # t.timestamps
16
18
  # end
17
- # add_index :accounts, :email, unique: true
19
+ # add_index :accounts, :email
18
20
  #
19
21
 
20
22
  class Account < ActiveRecord::Base
@@ -27,7 +29,6 @@ class Account < ActiveRecord::Base
27
29
  validates :password, length: 10..1024
28
30
 
29
31
  attr_accessible :email
30
- attr_accessible :password, :password_confirmation
31
32
  end
32
33
  ```
33
34
 
@@ -38,35 +39,35 @@ We'll you can see their own pages, but here's a taste:
38
39
 
39
40
  ``` ruby
40
41
  # create_table :accounts do |t|
41
- # t.string :email, null: false, default: nil
42
- # t.binary :password_digest, null: false, default: nil
42
+ # t.string :email
43
+ # t.binary :password_digest
43
44
  #
44
- # t.string :activation_token, default: nil
45
- # t.boolean :activation_state, null: false, default: false
46
- # t.datetime :activation_expires_at, default: nil
45
+ # t.string :activation_token
46
+ # t.boolean :activation_state, default: false
47
+ # t.datetime :activation_expires_at
47
48
  #
48
- # t.string :password_recovery_token, default: nil
49
- # t.datetime :password_recovery_expires_at, default: nil
49
+ # t.string :password_recovery_token
50
+ # t.datetime :password_recovery_expires_at
50
51
  #
51
- # t.string :login_protection_token, default: nil
52
- # t.datetime :login_protection_expires_at, default: nil
52
+ # t.string :login_protection_token
53
+ # t.datetime :login_protection_expires_at
53
54
  # t.integer :login_protection_attempts, default: 0
54
55
  #
55
56
  # t.timestamps
56
57
  # end
57
- # add_index :accounts, :email, unique: true
58
- # add_index :accounts, :activation_token, unique: true
58
+ # add_index :accounts, :email
59
+ # add_index :accounts, :activation_token
59
60
  # add_index :accounts, :activation_state
60
- # add_index :accounts, :password_recovery_token, unique: true
61
- # add_index :accounts, :login_protection_token, unique: true
61
+ # add_index :accounts, :password_recovery_token
62
+ # add_index :accounts, :login_protection_token
62
63
  #
63
64
 
64
65
  class Account < ActiveRecord::Base
65
66
  include AuthN::Model
66
67
 
67
68
  has_authentication
68
- has_password_recovery mailer: PasswordRecoveryMailer
69
- has_activation mailer: ActivationMailer, on_create: false
69
+ has_password_recovery mailer: "PasswordRecoveryMailer"
70
+ has_activation mailer: "ActivationMailer", on_create: false
70
71
  has_login_protection maximum: 3, redirect: { controller: :accounts, action: :maximum_login_failure }
71
72
  has_secure_password
72
73
 
@@ -74,7 +75,6 @@ class Account < ActiveRecord::Base
74
75
  validates :password, length: 10..1024
75
76
 
76
77
  attr_accessible :email
77
- attr_accessible :password, :password_confirmation
78
78
  end
79
79
  ```
80
80
 
@@ -84,8 +84,8 @@ authn assumes quite a few things, but never stops you from changing how it works
84
84
  As above you can change how each of your "user" models functions (for say admin recovery emails vs support recovery emails).
85
85
  In addition you can either programatically write the "global" configuration or have a `authn.yml` file ready to be loaded.
86
86
 
87
- Installing AuthN (Rails)
88
- ========================
87
+ Installing AuthN Rails
88
+ ======================
89
89
 
90
90
  Add this line to your application's Gemfile:
91
91
 
data/authn-rails.gemspec CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |gem|
7
7
  gem.name = "authn-rails"
8
8
  gem.version = AuthN::Rails::VERSION
9
9
  gem.authors = ["Kurtis Rainbolt-Greene"]
10
- gem.email = ["kurtisrainboltgreene@gmail.com"]
10
+ gem.email = ["me@kurtisrainboltgreene.name"]
11
11
  gem.summary = %q{The plugin library for AuthN and Rails}
12
12
  gem.description = gem.summary
13
- gem.homepage = "http://github.com/krainboltgreene/authn-rails"
13
+ gem.homepage = "http://krainboltgreene.github.com/authn-rails"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -20,7 +20,6 @@ Gem::Specification.new do |gem|
20
20
  gem.add_runtime_dependency 'authn', '~> 2.0'
21
21
  gem.add_runtime_dependency 'rails', '~> 3.2'
22
22
  gem.add_runtime_dependency 'astruct', '~> 2.9'
23
- gem.add_runtime_dependency 'bcrypt-ruby', '~> 3.0'
24
23
  gem.add_development_dependency 'yard'
25
24
  gem.add_development_dependency 'kramdown'
26
25
  # gem.add_runtime_dependency 'gemname', '~> 1.0'
@@ -1,5 +1,5 @@
1
1
  module AuthN
2
2
  module Rails
3
- VERSION = "1.1.0"
3
+ VERSION = "1.3.2"
4
4
  end
5
5
  end
data/test/helper.rb CHANGED
@@ -1 +1 @@
1
- require 'authn'
1
+ require 'authn-rails'
@@ -2,11 +2,7 @@ require 'minitest/autorun'
2
2
  require_relative '../../../helper'
3
3
 
4
4
  class TestAuthNRailsVersion < MiniTest::Unit::TestCase
5
- def setup
6
- # Setup logic here
7
- end
8
-
9
5
  def test_that_version_is_latest
10
- assert_equal "1.0.0", AuthN::Rails::VERSION
6
+ assert_equal "1.3.2", AuthN::Rails::VERSION
11
7
  end
12
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authn-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-01 00:00:00.000000000 Z
12
+ date: 2012-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: authn
@@ -59,22 +59,6 @@ dependencies:
59
59
  - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '2.9'
62
- - !ruby/object:Gem::Dependency
63
- name: bcrypt-ruby
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: '3.0'
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: '3.0'
78
62
  - !ruby/object:Gem::Dependency
79
63
  name: yard
80
64
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +93,7 @@ dependencies:
109
93
  version: '0'
110
94
  description: The plugin library for AuthN and Rails
111
95
  email:
112
- - kurtisrainboltgreene@gmail.com
96
+ - me@kurtisrainboltgreene.name
113
97
  executables: []
114
98
  extensions: []
115
99
  extra_rdoc_files: []
@@ -128,7 +112,7 @@ files:
128
112
  - lib/authn/rails/version.rb
129
113
  - test/helper.rb
130
114
  - test/lib/authn/rails/version_test.rb
131
- homepage: http://github.com/krainboltgreene/authn-rails
115
+ homepage: http://krainboltgreene.github.com/authn-rails
132
116
  licenses: []
133
117
  post_install_message:
134
118
  rdoc_options: []
@@ -142,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
142
126
  version: '0'
143
127
  segments:
144
128
  - 0
145
- hash: 2824456558225758350
129
+ hash: 3773068624867028438
146
130
  required_rubygems_version: !ruby/object:Gem::Requirement
147
131
  none: false
148
132
  requirements:
@@ -151,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
135
  version: '0'
152
136
  segments:
153
137
  - 0
154
- hash: 2824456558225758350
138
+ hash: 3773068624867028438
155
139
  requirements: []
156
140
  rubyforge_project:
157
141
  rubygems_version: 1.8.24