model_tokenizer 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 57403bb634f47bb5abfe3f050eaa290b84375f07
4
- data.tar.gz: 6767deb8e1e2c86daf7e04b70cdda683f929f2d2
2
+ SHA256:
3
+ metadata.gz: 672aa86401e879435a240660945075b8306ccf83e990d1447c3dbc787e66ba35
4
+ data.tar.gz: a887ae6ca318ca47fac726795b5e1fc59467d591206be8db02d0cb66732e7e64
5
5
  SHA512:
6
- metadata.gz: 386b6a9949e460a36ba1083be1c8846059b37896e09440acb46b837b502dafe0a8f19c24db2f563577d1da84931854ab341a529d50dc79d4c6a2ae17cd90cadc
7
- data.tar.gz: 980be40d675d67d17620a73cd1bb71cddb52055022f8c503e41fc0355b5f1926e0613cfe746865d17bf4f7f44138a8cfec5c9cc17405bb529bd4c860e61df69d
6
+ metadata.gz: 463018c7bd09b525838a60d4c43716f8bcdc647fc84c9ece96ae1a754fa6f2735d633d23a832b6ffa73e6d6573c75632d3c233d3d46358030ca84fac56202e1f
7
+ data.tar.gz: 18698312332ac15319b2faf7451d82c3fe08c569f671ffef3bf7c5867b176067a4c1a54badf88811f9969fa1b49006d2ead55273c702f07159bf43c014ded700
@@ -0,0 +1 @@
1
+ service_name: travis-ci
data/.gitignore CHANGED
@@ -1,6 +1,5 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
@@ -11,4 +10,5 @@
11
10
  *.so
12
11
  *.o
13
12
  *.a
13
+ *.gem
14
14
  mkmf.log
@@ -0,0 +1,15 @@
1
+ language: ruby
2
+ cache: bundler
3
+ sudo: false
4
+
5
+ rvm:
6
+ - 2.0.0
7
+
8
+ script: 'bundle exec rake'
9
+
10
+ notifications:
11
+ email:
12
+ recipients:
13
+ - adib.saad@gmail.com
14
+ on_failure: change
15
+ on_success: never
data/Gemfile CHANGED
@@ -3,4 +3,11 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in model_tokenizer.gemspec
4
4
  gemspec
5
5
 
