pgcli-rails 0.4.0 → 0.6.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: 72f061d6e9eb665ae79654c660a398ef4f25f8746f47ede113ff5871329920db
4
- data.tar.gz: ead4205167642e0b94573dc954050c520bb05403ab7af9a7344ef2adea4c6e61
3
+ metadata.gz: 353cd8d1d69860c8872bda8b8733675cc39839b78745b6b3d358edaba380ed25
4
+ data.tar.gz: 391d5fb9da549a77a6cecf20965cd23ae9ca5761d6c32b813c096fa9064a7617
5
5
  SHA512:
6
- metadata.gz: 7e374793a18217c65c3f45cff6054e9b2dfb6935d022462295cafd3dffecea73cf380319969c5b3bd82d1ad846cb639cf4c07afa0bcf0cfb954ab93d4efa8127
7
- data.tar.gz: 5a2c15f30d885c75cf03d1ae77b86a1f2c60c316272cc86ac906abeb72b0b48b7090057c407646191726fe0e805daf28bc8cfa86d5a856bce59ca2a45806e1db
6
+ metadata.gz: 77e768a82e50247a83e6143353b54cfd5faf0cb221394d0757b2240fda4132c378969e6af460be3c2924f6be3c76c5ceaee2e4bffd70adb2048f27a14b229b44
7
+ data.tar.gz: 50e3537b7c8803aa5e81a19667b5a87d2a213c8d188db4b81575cbac9ee4d9097ac9c0bacf671689d25b54263d385d7c09c8a12c602cc3f439d47724f6f29f0d
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2019 Matt Brictson
3
+ Copyright (c) 2021 Matt Brictson
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # pgcli-rails
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/pgcli-rails.svg)](http://badge.fury.io/rb/pgcli-rails)
4
+ [![Build Status](https://circleci.com/gh/mattbrictson/pgcli-rails/tree/main.svg?style=shield)](https://app.circleci.com/pipelines/github/mattbrictson/pgcli-rails?branch=main)
4
5
 
5
6
  [pgcli][] is a command-line interface for PostgreSQL that offers many improvements over `psql`, like auto-completion and syntax highlighting. Wouldn't it be nice to have a convenient way to use `pgcli` with your Rails app?
6
7
 
@@ -42,7 +43,7 @@ RAILS_ENV=test bin/rake pgcli
42
43
  ## Requirements
43
44
 
44
45
  * Rails 4.2+ using PostgreSQL
45
- * Ruby 2.4.0+
46
+ * Ruby 2.6.0+
46
47
  * [pgcli][] (`brew install pgcli` to install on macOS)
47
48
 
48
49
  ## How it works
@@ -59,7 +60,6 @@ pgcli-rails is little more than a proof-of-concept at this point. Next steps are
59
60
 
60
61
  * Add tests
61
62
  * Use [Appraisal][] to test against multiple versions of Rails
62
- * Set up Travis CI
63
63
 
64
64
  If you have other ideas, open an issue on GitHub!
65
65
 
@@ -71,5 +71,5 @@ Code contributions are also welcome! Read [CONTRIBUTING.md](CONTRIBUTING.md) to
71
71
 
72
72
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
73
73
 
74
- [pgcli]: http://pgcli.com
74
+ [pgcli]: https://www.pgcli.com/
75
75
  [Appraisal]: https://github.com/thoughtbot/appraisal
@@ -1,5 +1,5 @@
1
1
  module Pgcli
2
2
  module Rails
3
- VERSION = "0.4.0".freeze
3
+ VERSION = "0.6.0".freeze
4
4
  end
5
5
  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.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brictson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-27 00:00:00.000000000 Z
11
+ date: 2021-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -24,108 +24,29 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.2.0
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '2.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '2.0'
41
- - !ruby/object:Gem::Dependency
42
- name: rake
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '12.0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '12.0'
55
- - !ruby/object:Gem::Dependency
56
- name: minitest
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '5.0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '5.0'
69
- - !ruby/object:Gem::Dependency
70
- name: minitest-reporters
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '1.1'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '1.1'
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 0.72.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 0.72.0
97
- description:
27
+ description:
98
28
  email:
99
29
  - opensource@mattbrictson.com
100
30
  executables: []
101
31
  extensions: []
102
32
  extra_rdoc_files: []
103
33
  files:
104
- - ".github/main.workflow"
105
- - ".github/release-drafter.yml"
106
- - ".gitignore"
107
- - ".rubocop.yml"
108
- - ".travis.yml"
109
- - CHANGELOG.md
110
- - CODE_OF_CONDUCT.md
111
- - CONTRIBUTING.md
112
- - Gemfile
113
34
  - LICENSE.txt
114
35
  - README.md
115
- - Rakefile
116
- - bin/console
117
- - bin/setup
118
36
  - lib/pgcli/rails.rb
119
37
  - lib/pgcli/rails/dbconsole.rb
120
38
  - lib/pgcli/rails/railtie.rb
121
39
  - lib/pgcli/rails/tasks.rake
122
40
  - lib/pgcli/rails/version.rb
123
- - pgcli-rails.gemspec
124
41
  homepage: https://github.com/mattbrictson/pgcli-rails
125
42
  licenses:
126
43
  - MIT
127
- metadata: {}
128
- post_install_message:
44
+ metadata:
45
+ bug_tracker_uri: https://github.com/mattbrictson/pgcli-rails/issues
46
+ changelog_uri: https://github.com/mattbrictson/pgcli-rails/releases
47
+ source_code_uri: https://github.com/mattbrictson/pgcli-rails
48
+ homepage_uri: https://github.com/mattbrictson/pgcli-rails
49
+ post_install_message:
129
50
  rdoc_options: []
130
51
  require_paths:
131
52
  - lib
@@ -133,15 +54,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
133
54
  requirements:
134
55
  - - ">="
135
56
  - !ruby/object:Gem::Version
136
- version: 2.4.0
57
+ version: 2.6.0
137
58
  required_rubygems_version: !ruby/object:Gem::Requirement
138
59
  requirements:
139
60
  - - ">="
140
61
  - !ruby/object:Gem::Version
141
62
  version: '0'
142
63
  requirements: []
143
- rubygems_version: 3.0.4
144
- signing_key:
64
+ rubygems_version: 3.2.22
65
+ signing_key:
145
66
  specification_version: 4
146
67
  summary: Replaces the Rails PostgreSQL dbconsole with the much nicer pgcli
147
68
  test_files: []
@@ -1,9 +0,0 @@
1
- workflow "Push" {
2
- on = "push"
3
- resolves = ["Draft Release"]
4
- }
5
-
6
- action "Draft Release" {
7
- uses = "toolmantim/release-drafter@v5.1.1"
8
- secrets = ["GITHUB_TOKEN"]
9
- }
@@ -1,17 +0,0 @@
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/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
data/.rubocop.yml DELETED
@@ -1,47 +0,0 @@
1
- AllCops:
2
- DisplayCopNames: true
3
- DisplayStyleGuide: true
4
- TargetRubyVersion: 2.4
5
- Exclude:
6
- - "*.gemspec"
7
- - "tmp/**/*"
8
- - "vendor/**/*"
9
-
10
- Metrics/AbcSize:
11
- Exclude:
12
- - "test/**/*"
13
-
14
- Metrics/MethodLength:
15
- Exclude:
16
- - "test/**/*"
17
-
18
- Metrics/ClassLength:
19
- Exclude:
20
- - "test/**/*"
21
-
22
- Naming/MemoizedInstanceVariableName:
23
- EnforcedStyleForLeadingUnderscores: optional
24
-
25
- Style/BarePercentLiterals:
26
- EnforcedStyle: percent_q
27
-
28
- Style/ClassAndModuleChildren:
29
- Enabled: false
30
-
31
- Style/Documentation:
32
- Enabled: false
33
-
34
- Style/DoubleNegation:
35
- Enabled: false
36
-
37
- Style/FrozenStringLiteralComment:
38
- Enabled: false
39
-
40
- Style/HashSyntax:
41
- EnforcedStyle: ruby19
42
-
43
- Style/SpaceAroundEqualsInParameterDefault:
44
- EnforcedStyle: no_space
45
-
46
- Style/StringLiterals:
47
- EnforcedStyle: double_quotes
data/.travis.yml DELETED
@@ -1,14 +0,0 @@
1
- ---
2
- sudo: false
3
- language: ruby
4
- cache: bundler
5
- branches:
6
- only:
7
- - master
8
- rvm:
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 DELETED
@@ -1 +0,0 @@
1
- Release notes for this project are kept here: https://github.com/mattbrictson/pgcli-rails/releases
data/CODE_OF_CONDUCT.md DELETED
@@ -1,49 +0,0 @@
1
- # Contributor Code of Conduct
2
-
3
- As contributors and maintainers of this project, and in the interest of
4
- fostering an open and welcoming community, we pledge to respect all people who
5
- contribute through reporting issues, posting feature requests, updating
6
- documentation, submitting pull requests or patches, and other activities.
7
-
8
- We are committed to making participation in this project a harassment-free
9
- experience for everyone, regardless of level of experience, gender, gender
10
- identity and expression, sexual orientation, disability, personal appearance,
11
- body size, race, ethnicity, age, religion, or nationality.
12
-
13
- Examples of unacceptable behavior by participants include:
14
-
15
- * The use of sexualized language or imagery
16
- * Personal attacks
17
- * Trolling or insulting/derogatory comments
18
- * Public or private harassment
19
- * Publishing other's private information, such as physical or electronic
20
- addresses, without explicit permission
21
- * Other unethical or unprofessional conduct
22
-
23
- Project maintainers have the right and responsibility to remove, edit, or
24
- reject comments, commits, code, wiki edits, issues, and other contributions
25
- that are not aligned to this Code of Conduct, or to ban temporarily or
26
- permanently any contributor for other behaviors that they deem inappropriate,
27
- threatening, offensive, or harmful.
28
-
29
- By adopting this Code of Conduct, project maintainers commit themselves to
30
- fairly and consistently applying these principles to every aspect of managing
31
- this project. Project maintainers who do not follow or enforce the Code of
32
- Conduct may be permanently removed from the project team.
33
-
34
- This code of conduct applies both within project spaces and in public spaces
35
- when an individual is representing the project or its community.
36
-
37
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
38
- reported by contacting a project maintainer at matt@mattbrictson.com. All
39
- complaints will be reviewed and investigated and will result in a response that
40
- is deemed necessary and appropriate to the circumstances. Maintainers are
41
- obligated to maintain confidentiality with regard to the reporter of an
42
- incident.
43
-
44
- This Code of Conduct is adapted from the [Contributor Covenant][homepage],
45
- version 1.3.0, available at
46
- [http://contributor-covenant.org/version/1/3/0/][version]
47
-
48
- [homepage]: http://contributor-covenant.org
49
- [version]: http://contributor-covenant.org/version/1/3/0/
data/CONTRIBUTING.md DELETED
@@ -1,24 +0,0 @@
1
- # Contributing to pgcli-rails
2
-
3
- Have a feature idea, bug fix, or refactoring suggestion? Contributions are welcome!
4
-
5
- ## Pull requests
6
-
7
- 1. Check [Issues][] to see if your contribution has already been discussed and/or implemented.
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
- 3. Once you have the :thumbsup:, fork the repo, make your changes, and open a PR.
10
-
11
- ## Coding guidelines
12
-
13
- * This project has a coding style enforced by [RuboCop][]. Use hash rockets and double-quoted strings, and otherwise try to follow the [Ruby style guide][style].
14
- * Writing tests is strongly encouraged! This project uses Minitest.
15
-
16
- ## Getting started
17
-
18
- After checking out the repo, run `bin/setup` to install dependencies.
19
-
20
- Use `rake` to execute all of pgcli-rails's tests and RuboCop checks
21
-
22
- [Issues]: https://github.com/mattbrictson/pgcli-rails/issues
23
- [RuboCop]: https://github.com/bbatsov/rubocop
24
- [style]: https://github.com/bbatsov/ruby-style-guide
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in pgcli-rails.gemspec
4
- gemspec
data/Rakefile DELETED
@@ -1,107 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
- require "rubocop/rake_task"
4
-
5
- task default: %i[test rubocop]
6
-
7
- RuboCop::RakeTask.new
8
-
9
- Rake::TestTask.new("test") do |t|
10
- t.libs << "test"
11
- t.libs << "lib"
12
- t.test_files = FileList["test/**/*_test.rb"]
13
- end
14
-
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"
50
-
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/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "pgcli/rails"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
data/pgcli-rails.gemspec DELETED
@@ -1,30 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "pgcli/rails/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "pgcli-rails"
8
- spec.version = Pgcli::Rails::VERSION
9
- spec.authors = ["Matt Brictson"]
10
- spec.email = ["opensource@mattbrictson.com"]
11
-
12
- spec.summary = "Replaces the Rails PostgreSQL dbconsole with the much nicer pgcli"
13
- spec.homepage = "https://github.com/mattbrictson/pgcli-rails"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- spec.required_ruby_version = ">= 2.4.0"
22
-
23
- spec.add_dependency "railties", ">= 4.2.0"
24
-
25
- spec.add_development_dependency "bundler", "~> 2.0"
26
- spec.add_development_dependency "rake", "~> 12.0"
27
- spec.add_development_dependency "minitest", "~> 5.0"
28
- spec.add_development_dependency "minitest-reporters", "~> 1.1"
29
- spec.add_development_dependency "rubocop", "0.72.0"
30
- end