image_optim_rails 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/check.yml +35 -0
- data/.github/workflows/rubocop.yml +16 -0
- data/.rubocop.yml +18 -8
- data/Appraisals +19 -9
- data/CHANGELOG.markdown +4 -0
- data/Gemfile +1 -5
- data/LICENSE.txt +1 -1
- data/README.markdown +6 -6
- data/image_optim_rails.gemspec +6 -5
- data/spec/spec_helper.rb +1 -1
- metadata +35 -14
- data/.travis.yml +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46fad384b84c00af63a674e3dfd342d647d8a3dbfd0f9ca66ae5bcc50875fc72
|
4
|
+
data.tar.gz: e4a0fc9d32035beaf461a2f2b3b88a34bfff7f0720a5a5d7e2661fb4a6c6f10f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e082b07822f57f78c269f66d15ff163b0f773c6ba1581e80761c7f8e715ead2225c557906f2ac5401b4a6ab6050248484159d2a7f8021e33225d1accc6d280b6
|
7
|
+
data.tar.gz: 6943e4399833c44643575eff5e612d0cd0dd2e03d64ad12acf94d74c9dea74c63dc823df23c263647af58928249907a918c6817b9421806ad09c46f5fcbd729e
|
@@ -0,0 +1,35 @@
|
|
1
|
+
name: check
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
pull_request:
|
5
|
+
schedule:
|
6
|
+
- cron: 45 4 * * 0
|
7
|
+
jobs:
|
8
|
+
check:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby:
|
13
|
+
- '2.0'
|
14
|
+
- '2.1'
|
15
|
+
- '2.2'
|
16
|
+
- '2.3'
|
17
|
+
- '2.4'
|
18
|
+
- '2.5'
|
19
|
+
- '2.6'
|
20
|
+
- '2.7'
|
21
|
+
- '3.0'
|
22
|
+
- '3.1'
|
23
|
+
fail-fast: false
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- uses: ruby/setup-ruby@v1
|
27
|
+
with:
|
28
|
+
ruby-version: "${{ matrix.ruby }}"
|
29
|
+
bundler-cache: true
|
30
|
+
bundler: 1
|
31
|
+
- run: sudo npm install -g svgo
|
32
|
+
- run: curl -L "https://www.jonof.id.au/files/kenutils/pngout-20200115-linux.tar.gz" | sudo tar -xz -C /usr/local/bin --strip-components 2 --wildcards '*/amd64/pngout'
|
33
|
+
- run: RUBYOPT=-rset bundle exec appraisal install --jobs=3 --retry=3
|
34
|
+
- run: bundle exec image_optim --info
|
35
|
+
- run: bundle exec appraisal rspec
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name: rubocop
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
pull_request:
|
5
|
+
schedule:
|
6
|
+
- cron: 45 4 * * 0
|
7
|
+
jobs:
|
8
|
+
rubocop:
|
9
|
+
runs-on: ubuntu-latest
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@v2
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: '3.1'
|
15
|
+
bundler-cache: true
|
16
|
+
- run: bundle exec rubocop
|
data/.rubocop.yml
CHANGED
@@ -3,10 +3,14 @@ AllCops:
|
|
3
3
|
- '*.gemspec'
|
4
4
|
- 'vendor/**/*'
|
5
5
|
- 'gemfiles/*.gemfile'
|
6
|
+
NewCops: enable
|
6
7
|
|
7
8
|
Layout/AccessModifierIndentation:
|
8
9
|
EnforcedStyle: outdent
|
9
10
|
|
11
|
+
Layout/AssignmentIndentation:
|
12
|
+
Enabled: false
|
13
|
+
|
10
14
|
Layout/CaseIndentation:
|
11
15
|
EnforcedStyle: end
|
12
16
|
|
@@ -16,15 +20,15 @@ Layout/DotPosition:
|
|
16
20
|
Layout/EndAlignment:
|
17
21
|
EnforcedStyleAlignWith: variable
|
18
22
|
|
19
|
-
Layout/
|
23
|
+
Layout/FirstArrayElementIndentation:
|
20
24
|
EnforcedStyle: consistent
|
21
25
|
|
22
|
-
Layout/
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Layout/IndentFirstHashElement:
|
26
|
+
Layout/FirstHashElementIndentation:
|
26
27
|
EnforcedStyle: consistent
|
27
28
|
|
29
|
+
Layout/LineLength:
|
30
|
+
Max: 120
|
31
|
+
|
28
32
|
Layout/SpaceBeforeBlockBraces:
|
29
33
|
EnforcedStyle: no_space
|
30
34
|
|
@@ -38,9 +42,6 @@ Metrics/BlockLength:
|
|
38
42
|
Exclude:
|
39
43
|
- 'spec/**/*.rb'
|
40
44
|
|
41
|
-
Metrics/LineLength:
|
42
|
-
Max: 120
|
43
|
-
|
44
45
|
Metrics/MethodLength:
|
45
46
|
Max: 25
|
46
47
|
|
@@ -56,9 +57,18 @@ Style/EmptyCaseCondition:
|
|
56
57
|
Style/ExpandPathArguments:
|
57
58
|
Enabled: false
|
58
59
|
|
60
|
+
Style/HashEachMethods:
|
61
|
+
Enabled: true
|
62
|
+
|
59
63
|
Style/HashSyntax:
|
60
64
|
EnforcedStyle: hash_rockets
|
61
65
|
|
66
|
+
Style/HashTransformKeys:
|
67
|
+
Enabled: false
|
68
|
+
|
69
|
+
Style/HashTransformValues:
|
70
|
+
Enabled: false
|
71
|
+
|
62
72
|
Style/IfUnlessModifier:
|
63
73
|
Enabled: false
|
64
74
|
|
data/Appraisals
CHANGED
@@ -16,20 +16,30 @@ def appgen(gems)
|
|
16
16
|
if RUBY_VERSION < '2.1'
|
17
17
|
gem 'nokogiri', '< 1.7'
|
18
18
|
end
|
19
|
+
|
20
|
+
gem 'tzinfo'
|
21
|
+
|
22
|
+
gem 'sprockets-rails' if gems['railties'] != '~> 3.2' && !gems['sprockets-rails']
|
19
23
|
end
|
20
24
|
end
|
21
25
|
|
22
|
-
if RUBY_VERSION < '2.
|
23
|
-
appgen '
|
26
|
+
if RUBY_VERSION < '2.4'
|
27
|
+
appgen 'railties' => '~> 3.2'
|
28
|
+
end
|
29
|
+
|
30
|
+
if RUBY_VERSION >= '1.9' && RUBY_VERSION < '2.5'
|
31
|
+
appgen 'railties' => '~> 4.0', 'sprockets-rails' => '~> 2.0'
|
32
|
+
appgen 'railties' => '~> 4.0', 'sprockets' => '~> 3.0'
|
24
33
|
end
|
25
34
|
|
26
|
-
if RUBY_VERSION >= '2.
|
27
|
-
appgen '
|
28
|
-
appgen '
|
35
|
+
if RUBY_VERSION >= '2.3' && RUBY_VERSION < '2.7'
|
36
|
+
appgen 'railties' => '~> 5.0', 'sprockets-rails' => '~> 2.0'
|
37
|
+
appgen 'railties' => '~> 5.0', 'sprockets' => '~> 3.0'
|
38
|
+
appgen 'railties' => '~> 5.0', 'sprockets' => '>= 4.0' if RUBY_VERSION >= '2.5'
|
29
39
|
end
|
30
40
|
|
31
|
-
if RUBY_VERSION >= '2.
|
32
|
-
appgen '
|
33
|
-
appgen '
|
34
|
-
appgen '
|
41
|
+
if RUBY_VERSION >= '2.5'
|
42
|
+
appgen 'railties' => '~> 6.0', 'sprockets-rails' => '~> 2.0'
|
43
|
+
appgen 'railties' => '~> 6.0', 'sprockets' => '~> 3.0'
|
44
|
+
appgen 'railties' => '~> 6.0', 'sprockets' => '>= 4.0'
|
35
45
|
end
|
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
## unreleased
|
4
4
|
|
5
|
+
## v0.5.0 (2022-02-02)
|
6
|
+
|
7
|
+
* Depend only on `railties` instead of complete `rails` [#13](https://github.com/toy/image_optim_rails/issues/13) [@toy](https://github.com/toy)
|
8
|
+
|
5
9
|
## v0.4.3 (2019-07-14)
|
6
10
|
|
7
11
|
* Remove deprecated `rubyforge_project` attribute from gemspec [rubygems/rubygems#2436](https://github.com/rubygems/rubygems/pull/2436) [@toy](https://github.com/toy)
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.markdown
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
[![Gem Version](https://img.shields.io/gem/v/image_optim_rails
|
2
|
-
[![Build Status](https://img.shields.io/
|
3
|
-
[![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_rails
|
4
|
-
[![Depfu](https://
|
5
|
-
[![Inch CI](https://inch-ci.org/github/toy/image_optim_rails.svg?branch=master
|
1
|
+
[![Gem Version](https://img.shields.io/gem/v/image_optim_rails?logo=rubygems)](https://rubygems.org/gems/image_optim_rails)
|
2
|
+
[![Build Status](https://img.shields.io/github/workflow/status/toy/image_optim_rails/check/master?logo=github)](https://github.com/toy/image_optim_rails/actions/workflows/check.yml)
|
3
|
+
[![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_rails?logo=codeclimate)](https://codeclimate.com/github/toy/image_optim_rails)
|
4
|
+
[![Depfu](https://img.shields.io/depfu/toy/image_optim_rails)](https://depfu.com/github/toy/image_optim_rails)
|
5
|
+
[![Inch CI](https://inch-ci.org/github/toy/image_optim_rails.svg?branch=master)](https://inch-ci.org/github/toy/image_optim_rails)
|
6
6
|
|
7
7
|
# image\_optim\_rails
|
8
8
|
|
@@ -49,4 +49,4 @@ In separate file [CHANGELOG.markdown](CHANGELOG.markdown).
|
|
49
49
|
|
50
50
|
## Copyright
|
51
51
|
|
52
|
-
Copyright (c) 2013-
|
52
|
+
Copyright (c) 2013-2022 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
|
data/image_optim_rails.gemspec
CHANGED
@@ -2,9 +2,9 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'image_optim_rails'
|
5
|
-
s.version = '0.
|
5
|
+
s.version = '0.5.0'
|
6
6
|
s.summary = %q{Optimize image assets using image_optim}
|
7
|
-
s.homepage = "
|
7
|
+
s.homepage = "https://github.com/toy/#{s.name}"
|
8
8
|
s.authors = ['Ivan Kuchin']
|
9
9
|
s.license = 'MIT'
|
10
10
|
|
@@ -21,12 +21,13 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.require_paths = %w[lib]
|
22
22
|
|
23
23
|
s.add_dependency 'image_optim', '~> 0.24'
|
24
|
-
s.add_dependency '
|
24
|
+
s.add_dependency 'railties'
|
25
25
|
s.add_dependency 'sprockets'
|
26
26
|
|
27
27
|
s.add_development_dependency 'image_optim_pack', '~> 0.2', '>= 0.2.2'
|
28
28
|
s.add_development_dependency 'rspec', '~> 3.0'
|
29
|
-
if RUBY_VERSION >= '2.
|
30
|
-
s.add_development_dependency 'rubocop', '~>
|
29
|
+
if RUBY_VERSION >= '2.5'
|
30
|
+
s.add_development_dependency 'rubocop', '~> 1.22', '!= 1.22.2'
|
31
|
+
s.add_development_dependency 'rubocop-rspec', '~> 2.0'
|
31
32
|
end
|
32
33
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -67,6 +67,6 @@ RSpec::Matchers.define :be_similar_to do |expected, max_difference|
|
|
67
67
|
end
|
68
68
|
failure_message do |actual|
|
69
69
|
"expected #{actual} to have at most #{max_difference} difference from "\
|
70
|
-
|
70
|
+
"#{expected}, got normalized root-mean-square error of #{@diff}"
|
71
71
|
end
|
72
72
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: image_optim_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: image_optim
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0.24'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
@@ -92,23 +92,44 @@ dependencies:
|
|
92
92
|
requirements:
|
93
93
|
- - "~>"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '1.22'
|
96
|
+
- - "!="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 1.22.2
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: !ruby/object:Gem::Requirement
|
102
|
+
requirements:
|
103
|
+
- - "~>"
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
version: '1.22'
|
106
|
+
- - "!="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: 1.22.2
|
109
|
+
- !ruby/object:Gem::Dependency
|
110
|
+
name: rubocop-rspec
|
111
|
+
requirement: !ruby/object:Gem::Requirement
|
112
|
+
requirements:
|
113
|
+
- - "~>"
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
version: '2.0'
|
96
116
|
type: :development
|
97
117
|
prerelease: false
|
98
118
|
version_requirements: !ruby/object:Gem::Requirement
|
99
119
|
requirements:
|
100
120
|
- - "~>"
|
101
121
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0
|
103
|
-
description:
|
104
|
-
email:
|
122
|
+
version: '2.0'
|
123
|
+
description:
|
124
|
+
email:
|
105
125
|
executables: []
|
106
126
|
extensions: []
|
107
127
|
extra_rdoc_files: []
|
108
128
|
files:
|
129
|
+
- ".github/workflows/check.yml"
|
130
|
+
- ".github/workflows/rubocop.yml"
|
109
131
|
- ".gitignore"
|
110
132
|
- ".rubocop.yml"
|
111
|
-
- ".travis.yml"
|
112
133
|
- Appraisals
|
113
134
|
- CHANGELOG.markdown
|
114
135
|
- Gemfile
|
@@ -120,15 +141,15 @@ files:
|
|
120
141
|
- spec/dummy/app/assets/config/manifest.js
|
121
142
|
- spec/image_optim/railtie_spec.rb
|
122
143
|
- spec/spec_helper.rb
|
123
|
-
homepage:
|
144
|
+
homepage: https://github.com/toy/image_optim_rails
|
124
145
|
licenses:
|
125
146
|
- MIT
|
126
147
|
metadata:
|
127
148
|
bug_tracker_uri: https://github.com/toy/image_optim_rails/issues
|
128
149
|
changelog_uri: https://github.com/toy/image_optim_rails/blob/master/CHANGELOG.markdown
|
129
|
-
documentation_uri: https://www.rubydoc.info/gems/image_optim_rails/0.
|
150
|
+
documentation_uri: https://www.rubydoc.info/gems/image_optim_rails/0.5.0
|
130
151
|
source_code_uri: https://github.com/toy/image_optim_rails
|
131
|
-
post_install_message:
|
152
|
+
post_install_message:
|
132
153
|
rdoc_options: []
|
133
154
|
require_paths:
|
134
155
|
- lib
|
@@ -143,8 +164,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
143
164
|
- !ruby/object:Gem::Version
|
144
165
|
version: '0'
|
145
166
|
requirements: []
|
146
|
-
rubygems_version: 3.
|
147
|
-
signing_key:
|
167
|
+
rubygems_version: 3.3.5
|
168
|
+
signing_key:
|
148
169
|
specification_version: 4
|
149
170
|
summary: Optimize image assets using image_optim
|
150
171
|
test_files:
|
data/.travis.yml
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
cache:
|
4
|
-
bundler: true
|
5
|
-
directories:
|
6
|
-
- $(npm root)
|
7
|
-
- ~/bin
|
8
|
-
rvm:
|
9
|
-
- '1.9.3-p551'
|
10
|
-
- '2.0.0-p648'
|
11
|
-
- '2.1.10'
|
12
|
-
- '2.2.10'
|
13
|
-
- '2.3.8'
|
14
|
-
- '2.4.6'
|
15
|
-
- '2.5.5'
|
16
|
-
- '2.6.3'
|
17
|
-
script:
|
18
|
-
- ./bundle exec image_optim --info
|
19
|
-
- ./bundle exec appraisal rspec
|
20
|
-
before_install:
|
21
|
-
- gem install rubygems-update || gem install rubygems-update --version '< 3'
|
22
|
-
- gem update --system
|
23
|
-
- gem install bundler --version '< 2'
|
24
|
-
- ruby -e 'puts "#!/bin/sh", %{bundle _#{Gem::Dependency.new("bundler", "< 2.0").to_spec.version}_ "$@"}' > bundle
|
25
|
-
- chmod +x bundle
|
26
|
-
- mkdir -p ~/bin
|
27
|
-
- command -v svgo || npm install -g svgo
|
28
|
-
- command -v pngout || curl -L "http://static.jonof.id.au/dl/kenutils/pngout-20150319-linux.tar.gz" | tar -xz -C ~/bin --strip-components 2 --wildcards '*/x86_64/pngout'
|
29
|
-
install:
|
30
|
-
- ./bundle install --jobs=3 --retry=3
|
31
|
-
- ./bundle exec appraisal install --jobs=3 --retry=3
|
32
|
-
matrix:
|
33
|
-
include:
|
34
|
-
- env: RUBOCOP=✓
|
35
|
-
rvm: '2.6.3'
|
36
|
-
script: bundle exec rubocop
|
37
|
-
- env: CHECK_RUBIES=✓
|
38
|
-
rvm: '2.6.3'
|
39
|
-
script: bundle exec travis_check_rubies
|