uuidable 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6bef2a8c5b3ba999fc584d96ab54ca6ea9bfef1f
4
- data.tar.gz: cebd3fe34711866eb84f227f0fd41f7b3ffe7d87
2
+ SHA256:
3
+ metadata.gz: 07b1e33134d28ef0fa3301eee86b2ebc3e5141dbd79102ab76b136daed10ad30
4
+ data.tar.gz: d2a6dd5a25ebef6024622e75e79d30990ba16bc647f2efce766ebe56c8b21db8
5
5
  SHA512:
6
- metadata.gz: 9c3e598c79ecfa411932a1b272e31b88e487939e57b0205e08f8b00b32259389a391cce265cea8da36ff716d46f60647a3170b42c8096c662796dceb552fd7d5
7
- data.tar.gz: b3dfd81d70a19fa9243f1268107aa077c4cbbe906ead773bfb414f53bff62ecfe174ae00682b4b6201d15aaf3992c282dffa28a990a8486b43a3aa8e0cea724a
6
+ metadata.gz: e9ee36b33cad5dbe69bf3a942e642efe3bb0ed8da31cd3814e567b22e04a78ae27058394fceda3740672c12a0190c120261b07b4a3ceeacd2f870b4ac3231f37
7
+ data.tar.gz: 3e766c2882808b4440e56924f86abcf6c3a120e384f5781a331d43c31d743330e3670b40cbfc10f7b66c392a65b6f376bbe496e7620ec0519fcccb49028e97d1
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/
data/Gemfile.lock ADDED
@@ -0,0 +1,114 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ uuidable (0.2.2)
5
+ activerecord (>= 4.2, < 5.1)
6
+ uuidtools (>= 2.1, < 3)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activemodel (5.0.6)
12
+ activesupport (= 5.0.6)
13
+ activerecord (5.0.6)
14
+ activemodel (= 5.0.6)
15
+ activesupport (= 5.0.6)
16
+ arel (~> 7.0)
17
+ activesupport (5.0.6)
18
+ concurrent-ruby (~> 1.0, >= 1.0.2)
19
+ i18n (~> 0.7)
20
+ minitest (~> 5.1)
21
+ tzinfo (~> 1.1)
22
+ addressable (2.4.0)
23
+ arel (7.1.4)
24
+ ast (2.3.0)
25
+ backports (3.6.8)
26
+ concurrent-ruby (1.0.5)
27
+ diff-lcs (1.2.5)
28
+ ethon (0.8.1)
29
+ ffi (>= 1.3.0)
30
+ faraday (0.9.2)
31
+ multipart-post (>= 1.2, < 3)
32
+ faraday_middleware (0.10.0)
33
+ faraday (>= 0.7.4, < 0.10)
34
+ ffi (1.9.10)
35
+ gh (0.14.0)
36
+ addressable
37
+ backports
38
+ faraday (~> 0.8)
39
+ multi_json (~> 1.0)
40
+ net-http-persistent (>= 2.7)
41
+ net-http-pipeline
42
+ highline (1.7.8)
43
+ i18n (0.9.1)
44
+ concurrent-ruby (~> 1.0)
45
+ json (1.8.3)
46
+ launchy (2.4.3)
47
+ addressable (~> 2.3)
48
+ minitest (5.10.3)
49
+ multi_json (1.11.2)
50
+ multipart-post (2.0.0)
51
+ net-http-persistent (2.9.4)
52
+ net-http-pipeline (1.0.1)
53
+ parallel (1.12.0)
54
+ parser (2.4.0.2)
55
+ ast (~> 2.3)
56
+ powerpack (0.1.1)
57
+ pusher-client (0.6.2)
58
+ json
59
+ websocket (~> 1.0)
60
+ rainbow (2.2.2)
61
+ rake
62
+ rake (10.5.0)
63
+ rspec (3.4.0)
64
+ rspec-core (~> 3.4.0)
65
+ rspec-expectations (~> 3.4.0)
66
+ rspec-mocks (~> 3.4.0)
67
+ rspec-core (3.4.3)
68
+ rspec-support (~> 3.4.0)
69
+ rspec-expectations (3.4.0)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.4.0)
72
+ rspec-mocks (3.4.1)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.4.0)
75
+ rspec-support (3.4.1)
76
+ rubocop (0.50.0)
77
+ parallel (~> 1.10)
78
+ parser (>= 2.3.3.1, < 3.0)
79
+ powerpack (~> 0.1)
80
+ rainbow (>= 2.2.2, < 3.0)
81
+ ruby-progressbar (~> 1.7)
82
+ unicode-display_width (~> 1.0, >= 1.0.1)
83
+ ruby-progressbar (1.9.0)
84
+ thread_safe (0.3.6)
85
+ travis (1.8.2)
86
+ backports
87
+ faraday (~> 0.9)
88
+ faraday_middleware (~> 0.9, >= 0.9.1)
89
+ gh (~> 0.13)
90
+ highline (~> 1.6)
91
+ launchy (~> 2.1)
92
+ pusher-client (~> 0.4)
93
+ typhoeus (~> 0.6, >= 0.6.8)
94
+ typhoeus (0.8.0)
95
+ ethon (>= 0.8.0)
96
+ tzinfo (1.2.4)
97
+ thread_safe (~> 0.1)
98
+ unicode-display_width (1.3.0)
99
+ uuidtools (2.1.5)
100
+ websocket (1.2.2)
101
+
102
+ PLATFORMS
103
+ ruby
104
+
105
+ DEPENDENCIES
106
+ bundler (~> 1.11)
107
+ rake (~> 10.0)
108
+ rspec (~> 3.0)
109
+ rubocop
110
+ travis (~> 1.8, >= 1.8.2)
111
+ uuidable!
112
+
113
+ BUNDLED WITH
114
+ 1.16.0
@@ -7,11 +7,13 @@ module Uuidable
7
7
  # Module adds method to table definition
