pronto-rails_schema 0.10.0 → 0.11.0

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
2
  SHA256:
3
- metadata.gz: 155cce517ccbd563f5ba12382f72ed85c8fcb3347870fa44ddf36e79ca1e712b
4
- data.tar.gz: 409f72a073e4bd63f91185146bf984dace12584ac7e4dee72572e8d9fce48cd9
3
+ metadata.gz: 9fe26256386810fd830f956985b253743fad69f107bcf0d51b52bc30c2677ef6
4
+ data.tar.gz: b7fbf005144f9c5509785bfd6614bcc4d24dac7341995b1d6427e56b2e4ad1cf
5
5
  SHA512:
6
- metadata.gz: f37095295e25ba7f145fda261c586187c5dfa6d3d4a85805a46161167f3d043dcebf1610dbf38005bc58e63e7ef55de5e893593c8bb5e594f695c2f3a651c823
7
- data.tar.gz: 3bc8915763c287b1860b11cb4a8b06c7c07a24fe835fe4a602d2c8e9a2f374b9677ea1f688bdae5a26babf259a312328fc171761724b5d26e62b8afaa642457b
6
+ metadata.gz: da6b428824bc799d6780fefd1507c7e288caa1f1ab62512ace797571e526f2657ac07b5a688d30057d49e2a3156c52abd59633ee49089c8c2a1695665089ed5e
7
+ data.tar.gz: c59261013902ced44f880de581ca8393d769aa9836ca319726cd039d2259e726a03fffe5cf6a89e1a54f4619036ed9c93bfca26cdb6616e008ffaec55fc2c94a
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/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-performance
4
+
5
+ Metrics/BlockLength:
6
+ Exclude:
7
+ - spec/**/*.rb
8
+
9
+ RSpec/NestedGroups:
10
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.0.0-p648
4
- - 2.1.10
5
- - 2.2.5
6
- - 2.3.1
3
+ - 2.3.4
4
+ - 2.4.1
5
+ - 2.5.1
6
+ - 2.6.3
7
7
  before_install: gem install bundler -v 1.10.6
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in pronto-rails_schema.gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,116 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pronto-rails_schema (0.11.0)
5
+ pronto (>= 0.10, < 0.12)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.0)
11
+ public_suffix (>= 2.0.2, < 5.0)
12
+ ast (2.4.2)
13
+ diff-lcs (1.5.0)
14
+ faraday (1.8.0)
15
+ faraday-em_http (~> 1.0)
16
+ faraday-em_synchrony (~> 1.0)
17
+ faraday-excon (~> 1.1)
18
+ faraday-httpclient (~> 1.0.1)
19
+ faraday-net_http (~> 1.0)
20
+ faraday-net_http_persistent (~> 1.1)
21
+ faraday-patron (~> 1.0)
22
+ faraday-rack (~> 1.0)
23
+ multipart-post (>= 1.2, < 3)
24
+ ruby2_keywords (>= 0.0.4)
25
+ faraday-em_http (1.0.0)
26
+ faraday-em_synchrony (1.0.0)
27
+ faraday-excon (1.1.0)
28
+ faraday-httpclient (1.0.1)
29
+ faraday-net_http (1.0.1)
30
+ faraday-net_http_persistent (1.2.0)
31
+ faraday-patron (1.0.0)
32
+ faraday-rack (1.0.0)
33
+ gitlab (4.18.0)
34
+ httparty (~> 0.18)
35
+ terminal-table (>= 1.5.1)
36
+ httparty (0.20.0)
37
+ mime-types (~> 3.0)
38
+ multi_xml (>= 0.5.2)
39
+ mime-types (3.4.1)
40
+ mime-types-data (~> 3.2015)
41
+ mime-types-data (3.2022.0105)
42
+ multi_xml (0.6.0)
43
+ multipart-post (2.1.1)
44
+ octokit (4.22.0)
45
+ faraday (>= 0.9)
46
+ sawyer (~> 0.8.0, >= 0.5.3)
47
+ parallel (1.21.0)
48
+ parser (3.1.0.0)
49
+ ast (~> 2.4.1)
50
+ pronto (0.11.0)
51
+ gitlab (~> 4.4, >= 4.4.0)
52
+ httparty (>= 0.13.7)
53
+ octokit (~> 4.7, >= 4.7.0)
54
+ rainbow (>= 2.2, < 4.0)
55
+ rexml (~> 3.2)
56
+ rugged (>= 0.23.0, < 1.1.0)
57
+ thor (>= 0.20.3, < 2.0)
58
+ public_suffix (4.0.6)
59
+ rainbow (3.1.1)
60
+ rake (13.0.6)
61
+ regexp_parser (2.2.0)
62
+ rexml (3.2.5)
63
+ rspec (3.10.0)
64
+ rspec-core (~> 3.10.0)
65
+ rspec-expectations (~> 3.10.0)
66
+ rspec-mocks (~> 3.10.0)
67
+ rspec-core (3.10.1)
68
+ rspec-support (~> 3.10.0)
69
+ rspec-expectations (3.10.1)
70
+ diff-lcs (>= 1.2.0, < 2.0)
71
+ rspec-support (~> 3.10.0)
72
+ rspec-mocks (3.10.2)
73
+ diff-lcs (>= 1.2.0, < 2.0)
74
+ rspec-support (~> 3.10.0)
75
+ rspec-support (3.10.3)
76
+ rubocop (1.23.0)
77
+ parallel (~> 1.10)
78
+ parser (>= 3.0.0.0)
79
+ rainbow (>= 2.2.2, < 4.0)
80
+ regexp_parser (>= 1.8, < 3.0)
81
+ rexml
82
+ rubocop-ast (>= 1.12.0, < 2.0)
83
+ ruby-progressbar (~> 1.7)
84
+ unicode-display_width (>= 1.4.0, < 3.0)
85
+ rubocop-ast (1.15.1)
86
+ parser (>= 3.0.1.1)
87
+ rubocop-performance (1.12.0)
88
+ rubocop (>= 1.7.0, < 2.0)
89
+ rubocop-ast (>= 0.4.0)
90
+ rubocop-rspec (2.6.0)
91
+ rubocop (~> 1.19)
92
+ ruby-progressbar (1.11.0)
93
+ ruby2_keywords (0.0.5)
94
+ rugged (1.0.1)
95
+ sawyer (0.8.2)
96
+ addressable (>= 2.3.5)
97
+ faraday (> 0.8, < 2.0)
98
+ terminal-table (3.0.2)
99
+ unicode-display_width (>= 1.1.1, < 3)
100
+ thor (1.2.1)
101
+ unicode-display_width (2.1.0)
102
+
103
+ PLATFORMS
104
+ x86_64-linux
105
+
106
+ DEPENDENCIES
107
+ bundler
108
+ pronto-rails_schema!
109
+ rake
110
+ rspec
111
+ rubocop
112
+ rubocop-performance
113
+ rubocop-rspec
114
+
115
+ BUNDLED WITH
116
+ 2.2.27
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Pronto
2
4
  module RailsSchemaVersion
