web-utils 0.0.4 → 0.0.5
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 +0 -7
- data/lib/web_utils.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6888ae28ec9b1db76faa21a4cfbe1b26a8704802
|
4
|
+
data.tar.gz: 4644b857b3a97e1a7d5c74dc1deec0e38ada30a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 891c7dad402974ecef9574be2b9c185a5aefec9a914169ac453d7c0af233b890e2a8ee050228fe47823459c9cac76bfafda26c2c2b0b301385af8b4481242528
|
7
|
+
data.tar.gz: '092bb89b176b06a8a6ff84438fa86ae2e2d4b02b4f343fc917ee17d06fac3732674be4e75273d6480c9a88216e27d60934b1a87b006bd801632ea0685dcab34b'
|
data/README.md
CHANGED
@@ -161,13 +161,6 @@ The second argument is the list of things you want to typecast.
|
|
161
161
|
By default there is everything, but if you only want to typecast
|
162
162
|
integers and floats, you can pass `[:int, :float]`.
|
163
163
|
|
164
|
-
`generate_random_id(size)`
|
165
|
-
--------------------------
|
166
|
-
|
167
|
-
Like the name suggests, it generates a random string of
|
168
|
-
only letters and numbers. If you don't provide a size,
|
169
|
-
it defaults to 16.
|
170
|
-
|
171
164
|
`nl2br(string, br="<br>")`
|
172
165
|
--------------------------
|
173
166
|
|
data/lib/web_utils.rb
CHANGED
@@ -5,7 +5,7 @@ require 'uri'
|
|
5
5
|
|
6
6
|
module WebUtils
|
7
7
|
|
8
|
-
VERSION = '0.0.
|
8
|
+
VERSION = '0.0.5'
|
9
9
|
|
10
10
|
# Most methods are supposed to be as simple as possible
|
11
11
|
# and just cover most cases.
|
@@ -174,6 +174,7 @@ module WebUtils
|
|
174
174
|
ID_CHARS = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
|
175
175
|
ID_SIZE = 16
|
176
176
|
def generate_random_id size=ID_SIZE
|
177
|
+
warn "WebUtils::generate_random_id is deprecated. Use standard SecureRandom instead."
|
177
178
|
id = ''
|
178
179
|
size.times{id << ID_CHARS[rand(ID_CHARS.size)]}
|
179
180
|
id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mickael Riga
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.6.
|
89
|
+
rubygems_version: 2.6.13
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Web Utils
|