8
8
  module TableDefinition
9
9
  def uuid(opts = {})
10
- index_opts = opts.delete(:index) || {}
10
+ index_opts = opts.delete(:index)
11
+ index_opts = {} if index_opts.nil?
12
+
11
13
  column_name = opts.delete(:column_name) || COLUMN_NAME
12
14
 
13
15
  column column_name, COLUMN_TYPE, COLUMN_OPTIONS.merge(opts)
14
- index column_name, INDEX_OPTIONS.merge(index_opts) unless index_opts == false
16
+ index column_name, INDEX_OPTIONS.merge(index_opts) if index_opts
15
17
  end
16
18
  end
17
19
 
@@ -25,7 +27,7 @@ module Uuidable
25
27
 
26
28
  add_column table_name, column_name, COLUMN_TYPE, COLUMN_OPTIONS.merge(opts)
27
29
 
28
- add_uuid_index(table_name, index_opts.merge(column_name: column_name)) unless index_opts.nil?
30
+ add_uuid_index(table_name, index_opts.merge(column_name: column_name)) if index_opts
29
31
  end
30
32
 
31
33
  def add_uuid_index(table_name, opts = {})
@@ -1,3 +1,3 @@
1
1
  module Uuidable
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.2.2'.freeze
3
3
  end
data/uuidable.gemspec CHANGED
@@ -1,5 +1,3 @@
1
- # coding: utf-8
2
-
3
1
  lib = File.expand_path('../lib', __FILE__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
  require 'uuidable/version'
@@ -25,6 +23,6 @@ Gem::Specification.new do |spec|
25
23
  spec.add_development_dependency 'rspec', '~> 3.0'
26
24
  spec.add_development_dependency 'travis', '~> 1.8', '>= 1.8.2'
27
25
 
28
- spec.add_dependency 'uuidtools', '>= 2.1', '< 3'
29
26
  spec.add_dependency 'activerecord', '>= 4.2', '< 5.1'
27
+ spec.add_dependency 'uuidtools', '>= 2.1', '< 3'
30
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uuidable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Gnuskov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-05 00:00:00.000000000 Z
11
+ date: 2017-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,45 +73,45 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: 1.8.2
75
75
  - !ruby/object:Gem::Dependency
76
- name: uuidtools
76
+ name: activerecord
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: '2.1'
81
+ version: '4.2'
82
82
  - - "<"
83
83
  - !ruby/object:Gem::Version
84
- version: '3'
84
+ version: '5.1'
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - ">="
90
90
  - !ruby/object:Gem::Version
91
- version: '2.1'
91
+ version: '4.2'
92
92
  - - "<"
93
93
  - !ruby/object:Gem::Version
94
- version: '3'
94
+ version: '5.1'
95
95
  - !ruby/object:Gem::Dependency
96
- name: activerecord
96
+ name: uuidtools
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - ">="
100
100
  - !ruby/object:Gem::Version
101
- version: '4.2'
101
+ version: '2.1'
102
102
  - - "<"
103
103
  - !ruby/object:Gem::Version
104
- version: '5.1'
104
+ version: '3'
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - ">="
110
110
  - !ruby/object:Gem::Version
111
- version: '4.2'
111
+ version: '2.1'
112
112
  - - "<"
113
113
  - !ruby/object:Gem::Version
114
- version: '5.1'
114
+ version: '3'
115
115
  description: ''
116
116
  email:
117
117
  - sergey.gnuskov@flant.com
@@ -125,6 +125,7 @@ files:
125
125
  - ".rubocop.yml"
126
126
  - ".travis.yml"
127
127
  - Gemfile
128
+ - Gemfile.lock
128
129
  - LICENSE.txt
129
130
  - README.md
130
131
  - Rakefile
@@ -155,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
156
  version: '0'
156
157
  requirements: []
157
158
  rubyforge_project:
158
- rubygems_version: 2.6.13
159
+ rubygems_version: 2.7.2
159
160
  signing_key:
160
161
  specification_version: 4
161
162
  summary: Helps using uuid everywhere in routes instead of id for ActiveRecord models.