has_a_token 0.3.0

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b8491d9a4c3075b49a847c5a08f6ba5fcbf024cd
4
+ data.tar.gz: 0c03816f73b77e85ddc57803b5396041cdb4412e
5
+ SHA512:
6
+ metadata.gz: f1cfb8c4c0359d7cd768531ecc01f13ddae17c2df935caf31931bbc891869125353c42c9a2c5422abf29fa514a14e0e1ef00f9e2a93c42b6f77d8d8124a176e0
7
+ data.tar.gz: 88806e63ce3b213416e22ce7005fb4e3bbd8923ecb34acb69a0cef54d12eae814531a9595dc01e15855382bb513756f951f558a345aee1d4b24032a81128d737
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ *.bundle
11
+ *.so
12
+ *.o
13
+ *.a
14
+ mkmf.log
data/.rubocop.yml ADDED
@@ -0,0 +1,65 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'lib/has_a_token/version.rb'
4
+ - 'Guardfile'
5
+ DisplayStyleGuide: true
6
+ RunRailsCops: true
7
+
8
+ Metrics/LineLength:
9
+ Max: 100
10
+
11
+ Style/AndOr:
12
+ EnforcedStyle: conditionals
13
+
14
+ Style/EmptyElse:
15
+ EnforcedStyle: empty
16
+
17
+ Style/IndentationConsistency:
18
+ EnforcedStyle: normal
19
+
20
+ Style/RegexpLiteral:
21
+ EnforcedStyle: mixed
22
+
23
+ Style/StringLiterals:
24
+ EnforcedStyle: double_quotes
25
+
26
+ Metrics/ClassLength:
27
+ Max: 200 # lenient
28
+
29
+ Metrics/ModuleLength:
30
+ Max: 200 # lenient
31
+
32
+ Style/CommandLiteral:
33
+ Enabled: false
34
+
35
+ Style/EmptyLinesAroundBlockBody:
36
+ Enabled: false
37
+
38
+ Style/EmptyLinesAroundClassBody:
39
+ Enabled: false
40
+
41
+ Style/EmptyLinesAroundModuleBody:
42
+ Enabled: false
43
+
44
+ Style/MethodDefParentheses:
45
+ Enabled: false
46
+
47
+ Style/SingleLineBlockParams:
48
+ Enabled: false
49
+
50
+ Style/SingleLineMethods:
51
+ Enabled: false
52
+
53
+ Metrics/MethodLength:
54
+ Enabled: false
55
+
56
+ Metrics/ParameterLists:
57
+ CountKeywordArgs: false
58
+
59
+ Style/StringLiterals:
60
+ Enabled: false
61
+ EnforcedStyle: double_quotes
62
+
63
+ Style/StringLiteralsInInterpolation:
64
+ Enabled: false
65
+ EnforcedStyle: double_quotes
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 2.2.1
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in has_a_token.gemspec
4
+ gemspec
data/Guardfile ADDED
@@ -0,0 +1,55 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features)
6
+
7
+ ## Uncomment to clear the screen before every task
8
+ # clearing :on
9
+
10
+ ## Guard internally checks for changes in the Guardfile and exits.
11
+ ## If you want Guard to automatically start up again, run guard in a
12
+ ## shell loop, e.g.:
13
+ ##
14
+ ## $ while bundle exec guard; do echo "Restarting Guard..."; done
15
+ ##
16
+ ## Note: if you are using the `directories` clause above and you are not
17
+ ## watching the project directory ('.'), then you will want to move
18
+ ## the Guardfile to a watched dir and symlink it back, e.g.
19
+ #
20
+ # $ mkdir config
21
+ # $ mv Guardfile config/
22
+ # $ ln -s config/Guardfile .
23
+ #
24
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
25
+
26
+ guard :minitest do
27
+ # with Minitest::Unit
28
+ watch(%r{^test/(.*)\/?test_(.*)\.rb$})
29
+ watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
30
+ watch(%r{^test/test_helper\.rb$}) { 'test' }
31
+
32
+ # with Minitest::Spec
33
+ # watch(%r{^spec/(.*)_spec\.rb$})
34
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
35
+ # watch(%r{^spec/spec_helper\.rb$}) { 'spec' }
36
+
37
+ # Rails 4
38
+ # watch(%r{^app/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
39
+ # watch(%r{^app/controllers/application_controller\.rb$}) { 'test/controllers' }
40
+ # watch(%r{^app/controllers/(.+)_controller\.rb$}) { |m| "test/integration/#{m[1]}_test.rb" }
41
+ # watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
42
+ # watch(%r{^lib/(.+)\.rb$}) { |m| "test/lib/#{m[1]}_test.rb" }
43
+ # watch(%r{^test/.+_test\.rb$})
44
+ # watch(%r{^test/test_helper\.rb$}) { 'test' }
45
+
46
+ # Rails < 4
47
+ # watch(%r{^app/controllers/(.*)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
48
+ # watch(%r{^app/helpers/(.*)\.rb$}) { |m| "test/helpers/#{m[1]}_test.rb" }
49
+ # watch(%r{^app/models/(.*)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
50
+ end
51
+
52
+ guard :rubocop do
53
+ watch(%r{.+\.rb$})
54
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
55
+ end
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 James Phillips
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # HasAToken
2
+
3
+ Generate simple/complex/readable tokens in Rails models.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'has_a_token'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ ## Usage
18
+
19
+ Basic usage:
20
+
21
+ ```ruby
22
+ # Setup your model
23
+ class User < ActiveRecord::Base
24
+ include HasAToken::Concern
25
+
26
+ # ...
27
+
28
+ has_a_token :invite_code, charset: :unambiguous # generates an easily readable token
29
+ has_a_token :password_reset, length: 32 # generates a 32 character secure token
30
+
31
+ # ...
32
+
33
+ # You can use the generate_* methods to fetch a token when records are created
34
+ before_create :generate_invite_code
35
+ before_save :generate_password_reset_token, if: "password_reset_token.nil?"
36
+
37
+ # ...
38
+ end
39
+
40
+ # Reset a token
41
+ user = User
42
+ user.reset_password_reset_token! # creates a new token and persists the changes
43
+ ```
44
+
45
+ ## Contributing
46
+
47
+ 1. Fork it ( https://github.com/[my-github-username]/has_a_token/fork )
48
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
49
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
50
+ 4. Push to the branch (`git push origin my-new-feature`)
51
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'has_a_token/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "has_a_token"
8
+ spec.version = HasAToken::VERSION
9
+ spec.authors = ["James Phillips"]
10
+ spec.email = ["jamesdphillips@gmail.com"]
11
+ spec.summary = "Generate simple/complex/readable tokens in Rails models"
12
+ spec.homepage = "https://www.github.com/jamesdphillips/has_a_token"
13
+ spec.license = "MIT"
14
+
15
+ spec.files = `git ls-files -z`.split("\x0")
16
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
+ spec.test_files = spec.files.grep(%r{^(test)/})
18
+ spec.require_paths = ["lib"]
19
+
20
+ spec.add_dependency "contracts", "~> 0.9.0"
21
+ spec.add_development_dependency "bundler", "~> 1.7"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_development_dependency "minitest", "~> 5.0"
24
+ spec.add_development_dependency "simplecov-html"
25
+ spec.add_development_dependency "coveralls"
26
+ spec.add_development_dependency "rubocop"
27
+ spec.add_development_dependency "guard"
28
+ spec.add_development_dependency "guard-minitest"
29
+ spec.add_development_dependency "guard-rubocop"
30
+ end
@@ -0,0 +1,50 @@
1
+ require "active_support/all"
2
+
3
+ module HasAToken
4
+
5
+ # Model concern
6
+ # @example unambiguous token
7
+ # class Workspace < ActiveRecord::Base
8
+ # # ...
9
+ # has_a_token :invite_code, charset: :unambiguous
10
+ # has_a_token :password_reset_token, length: 32
11
+ module Concern
12
+ extend ActiveSupport::Concern
13
+
14
+ module ClassMethods # rubocop:disable all
15
+ # @param name [Symbol] name of the column
16
+ # @param opts [Hash] generator options
17
+ # @option opts [Symbol] :charset
18
+ # @option opts [Symbol] :length
19
+ # @example
20
+ # has_a_token :invite_code, charset: unambiguous # generates easily readable token
21
+ # has_a_token :password_reset, length: 32 # generates a secure token of 32 length
22
+ #
23
+ # before_create :generate_invite_code
24
+ # before_save :generate_password_reset_token, if: "password_reset_token.nil?"
25
+ #
26
+ # user = User.first
27
+ # user.reset_password_reset_token!
28
+ # @see https://github.com/jamesdphillips/has_a_token/blob/master/lib/has_a_token/generator.rb
29
+ def has_a_token(name = :token, opts = {}) # rubocop:disable all
30
+ if String(name).match(/(_token|_code)$/)
31
+ method_name = name.to_s
32
+ else
33
+ method_name = "#{name}_token"
34
+ end
35
+
36
+ define_method "generate_#{method_name}" do
37
+ self[method_name] = loop do
38
+ random_token = HasAToken::Generator.new(opts).generate
39
+ break random_token unless self.class.exists?(Hash[method_name, random_token])
40
+ end
41
+ end
42
+
43
+ define_method "reset_#{method_name}!" do
44
+ send("generate_#{method_name}")
45
+ save!
46
+ end
47
+ end
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,60 @@
1
+ module HasAToken
2
+
3
+ # Configurable generator for build unique tokens
4
+ class Generator
5
+ include Contracts
6
+
7
+ UNAMBIGUOUS_CHARSET = %w( 2 3 4 6 7 9 A C D E F G H J K M N P Q R T V W X Y Z ).freeze
8
+
9
+ # @option [Symbol] :charset charset to token
10
+ # :unambiguous token will only contain unambiguous letters and numbers
11
+ # :urlsafe_base64 will return base64 token with '/' & '+' replaced w/ '-' & '_'
12
+ # @option [Fixnum] :length of the resulting token; defaults to 24 (or 8 for unambiguous sets)
13
+ def initialize(charset: :urlsafe_base64, length: nil)
14
+ @length = length || (charset == :unambiguous ? 5 : 24)
15
+ @charset = charset
16
+ end
17
+
18
+ # Generate a unique token
19
+ #
20
+ # @return [String] unique token
21
+ Contract None => String
22
+ def generate
23
+ case @charset
24
+ when :unambiguous
25
+ generate_unambiguous_token
26
+ else
27
+ generate_secure_token
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ Contract None => String
34
+ def generate_unambiguous_token
35
+ # Fetch a random set of bytes
36
+ randset = SecureRandom.random_number(UNAMBIGUOUS_CHARSET.size**@length)
37
+
38
+ # Assign to ambiguous charset
39
+ @length
40
+ .times
41
+ .map do |i|
42
+ UNAMBIGUOUS_CHARSET.to_a[
43
+ (randset / UNAMBIGUOUS_CHARSET.size**i) % UNAMBIGUOUS_CHARSET.size
44
+ ]
45
+ end.join
46
+ end
47
+
48
+ Contract None => String
49
+ def generate_secure_token
50
+ case @charset
51
+ when :hex
52
+ SecureRandom.send(@charset, Integer(@length * Rational(1, 2)))
53
+ when :urlsafe_base64, :base64
54
+ SecureRandom.send(@charset, Integer(@length / Rational(4, 3)))
55
+ else
56
+ fail ArgumentError, "Unsupported charset #{@charset}"
57
+ end
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,3 @@
1
+ module HasAToken
2
+ VERSION = "0.3.0"
3
+ end
@@ -0,0 +1,9 @@
1
+ require "contracts"
2
+
3
+ require "has_a_token/version"
4
+ require "has_a_token/generator"
5
+ require "has_a_token/concern" if defined?(Rails)
6
+
7
+ module HasAToken
8
+ # ...
9
+ end
@@ -0,0 +1,17 @@
1
+ require "simplecov"
2
+ require "simplecov-html"
3
+ require "coveralls"
4
+
5
+ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
6
+ SimpleCov::Formatter::HTMLFormatter,
7
+ Coveralls::SimpleCov::Formatter,
8
+ ]
9
+
10
+ SimpleCov.start do
11
+ add_filter "test/"
12
+ end
13
+
14
+ require "minitest"
15
+ require "minitest/unit"
16
+ require "minitest/autorun"
17
+ require "has_a_token"
@@ -0,0 +1,32 @@
1
+ require "test_helper"
2
+
3
+ # Test Generator class
4
+ class GeneratorTests < Minitest::Test
5
+ def test_unambiguous_length
6
+ assert HasAToken::Generator.new(charset: :unambiguous, length: 8).generate.length == 8
7
+ assert HasAToken::Generator.new(charset: :unambiguous, length: 10).generate.length == 10
8
+ end
9
+
10
+ def test_unambiguous_charset
11
+ SecureRandom.stub :random_number, 456_975 do # ZZZZ
12
+ assert_instance_of String, HasAToken::Generator.new(charset: :unambiguous, length: 1).generate
13
+ assert_equal "ZZZZ", HasAToken::Generator.new(charset: :unambiguous, length: 4).generate
14
+ end
15
+ end
16
+
17
+ def test_secure_token_length
18
+ assert HasAToken::Generator.new(charset: :urlsafe_base64, length: 8).generate.length == 8
19
+ assert HasAToken::Generator.new(charset: :base64, length: 8).generate.length == 8
20
+ assert HasAToken::Generator.new(charset: :hex, length: 8).generate.length == 8
21
+ end
22
+
23
+ def test_secure_token_charset
24
+ assert_raises(ArgumentError) { HasAToken::Generator.new(charset: :squidward).generate }
25
+ SecureRandom.stub :base64, "ABCD" do
26
+ assert_equal "ABCD", HasAToken::Generator.new(charset: :base64).generate
27
+ end
28
+ SecureRandom.stub :hex, "1234" do
29
+ assert_equal "1234", HasAToken::Generator.new(charset: :hex).generate
30
+ end
31
+ end
32
+ end
metadata ADDED
@@ -0,0 +1,201 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: has_a_token
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ platform: ruby
6
+ authors:
7
+ - James Phillips
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: contracts
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.9.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.7'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.7'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '5.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '5.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov-html
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rubocop
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: guard-minitest
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: guard-rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ description:
154
+ email:
155
+ - jamesdphillips@gmail.com
156
+ executables: []
157
+ extensions: []
158
+ extra_rdoc_files: []
159
+ files:
160
+ - ".gitignore"
161
+ - ".rubocop.yml"
162
+ - ".ruby-version"
163
+ - Gemfile
164
+ - Guardfile
165
+ - LICENSE.txt
166
+ - README.md
167
+ - Rakefile
168
+ - has_a_token.gemspec
169
+ - lib/has_a_token.rb
170
+ - lib/has_a_token/concern.rb
171
+ - lib/has_a_token/generator.rb
172
+ - lib/has_a_token/version.rb
173
+ - test/test_helper.rb
174
+ - test/test_token_generator.rb
175
+ homepage: https://www.github.com/jamesdphillips/has_a_token
176
+ licenses:
177
+ - MIT
178
+ metadata: {}
179
+ post_install_message:
180
+ rdoc_options: []
181
+ require_paths:
182
+ - lib
183
+ required_ruby_version: !ruby/object:Gem::Requirement
184
+ requirements:
185
+ - - ">="
186
+ - !ruby/object:Gem::Version
187
+ version: '0'
188
+ required_rubygems_version: !ruby/object:Gem::Requirement
189
+ requirements:
190
+ - - ">="
191
+ - !ruby/object:Gem::Version
192
+ version: '0'
193
+ requirements: []
194
+ rubyforge_project:
195
+ rubygems_version: 2.2.2
196
+ signing_key:
197
+ specification_version: 4
198
+ summary: Generate simple/complex/readable tokens in Rails models
199
+ test_files:
200
+ - test/test_helper.rb
201
+ - test/test_token_generator.rb