pgcli-rails 0.3.0 → 0.4.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 +4 -4
- data/.github/main.workflow +9 -0
- data/.github/release-drafter.yml +17 -0
- data/.rubocop.yml +12 -2
- data/.travis.yml +11 -2
- data/CHANGELOG.md +1 -32
- data/CONTRIBUTING.md +0 -1
- data/LICENSE.txt +1 -1
- data/README.md +1 -1
- data/Rakefile +97 -5
- data/lib/pgcli/rails/railtie.rb +1 -1
- data/lib/pgcli/rails/version.rb +1 -1
- data/pgcli-rails.gemspec +4 -3
- metadata +10 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72f061d6e9eb665ae79654c660a398ef4f25f8746f47ede113ff5871329920db
|
4
|
+
data.tar.gz: ead4205167642e0b94573dc954050c520bb05403ab7af9a7344ef2adea4c6e61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e374793a18217c65c3f45cff6054e9b2dfb6935d022462295cafd3dffecea73cf380319969c5b3bd82d1ad846cb639cf4c07afa0bcf0cfb954ab93d4efa8127
|
7
|
+
data.tar.gz: 5a2c15f30d885c75cf03d1ae77b86a1f2c60c316272cc86ac906abeb72b0b48b7090057c407646191726fe0e805daf28bc8cfa86d5a856bce59ca2a45806e1db
|
@@ -0,0 +1,17 @@
|
|
1
|
+
name-template: "$NEXT_PATCH_VERSION"
|
2
|
+
tag-template: "v$NEXT_PATCH_VERSION"
|
3
|
+
categories:
|
4
|
+
- title: "⚠️ Breaking Changes"
|
5
|
+
label: "⚠️ Breaking"
|
6
|
+
- title: "✨ New Features"
|
7
|
+
label: "✨ Feature"
|
8
|
+
- title: "🐛 Bug Fixes"
|
9
|
+
label: "🐛 Bug Fix"
|
10
|
+
- title: "📚 Documentation"
|
11
|
+
label: "📚 Docs"
|
12
|
+
- title: "🏠 Housekeeping"
|
13
|
+
label: "🏠 Housekeeping"
|
14
|
+
change-template: "- $TITLE (#$NUMBER) @$AUTHOR"
|
15
|
+
no-changes-template: "- No changes"
|
16
|
+
template: |
|
17
|
+
$CHANGES
|
data/.rubocop.yml
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
AllCops:
|
2
|
-
|
2
|
+
DisplayCopNames: true
|
3
|
+
DisplayStyleGuide: true
|
4
|
+
TargetRubyVersion: 2.4
|
3
5
|
Exclude:
|
4
6
|
- "*.gemspec"
|
7
|
+
- "tmp/**/*"
|
8
|
+
- "vendor/**/*"
|
5
9
|
|
6
10
|
Metrics/AbcSize:
|
7
11
|
Exclude:
|
@@ -15,6 +19,9 @@ Metrics/ClassLength:
|
|
15
19
|
Exclude:
|
16
20
|
- "test/**/*"
|
17
21
|
|
22
|
+
Naming/MemoizedInstanceVariableName:
|
23
|
+
EnforcedStyleForLeadingUnderscores: optional
|
24
|
+
|
18
25
|
Style/BarePercentLiterals:
|
19
26
|
EnforcedStyle: percent_q
|
20
27
|
|
@@ -27,8 +34,11 @@ Style/Documentation:
|
|
27
34
|
Style/DoubleNegation:
|
28
35
|
Enabled: false
|
29
36
|
|
37
|
+
Style/FrozenStringLiteralComment:
|
38
|
+
Enabled: false
|
39
|
+
|
30
40
|
Style/HashSyntax:
|
31
|
-
EnforcedStyle:
|
41
|
+
EnforcedStyle: ruby19
|
32
42
|
|
33
43
|
Style/SpaceAroundEqualsInParameterDefault:
|
34
44
|
EnforcedStyle: no_space
|
data/.travis.yml
CHANGED
@@ -1,5 +1,14 @@
|
|
1
|
+
---
|
1
2
|
sudo: false
|
2
3
|
language: ruby
|
4
|
+
cache: bundler
|
5
|
+
branches:
|
6
|
+
only:
|
7
|
+
- master
|
3
8
|
rvm:
|
4
|
-
|
5
|
-
|
9
|
+
- 2.4.6
|
10
|
+
- 2.5.5
|
11
|
+
- 2.6.3
|
12
|
+
- ruby-head
|
13
|
+
before_install: gem install bundler -v 2.0.2
|
14
|
+
script: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1,32 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
All notable changes to this project will be documented in this file.
|
4
|
-
|
5
|
-
pgcli-rails is in a pre-1.0 state. This means that its APIs and behavior are subject to breaking changes without deprecation notices. Until 1.0, version numbers will follow a [Semver][]-ish `0.y.z` format, where `y` is incremented when new features or breaking changes are introduced, and `z` is incremented for lesser changes or bug fixes.
|
6
|
-
|
7
|
-
## [Unreleased][]
|
8
|
-
|
9
|
-
* Your contribution here!
|
10
|
-
|
11
|
-
## [0.3.0][] (2018-02-24)
|
12
|
-
|
13
|
-
* [#3](https://github.com/mattbrictson/pgcli-rails/pull/3): Add Rails 5.1 support - [@nachokb](https://github.com/nachokb)
|
14
|
-
|
15
|
-
## [0.2.1][] (2016-07-18)
|
16
|
-
|
17
|
-
* Minor change to gemspec summary
|
18
|
-
|
19
|
-
## [0.2.0][] (2016-07-18)
|
20
|
-
|
21
|
-
* Rewrite as a Rake task instead of a monkey patch
|
22
|
-
* New usage: `bin/rake pgcli`
|
23
|
-
|
24
|
-
## 0.1.0 (2016-07-15)
|
25
|
-
|
26
|
-
* Initial release
|
27
|
-
|
28
|
-
[Semver]: http://semver.org
|
29
|
-
[Unreleased]: https://github.com/mattbrictson/pgcli-rails/compare/v0.3.0...HEAD
|
30
|
-
[0.3.0]: https://github.com/mattbrictson/pgcli-rails/compare/v0.2.1...v0.3.0
|
31
|
-
[0.2.1]: https://github.com/mattbrictson/pgcli-rails/compare/v0.2.0...v0.2.1
|
32
|
-
[0.2.0]: https://github.com/mattbrictson/pgcli-rails/compare/v0.1.0...v0.2.0
|
1
|
+
Release notes for this project are kept here: https://github.com/mattbrictson/pgcli-rails/releases
|
data/CONTRIBUTING.md
CHANGED
@@ -7,7 +7,6 @@ Have a feature idea, bug fix, or refactoring suggestion? Contributions are welco
|
|
7
7
|
1. Check [Issues][] to see if your contribution has already been discussed and/or implemented.
|
8
8
|
2. If not, open an issue to discuss your contribution. I won't accept all changes and do not want to waste your time.
|
9
9
|
3. Once you have the :thumbsup:, fork the repo, make your changes, and open a PR.
|
10
|
-
4. Don't forget to add your contribution and credit yourself in `CHANGELOG.md`!
|
11
10
|
|
12
11
|
## Coding guidelines
|
13
12
|
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1,15 +1,107 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
|
-
require "chandler/tasks"
|
3
2
|
require "rake/testtask"
|
4
3
|
require "rubocop/rake_task"
|
5
4
|
|
6
|
-
|
5
|
+
task default: %i[test rubocop]
|
6
|
+
|
7
|
+
RuboCop::RakeTask.new
|
8
|
+
|
9
|
+
Rake::TestTask.new("test") do |t|
|
7
10
|
t.libs << "test"
|
8
11
|
t.libs << "lib"
|
9
12
|
t.test_files = FileList["test/**/*_test.rb"]
|
10
13
|
end
|
11
14
|
|
12
|
-
|
15
|
+
Rake::Task["release"].enhance do
|
16
|
+
puts "Don't forget to publish the release on GitHub!"
|
17
|
+
system "open https://github.com/mattbrictson/pgcli-rails/releases"
|
18
|
+
end
|
19
|
+
|
20
|
+
task bump: %w[bump:bundler bump:ruby bump:year]
|
21
|
+
|
22
|
+
namespace :bump do
|
23
|
+
task :bundler do
|
24
|
+
version = Gemfile.bundler_version
|
25
|
+
replace_in_file ".travis.yml", /bundler -v (\S+)/ => version
|
26
|
+
end
|
27
|
+
|
28
|
+
task :ruby do
|
29
|
+
lowest = RubyVersions.lowest_supported
|
30
|
+
lowest_minor = RubyVersions.lowest_supported_minor
|
31
|
+
|
32
|
+
replace_in_file "README.md", /Ruby (\d\.\d\.\d)\+/ => lowest
|
33
|
+
replace_in_file "pgcli-rails.gemspec",
|
34
|
+
/ruby_version = ">= (.*)"/ => lowest
|
35
|
+
replace_in_file ".rubocop.yml", /TargetRubyVersion: (.*)/ => lowest_minor
|
36
|
+
|
37
|
+
travis = YAML.safe_load(open(".travis.yml"))
|
38
|
+
travis["rvm"] = RubyVersions.latest_supported_patches + ["ruby-head"]
|
39
|
+
IO.write(".travis.yml", YAML.dump(travis))
|
40
|
+
end
|
41
|
+
|
42
|
+
task :year do
|
43
|
+
replace_in_file "LICENSE.txt", /\(c\) (\d+)/ => Date.today.year.to_s
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
require "date"
|
48
|
+
require "open-uri"
|
49
|
+
require "yaml"
|
13
50
|
|
14
|
-
|
15
|
-
|
51
|
+
def replace_in_file(path, replacements)
|
52
|
+
contents = IO.read(path)
|
53
|
+
orig_contents = contents.dup
|
54
|
+
replacements.each do |regexp, text|
|
55
|
+
contents.gsub!(regexp) do |match|
|
56
|
+
match[regexp, 1] = text
|
57
|
+
match
|
58
|
+
end
|
59
|
+
end
|
60
|
+
IO.write(path, contents) if contents != orig_contents
|
61
|
+
end
|
62
|
+
|
63
|
+
module Gemfile
|
64
|
+
class << self
|
65
|
+
def bundler_version
|
66
|
+
lock_file[/BUNDLED WITH\n (\S+)$/, 1]
|
67
|
+
end
|
68
|
+
|
69
|
+
private
|
70
|
+
|
71
|
+
def lock_file
|
72
|
+
@_lock_file ||= IO.read("Gemfile.lock")
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
module RubyVersions
|
78
|
+
class << self
|
79
|
+
def lowest_supported
|
80
|
+
"#{lowest_supported_minor}.0"
|
81
|
+
end
|
82
|
+
|
83
|
+
def lowest_supported_minor
|
84
|
+
latest_supported_patches.first[/\d+\.\d+/]
|
85
|
+
end
|
86
|
+
|
87
|
+
def latest
|
88
|
+
latest_supported_patches.last
|
89
|
+
end
|
90
|
+
|
91
|
+
def latest_supported_patches
|
92
|
+
patches = [versions[:stable], versions[:security_maintenance]].flatten
|
93
|
+
patches.map(&Gem::Version.method(:new)).sort.map(&:to_s)
|
94
|
+
end
|
95
|
+
|
96
|
+
private
|
97
|
+
|
98
|
+
# rubocop:disable Metrics/LineLength
|
99
|
+
def versions
|
100
|
+
@_versions ||= begin
|
101
|
+
yaml = open("https://raw.githubusercontent.com/ruby/www.ruby-lang.org/master/_data/downloads.yml")
|
102
|
+
YAML.safe_load(yaml, symbolize_names: true)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
# rubocop:enable Metrics/LineLength
|
106
|
+
end
|
107
|
+
end
|
data/lib/pgcli/rails/railtie.rb
CHANGED
data/lib/pgcli/rails/version.rb
CHANGED
data/pgcli-rails.gemspec
CHANGED
@@ -18,12 +18,13 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
+
spec.required_ruby_version = ">= 2.4.0"
|
22
|
+
|
21
23
|
spec.add_dependency "railties", ">= 4.2.0"
|
22
24
|
|
23
|
-
spec.add_development_dependency "bundler", "~>
|
24
|
-
spec.add_development_dependency "chandler"
|
25
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
25
26
|
spec.add_development_dependency "rake", "~> 12.0"
|
26
27
|
spec.add_development_dependency "minitest", "~> 5.0"
|
27
28
|
spec.add_development_dependency "minitest-reporters", "~> 1.1"
|
28
|
-
spec.add_development_dependency "rubocop", "0.
|
29
|
+
spec.add_development_dependency "rubocop", "0.72.0"
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pgcli-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Brictson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -30,28 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: chandler
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
40
|
+
version: '2.0'
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: rake
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +86,14 @@ dependencies:
|
|
100
86
|
requirements:
|
101
87
|
- - '='
|
102
88
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
89
|
+
version: 0.72.0
|
104
90
|
type: :development
|
105
91
|
prerelease: false
|
106
92
|
version_requirements: !ruby/object:Gem::Requirement
|
107
93
|
requirements:
|
108
94
|
- - '='
|
109
95
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
96
|
+
version: 0.72.0
|
111
97
|
description:
|
112
98
|
email:
|
113
99
|
- opensource@mattbrictson.com
|
@@ -115,6 +101,8 @@ executables: []
|
|
115
101
|
extensions: []
|
116
102
|
extra_rdoc_files: []
|
117
103
|
files:
|
104
|
+
- ".github/main.workflow"
|
105
|
+
- ".github/release-drafter.yml"
|
118
106
|
- ".gitignore"
|
119
107
|
- ".rubocop.yml"
|
120
108
|
- ".travis.yml"
|
@@ -145,15 +133,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
145
133
|
requirements:
|
146
134
|
- - ">="
|
147
135
|
- !ruby/object:Gem::Version
|
148
|
-
version:
|
136
|
+
version: 2.4.0
|
149
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
138
|
requirements:
|
151
139
|
- - ">="
|
152
140
|
- !ruby/object:Gem::Version
|
153
141
|
version: '0'
|
154
142
|
requirements: []
|
155
|
-
|
156
|
-
rubygems_version: 2.7.6
|
143
|
+
rubygems_version: 3.0.4
|
157
144
|
signing_key:
|
158
145
|
specification_version: 4
|
159
146
|
summary: Replaces the Rails PostgreSQL dbconsole with the much nicer pgcli
|