gutentag 2.5.3 → 2.5.4
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/workflows/ci.yml +90 -0
- data/.rubocop.yml +4 -0
- data/Appraisals +11 -4
- data/CHANGELOG.md +7 -1
- data/Gemfile +6 -1
- data/gutentag.gemspec +2 -2
- data/lib/gutentag/tag_validations.rb +1 -0
- data/spec/internal/config/database.yml +16 -1
- metadata +5 -5
- data/.travis.yml +0 -23
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7af5fa8abd650550bd231819b8b4f043a17a15f0afba13dc443bf1b42ddd7a26
|
|
4
|
+
data.tar.gz: 7e22c0cc2a8c0de4840264b1e9cceb62c4504fc8df5d0e636a4894aa298152b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44ebaff249f6bba8798d98944177e3eac9569dc7731a3814add6e10fa1b2c5db1f491175e00bda53a25d84d6a96bdd622a5a812adac032017234c54864072002
|
|
7
|
+
data.tar.gz: fd440589741ffe77dfbde8649095c2bb5fae9a656d5b0cfb110390a8e156d49840cbead9a0e1e19d01a19a527a2d2e85dbd60e31a807fe25c6e2f746e5b59c55
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on: [push, pull_request]
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
test:
|
|
7
|
+
runs-on: ubuntu-18.04
|
|
8
|
+
|
|
9
|
+
strategy:
|
|
10
|
+
fail-fast: false
|
|
11
|
+
matrix:
|
|
12
|
+
ruby: [ '2.4', '2.5', '2.6', '2.7', '3.0' ]
|
|
13
|
+
bundler: [ '1.17.3', '2.1.4' ]
|
|
14
|
+
database: [ 'mysql', 'postgresql', 'sqlite' ]
|
|
15
|
+
exclude:
|
|
16
|
+
- ruby: '2.4'
|
|
17
|
+
bundler: '2.1.4'
|
|
18
|
+
- ruby: '2.5'
|
|
19
|
+
bundler: '2.1.4'
|
|
20
|
+
- ruby: '2.6'
|
|
21
|
+
bundler: '2.1.4'
|
|
22
|
+
- ruby: '2.7'
|
|
23
|
+
bundler: '1.17.3'
|
|
24
|
+
- ruby: '3.0'
|
|
25
|
+
bundler: '1.17.3'
|
|
26
|
+
|
|
27
|
+
services:
|
|
28
|
+
postgres:
|
|
29
|
+
image: postgres:10
|
|
30
|
+
env:
|
|
31
|
+
POSTGRES_USER: root
|
|
32
|
+
POSTGRES_PASSWORD: gutentag
|
|
33
|
+
POSTGRES_DB: test
|
|
34
|
+
ports: ['5432:5432']
|
|
35
|
+
# needed because the postgres container does not provide a healthcheck
|
|
36
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
37
|
+
|
|
38
|
+
mysql:
|
|
39
|
+
image: mysql:5.7
|
|
40
|
+
env:
|
|
41
|
+
MYSQL_ROOT_PASSWORD: gutentag
|
|
42
|
+
MYSQL_DATABASE: test
|
|
43
|
+
ports: ['3306:3306']
|
|
44
|
+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
|
45
|
+
|
|
46
|
+
steps:
|
|
47
|
+
- name: Check out code
|
|
48
|
+
uses: actions/checkout@v2
|
|
49
|
+
- name: Set up ruby
|
|
50
|
+
uses: ruby/setup-ruby@v1
|
|
51
|
+
with:
|
|
52
|
+
ruby-version: ${{ matrix.ruby }}
|
|
53
|
+
bundler: ${{ matrix.bundler }}
|
|
54
|
+
bundler-cache: true
|
|
55
|
+
|
|
56
|
+
- name: Set up Bundler
|
|
57
|
+
run: |
|
|
58
|
+
export BUNDLER_VERSION=${{ matrix.bundler }}
|
|
59
|
+
export BUNDLE_PATH=$PWD/vendor/bundle
|
|
60
|
+
|
|
61
|
+
gem update --system
|
|
62
|
+
|
|
63
|
+
bundle _${{ matrix.bundler }}_ config set path $PWD/$BUNDLE_PATH
|
|
64
|
+
bundle _${{ matrix.bundler }}_ install --jobs=4 --retry=3
|
|
65
|
+
bundle _${{ matrix.bundler }}_ update
|
|
66
|
+
- name: Set up Appraisal
|
|
67
|
+
run: bundle exec appraisal update
|
|
68
|
+
- name: Test
|
|
69
|
+
env:
|
|
70
|
+
CI: "true"
|
|
71
|
+
DATABASE: ${{ matrix.database }}
|
|
72
|
+
DB_USERNAME: root
|
|
73
|
+
DB_PASSWORD: gutentag
|
|
74
|
+
DB_HOST: 127.0.0.1
|
|
75
|
+
run: bundle exec appraisal rspec
|
|
76
|
+
|
|
77
|
+
rubocop:
|
|
78
|
+
runs-on: ubuntu-18.04
|
|
79
|
+
|
|
80
|
+
steps:
|
|
81
|
+
- name: Check out code
|
|
82
|
+
uses: actions/checkout@v2
|
|
83
|
+
- name: Set up ruby
|
|
84
|
+
uses: ruby/setup-ruby@v1
|
|
85
|
+
with:
|
|
86
|
+
ruby-version: 2.7
|
|
87
|
+
bundler: 2.1.4
|
|
88
|
+
bundler-cache: true
|
|
89
|
+
- name: Rubocop
|
|
90
|
+
run: bundle exec rubocop
|
data/.rubocop.yml
CHANGED
data/Appraisals
CHANGED
|
@@ -22,22 +22,29 @@ end if RUBY_VERSION.to_f < 2.7
|
|
|
22
22
|
appraise "rails_5_0" do
|
|
23
23
|
gem "rails", "~> 5.0.3"
|
|
24
24
|
gem "mysql2", "~> 0.4.0", :platform => :ruby
|
|
25
|
-
end if RUBY_VERSION.to_f >= 2.2
|
|
25
|
+
end if RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.7
|
|
26
26
|
|
|
27
27
|
appraise "rails_5_1" do
|
|
28
28
|
gem "rails", "~> 5.1.1"
|
|
29
29
|
gem "mysql2", "~> 0.4.0", :platform => :ruby
|
|
30
|
-
end if RUBY_VERSION.to_f >= 2.2
|
|
30
|
+
end if RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.7
|
|
31
31
|
|
|
32
32
|
appraise "rails_5_2" do
|
|
33
33
|
gem "rails", "~> 5.2.0"
|
|
34
34
|
gem "pg", "~> 1.0", :platform => :ruby
|
|
35
35
|
gem "mysql2", "~> 0.5.0", :platform => :ruby
|
|
36
|
-
end if RUBY_VERSION.to_f >= 2.2
|
|
36
|
+
end if RUBY_VERSION.to_f >= 2.2 && RUBY_VERSION.to_f <= 2.7
|
|
37
37
|
|
|
38
38
|
appraise "rails_6_0" do
|
|
39
39
|
gem "rails", "~> 6.0.0"
|
|
40
40
|
gem "pg", "~> 1.0", :platform => :ruby
|
|
41
41
|
gem "mysql2", "~> 0.5.0", :platform => :ruby
|
|
42
|
-
gem "sqlite3", "~> 1.4",
|
|
42
|
+
gem "sqlite3", "~> 1.4", :platform => :ruby
|
|
43
|
+
end if RUBY_VERSION.to_f >= 2.5 && RUBY_PLATFORM != "java"
|
|
44
|
+
|
|
45
|
+
appraise "rails_6_1" do
|
|
46
|
+
gem "rails", "~> 6.1.0"
|
|
47
|
+
gem "pg", "~> 1.0", :platform => :ruby
|
|
48
|
+
gem "mysql2", "~> 0.5.0", :platform => :ruby
|
|
49
|
+
gem "sqlite3", "~> 1.4", :platform => :ruby
|
|
43
50
|
end if RUBY_VERSION.to_f >= 2.5 && RUBY_PLATFORM != "java"
|
data/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project (at least, from v0.5.0 onwards) will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 2.5.4 - 2021-02-21
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
* Don't apply the tag length validation when `ActiveRecord::ConnectionNotEstablished` exceptions are raised. ([John Duff](https://github.com/jduff) in [#77](https://github.com/pat/gutentag/pull/77)).
|
|
10
|
+
|
|
5
11
|
## 2.5.3 - 2020-06-28
|
|
6
12
|
|
|
7
13
|
### Fixed
|
|
8
14
|
|
|
9
|
-
* Use `saved_change_to_tag_names?` instead of `tag_names_previously_changed?` for Rails 5.1+ ([Morten Trolle](https://github.com/mtrolle) in [70](https://github.com/pat/gutentag/pull/70)).
|
|
15
|
+
* Use `saved_change_to_tag_names?` instead of `tag_names_previously_changed?` for Rails 5.1+ ([Morten Trolle](https://github.com/mtrolle) in [#70](https://github.com/pat/gutentag/pull/70)).
|
|
10
16
|
* `Gutentag::Tag.names_for_scope` now handles empty scopes ([Mike Gunderloy](https://github.com/ffmike) in [#73](https://github.com/pat/gutentag/pull/73)).
|
|
11
17
|
|
|
12
18
|
## 2.5.2 - 2019-07-08
|
data/Gemfile
CHANGED
|
@@ -8,7 +8,12 @@ gem "test-unit", :platform => :ruby_22
|
|
|
8
8
|
|
|
9
9
|
gem "mysql2", "~> 0.3", :platform => :ruby
|
|
10
10
|
gem "pg", "~> 0.18", :platform => :ruby
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
if RUBY_VERSION.to_f < 3.0
|
|
13
|
+
gem "sqlite3", "~> 1.3.13"
|
|
14
|
+
else
|
|
15
|
+
gem "sqlite3", "~> 1.4"
|
|
16
|
+
end
|
|
12
17
|
|
|
13
18
|
gem "activerecord-jdbcmysql-adapter", ">= 1.3.23", :platform => :jruby
|
|
14
19
|
gem "activerecord-jdbcpostgresql-adapter", ">= 1.3.23", :platform => :jruby
|
data/gutentag.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "gutentag"
|
|
5
|
-
s.version = "2.5.
|
|
5
|
+
s.version = "2.5.4"
|
|
6
6
|
s.authors = ["Pat Allan"]
|
|
7
7
|
s.email = ["pat@freelancing-gods.com"]
|
|
8
8
|
s.homepage = "https://github.com/pat/gutentag"
|
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
|
16
16
|
|
|
17
17
|
s.add_runtime_dependency "activerecord", ">= 3.2.0"
|
|
18
18
|
|
|
19
|
-
s.add_development_dependency "appraisal", "~> 2.
|
|
19
|
+
s.add_development_dependency "appraisal", "~> 2.3"
|
|
20
20
|
s.add_development_dependency "bundler", ">= 1.17"
|
|
21
21
|
s.add_development_dependency "combustion", "~> 1.1"
|
|
22
22
|
s.add_development_dependency "database_cleaner", "~> 1.6"
|
|
@@ -13,6 +13,7 @@ class Gutentag::TagValidations
|
|
|
13
13
|
if ActiveRecord::VERSION::STRING.to_f > 4.0
|
|
14
14
|
classes << ActiveRecord::NoDatabaseError
|
|
15
15
|
end
|
|
16
|
+
classes << ActiveRecord::ConnectionNotEstablished
|
|
16
17
|
classes << Mysql2::Error if defined?(::Mysql2)
|
|
17
18
|
classes << PG::ConnectionBad if defined?(::PG)
|
|
18
19
|
classes
|
|
@@ -2,11 +2,26 @@
|
|
|
2
2
|
test:
|
|
3
3
|
adapter: mysql2
|
|
4
4
|
database: gutentag
|
|
5
|
-
username: root
|
|
5
|
+
username: <%= ENV.fetch("DB_USERNAME", "root") %>
|
|
6
|
+
<% if ENV["DB_HOST"] %>
|
|
7
|
+
host: <%= ENV["DB_HOST"] %>
|
|
8
|
+
<% end %>
|
|
9
|
+
<% if ENV["DB_PASSWORD"] %>
|
|
10
|
+
password: <%= ENV["DB_PASSWORD"] %>
|
|
11
|
+
<% end %>
|
|
6
12
|
<% elsif ENV["DATABASE"] == "postgres" %>
|
|
7
13
|
test:
|
|
8
14
|
adapter: postgresql
|
|
9
15
|
database: gutentag
|
|
16
|
+
<% if ENV["DB_HOST"] %>
|
|
17
|
+
host: <%= ENV["DB_HOST"] %>
|
|
18
|
+
<% end %>
|
|
19
|
+
<% if ENV["DB_USERNAME"] %>
|
|
20
|
+
username: <%= ENV["DB_USERNAME"] %>
|
|
21
|
+
<% end %>
|
|
22
|
+
<% if ENV["DB_PASSWORD"] %>
|
|
23
|
+
password: <%= ENV["DB_PASSWORD"] %>
|
|
24
|
+
<% end %>
|
|
10
25
|
<% else %>
|
|
11
26
|
test:
|
|
12
27
|
adapter: sqlite3
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gutentag
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.5.
|
|
4
|
+
version: 2.5.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pat Allan
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2021-02-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activerecord
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 2.
|
|
33
|
+
version: '2.3'
|
|
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: 2.
|
|
40
|
+
version: '2.3'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: bundler
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -143,9 +143,9 @@ executables: []
|
|
|
143
143
|
extensions: []
|
|
144
144
|
extra_rdoc_files: []
|
|
145
145
|
files:
|
|
146
|
+
- ".github/workflows/ci.yml"
|
|
146
147
|
- ".gitignore"
|
|
147
148
|
- ".rubocop.yml"
|
|
148
|
-
- ".travis.yml"
|
|
149
149
|
- Appraisals
|
|
150
150
|
- CHANGELOG.md
|
|
151
151
|
- Gemfile
|
data/.travis.yml
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
language: ruby
|
|
2
|
-
dist: xenial
|
|
3
|
-
script: bundle exec appraisal rake
|
|
4
|
-
rvm:
|
|
5
|
-
- 2.3.8
|
|
6
|
-
- 2.4.10
|
|
7
|
-
- 2.5.8
|
|
8
|
-
- 2.6.6
|
|
9
|
-
- 2.7.1
|
|
10
|
-
# - jruby-9.2.8.0
|
|
11
|
-
before_install:
|
|
12
|
-
- gem install bundler --version 1.17.3
|
|
13
|
-
install:
|
|
14
|
-
- bundle _1.17.3_ install --jobs=3 --retry=3
|
|
15
|
-
before_script:
|
|
16
|
-
- bundle exec appraisal install
|
|
17
|
-
env:
|
|
18
|
-
- DATABASE=postgres
|
|
19
|
-
- DATABASE=mysql
|
|
20
|
-
- DATABASE=sqlite
|
|
21
|
-
services:
|
|
22
|
-
- mysql
|
|
23
|
-
- postgresql
|