trestle-auth 0.2.5 → 0.4.3

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/.browserslistrc +1 -0
  3. data/.gitignore +5 -0
  4. data/.rspec +1 -0
  5. data/.travis.yml +20 -3
  6. data/Gemfile +14 -0
  7. data/README.md +34 -7
  8. data/app/assets/bundle/trestle/auth/bundle.css +1 -0
  9. data/app/assets/bundle/trestle/auth/userbox.css +1 -0
  10. data/app/assets/stylesheets/trestle/_custom-auth.css +6 -0
  11. data/app/assets/stylesheets/trestle/auth.css +2 -0
  12. data/app/controllers/trestle/auth/sessions_controller.rb +3 -4
  13. data/app/helpers/trestle/auth/title_helper.rb +3 -1
  14. data/app/views/layouts/trestle/auth.html.erb +11 -8
  15. data/app/views/trestle/auth/_userbox.html.erb +16 -5
  16. data/app/views/trestle/auth/sessions/_form.html.erb +32 -0
  17. data/app/views/trestle/auth/sessions/new.html.erb +8 -31
  18. data/bin/rails +20 -0
  19. data/config/{locale → locales}/en.yml +7 -0
  20. data/config/locales/es.yml +15 -0
  21. data/config/{locale → locales}/pl.yml +7 -0
  22. data/config/{locale → locales}/pt-BR.yml +7 -0
  23. data/config/{locale → locales}/zh-CN.yml +0 -0
  24. data/config/routes.rb +8 -3
  25. data/frontend/_form.scss +79 -0
  26. data/frontend/_layout.scss +35 -0
  27. data/{app/assets/stylesheets/trestle/auth/_defaults.scss → frontend/_variables.scss} +2 -6
  28. data/frontend/index.scss +5 -0
  29. data/{app/assets/stylesheets/trestle/auth → frontend}/userbox.scss +14 -12
  30. data/gemfiles/rails-4.2.gemfile +18 -0
  31. data/gemfiles/rails-5.0.gemfile +18 -0
  32. data/gemfiles/rails-5.1.gemfile +18 -0
  33. data/gemfiles/rails-5.2.gemfile +18 -0
  34. data/gemfiles/rails-6.0.gemfile +18 -0
  35. data/lib/generators/trestle/auth/account/account_generator.rb +32 -0
  36. data/lib/generators/trestle/auth/account/templates/admin.rb.erb +47 -0
  37. data/lib/generators/trestle/auth/admin/admin_generator.rb +15 -1
  38. data/lib/generators/trestle/auth/admin/templates/admin.rb.erb +28 -5
  39. data/lib/generators/trestle/auth/install/install_generator.rb +40 -109
  40. data/lib/generators/trestle/auth/install/templates/basic.rb.erb +121 -0
  41. data/lib/generators/trestle/auth/install/templates/devise.rb.erb +92 -0
  42. data/lib/trestle/auth.rb +14 -8
  43. data/lib/trestle/auth/backends.rb +34 -0
  44. data/lib/trestle/auth/backends/base.rb +28 -0
  45. data/lib/trestle/auth/backends/basic.rb +72 -0
  46. data/lib/trestle/auth/backends/devise.rb +14 -0
  47. data/lib/trestle/auth/backends/warden.rb +53 -0
  48. data/lib/trestle/auth/configuration.rb +27 -3
  49. data/lib/trestle/auth/configuration/warden.rb +11 -0
  50. data/lib/trestle/auth/constraint.rb +23 -1
  51. data/lib/trestle/auth/controller/authentication.rb +58 -0
  52. data/lib/trestle/auth/controller/locale.rb +18 -0
  53. data/lib/trestle/auth/controller/time_zone.rb +18 -0
  54. data/lib/trestle/auth/controller_methods.rb +3 -74
  55. data/lib/trestle/auth/engine.rb +1 -1
  56. data/lib/trestle/auth/model_methods.rb +2 -3
  57. data/lib/trestle/auth/version.rb +1 -1
  58. data/package.json +29 -0
  59. data/trestle-auth.gemspec +14 -10
  60. data/webpack.config.js +49 -0
  61. data/yarn.lock +4835 -0
  62. metadata +66 -32
  63. data/app/assets/javascripts/trestle/auth.js +0 -0
  64. data/app/assets/stylesheets/trestle/_custom-auth.scss +0 -4
  65. data/app/assets/stylesheets/trestle/auth.scss +0 -13
  66. data/app/assets/stylesheets/trestle/auth/_form.scss +0 -138
  67. data/app/assets/stylesheets/trestle/auth/_layout.scss +0 -20
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trestle-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Pohlenz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-27 00:00:00.000000000 Z
11
+ date: 2021-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: trestle
@@ -16,14 +16,20 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0.8'
19
+ version: 0.9.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 0.9.3
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
27
  - - "~>"
