active_record-sequence 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +1 -0
- data/.rubocop.yml +19 -3
- data/.travis.yml +16 -7
- data/Appraisals +37 -11
- data/README.md +1 -1
- data/active_record-sequence.gemspec +6 -6
- data/bin/setup +1 -2
- data/gemfiles/{rails_4.2.7.gemfile → rails_4.2.11.gemfile} +2 -1
- data/gemfiles/{rails_5.0.0.gemfile → rails_5.2.2.gemfile} +2 -1
- data/lib/active_record/sequence.rb +1 -0
- data/lib/active_record/sequence/version.rb +1 -1
- metadata +29 -31
- data/gemfiles/rails_4.2.7.gemfile.lock +0 -88
- data/gemfiles/rails_5.0.0.gemfile.lock +0 -86
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0da38b19e34cf890d60fb75c34165fa98bead91af023d79c8ca4403d7cc032e6
|
4
|
+
data.tar.gz: f74766a8b3273a66883fb9ab1314b3d9ce989855e61545dbf618cdc0669513dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a887daa8183e6315d93dfb71ea5e68f38daf5ab4efcc8654f05f3ded2cd41391b018fd93c1554df3caaf01c6cbde32bce210fe09d87ba9dca2f80d3e9205be6e
|
7
|
+
data.tar.gz: 415cc1327091f05d5abd373f93136cd7ee29f68c98bf0733e81f8bd81d7d6f7583813d719904570b22344971c0bf6aeb49db92e5cd16a6eb5bd9580da27cbe2d
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,6 +1,22 @@
|
|
1
|
-
inherit_gem:
|
2
|
-
spbtv_code_style: .strict_rubocop.yml
|
3
|
-
|
4
1
|
AllCops:
|
5
2
|
Exclude:
|
6
3
|
- gemfiles/**/*
|
4
|
+
|
5
|
+
Metrics/LineLength:
|
6
|
+
Max: 120
|
7
|
+
|
8
|
+
Style/TrailingCommaInHashLiteral:
|
9
|
+
EnforcedStyleForMultiline: comma
|
10
|
+
|
11
|
+
Style/TrailingCommaInArrayLiteral:
|
12
|
+
EnforcedStyleForMultiline: comma
|
13
|
+
|
14
|
+
Style/TrailingCommaInArguments:
|
15
|
+
EnforcedStyleForMultiline: comma
|
16
|
+
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Exclude:
|
19
|
+
- spec/**/*.rb
|
20
|
+
|
21
|
+
Style/FormatStringToken:
|
22
|
+
Enabled: false
|
data/.travis.yml
CHANGED
@@ -1,15 +1,24 @@
|
|
1
1
|
---
|
2
2
|
language: ruby
|
3
|
-
rvm:
|
4
|
-
- 2.2.5
|
5
|
-
- 2.3.1
|
6
3
|
services:
|
7
4
|
- postgresql
|
8
5
|
before_script:
|
9
|
-
-
|
6
|
+
- bundle install
|
7
|
+
- psql -c "create database travis_ci_test;" -U postgres
|
8
|
+
matrix:
|
9
|
+
include:
|
10
|
+
- :rvm: 2.4.5
|
11
|
+
:gemfile: gemfiles/rails_4.2.11.gemfile
|
12
|
+
- :rvm: 2.5.3
|
13
|
+
:gemfile: gemfiles/rails_4.2.11.gemfile
|
14
|
+
- :rvm: 2.6.1
|
15
|
+
:gemfile: gemfiles/rails_4.2.11.gemfile
|
16
|
+
- :rvm: 2.4.5
|
17
|
+
:gemfile: gemfiles/rails_5.2.2.gemfile
|
18
|
+
- :rvm: 2.5.3
|
19
|
+
:gemfile: gemfiles/rails_5.2.2.gemfile
|
20
|
+
- :rvm: 2.6.1
|
21
|
+
:gemfile: gemfiles/rails_5.2.2.gemfile
|
10
22
|
script:
|
11
23
|
- bundle exec rake spec
|
12
24
|
- bundle exec rubocop --fail-level C
|
13
|
-
gemfile:
|
14
|
-
- gemfiles/rails_4.2.7.gemfile
|
15
|
-
- gemfiles/rails_5.0.0.gemfile
|
data/Appraisals
CHANGED
@@ -1,26 +1,52 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
matrix = [
|
4
|
+
{
|
5
|
+
rails_version: '4.2.11',
|
6
|
+
ruby_versions: %w[2.4.5 2.5.3 2.6.1],
|
7
|
+
pg_version: '< 1.0.0',
|
8
|
+
},
|
9
|
+
{
|
10
|
+
rails_version: '5.2.2',
|
11
|
+
ruby_versions: %w[2.4.5 2.5.3 2.6.1],
|
12
|
+
pg_version: '>= 1.0.0',
|
13
|
+
},
|
14
|
+
]
|
15
|
+
|
16
|
+
matrix.each do |gemfile|
|
17
|
+
rails_version = gemfile.fetch(:rails_version)
|
18
|
+
pg_version = gemfile.fetch(:pg_version)
|
5
19
|
|
6
|
-
rails_versions.each do |rails_version|
|
7
20
|
appraise "rails_#{rails_version}" do
|
8
|
-
gem 'activerecord', rails_version
|
21
|
+
gem 'activerecord', "~> #{rails_version}"
|
22
|
+
gem 'pg', pg_version
|
9
23
|
end
|
10
24
|
end
|
11
25
|
|
12
26
|
travis = ::YAML.dump(
|
13
27
|
'language' => 'ruby',
|
14
|
-
'
|
15
|
-
|
28
|
+
'services' => [
|
29
|
+
'postgresql',
|
30
|
+
],
|
16
31
|
'before_script' => [
|
17
|
-
'
|
18
|
-
|
19
|
-
|
32
|
+
'bundle install',
|
33
|
+
'psql -c "create database travis_ci_test;" -U postgres',
|
34
|
+
],
|
35
|
+
'matrix' => {
|
36
|
+
'include' =>
|
37
|
+
matrix.flat_map do |rails_version:, ruby_versions:, **|
|
38
|
+
ruby_versions.map do |ruby_version|
|
39
|
+
{
|
40
|
+
rvm: ruby_version,
|
41
|
+
gemfile: "gemfiles/rails_#{rails_version}.gemfile",
|
42
|
+
}
|
43
|
+
end
|
44
|
+
end,
|
45
|
+
},
|
46
|
+
'script' => [
|
20
47
|
'bundle exec rake spec',
|
21
|
-
'bundle exec rubocop --fail-level C'
|
48
|
+
'bundle exec rubocop --fail-level C',
|
22
49
|
],
|
23
|
-
'gemfile' => Dir.glob('gemfiles/*.gemfile'),
|
24
50
|
)
|
25
51
|
|
26
52
|
::File.open('.travis.yml', 'w+') do |file|
|
data/README.md
CHANGED
@@ -95,7 +95,7 @@ sequence.next #=> 2
|
|
95
95
|
# etc.
|
96
96
|
```
|
97
97
|
|
98
|
-
You
|
98
|
+
You can use previously created sequence by instantiating `Sequence` class:
|
99
99
|
|
100
100
|
```ruby
|
101
101
|
ActiveRecord::Sequence.create('numbers', max: 2, cycle: true)
|
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'active_record/sequence/version'
|
5
4
|
|
@@ -18,11 +17,12 @@ Gem::Specification.new do |spec|
|
|
18
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
18
|
spec.require_paths = ['lib']
|
20
19
|
|
21
|
-
spec.
|
20
|
+
spec.add_runtime_dependency 'activerecord', '>= 4.2.11', '<= 6.0.0.beta1'
|
21
|
+
spec.add_runtime_dependency 'pg'
|
22
|
+
|
22
23
|
spec.add_development_dependency 'appraisal', '2.1.0'
|
23
|
-
spec.add_development_dependency 'bundler'
|
24
|
-
spec.add_development_dependency 'pg', '0.19.0'
|
24
|
+
spec.add_development_dependency 'bundler'
|
25
25
|
spec.add_development_dependency 'rake', '11.3.0'
|
26
26
|
spec.add_development_dependency 'rspec', '3.5.0'
|
27
|
-
spec.add_development_dependency '
|
27
|
+
spec.add_development_dependency 'rubocop', '0.64.0'
|
28
28
|
end
|
data/bin/setup
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_record-sequence
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tema Bolshakov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,62 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
- - "
|
19
|
+
version: 4.2.11
|
20
|
+
- - "<="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 6.0.0
|
23
|
-
type: :
|
22
|
+
version: 6.0.0.beta1
|
23
|
+
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
30
|
-
- - "
|
29
|
+
version: 4.2.11
|
30
|
+
- - "<="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: 6.0.0
|
32
|
+
version: 6.0.0.beta1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: pg
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
40
|
-
type: :
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
|
-
- -
|
44
|
+
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version:
|
46
|
+
version: '0'
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
48
|
+
name: appraisal
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
50
50
|
requirements:
|
51
51
|
- - '='
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: 1.
|
53
|
+
version: 2.1.0
|
54
54
|
type: :development
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - '='
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 1.
|
60
|
+
version: 2.1.0
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
62
|
+
name: bundler
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
|
-
- -
|
65
|
+
- - ">="
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 0
|
67
|
+
version: '0'
|
68
68
|
type: :development
|
69
69
|
prerelease: false
|
70
70
|
version_requirements: !ruby/object:Gem::Requirement
|
71
71
|
requirements:
|
72
|
-
- -
|
72
|
+
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 0
|
74
|
+
version: '0'
|
75
75
|
- !ruby/object:Gem::Dependency
|
76
76
|
name: rake
|
77
77
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,19 +101,19 @@ dependencies:
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 3.5.0
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
|
-
name:
|
104
|
+
name: rubocop
|
105
105
|
requirement: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - '='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 0.64.0
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - '='
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version:
|
116
|
+
version: 0.64.0
|
117
117
|
description: Provide access to PostgreSQL's sequences
|
118
118
|
email:
|
119
119
|
- abolshakov@spbtv.com
|
@@ -132,10 +132,8 @@ files:
|
|
132
132
|
- active_record-sequence.gemspec
|
133
133
|
- bin/console
|
134
134
|
- bin/setup
|
135
|
-
- gemfiles/rails_4.2.
|
136
|
-
- gemfiles/
|
137
|
-
- gemfiles/rails_5.0.0.gemfile
|
138
|
-
- gemfiles/rails_5.0.0.gemfile.lock
|
135
|
+
- gemfiles/rails_4.2.11.gemfile
|
136
|
+
- gemfiles/rails_5.2.2.gemfile
|
139
137
|
- lib/active_record/sequence.rb
|
140
138
|
- lib/active_record/sequence/error.rb
|
141
139
|
- lib/active_record/sequence/sequence_sql_builder.rb
|
@@ -159,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
157
|
version: '0'
|
160
158
|
requirements: []
|
161
159
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
160
|
+
rubygems_version: 2.7.6
|
163
161
|
signing_key:
|
164
162
|
specification_version: 4
|
165
163
|
summary: Provide access to PostgreSQL's sequences
|
@@ -1,88 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../
|
3
|
-
specs:
|
4
|
-
active_record-sequence (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
activemodel (4.2.7)
|
10
|
-
activesupport (= 4.2.7)
|
11
|
-
builder (~> 3.1)
|
12
|
-
activerecord (4.2.7)
|
13
|
-
activemodel (= 4.2.7)
|
14
|
-
activesupport (= 4.2.7)
|
15
|
-
arel (~> 6.0)
|
16
|
-
activesupport (4.2.7)
|
17
|
-
i18n (~> 0.7)
|
18
|
-
json (~> 1.7, >= 1.7.7)
|
19
|
-
minitest (~> 5.1)
|
20
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
21
|
-
tzinfo (~> 1.1)
|
22
|
-
appraisal (2.1.0)
|
23
|
-
bundler
|
24
|
-
rake
|
25
|
-
thor (>= 0.14.0)
|
26
|
-
arel (6.0.3)
|
27
|
-
ast (2.3.0)
|
28
|
-
builder (3.2.2)
|
29
|
-
diff-lcs (1.2.5)
|
30
|
-
i18n (0.7.0)
|
31
|
-
json (1.8.3)
|
32
|
-
minitest (5.9.0)
|
33
|
-
parser (2.3.1.2)
|
34
|
-
ast (~> 2.2)
|
35
|
-
pg (0.19.0)
|
36
|
-
powerpack (0.1.1)
|
37
|
-
rainbow (2.1.0)
|
38
|
-
rake (11.3.0)
|
39
|
-
rspec (3.5.0)
|
40
|
-
rspec-core (~> 3.5.0)
|
41
|
-
rspec-expectations (~> 3.5.0)
|
42
|
-
rspec-mocks (~> 3.5.0)
|
43
|
-
rspec-core (3.5.3)
|
44
|
-
rspec-support (~> 3.5.0)
|
45
|
-
rspec-expectations (3.5.0)
|
46
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
-
rspec-support (~> 3.5.0)
|
48
|
-
rspec-mocks (3.5.0)
|
49
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
-
rspec-support (~> 3.5.0)
|
51
|
-
rspec-support (3.5.0)
|
52
|
-
rspec_junit_formatter (0.2.3)
|
53
|
-
builder (< 4)
|
54
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
55
|
-
rubocop (0.40.0)
|
56
|
-
parser (>= 2.3.1.0, < 3.0)
|
57
|
-
powerpack (~> 0.1)
|
58
|
-
rainbow (>= 1.99.1, < 3.0)
|
59
|
-
ruby-progressbar (~> 1.7)
|
60
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
61
|
-
rubocop-checkstyle_formatter (0.3.0)
|
62
|
-
rubocop (>= 0.30.1)
|
63
|
-
ruby-progressbar (1.8.1)
|
64
|
-
spbtv_code_style (1.4.1)
|
65
|
-
rspec_junit_formatter
|
66
|
-
rubocop (= 0.40.0)
|
67
|
-
rubocop-checkstyle_formatter
|
68
|
-
thor (0.19.1)
|
69
|
-
thread_safe (0.3.5)
|
70
|
-
tzinfo (1.2.2)
|
71
|
-
thread_safe (~> 0.1)
|
72
|
-
unicode-display_width (1.1.1)
|
73
|
-
|
74
|
-
PLATFORMS
|
75
|
-
ruby
|
76
|
-
|
77
|
-
DEPENDENCIES
|
78
|
-
active_record-sequence!
|
79
|
-
activerecord (= 4.2.7)
|
80
|
-
appraisal (= 2.1.0)
|
81
|
-
bundler (= 1.13.1)
|
82
|
-
pg (= 0.19.0)
|
83
|
-
rake (= 11.3.0)
|
84
|
-
rspec (= 3.5.0)
|
85
|
-
spbtv_code_style (= 1.4.1)
|
86
|
-
|
87
|
-
BUNDLED WITH
|
88
|
-
1.13.1
|
@@ -1,86 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../
|
3
|
-
specs:
|
4
|
-
active_record-sequence (0.1.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
activemodel (5.0.0)
|
10
|
-
activesupport (= 5.0.0)
|
11
|
-
activerecord (5.0.0)
|
12
|
-
activemodel (= 5.0.0)
|
13
|
-
activesupport (= 5.0.0)
|
14
|
-
arel (~> 7.0)
|
15
|
-
activesupport (5.0.0)
|
16
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
17
|
-
i18n (~> 0.7)
|
18
|
-
minitest (~> 5.1)
|
19
|
-
tzinfo (~> 1.1)
|
20
|
-
appraisal (2.1.0)
|
21
|
-
bundler
|
22
|
-
rake
|
23
|
-
thor (>= 0.14.0)
|
24
|
-
arel (7.1.1)
|
25
|
-
ast (2.3.0)
|
26
|
-
builder (3.2.2)
|
27
|
-
concurrent-ruby (1.0.2)
|
28
|
-
diff-lcs (1.2.5)
|
29
|
-
i18n (0.7.0)
|
30
|
-
minitest (5.9.0)
|
31
|
-
parser (2.3.1.2)
|
32
|
-
ast (~> 2.2)
|
33
|
-
pg (0.19.0)
|
34
|
-
powerpack (0.1.1)
|
35
|
-
rainbow (2.1.0)
|
36
|
-
rake (11.3.0)
|
37
|
-
rspec (3.5.0)
|
38
|
-
rspec-core (~> 3.5.0)
|
39
|
-
rspec-expectations (~> 3.5.0)
|
40
|
-
rspec-mocks (~> 3.5.0)
|
41
|
-
rspec-core (3.5.3)
|
42
|
-
rspec-support (~> 3.5.0)
|
43
|
-
rspec-expectations (3.5.0)
|
44
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
-
rspec-support (~> 3.5.0)
|
46
|
-
rspec-mocks (3.5.0)
|
47
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
-
rspec-support (~> 3.5.0)
|
49
|
-
rspec-support (3.5.0)
|
50
|
-
rspec_junit_formatter (0.2.3)
|
51
|
-
builder (< 4)
|
52
|
-
rspec-core (>= 2, < 4, != 2.12.0)
|
53
|
-
rubocop (0.40.0)
|
54
|
-
parser (>= 2.3.1.0, < 3.0)
|
55
|
-
powerpack (~> 0.1)
|
56
|
-
rainbow (>= 1.99.1, < 3.0)
|
57
|
-
ruby-progressbar (~> 1.7)
|
58
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
59
|
-
rubocop-checkstyle_formatter (0.3.0)
|
60
|
-
rubocop (>= 0.30.1)
|
61
|
-
ruby-progressbar (1.8.1)
|
62
|
-
spbtv_code_style (1.4.1)
|
63
|
-
rspec_junit_formatter
|
64
|
-
rubocop (= 0.40.0)
|
65
|
-
rubocop-checkstyle_formatter
|
66
|
-
thor (0.19.1)
|
67
|
-
thread_safe (0.3.5)
|
68
|
-
tzinfo (1.2.2)
|
69
|
-
thread_safe (~> 0.1)
|
70
|
-
unicode-display_width (1.1.1)
|
71
|
-
|
72
|
-
PLATFORMS
|
73
|
-
ruby
|
74
|
-
|
75
|
-
DEPENDENCIES
|
76
|
-
active_record-sequence!
|
77
|
-
activerecord (= 5.0.0)
|
78
|
-
appraisal (= 2.1.0)
|
79
|
-
bundler (= 1.13.1)
|
80
|
-
pg (= 0.19.0)
|
81
|
-
rake (= 11.3.0)
|
82
|
-
rspec (= 3.5.0)
|
83
|
-
spbtv_code_style (= 1.4.1)
|
84
|
-
|
85
|
-
BUNDLED WITH
|
86
|
-
1.13.1
|