3
- VERSION = "0.10.0"
5
+ VERSION = '0.11.0'
4
6
  end
5
7
  end
@@ -1,6 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'pronto'
2
4
 
3
5
  module Pronto
6
+ # Pronto runner
4
7
  class RailsSchema < Runner
5
8
  def run
6
9
  return [] unless migration_patches.any?
@@ -25,31 +28,34 @@ module Pronto
25
28
  end
26
29
 
27
30
  def structure_file_present?
28
- File.exists?('db/structure.sql')
31
+ File.exist?('db/structure.sql')
29
32
  end
30
33
 
31
34
  def migration_patches
32
35
  return [] unless @patches
33
- @migration_patches ||= @patches
34
- .select { |patch| detect_added_migration_file(patch) }
36
+
37
+ @migration_patches ||= @patches.select { |patch| detect_added_migration_file(patch) }
35
38
  end
36
39
 
37
40
  def generate_messages_for(target)
38
41
  migration_patches.map do |patch|
39
42
  first_line = patch.added_lines.first
40
- Message.new(patch.delta.new_file[:path], first_line, :warning,
41
- "Migration file detected, but no changes in #{target}",
42
- nil, self.class)
43
+ Message.new(
44
+ patch.delta.new_file[:path], first_line, :warning,
45
+ "Migration file detected, but no changes in #{target}",
46
+ nil, self.class
47
+ )
43
48
  end
44
49
  end
45
50
 
46
51
  def detect_added_migration_file(patch)
47
52
  return unless patch.delta.added?
48
- /(.*)db[\\|\/]migrate[\\|\/](\d{14}_([_A-Za-z]+)\.rb)$/i =~ patch.delta.new_file[:path]
53
+
54
+ %r{(.*)db[\\|/]migrate[\\|/](\d{14}_([_A-Za-z]+)\.rb)$}i =~ patch.delta.new_file[:path]
49
55
  end
50
56
 
51
57
  def detect_schema_file(path)
52
- /db[\\|\/]schema.rb/i =~ path.to_s
58
+ %r{db[\\|/]schema.rb}i =~ path.to_s
53
59
  end
54
60
 
55
61
  def changes_detected?(patch)
@@ -57,7 +63,7 @@ module Pronto
57
63
  end
58
64
 
59
65
  def detect_structure_file(path)
60
- /db[\\|\/]structure.sql/i =~ path.to_s
66
+ %r{db[\\|/]structure.sql}i =~ path.to_s
61
67
  end