25
28
  - !ruby/object:Gem::Version
26
- version: '0.8'
29
+ version: 0.9.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 0.9.3
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bcrypt
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -39,54 +45,55 @@ dependencies:
39
45
  - !ruby/object:Gem::Version
40
46
  version: 3.1.7
41
47
  - !ruby/object:Gem::Dependency
42
- name: bundler
48
+ name: rspec-rails
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
51
  - - "~>"
46
52
  - !ruby/object:Gem::Version
47
- version: '1.12'
53
+ version: '3.0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
58
  - - "~>"
53
59
  - !ruby/object:Gem::Version
54
- version: '1.12'
60
+ version: '3.0'
55
61
  - !ruby/object:Gem::Dependency
56
- name: rake
62
+ name: show_me_the_cookies
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
65
  - - "~>"
60
66
  - !ruby/object:Gem::Version
61
- version: '10.0'
67
+ version: '5.0'
62
68
  type: :development
63
69
  prerelease: false
64
70
  version_requirements: !ruby/object:Gem::Requirement
65
71
  requirements:
66
72
  - - "~>"
67
73
  - !ruby/object:Gem::Version
68
- version: '10.0'
74
+ version: '5.0'
69
75
  - !ruby/object:Gem::Dependency
70
- name: rspec
76
+ name: timecop
71
77
  requirement: !ruby/object:Gem::Requirement
72
78
  requirements:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: '3.0'
81
+ version: 0.9.1
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: '3.0'
83
- description:
88
+ version: 0.9.1
89
+ description:
84
90
  email:
85
91
  - sam@sampohlenz.com
86
92
  executables: []
87
93
  extensions: []
88
94
  extra_rdoc_files: []
89
95
  files:
96
+ - ".browserslistrc"
90
97
  - ".gitignore"
91
98
  - ".rspec"
92
99
  - ".travis.yml"
@@ -94,45 +101,73 @@ files:
94
101
  - LICENSE
95
102
  - README.md
96
103
  - Rakefile
97
- - app/assets/javascripts/trestle/auth.js
98
- - app/assets/stylesheets/trestle/_custom-auth.scss
99
- - app/assets/stylesheets/trestle/auth.scss
100
- - app/assets/stylesheets/trestle/auth/_defaults.scss
101
- - app/assets/stylesheets/trestle/auth/_form.scss
102
- - app/assets/stylesheets/trestle/auth/_layout.scss
103
- - app/assets/stylesheets/trestle/auth/userbox.scss
104
+ - app/assets/bundle/trestle/auth/bundle.css
105
+ - app/assets/bundle/trestle/auth/userbox.css
106
+ - app/assets/stylesheets/trestle/_custom-auth.css
107
+ - app/assets/stylesheets/trestle/auth.css
104
108
  - app/controllers/trestle/auth/sessions_controller.rb
105
109
  - app/helpers/trestle/auth/title_helper.rb
106
110
  - app/helpers/trestle/auth/user_helper.rb
107
111
  - app/views/layouts/trestle/auth.html.erb
108
112
  - app/views/trestle/auth/_userbox.html.erb
113
+ - app/views/trestle/auth/sessions/_form.html.erb
109
114
  - app/views/trestle/auth/sessions/new.html.erb
115
+ - bin/rails
110
116
  - config/initializers/trestle.rb
111
- - config/locale/en.yml
112
- - config/locale/pl.yml
113
- - config/locale/pt-BR.yml
114
- - config/locale/zh-CN.yml
117
+ - config/locales/en.yml
118
+ - config/locales/es.yml
119
+ - config/locales/pl.yml
120
+ - config/locales/pt-BR.yml
121
+ - config/locales/zh-CN.yml
115
122
  - config/routes.rb
