spring_onion 0.2.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +0 -1
- data/.rubocop.yml +4 -0
- data/.travis.yml +17 -1
- data/Appraisals +9 -0
- data/Dockerfile +14 -0
- data/Gemfile.lock +2 -2
- data/README.md +10 -0
- data/Rakefile +6 -1
- data/docker-compose.yml +15 -0
- data/gemfiles/ar52.gemfile +9 -0
- data/gemfiles/ar60.gemfile +9 -0
- data/lib/spring_onion/explainer.rb +2 -0
- data/lib/spring_onion/version.rb +1 -1
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3d2f2a889573516f94fa1f5fb4a3276a26c31de830a9dabc56785e35c715c57
|
4
|
+
data.tar.gz: de4ca5c79ffdf0455552f54fb95d0316cf5eb075bb281c975e1db3bd0d6a3655
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 247a3d06f4f82854f0fa3a395a5f5ba224362772c3f3c40273029009db5f10babaf5a70de589d1ce08b2c242ec4d1072ab038d0dfb92196262c2527094f879ea
|
7
|
+
data.tar.gz: 6754099ea2ffb1d6ce713d665954dfb7ebce6f74a51141f85006ff06e4b0bc32083ea155e2c116d22a59552a97d69efa62655935f79337d5736e1883fb448c8d
|
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
@@ -4,6 +4,8 @@ AllCops:
|
|
4
4
|
TargetRubyVersion: 2.5
|
5
5
|
Style/Documentation:
|
6
6
|
Enabled: false
|
7
|
+
Style/TrailingCommaInArrayLiteral:
|
8
|
+
EnforcedStyleForMultiline: consistent_comma
|
7
9
|
Style/TrailingCommaInHashLiteral:
|
8
10
|
EnforcedStyleForMultiline: consistent_comma
|
9
11
|
Metrics/AbcSize:
|
@@ -12,6 +14,8 @@ Metrics/CyclomaticComplexity:
|
|
12
14
|
Enabled: false
|
13
15
|
Metrics/MethodLength:
|
14
16
|
Enabled: false
|
17
|
+
Metrics/BlockLength:
|
18
|
+
Enabled: false
|
15
19
|
Layout/LineLength:
|
16
20
|
Enabled: false
|
17
21
|
|
data/.travis.yml
CHANGED
@@ -2,5 +2,21 @@
|
|
2
2
|
language: ruby
|
3
3
|
cache: bundler
|
4
4
|
rvm:
|
5
|
+
- 2.5.8
|
5
6
|
- 2.6.6
|
6
|
-
|
7
|
+
- 2.7.1
|
8
|
+
gemfile:
|
9
|
+
- gemfiles/ar52.gemfile
|
10
|
+
- gemfiles/ar60.gemfile
|
11
|
+
services:
|
12
|
+
- mysql
|
13
|
+
env:
|
14
|
+
- DATABASE_URL=mysql2://travis@localhost/sakila
|
15
|
+
before_install:
|
16
|
+
- gem install bundler -v 2.1.2
|
17
|
+
- curl -sSfL https://downloads.mysql.com/docs/sakila-db.tar.gz -o - | tar zxf -
|
18
|
+
- cd sakila-db
|
19
|
+
- mysql < sakila-schema.sql
|
20
|
+
- mysql < sakila-data.sql
|
21
|
+
script:
|
22
|
+
- bundle exec rake
|
data/Appraisals
ADDED
data/Dockerfile
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
FROM rubylang/ruby:2.5-bionic
|
2
|
+
|
3
|
+
RUN apt-get update && \
|
4
|
+
apt-get install -y \
|
5
|
+
mysql-client \
|
6
|
+
libmysqlclient-dev \
|
7
|
+
rubygems \
|
8
|
+
curl
|
9
|
+
|
10
|
+
COPY ./ /mnt/
|
11
|
+
WORKDIR /mnt
|
12
|
+
RUN gem update bundler -f && \
|
13
|
+
bundle install && \
|
14
|
+
bundle exec appraisal install
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
# SpringOnion
|
2
2
|
|
3
3
|
Log MySQL queries with EXPLAIN that may be slow.
|
4
|
+
|
4
5
|
Inspired by [MySQLCasualLog.pm](https://gist.github.com/kamipo/839e8a5b6d12bddba539).
|
5
6
|
|
7
|
+
[![Build Status](https://travis-ci.org/winebarrel/spring_onion.svg?branch=master)](https://travis-ci.org/winebarrel/spring_onion)
|
8
|
+
|
6
9
|
## Installation
|
7
10
|
|
8
11
|
Add this line to your application's Gemfile:
|
@@ -75,3 +78,10 @@ p Employee.all.to_a.count
|
|
75
78
|
]
|
76
79
|
}
|
77
80
|
```
|
81
|
+
|
82
|
+
## Test
|
83
|
+
|
84
|
+
```sh
|
85
|
+
docker-compose build
|
86
|
+
docker-compose run client bundle exec appraisal ar60 rake
|
87
|
+
```
|
data/Rakefile
CHANGED
@@ -2,7 +2,12 @@
|
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
5
6
|
|
6
7
|
RSpec::Core::RakeTask.new(:spec)
|
7
8
|
|
8
|
-
|
9
|
+
RuboCop::RakeTask.new do |task|
|
10
|
+
task.options = %w[-c .rubocop.yml]
|
11
|
+
end
|
12
|
+
|
13
|
+
task default: %i[rubocop spec]
|
data/docker-compose.yml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
version: "3.8"
|
2
|
+
services:
|
3
|
+
client:
|
4
|
+
build: .
|
5
|
+
environment:
|
6
|
+
MYSQL_PING_ATTEMPTS: "10"
|
7
|
+
DATABASE_URL: mysql2://root@db/sakila
|
8
|
+
volumes:
|
9
|
+
- ./:/mnt
|
10
|
+
depends_on:
|
11
|
+
- db
|
12
|
+
db:
|
13
|
+
image: budougumi0617/mysql-sakila:5.7
|
14
|
+
environment:
|
15
|
+
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
|
data/lib/spring_onion/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spring_onion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- winebarrel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-07-
|
11
|
+
date: 2020-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -133,11 +133,16 @@ files:
|
|
133
133
|
- ".rspec"
|
134
134
|
- ".rubocop.yml"
|
135
135
|
- ".travis.yml"
|
136
|
+
- Appraisals
|
137
|
+
- Dockerfile
|
136
138
|
- Gemfile
|
137
139
|
- Gemfile.lock
|
138
140
|
- LICENSE.txt
|
139
141
|
- README.md
|
140
142
|
- Rakefile
|
143
|
+
- docker-compose.yml
|
144
|
+
- gemfiles/ar52.gemfile
|
145
|
+
- gemfiles/ar60.gemfile
|
141
146
|
- lib/spring_onion.rb
|
142
147
|
- lib/spring_onion/config.rb
|
143
148
|
- lib/spring_onion/error.rb
|