simple_sessions 0.2.0 → 0.2.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 +4 -4
- data/README.md +2 -0
- data/lib/generators/advanced/advanced_generator.rb +4 -1
- data/lib/simple_sessions/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ff7b951ac9b2f940258e3d3f47c1ef3f347543f3cd6bfd82549ae3af98c47ce
|
4
|
+
data.tar.gz: 97fcf7d0ffede5ebcc28a31a26a38a55d80e0e0ef9e5b54d1ca225b9ecd9c9f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc915c2d49dcbdf08eefc9f309b465f93db9978632bdcf383287904ab80267cec62edc4e84111149e754227cf889a0b4b0db64776beb983df7d8c28315b48220
|
7
|
+
data.tar.gz: c53ac7bbc5ce213831d61d8d3ef23697b4eb601471a5220683850a535f5fadcfaa829af280a5072318952ad81323f03693b8e9624dcb093cb8caa0d617223f03
|
data/README.md
CHANGED
@@ -10,6 +10,8 @@ After running `bundle update` and `bundle` you should be able to run:
|
|
10
10
|
|
11
11
|
> `rails g simple NAME` *or* `rails g advanced NAME`
|
12
12
|
|
13
|
+
I strongly recommend NOT to run the programm if you already have a session controller. This will generate conflicts with the files that are going to be created.
|
14
|
+
|
13
15
|
## How does it work?
|
14
16
|
|
15
17
|
It will automatically generate the view, controller, helper, test (for this version there are no automatic tests!), routes in your config/routes.rb and add the SessionsHelper to your ApplicationController.
|
@@ -92,6 +92,9 @@ end
|
|
92
92
|
include SessionsHelper
|
93
93
|
RUBY
|
94
94
|
end
|
95
|
+
end
|
96
|
+
|
97
|
+
def inject_user
|
95
98
|
inject_into_file "app/models/#{file_name.downcase}.rb", after: "class #{file_name.capitalize} < ApplicationRecord\n" do <<-'RUBY'
|
96
99
|
attr_accessor :remember_token
|
97
100
|
############
|
@@ -105,7 +108,7 @@ end
|
|
105
108
|
BCrypt::Password.new(remember_digest).is_password?(remember_token)
|
106
109
|
end
|
107
110
|
############
|
108
|
-
|
111
|
+
RUBY
|
109
112
|
end
|
110
113
|
end
|
111
114
|
|