123
+ - frontend/_form.scss
124
+ - frontend/_layout.scss
125
+ - frontend/_variables.scss
126
+ - frontend/index.scss
127
+ - frontend/userbox.scss
128
+ - gemfiles/rails-4.2.gemfile
129
+ - gemfiles/rails-5.0.gemfile
130
+ - gemfiles/rails-5.1.gemfile
131
+ - gemfiles/rails-5.2.gemfile
132
+ - gemfiles/rails-6.0.gemfile
133
+ - lib/generators/trestle/auth/account/account_generator.rb
134
+ - lib/generators/trestle/auth/account/templates/admin.rb.erb
116
135
  - lib/generators/trestle/auth/admin/admin_generator.rb
117
136
  - lib/generators/trestle/auth/admin/templates/admin.rb.erb
118
137
  - lib/generators/trestle/auth/install/install_generator.rb
138
+ - lib/generators/trestle/auth/install/templates/basic.rb.erb
139
+ - lib/generators/trestle/auth/install/templates/devise.rb.erb
119
140
  - lib/generators/trestle/auth/model/model_generator.rb
120
141
  - lib/trestle/auth.rb
142
+ - lib/trestle/auth/backends.rb
143
+ - lib/trestle/auth/backends/base.rb
144
+ - lib/trestle/auth/backends/basic.rb
145
+ - lib/trestle/auth/backends/devise.rb
146
+ - lib/trestle/auth/backends/warden.rb
121
147
  - lib/trestle/auth/configuration.rb
122
148
  - lib/trestle/auth/configuration/rememberable.rb
149
+ - lib/trestle/auth/configuration/warden.rb
123
150
  - lib/trestle/auth/constraint.rb
151
+ - lib/trestle/auth/controller/authentication.rb
152
+ - lib/trestle/auth/controller/locale.rb
153
+ - lib/trestle/auth/controller/time_zone.rb
124
154
  - lib/trestle/auth/controller_methods.rb
125
155
  - lib/trestle/auth/engine.rb
126
156
  - lib/trestle/auth/model_methods.rb
127
157
  - lib/trestle/auth/model_methods/rememberable.rb
128
158
  - lib/trestle/auth/null_user.rb
129
159
  - lib/trestle/auth/version.rb
160
+ - package.json
130
161
  - trestle-auth.gemspec
162
+ - webpack.config.js
163
+ - yarn.lock
131
164
  homepage: https://www.trestle.io
132
165
  licenses:
133
166
  - LGPL-3.0
134
- metadata: {}
135
- post_install_message:
167
+ metadata:
168
+ homepage_uri: https://www.trestle.io
169
+ source_code_uri: https://github.com/TrestleAdmin/trestle-auth
170
+ post_install_message:
136
171
  rdoc_options: []
137
172
  require_paths:
138
173
  - lib
@@ -140,16 +175,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
175
  requirements:
141
176
  - - ">="
142
177
  - !ruby/object:Gem::Version
143
- version: '0'
178
+ version: 2.3.0
144
179
  required_rubygems_version: !ruby/object:Gem::Requirement
145
180
  requirements:
146
181
  - - ">="
147
182
  - !ruby/object:Gem::Version
148
183
  version: '0'
149
184
  requirements: []
150
- rubyforge_project:
151
- rubygems_version: 2.7.6
152
- signing_key:
185
+ rubygems_version: 3.0.8
186
+ signing_key:
153
187
  specification_version: 4
154
188
  summary: Authentication plugin for the Trestle admin framework
155
189
  test_files: []