6
- gem "rails"
6
+ group :test do
7
+ gem "bundler", "~> 1.7"
8
+ gem "rake", ">= 12.3.3"
9
+ gem "sqlite3", "< 1.4"
10
+ gem "minitest"
11
+ gem "coveralls"
12
+ end
13
+
@@ -0,0 +1,65 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ model_tokenizer (1.0.2)
5
+ activerecord (~> 4.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activemodel (4.2.11.3)
11
+ activesupport (= 4.2.11.3)
12
+ builder (~> 3.1)
13
+ activerecord (4.2.11.3)
14
+ activemodel (= 4.2.11.3)
15
+ activesupport (= 4.2.11.3)
16
+ arel (~> 6.0)
17
+ activesupport (4.2.11.3)
18
+ i18n (~> 0.7)
19
+ minitest (~> 5.1)
20
+ thread_safe (~> 0.3, >= 0.3.4)
21
+ tzinfo (~> 1.1)
22
+ arel (6.0.4)
23
+ builder (3.2.4)
24
+ concurrent-ruby (1.1.6)
25
+ coveralls (0.8.23)
26
+ json (>= 1.8, < 3)
27
+ simplecov (~> 0.16.1)
28
+ term-ansicolor (~> 1.3)
29
+ thor (>= 0.19.4, < 2.0)
30
+ tins (~> 1.6)
31
+ docile (1.3.2)
32
+ i18n (0.9.5)
33
+ concurrent-ruby (~> 1.0)
34
+ json (2.3.0)
35
+ minitest (5.14.1)
36
+ rake (13.0.1)
37
+ simplecov (0.16.1)
38
+ docile (~> 1.1)
39
+ json (>= 1.8, < 3)
40
+ simplecov-html (~> 0.10.0)
41
+ simplecov-html (0.10.2)
42
+ sqlite3 (1.3.13)
43
+ sync (0.5.0)
44
+ term-ansicolor (1.7.1)
45
+ tins (~> 1.0)
46
+ thor (1.0.1)
47
+ thread_safe (0.3.6)
48
+ tins (1.25.0)
49
+ sync
50
+ tzinfo (1.2.7)
51
+ thread_safe (~> 0.1)
52
+
53
+ PLATFORMS
54
+ ruby
55
+
56
+ DEPENDENCIES
57
+ bundler (~> 1.7)
58
+ coveralls
59
+ minitest
60
+ model_tokenizer!
61
+ rake (>= 12.3.3)
62
+ sqlite3 (< 1.4)
63
+
64
+ BUNDLED WITH
65
+ 1.17.2
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # ModelTokenizer
2
2
 
3
+ [![Build Status](https://travis-ci.org/adibsaad/model_tokenizer.svg?branch=master)](https://travis-ci.org/adibsaad/model_tokenizer)
4
+ [![Coverage Status](https://coveralls.io/repos/adibsaad/model_tokenizer/badge.svg)](https://coveralls.io/r/adibsaad/model_tokenizer)
5
+
3
6
  Generates random tokens that models can be accessed by. Instead of
4
7
 
5
8
  ```
@@ -30,33 +33,25 @@ Or install it yourself as:
30
33
 
31
34
  ## Usage
32
35
 
33
- 1. Run
34
-
35
- $ rails g model_tokenizer MODEL_NAME [field:type field:type ... ]
36
-
37
- to create a new tokenized model. If the model already exists, ModelTokenizer will integrate into it by injecting the following code
38
-
39
- ```ruby
40
- extend ModelTokenizer
41
- has_token
42
- ```
43
-
44
- The appropriate migration will also be created, which will create the ```token``` field and its associated unique index.
45
-
46
- The default token length is 14, but you can change it (no lower than 8)
36
+ Run
47
37
 
48
- ```ruby
49
- has_token :length => 16
50
- ```
38
+ $ rails g model_tokenizer MODEL_NAME [field:type field:type ... ]
51
39
 
52
- 2. In the model file, make sure the following line is there:
40
+ to create a new tokenized model. If the model already exists, ModelTokenizer will integrate into it by injecting the following code
53
41
 
54
- ```ruby
42
+ ```ruby
43
+ extend ModelTokenizer
44
+ has_token
55
45
  self.primary_key = :token
56
- ```
46
+ ```
47
+
48
+ The appropriate migration will also be created, which will create the ```token``` field and its associated unique index.
57
49
 
58
- The generator will automatically inject this, but if you're doing something weird that involves manually installing ModelTokenizer without using the generators, make sure the aforementioned line exists.
50
+ The default token length is 14, but you can change it (no lower than 8)
59
51
 
52
+ ```ruby
53
+ has_token :length => 16
54
+ ```
60
55
 
61
56
  ## Notes
62
57
 
@@ -1,3 +1,3 @@
1
1
  module ModelTokenizer
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -20,9 +20,5 @@ Gem::Specification.new do |spec|
20
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.7"
24
- spec.add_development_dependency "rake", "~> 10.0"
25
- spec.add_development_dependency "activerecord", "~> 4.0"
26
- spec.add_development_dependency "sqlite3"
27
- spec.add_development_dependency "minitest"
23
+ spec.add_dependency("activerecord", "~> 4.0")
28
24
  end
@@ -1,8 +1,6 @@
1
1
  require "bundler/setup"
2
- # if ENV['COVERAGE']
3
- # require 'coveralls'
4
- # Coveralls.wear!
5
- # end
2
+ require 'coveralls'
3
+ Coveralls.wear!
6
4
 
7
5
  require "active_record"
8
6
 
metadata CHANGED
@@ -1,43 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_tokenizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adib Saad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-14 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.7'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.7'
27
- - !ruby/object:Gem::Dependency
28
- name: rake
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '10.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '10.0'
41
13
  - !ruby/object:Gem::Dependency
42
14
  name: activerecord
43
15
  requirement: !ruby/object:Gem::Requirement
@@ -45,41 +17,13 @@ dependencies:
45
17
  - - "~>"
46
18
  - !ruby/object:Gem::Version
47
19
  version: '4.0'
48
- type: :development
20
+ type: :runtime
49
21
  prerelease: false
50
22
  version_requirements: !ruby/object:Gem::Requirement
51
23
  requirements:
52
24
  - - "~>"
53
25
  - !ruby/object:Gem::Version
54
26
  version: '4.0'
55
- - !ruby/object:Gem::Dependency
56
- name: sqlite3
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest
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
27
  description: |-
84
28
  ModelTokenizer creates random tokens to be
85
29
  used as primary keys for ActiveRecord objects
@@ -89,8 +33,11 @@ executables: []
89
33
  extensions: []
90
34
  extra_rdoc_files: []
91
35
  files:
36
+ - ".coveralls.yml"
92
37
  - ".gitignore"
38
+ - ".travis.yml"
93
39
  - Gemfile
40
+ - Gemfile.lock
94
41
  - LICENSE.txt
95
42
  - README.md
96
43
  - Rakefile
@@ -124,8 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
71
  - !ruby/object:Gem::Version
125
72
  version: '0'
126
73
  requirements: []
127
- rubyforge_project:
128
- rubygems_version: 2.2.2
74
+ rubygems_version: 3.0.3
129
75
  signing_key:
130
76
  specification_version: 4
131
77
  summary: Random token generator for Rails models
@@ -134,4 +80,3 @@ test_files:
134
80
  - test/helper.rb
135
81
  - test/schema.rb
136
82
  - test/token_generator_test.rb
137
- has_rdoc: