-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrandom_token.gemspec
35 lines (28 loc) · 1.13 KB
/
random_token.gemspec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'random_token/version'
Gem::Specification.new do |spec|
spec.name = "random_token"
spec.version = RandomToken::VERSION
spec.authors = ["Sibevin Wang"]
spec.email = ["sibevin@gmail.com"]
spec.description = %q{A simple way to generate a random token.}
spec.summary = <<-EOF
Use "gen" method to create a random token with a given length.
RandomToken.gen(8)
# "iUEFxcG2"
Some options can help to modify the token format.
RandomToken.gen(20, seed: :alphabet, friendly: true, case: :up)
# "YTHJHTXKSSXTPLARALRH"
Use string format to create a random in the particular format.
RandomToken.gen("Give me a token %8?")
# "Give me a token 6HRQZp8O"
Please see "README" to get more details.
EOF
spec.homepage = "https://github.com/sibevin/random_token"
spec.license = "MIT"
spec.files = `git ls-files`.split($/)
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]
spec.add_development_dependency 'minitest', '~> 5.0'
end