File without changes
@@ -1,4 +0,0 @@
1
- // This file is left as an extension point for user customization.
2
- //
3
- // It will be overridden by the similarly named file within
4
- // the app/assets folder of the Rails application.
@@ -1,13 +0,0 @@
1
- // User-defined variables
2
- @import "trestle/support";
3
- @import "auth/defaults";
4
-
5
- // 3rd party dependencies
6
- @import "trestle/bootstrap";
7
- @import "trestle/font-awesome";
8
-
9
- @import "auth/layout";
10
- @import "auth/form";
11
-
12
- // User customizations
13
- @import "trestle/custom-auth";
@@ -1,138 +0,0 @@
1
- a {
2
- color: rgba(white, 0.75);
3
- &:hover { color: white; }
4
- }
5
-
6
- .auth-header {
7
- text-align: center;
8
- margin-bottom: 20px;
9
-
10
- h1 {
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
-
15
- font-size: 24px;
16
- font-weight: 500;
17
- text-shadow: rgba(black, 0.5) 0 1px 1px;
18
-
19
- height: 60px;
20
- padding: 10px 15px;
21
- }
22
-
23
- img {
24
- max-width: 100%;
25
- max-height: 100%;
26
- }
27
-
28
- span {
29
- margin-left: 10px;
30
- }
31
- }
32
-
33
- .form-control, .input-group-addon {
34
- background: $auth-form-control-bg;
35
- border: $auth-form-control-border;
36
- }
37
-
38
- .form-control {
39
- box-shadow: none;
40
-
41
- color: $auth-form-control-color;
42
-
43
- height: auto;
44
- padding: 12px 5px;
45
-
46
- font-size: 16px;
47
-
48
- &:focus {
49
- outline-color: transparent;
50
- outline-style: none;
51
- box-shadow: none;
52
- }
53
-
54
- &::placeholder {
55
- color: $auth-form-control-placeholder;
56
- }
57
-
58
- &:-webkit-autofill {
59
- -webkit-text-fill-color: $auth-form-control-color;
60
-
61
- &, &:hover, &:focus, &:active {
62
- transition: background-color 9999999s ease-in-out 0s;
63
- }
64
- }
65
- }
66
-
67
- .input-group-addon {
68
- color: rgba(white, 0.5);
69
-
70
- &:first-child {
71
- padding-right: 5px;
72
- }
73
- }
74
-
75
- .remember-me {
76
- display: block;
77
- font-weight: normal;
78
- color: $auth-remember-me-color;
79
- background: $auth-remember-me-bg;
80
- border-radius: 5px;
81
- padding: 10px 15px;
82
- font-size: 13px;
83
- cursor: pointer;
84
-
85
- input {
86
- margin-right: 10px;
87
- margin-top: 0;
88
- vertical-align: middle;
89
- }
90
-
91
- &:hover {
92
- background: opacify($auth-remember-me-bg, 0.05);
93
- }
94
- }
95
-
96
- .btn {
97
- box-shadow: rgba(black, 0.1) 0 0 2px;
98
- padding: 12px;
99
- font-size: 16px;
100
- }
101
-
102
- .btn-primary {
103
- outline: none;
104
-
105
- color: $auth-login-btn-color;
106
- background: $auth-login-btn-bg;
107
- border: $auth-login-btn-border;
108
-
109
- &:hover {
110
- background-color: darken($auth-login-btn-bg, 2.5%);
111
- border-color: darken($auth-login-btn-border, 5%);
112
- }
113
-
114
- &:focus, &:active {
115
- background-color: darken($auth-login-btn-bg, 5%);
116
- border-color: darken($auth-login-btn-border, 10%);
117
- }
118
-
119
- &:active:focus {
120
- outline: none !important;
121
- background-color: darken($auth-login-btn-bg, 10%);
122
- border-color: darken($auth-login-btn-border, 15%);
123
- }
124
- }
125
-
126
- .form-footer {
127
- font-size: 12px;
128
- }
129
-
130
- .forgot-password {
131
- float: right;
132
- padding: 10px 5px;
133
- }
134
-
135
- .alert-danger {
136
- background: $theme-bg-texture-url fixed, $alert-danger-bg;
137
- color: white;
138
- }
@@ -1,20 +0,0 @@
1
- html, body {
2
- height: 100%;
3
- }
4
-
5
- body {
6
- -webkit-font-smoothing: antialiased;
7
-
8
- margin: 0;
9
- overflow: hidden;
10
-
11
- color: white;
12
- background: $auth-bg;
13
-
14
- display: flex;
15
- }
16
-
17
- .container {
18
- margin: auto;
19
- width: 320px;
20
- }