da-has_token 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +5 -5
- data/lib/da-has_token/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +40 -0
- metadata +22 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c685fa877fce595d8e934e6e7f31fd39be5291c8350270d199401ea31f822af5
|
4
|
+
data.tar.gz: 319d6cbc07bdab771b7b6310f92270312611321e036e5370fdc7dc863aa1b895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 374b6b6df1aba8bb9fb5462dad5228094aafd73649dc0b734bbee68a5f903c89ff7e468bdead6042e1bf6ed925fb352380895a56cb3646a4970e78327ac7e87d
|
7
|
+
data.tar.gz: c3af306c769934374d81f3ec2d25c3939c32e1a4c2c295b3676916fdd72220a5b1e5dc13a8c45ec4837ed23dc0a46534b59095f4b261f28d89c38a54c32cab48
|
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# da-has_token
|
2
2
|
|
3
|
-
A token generator for Rails 3 and Active Record.
|
3
|
+
A token generator for Ruby on Rails 3 and Active Record.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Put the following gem requirement in your `Gemfile`:
|
8
8
|
|
9
|
-
gem "da-has_token"
|
9
|
+
gem "da-has_token"
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
@@ -18,10 +18,10 @@ class Entry < ActiveRecord::Base
|
|
18
18
|
has_token
|
19
19
|
|
20
20
|
# Use custom token size
|
21
|
-
# has_token :
|
21
|
+
# has_token size: 25
|
22
22
|
|
23
23
|
# Use custom set of characters
|
24
|
-
# has_token :
|
24
|
+
# has_token chars: "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
25
25
|
end
|
26
26
|
```
|
27
27
|
|
@@ -31,4 +31,4 @@ A `NoMoreTokens` error is raised if a new unique token can not be generated with
|
|
31
31
|
|
32
32
|
There are similar plugins providing more features configuration options, e.g. https://github.com/mindbox/has_token.
|
33
33
|
|
34
|
-
This project is released under the MIT license.
|
34
|
+
This project is released under the MIT license.
|
data/lib/da-has_token/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,40 @@
|
|
1
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
2
|
+
-------------------------------------------
|
3
|
+
HasTokenTest: test_no_more_tokens_exception
|
4
|
+
-------------------------------------------
|
5
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
6
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
7
|
+
----------------------------
|
8
|
+
HasTokenTest: test_new_token
|
9
|
+
----------------------------
|
10
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
11
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
12
|
+
---------------------------------
|
13
|
+
HasTokenTest: test_new_token_size
|
14
|
+
---------------------------------
|
15
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
16
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
17
|
+
----------------------------------
|
18
|
+
HasTokenTest: test_new_token_chars
|
19
|
+
----------------------------------
|
20
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
21
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
22
|
+
---------------------------------
|
23
|
+
HasTokenTest: test_new_token_size
|
24
|
+
---------------------------------
|
25
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
26
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
27
|
+
----------------------------
|
28
|
+
HasTokenTest: test_new_token
|
29
|
+
----------------------------
|
30
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
31
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
32
|
+
----------------------------------
|
33
|
+
HasTokenTest: test_new_token_chars
|
34
|
+
----------------------------------
|
35
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
36
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[36mbegin transaction[0m
|
37
|
+
-------------------------------------------
|
38
|
+
HasTokenTest: test_no_more_tokens_exception
|
39
|
+
-------------------------------------------
|
40
|
+
[1m[36mTRANSACTION (0.0ms)[0m [1m[31mrollback transaction[0m
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: da-has_token
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Daschek
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -18,9 +18,6 @@ dependencies:
|
|
18
18
|
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '3.0'
|
21
|
-
- - "<"
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: '5.0'
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -28,9 +25,6 @@ dependencies:
|
|
28
25
|
- - ">="
|
29
26
|
- !ruby/object:Gem::Version
|
30
27
|
version: '3.0'
|
31
|
-
- - "<"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '5.0'
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: sqlite3
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -84,6 +78,8 @@ files:
|
|
84
78
|
- test/dummy/config/initializers/wrap_parameters.rb
|
85
79
|
- test/dummy/config/locales/en.yml
|
86
80
|
- test/dummy/config/routes.rb
|
81
|
+
- test/dummy/db/test.sqlite3
|
82
|
+
- test/dummy/log/test.log
|
87
83
|
- test/dummy/public/404.html
|
88
84
|
- test/dummy/public/422.html
|
89
85
|
- test/dummy/public/500.html
|
@@ -109,38 +105,39 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
105
|
- !ruby/object:Gem::Version
|
110
106
|
version: '0'
|
111
107
|
requirements: []
|
112
|
-
|
113
|
-
rubygems_version: 2.2.2
|
108
|
+
rubygems_version: 3.1.6
|
114
109
|
signing_key:
|
115
110
|
specification_version: 4
|
116
111
|
summary: Simple has_token plugin for Rails (Active Record).
|
117
112
|
test_files:
|
113
|
+
- test/dummy/app/controllers/application_controller.rb
|
114
|
+
- test/dummy/app/views/layouts/application.html.erb
|
118
115
|
- test/dummy/app/assets/javascripts/application.js
|
119
116
|
- test/dummy/app/assets/stylesheets/application.css
|
120
|
-
- test/dummy/app/controllers/application_controller.rb
|
121
117
|
- test/dummy/app/helpers/application_helper.rb
|
122
|
-
- test/dummy/
|
123
|
-
- test/dummy/config/
|
124
|
-
- test/dummy/config/boot.rb
|
125
|
-
- test/dummy/config/database.yml
|
126
|
-
- test/dummy/config/environment.rb
|
127
|
-
- test/dummy/config/environments/development.rb
|
118
|
+
- test/dummy/config/routes.rb
|
119
|
+
- test/dummy/config/locales/en.yml
|
128
120
|
- test/dummy/config/environments/production.rb
|
121
|
+
- test/dummy/config/environments/development.rb
|
129
122
|
- test/dummy/config/environments/test.rb
|
123
|
+
- test/dummy/config/environment.rb
|
124
|
+
- test/dummy/config/application.rb
|
125
|
+
- test/dummy/config/database.yml
|
126
|
+
- test/dummy/config/boot.rb
|
130
127
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
131
|
-
- test/dummy/config/initializers/inflections.rb
|
132
128
|
- test/dummy/config/initializers/mime_types.rb
|
133
|
-
- test/dummy/config/initializers/secret_token.rb
|
134
129
|
- test/dummy/config/initializers/session_store.rb
|
135
130
|
- test/dummy/config/initializers/wrap_parameters.rb
|
136
|
-
- test/dummy/config/
|
137
|
-
- test/dummy/config/
|
131
|
+
- test/dummy/config/initializers/secret_token.rb
|
132
|
+
- test/dummy/config/initializers/inflections.rb
|
138
133
|
- test/dummy/config.ru
|
139
|
-
- test/dummy/
|
134
|
+
- test/dummy/script/rails
|
135
|
+
- test/dummy/Rakefile
|
136
|
+
- test/dummy/public/favicon.ico
|
140
137
|
- test/dummy/public/422.html
|
141
138
|
- test/dummy/public/500.html
|
142
|
-
- test/dummy/public/
|
143
|
-
- test/dummy/
|
144
|
-
- test/dummy/
|
139
|
+
- test/dummy/public/404.html
|
140
|
+
- test/dummy/db/test.sqlite3
|
141
|
+
- test/dummy/log/test.log
|
145
142
|
- test/has_token_test.rb
|
146
143
|
- test/test_helper.rb
|