nyauth 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +40 -0
- data/app/controllers/nyauth/reset_passwords_controller.rb +3 -0
- data/app/models/concerns/nyauth/confirmable.rb +2 -2
- data/app/models/concerns/nyauth/reset_password_ability.rb +3 -3
- data/app/services/nyauth/session_service.rb +2 -2
- data/config/locales/en.yml +7 -20
- data/config/locales/ja.yml +33 -0
- data/lib/generators/nyauth/templates/nyauth_install_initializer.rb +2 -0
- data/lib/nyauth/configuration.rb +4 -0
- data/lib/nyauth/engine.rb +0 -2
- data/lib/nyauth/version.rb +1 -1
- data/spec/dummy/app/views/layouts/application.html.erb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +1876 -0
- data/spec/dummy/log/test.log +5625 -0
- data/spec/dummy/tmp/pids/server.pid +1 -0
- data/spec/featrues/nyauth/reset_password_requests_spec.rb +0 -4
- data/spec/featrues/nyauth/sessions_spec.rb +2 -2
- data/spec/lib/generators/nyauth/install_generator_spec.rb +11 -2
- metadata +5 -6
- data/app/assets/javascripts/nyauth/application.js +0 -13
- data/app/assets/stylesheets/nyauth/application.css +0 -15
- data/config/application.yml +0 -1
- data/lib/tasks/nyauth_tasks.rake +0 -4
@@ -0,0 +1 @@
|
|
1
|
+
95078
|
@@ -32,10 +32,6 @@ RSpec.describe 'Nyauth::NewPasswordRequests' do
|
|
32
32
|
open_email(user.email)
|
33
33
|
current_email.click_link('set new password')
|
34
34
|
|
35
|
-
fill_in('user_password', with: reset_password)
|
36
|
-
fill_in('user_password_confirmation', with: reset_password)
|
37
|
-
click_button('Update')
|
38
|
-
|
39
35
|
expect(page).to have_content('expired')
|
40
36
|
end
|
41
37
|
end
|
@@ -17,7 +17,7 @@ RSpec.describe 'Nyauth::Sessions' do
|
|
17
17
|
scenario "can't sign in user" do
|
18
18
|
click_button('Sign in')
|
19
19
|
|
20
|
-
expect(page).to have_content('
|
20
|
+
expect(page).to have_content('Invalid')
|
21
21
|
end
|
22
22
|
|
23
23
|
end
|
@@ -51,7 +51,7 @@ RSpec.describe 'Nyauth::Sessions' do
|
|
51
51
|
scenario "can't sign in admin" do
|
52
52
|
click_button('Sign in')
|
53
53
|
|
54
|
-
expect(page).to have_content('
|
54
|
+
expect(page).to have_content('Invalid')
|
55
55
|
end
|
56
56
|
|
57
57
|
end
|
@@ -11,9 +11,18 @@ describe Nyauth::InstallGenerator, type: :generator do
|
|
11
11
|
|
12
12
|
describe 'rails g nyauth:install' do
|
13
13
|
it 'creates a test initializer' do
|
14
|
-
assert_file 'config/initializers/nyauth.rb', /config.
|
15
|
-
assert_file 'config/initializers/nyauth.rb', /config.
|
14
|
+
assert_file 'config/initializers/nyauth.rb', /config.encryption_secret = ENV\['NYAUTH_ENCRYPTION_SECRET'\]/
|
15
|
+
assert_file 'config/initializers/nyauth.rb', /config.confirmation_expire_limit = 1.hour/
|
16
|
+
assert_file 'config/initializers/nyauth.rb', /config.reset_password_expire_limit = 1.hour/
|
16
17
|
assert_file 'config/initializers/nyauth.rb', /config.redirect_path do |urls|/
|
18
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_sign_in = -> \(client_name\) \{\}/
|
19
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_sign_out = -> \(client_name\) \{\}/
|
20
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_registration = -> \(client_name\) \{\}/
|
21
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_create_request_confirmation = -> \(client_name\) \{\}/
|
22
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_update_confirmation = -> \(client_name\) \{\}/
|
23
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_reset_password_request = -> \(client_name\) \{\}/
|
24
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_reset_password = -> \(client_name\) \{\}/
|
25
|
+
assert_file 'config/initializers/nyauth.rb', /# config.redirect_path_after_update_password = -> \(client_name\) \{\}/
|
17
26
|
end
|
18
27
|
end
|
19
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nyauth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ppworks
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -48,8 +48,6 @@ files:
|
|
48
48
|
- MIT-LICENSE
|
49
49
|
- README.md
|
50
50
|
- Rakefile
|
51
|
-
- app/assets/javascripts/nyauth/application.js
|
52
|
-
- app/assets/stylesheets/nyauth/application.css
|
53
51
|
- app/controllers/concerns/nyauth/application_concern.rb
|
54
52
|
- app/controllers/concerns/nyauth/client_concern.rb
|
55
53
|
- app/controllers/concerns/nyauth/session_concern.rb
|
@@ -83,8 +81,8 @@ files:
|
|
83
81
|
- app/views/nyauth/reset_password_requests/new.html.erb
|
84
82
|
- app/views/nyauth/reset_passwords/edit.html.erb
|
85
83
|
- app/views/nyauth/sessions/new.html.erb
|
86
|
-
- config/application.yml
|
87
84
|
- config/locales/en.yml
|
85
|
+
- config/locales/ja.yml
|
88
86
|
- config/routes.rb
|
89
87
|
- lib/generators/nyauth/install_generator.rb
|
90
88
|
- lib/generators/nyauth/nyauth_generator.rb
|
@@ -98,7 +96,6 @@ files:
|
|
98
96
|
- lib/nyauth/rails.rb
|
99
97
|
- lib/nyauth/route.rb
|
100
98
|
- lib/nyauth/version.rb
|
101
|
-
- lib/tasks/nyauth_tasks.rake
|
102
99
|
- spec/controllers/application_controller_spec.rb
|
103
100
|
- spec/dummy/README.rdoc
|
104
101
|
- spec/dummy/Rakefile
|
@@ -164,6 +161,7 @@ files:
|
|
164
161
|
- spec/dummy/tmp/capybara/capybara-201503172346495241516033.html
|
165
162
|
- spec/dummy/tmp/capybara/capybara-201503172354248621830336.html
|
166
163
|
- spec/dummy/tmp/capybara/capybara-20150623002226753539811.html
|
164
|
+
- spec/dummy/tmp/pids/server.pid
|
167
165
|
- spec/factories/admins.rb
|
168
166
|
- spec/factories/users.rb
|
169
167
|
- spec/featrues/nyauth/confirmation_requests_spec.rb
|
@@ -289,6 +287,7 @@ test_files:
|
|
289
287
|
- spec/dummy/tmp/capybara/capybara-201503172346495241516033.html
|
290
288
|
- spec/dummy/tmp/capybara/capybara-201503172354248621830336.html
|
291
289
|
- spec/dummy/tmp/capybara/capybara-20150623002226753539811.html
|
290
|
+
- spec/dummy/tmp/pids/server.pid
|
292
291
|
- spec/factories/admins.rb
|
293
292
|
- spec/factories/users.rb
|
294
293
|
- spec/featrues/nyauth/confirmation_requests_spec.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
data/config/application.yml
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ENCRYPTION_SECRET: 9b6cf5298ef3cba725fa10bfc74e038fb037696879dd67df1a7ddc29b780529aa3033fbdfcbacc96939975b4ee76719f4e3f66c7ce1a68340305de47f68e5a09
|
data/lib/tasks/nyauth_tasks.rake
DELETED