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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5e729522bd65f386e5a141cb619788090705ceaee0b8ba3a9543d3c33efee67e
4
- data.tar.gz: '08cd535b24cff0233f8ed26fbc4577d2c335a6abf66c19ef66fd6ad5c4c537c8'
3
+ metadata.gz: 46fad384b84c00af63a674e3dfd342d647d8a3dbfd0f9ca66ae5bcc50875fc72
4
+ data.tar.gz: e4a0fc9d32035beaf461a2f2b3b88a34bfff7f0720a5a5d7e2661fb4a6c6f10f
5
5
  SHA512:
6
- metadata.gz: 58c8520a4a991347d3783543052acbec6da9ae8efb598643631fc9dab396eab5a1febf8b73fd3e9f2abb26d9d18c47ac0c695ab4bc243f8ac73dbf1f742fc44a
7
- data.tar.gz: 8b7233d0d3cfc916305e3f43e3c7a5e0acc7b83e3a22e027a0194d05df6e248b2f9777f20b15f72bed3853d9180d8535cc1d0f456a6a1e0aebebf2e898d612c3
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/IndentFirstArrayElement:
23
+ Layout/FirstArrayElementIndentation:
20
24
  EnforcedStyle: consistent
21
25
 
22
- Layout/IndentAssignment:
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.3'
23
- appgen 'rails' => '~> 3.2'
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.1'
27
- appgen 'rails' => '~> 4.0', 'sprockets-rails' => '~> 2.0'
28
- appgen 'rails' => '~> 4.0', 'sprockets' => '~> 3.0'
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.2'
32
- appgen 'rails' => '~> 5.0', 'sprockets-rails' => '~> 2.0'
33
- appgen 'rails' => '~> 5.0', 'sprockets' => '~> 3.0'
34
- appgen 'rails' => '~> 5.0', 'sprockets' => '>= 4.0.beta'
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
@@ -4,8 +4,4 @@ source 'https://rubygems.org'
4
4
 
5
5
  gemspec
6
6
 
7
- gem 'appraisal'
8
-
9
- if RUBY_VERSION >= '2.0'
10
- gem 'travis_check_rubies', '~> 0.2'
11
- end
7
+ gem 'appraisal', *RUBY_VERSION < '2.3' ? ['< 2.3'] : []
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2013-2019 Ivan Kuchin
1
+ Copyright (c) 2013-2022 Ivan Kuchin
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.markdown CHANGED
@@ -1,8 +1,8 @@
1
- [![Gem Version](https://img.shields.io/gem/v/image_optim_rails.svg?style=flat)](https://rubygems.org/gems/image_optim_rails)
2
- [![Build Status](https://img.shields.io/travis/toy/image_optim_rails/master.svg?style=flat)](https://travis-ci.org/toy/image_optim_rails)
3
- [![Code Climate](https://img.shields.io/codeclimate/maintainability/toy/image_optim_rails.svg?style=flat)](https://codeclimate.com/github/toy/image_optim_rails)
4
- [![Depfu](https://badges.depfu.com/badges/713ede61b82ee98a3e86a374b5278d28/overview.svg)](https://depfu.com/github/toy/image_optim_rails)
5
- [![Inch CI](https://inch-ci.org/github/toy/image_optim_rails.svg?branch=master&style=flat)](https://inch-ci.org/github/toy/image_optim_rails)
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-2019 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
52
+ Copyright (c) 2013-2022 Ivan Kuchin. See [LICENSE.txt](LICENSE.txt) for details.
@@ -2,9 +2,9 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_rails'
5
- s.version = '0.4.3'
5
+ s.version = '0.5.0'
6
6
  s.summary = %q{Optimize image assets using image_optim}
7
- s.homepage = "http://github.com/toy/#{s.name}"
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 'rails'
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.2'
30
- s.add_development_dependency 'rubocop', '~> 0.59'
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
- "#{expected}, got normalized root-mean-square error of #{@diff}"
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.3
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: 2019-07-14 00:00:00.000000000 Z
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: rails
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: '0.59'
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.59'
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: http://github.com/toy/image_optim_rails
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.4.3
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.0.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