svgeez 3.2.0 → 4.0.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: 9ec517999af227f154d38ca7c1a785fb061e292601e181213c83a108ffc1ac38
4
- data.tar.gz: 389bedd716f094b97b1899afbf1c290a44393d7234ee44d328e5cfd512037cbc
3
+ metadata.gz: ca924e5f0fad11f4fdecab5e808ac801088f2f3a2f5d5399d1dd896e9d833f87
4
+ data.tar.gz: c9983ad74b3c812fe5b47cb9a1b5de73bf4bea64a8fcab6f53cd38791c9795c3
5
5
  SHA512:
6
- metadata.gz: bb5f93fde2f014659bf678b4da09866864e84a57d251a04464c03df739055ef09e9a0b5c24f35094a8b147f5c4ad4dbf47a6e6482d27af7e60ab2d38a6f39a6a
7
- data.tar.gz: ca874151e7beb400e0819f3ea9ca74ca3489556ee29523d9eada5f3fefabd7eb8ab6374b6cc84b9ac67dd582db633a55e384fbaaa68ae1a657c484e0063d7d82
6
+ metadata.gz: 845e9150fe2d51c6431ad1a9659a9ef90383675f11cfe2f1245568f271f8588402b112183c88f56e95b2e0c9342956b42ac92f1ead7e1993177cb143039279e5
7
+ data.tar.gz: 21bc1821b63b4e3ed9d4b53c88e6d3e8db2dec382a3f3c2fd73bd1f47c5fd95ff5fce8ecd8981bab85baf5c596ba122a328b06b121f103885b4879285aa7e218
@@ -0,0 +1,47 @@
1
+ version: 2.1
2
+
3
+ orbs:
4
+ ruby: circleci/ruby@1.1.2
5
+
6
+ jobs:
7
+ test:
8
+ parameters:
9
+ version:
10
+ type: string
11
+ executor:
12
+ name: ruby/default
13
+ tag: << parameters.version >>
14
+ steps:
15
+ - checkout
16
+ - run:
17
+ name: Generate Gemfile.lock
18
+ command: bundle lock
19
+ - ruby/install-deps
20
+ - run:
21
+ name: Install SVGO
22
+ command: sudo npm install -g svgo@1.3.2
23
+ - run:
24
+ name: Install CodeClimate test reporter
25
+ command: |
26
+ curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
27
+ chmod +x ./cc-test-reporter
28
+ ./cc-test-reporter before-build
29
+ - run:
30
+ name: Run CI script
31
+ command: bin/ci
32
+ - run:
33
+ name: Upload coverage report to CodeClimate
34
+ command: ./cc-test-reporter after-build
35
+
36
+ workflows:
37
+ version: 2
38
+ default:
39
+ jobs:
40
+ - test:
41
+ matrix:
42
+ parameters:
43
+ version:
44
+ - "2.5-node"
45
+ - "2.6-node"
46
+ - "2.7-node"
47
+ - "3.0-node"
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ assignees:
8
+ - "jgarber623"
data/.rubocop.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  require:
2
2
  - rubocop-performance
3
+ - rubocop-rake
3
4
  - rubocop-rspec
4
5
 
5
6
  AllCops:
@@ -18,6 +19,9 @@ Naming/RescuedExceptionsVariableName:
18
19
  RSpec/MultipleExpectations:
19
20
  Max: 2
20
21
 
22
+ RSpec/MultipleMemoizedHelpers:
23
+ Max: 10
24
+
21
25
  Style/Documentation:
22
26
  Enabled: false
23
27
 
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.4.10
1
+ 2.5.9
data/.simplecov CHANGED
@@ -1,6 +1,10 @@
1
+ require 'simplecov_json_formatter'
1
2
  require 'simplecov-console'
2
3
 
3
- formatters = [SimpleCov::Formatter::HTMLFormatter]
4
+ formatters = [
5
+ SimpleCov::Formatter::HTMLFormatter,
6
+ SimpleCov::Formatter::JSONFormatter
7
+ ]
4
8
 
5
9
  # rubocop:disable Style/IfUnlessModifier
6
10
  if RSpec.configuration.files_to_run.length > 1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 4.0.0 / 2021-07-12
