authenticate 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfcdc32766cdac8613010672395197b51dcbd54b
4
- data.tar.gz: 32e9e1af1ef1cae8fd69e2aee5306f74837d51b7
3
+ metadata.gz: 385cdcc42a02c88733f5236180cbf2f8fe9b26cd
4
+ data.tar.gz: 467b36878265dd502f6fd88fd0fe4eb8075ff2a4
5
5
  SHA512:
6
- metadata.gz: b63724b793d9f8c48d98151a1bd9e1722ccb6b1f5201de424e8998c94405835d143550f312d5778e66894e44317acae0b919d4bb2e1bb811651d22d0cc39a10e
7
- data.tar.gz: 48ef63f7a896e3a00542908688b3e3dbb15056e6b7f8c3f5ecc4add8fb57abef5d4496919d1c91c36bb45452f5154b3b39b2959e454e4a071b22aa1f71ee5582
6
+ metadata.gz: 5dbfc58d5d80c63d57ea44f2609cb5d7945db12c0122aba71b498f3a90e9dd395573389aebd8bfa12a8c048d4507307e5e0ac4470b01ac2dfb72cdcde97ea8a8
7
+ data.tar.gz: 576dedbcf695565157b8a5df868f510695e50a38a6ed0e36a68be484017fbad396a4d10428411727bcfb15c9f99b89a15b196637ae2700fb223ea1b023a89ae8
@@ -1,6 +1,15 @@
1
1
  # Authenticate Changelog
2
2
 
3
3
 
4
+ ## [0.7.1] - June 22, 2017
5
+
6
+ ### Fixed
7
+ - routes respects config.allow_sign_up? and shuts off /sign_up
8
+ - removed spurious output from install generator
9
+
10
+ [0.7.1]: https://github.com/tomichj/authenticate/compare/v0.7.0...v0.7.1
11
+
12
+
4
13
  ## [0.7.0] - May 25, 2017
5
14
 
6
15
  ### API Changes
data/README.md CHANGED
@@ -17,7 +17,7 @@ Please use [GitHub Issues] to report bugs. You can contact me directly on twitte
17
17
 
18
18
  ## Philosophy
19
19
 
20
- * simple - Authenticate's code is straightforward and easy to read.
20
+ * simple - Authenticate's code is straightforward and easy to read. No middleware!
21
21
  * opinionated - set the "right" defaults, but let you control almost everything if you want
22
22
  * small footprint - as few public methods and modules as possible. Methods only loaded into your user model if needed.
23
23
  * configuration driven - almost all configuration is performed in the initializer
@@ -36,7 +36,7 @@ The callback architecture is based on the system used by devise and warden, but
36
36
 
37
37
  ### Session Token
38
38
 
39
- Authenticate generates and clears a token (called a 'session token') to identify the user from a saved cookie.
39
+ Authenticate generates a token (called a 'session token') to identify the user from a saved cookie.
40
40
  When a user authenticates successfully, Authenticate generates and stores a 'session token' for your user in
41
41
  your database. The session token is also stored in a cookie in the user's browser.
42
42
  The cookie is then presented upon each subsequent access attempt to your server.
@@ -9,8 +9,11 @@ if Authenticate.configuration.routes_enabled?
9
9
  resources :passwords, controller: 'authenticate/passwords', only: [:edit, :update]
10
10
  end
11
11
 
12
- get '/sign_up', to: 'authenticate/users#new', as: 'sign_up'
13
12
  get '/sign_in', to: 'authenticate/sessions#new', as: 'sign_in'
14
13
  get '/sign_out', to: 'authenticate/sessions#destroy', as: 'sign_out'
14
+
15
+ if Authenticate.configuration.allow_sign_up?
16
+ get '/sign_up', to: 'authenticate/users#new', as: 'sign_up'
17
+ end
15
18
  end
16
19
  end
@@ -1,3 +1,3 @@
1
1
  module Authenticate
2
- VERSION = '0.7.0'.freeze
2
+ VERSION = '0.7.1'.freeze
3
3
  end
@@ -91,7 +91,6 @@ module Authenticate
91
91
  end
92
92
 
93
93
  def copy_migration(migration_name, config = {})
94
- puts "migration_version: #{migration_version}"
95
94
  unless migration_exists?(migration_name)
96
95
  migration_template(
97
96
  "db/migrate/#{migration_name}",
@@ -52,7 +52,29 @@ describe DeprecatedMethodsController, type: :controller do
52
52
 
53
53
  it 'warns on authenticated?' do
54
54
  expect { subject.authenticated? }.to output(/deprecated/i).to_stderr
55
- expect(subject.authenticated?).to be_truthy
55
+ end
56
+
57
+ it 'authenticates' do
58
+ silence do
59
+ expect(subject.authenticated?).to be_truthy
60
+ end
56
61
  end
57
62
  end
58
63
  end
64
+
65
+
66
+ def silence
67
+ # Store the original stderr and stdout in order to restore them later
68
+ @original_stderr = $stderr
69
+ @original_stdout = $stdout
70
+
71
+ # Redirect stderr and stdout
72
+ $stderr = $stdout = StringIO.new
73
+
74
+ yield
75
+
76
+ $stderr = @original_stderr
77
+ $stdout = @original_stdout
78
+ @original_stderr = nil
79
+ @original_stdout = nil
80
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authenticate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Tomich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2017-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bcrypt