rails-pg-extras 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +29 -0
- data/.gitignore +2 -0
- data/README.md +1 -1
- data/lib/rails-pg-extras/version.rb +1 -1
- data/rails-pg-extras.gemspec +4 -0
- data/spec/smoke_spec.rb +28 -0
- data/spec/spec_helper.rb +20 -0
- metadata +51 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cc8fd2765b1470aa6c7f8786b0f2cbe89ae543dfe02339091d5d4d3af8decb82
|
4
|
+
data.tar.gz: c0d29ac67ae447bb91e75bd48a87a7d148cc6da05ab9430dd5b138be5d598a0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a958d2044dd13b23daf446f7e776fc735800e5a7b7efcf90f52ec178c203c6442e920e3c97c41c82d34940835fa6de006e7de5be62838cad1842457adc60510
|
7
|
+
data.tar.gz: b9f9d733cd3d292fe5282785458d46a40a051a76feb5504bd59f7d138844f091997635258c76cf08e561ffae47be80b3e68669db177a5be75c94f77583b53ac2
|
@@ -0,0 +1,29 @@
|
|
1
|
+
version: 2
|
2
|
+
jobs:
|
3
|
+
test:
|
4
|
+
docker:
|
5
|
+
- image: circleci/ruby:2.6.5
|
6
|
+
environment:
|
7
|
+
DATABASE_URL: postgresql://postgres:secret@localhost:5432/rails-pg-extras-test
|
8
|
+
- image: circleci/postgres:11.5
|
9
|
+
environment:
|
10
|
+
POSTGRES_USER: postgres
|
11
|
+
POSTGRES_DB: rails-pg-extras-test
|
12
|
+
POSTGRES_PASSWORD: secret
|
13
|
+
parallelism: 1
|
14
|
+
steps:
|
15
|
+
- checkout
|
16
|
+
- run: gem update --system
|
17
|
+
- run: gem install bundler
|
18
|
+
- run: bundle install --path vendor/bundle
|
19
|
+
- run: sudo apt install postgresql-client
|
20
|
+
- run: dockerize -wait tcp://localhost:5432 -timeout 1m
|
21
|
+
- run:
|
22
|
+
name: Run specs
|
23
|
+
command: |
|
24
|
+
bundle exec rspec spec/
|
25
|
+
workflows:
|
26
|
+
version: 2
|
27
|
+
test:
|
28
|
+
jobs:
|
29
|
+
- test
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Rails PG Extras [![Gem Version](https://badge.fury.io/rb/rails-pg-extras.svg)](https://badge.fury.io/rb/rails-pg-extras)
|
1
|
+
# Rails PG Extras [![Gem Version](https://badge.fury.io/rb/rails-pg-extras.svg)](https://badge.fury.io/rb/rails-pg-extras) [![CircleCI](https://circleci.com/gh/pawurb/rails-pg-extras.svg?style=svg)](https://circleci.com/gh/pawurb/rails-pg-extras)
|
2
2
|
|
3
3
|
Rails port of [Heroku PG Extras](https://github.com/heroku/heroku-pg-extras). The goal of this project is to provide a powerful insights into PostgreSQL database for Ruby on Rails apps that are not using the default Heroku PostgreSQL plugin.
|
4
4
|
|
data/rails-pg-extras.gemspec
CHANGED
@@ -12,8 +12,12 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.description = %q{ Rails port of Heroku PG Extras. The goal of this project is to provide a powerful insights into PostgreSQL database for Ruby on Rails apps that are not using the default Heroku PostgreSQL plugin. }
|
13
13
|
gem.homepage = "http://github.com/pawurb/rails-pg-extras"
|
14
14
|
gem.files = `git ls-files`.split("\n")
|
15
|
+
gem.test_files = gem.files.grep(%r{^(spec)/})
|
15
16
|
gem.require_paths = ["lib"]
|
16
17
|
gem.license = "MIT"
|
17
18
|
gem.add_dependency "activerecord"
|
19
|
+
gem.add_dependency "pg"
|
18
20
|
gem.add_dependency "terminal-table"
|
21
|
+
gem.add_development_dependency "rake"
|
22
|
+
gem.add_development_dependency "rspec"
|
19
23
|
end
|
data/spec/smoke_spec.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe RailsPGExtras do
|
6
|
+
RailsPGExtras::QUERIES.each do |query_name|
|
7
|
+
it "#{query_name} description can be read" do
|
8
|
+
expect do
|
9
|
+
RailsPGExtras.description_for(
|
10
|
+
query_name: query_name
|
11
|
+
)
|
12
|
+
end.not_to raise_error
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
PG_STATS_DEPENDENT_QUERIES = %i(calls outliers)
|
17
|
+
|
18
|
+
(RailsPGExtras::QUERIES - PG_STATS_DEPENDENT_QUERIES).each do |query_name|
|
19
|
+
it "#{query_name} query can be executed" do
|
20
|
+
expect do
|
21
|
+
result = RailsPGExtras.run_query(
|
22
|
+
query_name: query_name,
|
23
|
+
in_format: :hash
|
24
|
+
)
|
25
|
+
end.not_to raise_error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'active_record'
|
6
|
+
require_relative '../lib/rails-pg-extras'
|
7
|
+
|
8
|
+
ENV["DATABASE_URL"] ||= "postgresql://postgres:secret@localhost:5432/rails-pg-extras-test"
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.before :suite do
|
12
|
+
ActiveRecord::Base.establish_connection(
|
13
|
+
ENV.fetch("DATABASE_URL")
|
14
|
+
)
|
15
|
+
end
|
16
|
+
|
17
|
+
config.after :suite do
|
18
|
+
ActiveRecord::Base.remove_connection
|
19
|
+
end
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-pg-extras
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pawurb
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pg
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: terminal-table
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +52,34 @@ dependencies:
|
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
41
83
|
description: " Rails port of Heroku PG Extras. The goal of this project is to provide
|
42
84
|
a powerful insights into PostgreSQL database for Ruby on Rails apps that are not
|
43
85
|
using the default Heroku PostgreSQL plugin. "
|
@@ -47,6 +89,7 @@ executables: []
|
|
47
89
|
extensions: []
|
48
90
|
extra_rdoc_files: []
|
49
91
|
files:
|
92
|
+
- ".circleci/config.yml"
|
50
93
|
- ".gitignore"
|
51
94
|
- Gemfile
|
52
95
|
- LICENSE.txt
|
@@ -77,6 +120,8 @@ files:
|
|
77
120
|
- lib/rails-pg-extras/tasks/all.rake
|
78
121
|
- lib/rails-pg-extras/version.rb
|
79
122
|
- rails-pg-extras.gemspec
|
123
|
+
- spec/smoke_spec.rb
|
124
|
+
- spec/spec_helper.rb
|
80
125
|
homepage: http://github.com/pawurb/rails-pg-extras
|
81
126
|
licenses:
|
82
127
|
- MIT
|
@@ -96,8 +141,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
141
|
- !ruby/object:Gem::Version
|
97
142
|
version: '0'
|
98
143
|
requirements: []
|
99
|
-
rubygems_version: 3.0.
|
144
|
+
rubygems_version: 3.0.6
|
100
145
|
signing_key:
|
101
146
|
specification_version: 4
|
102
147
|
summary: Rails PostgreSQL performance database insights
|
103
|
-
test_files:
|
148
|
+
test_files:
|
149
|
+
- spec/smoke_spec.rb
|
150
|
+
- spec/spec_helper.rb
|