4
+
5
+ - **Breaking Change:** Require SVGO version 1.3.2 (c108320)
6
+ - Add Ruby 3 support (af4772d)
7
+ - **Breaking Change:** Remove Ruby 2.4 support (3ec6ea3)
8
+ - Update `listen` dependency constraint (e05a61b)
9
+ - Remove development gem dependency constraints (2911fae)
10
+ - Update development Ruby version to 2.5.9 (1e61b0b)
11
+ - Replace `bin/*` scripts with `bin/ci`
12
+ - Migrate from Travis CI to Circle CI
13
+
3
14
  ## 3.2.0 / 2020-08-11
4
15
 
5
16
  - Add `--prefix` option (#79 and #80)
data/CONTRIBUTING.md CHANGED
@@ -8,9 +8,9 @@ There are a couple ways you can help improve svgeez:
8
8
 
9
9
  ## Getting Started
10
10
 
11
- svgeez is developed using Ruby 2.4.10 and is additionally tested against Ruby 2.5, 2.6, and 2.7 using [Travis CI](https://travis-ci.org/jgarber623/svgeez).
11
+ svgeez is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/svgeez).
12
12
 
13
- Before making changes to svgeez, you'll want to install Ruby 2.4.10. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.4.10 using your method of choice, install the project's gems by running:
13
+ Before making changes to svgeez, you'll want to install Ruby 2.5.9. It's recommended that you use a Ruby version managment tool like [rbenv](https://github.com/rbenv/rbenv), [chruby](https://github.com/postmodern/chruby), or [rvm](https://github.com/rvm/rvm). Once you've installed Ruby 2.5.9 using your method of choice, install the project's gems by running:
14
14
 
15
15
  ```sh
16
16
  bundle install
@@ -30,8 +30,8 @@ npm install -g svgo
30
30
  1. Install development dependencies as outlined above.
31
31
  1. Create a feature branch for the code changes you're looking to make: `git checkout -b my-new-feature`.
32
32
  1. _Write some code!_
33
- 1. Build (`bin/rake build`) and install (`bin/rake install`) your updated code.
34
- 1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bin/rake`.
33
+ 1. Build (`bundle exec rake build`) and install (`bundle exec rake install`) your updated code.
34
+ 1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bin/ci`.
35
35
  1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`. _(See [this excellent article](https://chris.beams.io/posts/git-commit/) for tips on writing useful Git commit messages.)_
36
36
  1. Push the branch to your fork: `git push -u origin my-new-feature`.
37
37
  1. Create a new [pull request][pulls] and we'll review your changes.
@@ -40,8 +40,6 @@ npm install -g svgo
40
40
 
41
41
  Code formatting conventions are defined in the `.editorconfig` file which uses the [EditorConfig](http://editorconfig.org) syntax. There are [plugins for a variety of editors](http://editorconfig.org/#download) that utilize the settings in the `.editorconfig` file. We recommended you install the EditorConfig plugin for your editor of choice.
42
42
 
43
- Additionally, [Rubocop](https://github.com/bbatsov/rubocop) can be used to help identify possible trouble areas in your code. Run `bin/rubocop` to generate Rubocop's static code analysis report.
44
-
45
43
  Your bug fix or feature addition won't be rejected if it runs afoul of any (or all) of these guidelines, but following the guidelines will definitely make everyone's lives a little easier.
46
44
 
47
45
  [issues]: https://github.com/jgarber623/svgeez/issues
data/Gemfile CHANGED
@@ -3,12 +3,13 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in svgeez.gemspec
4
4
  gemspec
5
5
 
6
- gem 'pry-byebug', '~> 3.9'
7
- gem 'rake', '~> 13.0'
8
- gem 'reek', '~> 6.0'
9
- gem 'rspec', '~> 3.9'
10
- gem 'rubocop', '~> 0.89.0'
11
- gem 'rubocop-performance', '~> 1.7'
12
- gem 'rubocop-rspec', '~> 1.42'
13
- gem 'simplecov', '~> 0.18.5'
14
- gem 'simplecov-console', '~> 0.7.2'
6
+ gem 'pry-byebug'
7
+ gem 'rake'
8
+ gem 'reek'
9
+ gem 'rspec'
10
+ gem 'rubocop'
11
+ gem 'rubocop-performance'
12
+ gem 'rubocop-rake'
13
+ gem 'rubocop-rspec'
14
+ gem 'simplecov'
15
+ gem 'simplecov-console'
data/README.md CHANGED
@@ -2,12 +2,11 @@
2
2
 
3
3
  **A Ruby gem for automatically generating an SVG sprite from a folder of SVG icons.**
4
4
 
5
- [![Gem](https://img.shields.io/gem/v/svgeez.svg?style=for-the-badge)](https://rubygems.org/gems/svgeez)
6
- [![Downloads](https://img.shields.io/gem/dt/svgeez.svg?style=for-the-badge)](https://rubygems.org/gems/svgeez)
7
- [![Build](https://img.shields.io/travis/jgarber623/svgeez/main.svg?style=for-the-badge)](https://travis-ci.org/jgarber623/svgeez)
8
- [![Dependencies](https://img.shields.io/depfu/jgarber623/svgeez.svg?style=for-the-badge)](https://depfu.com/github/jgarber623/svgeez)
9
- [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/svgeez.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/svgeez)
10
- [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/svgeez.svg?style=for-the-badge)](https://codeclimate.com/github/jgarber623/svgeez/code)
5
+ [![Gem](https://img.shields.io/gem/v/svgeez.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/svgeez)
6
+ [![Downloads](https://img.shields.io/gem/dt/svgeez.svg?logo=rubygems&style=for-the-badge)](https://rubygems.org/gems/svgeez)
7
+ [![Build](https://img.shields.io/circleci/build/github/jgarber623/svgeez?logo=circleci&style=for-the-badge)](https://app.circleci.com/pipelines/github/jgarber623/svgeez)
8
+ [![Maintainability](https://img.shields.io/codeclimate/maintainability/jgarber623/svgeez.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/svgeez)
9
+ [![Coverage](https://img.shields.io/codeclimate/c/jgarber623/svgeez.svg?logo=code-climate&style=for-the-badge)](https://codeclimate.com/github/jgarber623/svgeez/code)
11
10
 
12
11
  If you're using an [SVG](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) icon system in your Web projects, svgeez can help speed up your workflow by automating the SVG sprite generation process. Run svgeez alongside your existing project (or integrate it into your current build system); add, edit, or delete SVG files from a folder; and marvel as svgeez generates a single SVG sprite file ready for inclusion in your user interface.
13
12
 
@@ -21,7 +20,7 @@ _For more on why SVG sprites are the bee's knees as far as icon systems go, give
21
20
 
22
21
  ## Getting Started
23
22
 
24
- Before installing and using svgeez, you'll want to have Ruby 2.4 (or newer) installed on your computer. There are plenty of ways to go about this, but my preference is [rbenv](https://github.com/sstephenson/rbenv). svgeez is developed using Ruby 2.4.10 and is additionally tested against Ruby 2.5, 2.6, and 2.7 using [Travis CI](https://travis-ci.org/jgarber623/svgeez).
23
+ Before installing and using svgeez, you'll want to have Ruby 2.5 (or newer) installed on your computer. There are plenty of ways to go about this, but my preference is [rbenv](https://github.com/sstephenson/rbenv). svgeez is developed using Ruby 2.5.9 and is additionally tested against Ruby 2.6, 2.7, and 3.0 using [CircleCI](https://app.circleci.com/pipelines/github/jgarber623/svgeez).
25
24
 
26
25
  ## Installation
27
26
 
@@ -92,6 +91,8 @@ The first section of Jayden Seric's post, [How to optimize SVG](http://jaydenser
92
91
 
93
92
  If you have the excellent [SVGO](https://github.com/svg/svgo) utility installed on your system (and the `svgo` command is available in your `PATH`), you can use the `--with-svgo` option and optimize the generated sprite file.
94
93
 
94
+ **Note:** If using SVGO with svgeez, you must use SVGO version 1.3.2. Future releases of svgeez will update to use SVGO version 2.x.x.
95
+
95
96
  ```sh
96
97
  svgeez build --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg --with-svgo
97
98
  ```
@@ -229,6 +230,7 @@ svgeez is written and maintained by [Jason Garber](https://sixtwothree.org).
229
230
  - [danny](https://github.com/f96q)
230
231
  - [Denis Hovart](https://github.com/dhovart)
231
232
  - [Desmond Sadler](https://github.com/dezman)
233
+ - [motoroller95](https://github.com/motoroller95)
232
234
 
233
235
  ## License
234
236
 
data/Rakefile CHANGED
@@ -1,18 +1,7 @@
1
1
  require 'bundler/gem_tasks'
2
2
 
3
- require 'reek/rake/task'
4
3
  require 'rspec/core/rake_task'
5
- require 'rubocop/rake_task'
6
-
7
- Reek::Rake::Task.new do |task|
8
- task.fail_on_error = false
9
- task.source_files = FileList['**/*.rb'].exclude('vendor/**/*.rb')
10
- end
11
4
 
12
5
  RSpec::Core::RakeTask.new
13
6
 
14
- RuboCop::RakeTask.new do |task|
15
- task.fail_on_error = false
16
- end
17
-
18
- task default: [:rubocop, :reek, :spec]
7
+ task default: :spec
data/lib/svgeez.rb CHANGED
@@ -22,7 +22,7 @@ require 'svgeez/source'
22
22
 
23
23
  module Svgeez
24
24
  def self.logger
25
- @logger ||= Logger.new(STDOUT)
25
+ @logger ||= Logger.new($stdout)
26
26
  end
27
27
 
28
28
  logger.formatter = proc { |_, _, _, msg| "#{msg}\n" }
@@ -1,12 +1,12 @@
1
1
  module Svgeez
2
2
  class Optimizer
3
- SVGO_MINIMUM_VERSION = '1.3.0'.freeze
4
- SVGO_MINIMUM_VERSION_MESSAGE = "svgeez relies on SVGO #{SVGO_MINIMUM_VERSION} or newer. Continuing with standard sprite generation...".freeze
3
+ SVGO_VERSION = '1.3.2'.freeze
4
+ SVGO_VERSION_MESSAGE = "svgeez relies on SVGO #{SVGO_VERSION}. Continuing with standard sprite generation...".freeze
5
5
  SVGO_NOT_INSTALLED = 'Unable to find `svgo` in your PATH. Continuing with standard sprite generation...'.freeze
6
6
 
7
7
  def optimize(file_contents)
8
8
  raise SVGO_NOT_INSTALLED unless installed?
9
- raise SVGO_MINIMUM_VERSION_MESSAGE unless supported?
9
+ raise SVGO_VERSION_MESSAGE unless supported?
10
10
 
11
11
  `cat <<EOF | svgo --disable=cleanupIDs --disable=removeHiddenElems --disable=removeViewBox -i - -o -\n#{file_contents}\nEOF`
12
12
  rescue RuntimeError => exception
@@ -24,7 +24,7 @@ module Svgeez
24
24
  end
25
25
 
26
26
  def supported?
27
- @supported ||= Gem::Version.new(`svgo -v`.strip) >= Gem::Version.new(SVGO_MINIMUM_VERSION)
27
+ @supported ||= `svgo -v`.strip == SVGO_VERSION
28
28
  end
29
29
  end
30
30
  end
@@ -1,3 +1,3 @@
1
1
  module Svgeez
2
- VERSION = '3.2.0'.freeze
2
+ VERSION = '4.0.0'.freeze
3
3
  end
data/svgeez.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  require_relative 'lib/svgeez/version'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
- spec.required_ruby_version = Gem::Requirement.new('>= 2.4', '< 2.8')
4
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.5', '< 3.1')
5
5
 
6
6
  spec.name = 'svgeez'
7
7
  spec.version = Svgeez::VERSION
@@ -24,6 +24,6 @@ Gem::Specification.new do |spec|
24
24
  spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
25
25
  spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/v#{spec.version}/CHANGELOG.md"
26
26
 
27
- spec.add_runtime_dependency 'listen', '~> 3.2'
27
+ spec.add_runtime_dependency 'listen', '~> 3.5'
28
28
  spec.add_runtime_dependency 'mercenary', '~> 0.4.0'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: svgeez
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.0
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: listen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.2'
19
+ version: '3.5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.2'
26
+ version: '3.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mercenary
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -46,7 +46,9 @@ executables:
46
46
  extensions: []
47
47
  extra_rdoc_files: []
48
48
  files:
49
+ - ".circleci/config.yml"
49
50
  - ".editorconfig"
51
+ - ".github/dependabot.yml"
50
52
  - ".gitignore"
51
53
  - ".reek.yml"
52
54
  - ".rspec"
@@ -54,7 +56,6 @@ files:
54
56
  - ".rubocop.yml"
55
57
  - ".ruby-version"
56
58
  - ".simplecov"
57
- - ".travis.yml"
58
59
  - CHANGELOG.md
59
60
  - CODE_OF_CONDUCT.md
60
61
  - CONTRIBUTING.md
@@ -80,8 +81,8 @@ licenses:
80
81
  - MIT
81
82
  metadata:
82
83
  bug_tracker_uri: https://github.com/jgarber623/svgeez/issues
83
- changelog_uri: https://github.com/jgarber623/svgeez/blob/v3.2.0/CHANGELOG.md
84
- post_install_message:
84
+ changelog_uri: https://github.com/jgarber623/svgeez/blob/v4.0.0/CHANGELOG.md
85
+ post_install_message:
85
86
  rdoc_options: []
86
87
  require_paths:
87
88
  - lib
@@ -89,18 +90,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
89
90
  requirements:
90
91
  - - ">="
91
92
  - !ruby/object:Gem::Version
92
- version: '2.4'
93
+ version: '2.5'
93
94
  - - "<"
94
95
  - !ruby/object:Gem::Version
95
- version: '2.8'
96
+ version: '3.1'
96
97
  required_rubygems_version: !ruby/object:Gem::Requirement
97
98
  requirements:
98
99
  - - ">="
99
100
  - !ruby/object:Gem::Version
100
101
  version: '0'
101
102
  requirements: []
102
- rubygems_version: 3.1.3
103
- signing_key:
103
+ rubygems_version: 3.2.16
104
+ signing_key:
104
105
  specification_version: 4
105
106
  summary: Automatically generate an SVG sprite from a folder of SVG icons.
106
107
  test_files: []
data/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- dist: bionic
2
- language: ruby
3
- rvm:
4
- - 2.4
5
- - 2.5
6
- - 2.6
7
- - 2.7
8
- cache: bundler
9
- before_install:
10
- - nvm install node
11
- - npm install -g svgo
12
- before_script:
13
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
- - chmod +x ./cc-test-reporter
15
- - ./cc-test-reporter before-build
16
- after_script:
17
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
18
- notifications:
19
- email: false
20
- slack:
21
- rooms:
22
- secure: nA0yP2h64kUBM4bs1PrLBfoMvj/u8S1g/Yc0BICCJWpcahUnZiX4Kd87+zprfg0r1nX1Eu+5ileM9U4Z9CeOfNHVma/o5PISliRMgWe3k9na+I66oEybj1u4+a3wA+upXsZQ+RpnJh1aE3A99EdA8plGhAjts3cmdYzcEknDM5wLRxj0V4H7lVzYGHBC4wKWTJ3dEq3uSnYvymxuJI29a8H1bgrlTsTutzwLmEiyDfiXEjUUfoUIE3EVjJdEswJUXmjUPGKB7a/O63ExZj1vtmPAFITw9MeTChbV+5suG0Ibv7dOwqACidqj868HGYHQ7I/G+SwRvJvwWyzmbbFzclupJqudDLPWLKOT8SeUDrezdi9cGg6NI4domRcKRlSSqX1uBDrI7yvhtPeAsB5GFSBCbZVobvVcc1oDitM0KXsQ1kzAKSxnoT0w+egVMfD15ga656agu2qVjiivBBscfSyoNIsQD90j+xGdKBysXGUFE1SxVJ3WtJ6X22PVpDRvjmFmdeT2vnpdA0YB00zvBibGvT+WFP2Iw45YBpXzc3bXj5zRlni79CsehWs44aUfQxNMaPi5G7Dzp+0C/cxDA7DgdU/aVjg6lkXgkuuKE0uybYrTQvWSQ43c8k3eExEMmy3/vFgG82rwGA6STfXf0EUmZ2N6MRI8E1eIU5M78OE=