62
68
  end
63
69
  end
@@ -1,29 +1,34 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'pronto/rails_schema/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "pronto-rails_schema"
8
+ spec.name = 'pronto-rails_schema'
8
9
  spec.version = Pronto::RailsSchemaVersion::VERSION
9
- spec.authors = ["Raimondas Valickas"]
10
- spec.email = ["raimondas@vinted.com"]
10
+ spec.authors = ['Raimondas Valickas']
11
+ spec.email = ['raimondas@vinted.com']
11
12
 
12
- spec.summary = %q{Pronto runner for detection of Rails schema changes.}
13
- spec.description = %q{Detects migration files and checks for changes in
14
- schema.rb or structure.sql files}
15
- spec.homepage = "https://github.com/raimondasv/pronto-schema_check"
16
- spec.license = "MIT"
13
+ spec.summary = 'Pronto runner for detection of Rails schema changes.'
14
+ spec.description = 'Detects migration files and checks for changes in
15
+ schema.rb or structure.sql files'
16
+ spec.homepage = 'https://github.com/raimondasv/pronto-schema_check'
17
+ spec.license = 'MIT'
17
18
 
18
19
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
19
- spec.bindir = "exe"
20
+ spec.bindir = 'exe'
20
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
22
+ spec.require_paths = ['lib']
22
23
 
23
24
  spec.required_ruby_version = '>= 2.3.0'
24
25
 
25
- spec.add_dependency 'pronto', '~> 0.10.0 '
26
- spec.add_development_dependency "bundler", "~> 1.10"
27
- spec.add_development_dependency "rake", "~> 10.0"
28
- spec.add_development_dependency "rspec", "~> 3.3"
26
+ spec.add_dependency 'pronto', '>= 0.10', '< 0.12'
27
+
28
+ spec.add_development_dependency 'bundler'
29
+ spec.add_development_dependency 'rake'
30
+ spec.add_development_dependency 'rspec'
31
+ spec.add_development_dependency 'rubocop'
32
+ spec.add_development_dependency 'rubocop-performance'
33
+ spec.add_development_dependency 'rubocop-rspec'
29
34
  end
metadata CHANGED
@@ -1,71 +1,119 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto-rails_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raimondas Valickas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-22 00:00:00.000000000 Z
11
+ date: 2022-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pronto
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.10.0
19
+ version: '0.10'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '0.12'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: '0.10'
30
+ - - "<"
25
31
  - !ruby/object:Gem::Version
26
- version: 0.10.0
32
+ version: '0.12'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: bundler
29
35
  requirement: !ruby/object:Gem::Requirement
30
36
  requirements:
31
- - - "~>"
37
+ - - ">="
32
38
  - !ruby/object:Gem::Version
33
- version: '1.10'
39
+ version: '0'
34
40
  type: :development
35
41
  prerelease: false
36
42
  version_requirements: !ruby/object:Gem::Requirement
37
43
  requirements:
38
- - - "~>"
44
+ - - ">="
39
45
  - !ruby/object:Gem::Version
40
- version: '1.10'
46
+ version: '0'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: rake
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '10.0'
53
+ version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '10.0'
60
+ version: '0'
55
61
  - !ruby/object:Gem::Dependency
56
62
  name: rspec
57
63
  requirement: !ruby/object:Gem::Requirement
58
64
  requirements:
59
- - - "~>"
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: rubocop
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: rubocop-performance
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: rubocop-rspec
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
60
108
  - !ruby/object:Gem::Version
61
- version: '3.3'
109
+ version: '0'
62
110
  type: :development
63
111
  prerelease: false
64
112
  version_requirements: !ruby/object:Gem::Requirement
65
113
  requirements:
66
- - - "~>"
114
+ - - ">="
67
115
  - !ruby/object:Gem::Version
68
- version: '3.3'
116
+ version: '0'
69
117
  description: |-
70
118
  Detects migration files and checks for changes in
71
119
  schema.rb or structure.sql files
@@ -77,8 +125,10 @@ extra_rdoc_files: []
77
125
  files:
78
126
  - ".gitignore"
79
127
  - ".rspec"
128
+ - ".rubocop.yml"
80
129
  - ".travis.yml"
81
130
  - Gemfile
131
+ - Gemfile.lock
82
132
  - LICENSE.txt
83
133
  - README.md
84
134
  - Rakefile
@@ -104,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
154
  - !ruby/object:Gem::Version
105
155
  version: '0'
106
156
  requirements: []
107
- rubygems_version: 3.0.1
157
+ rubygems_version: 3.1.4
108
158
  signing_key:
109
159
  specification_version: 4
110
160
  summary: Pronto runner for detection of Rails schema changes.