svgeez 1.0.3 → 3.2.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
- SHA1:
3
- metadata.gz: 4b5e6d929efa9fcb5c48283aada61cf024d4bdb7
4
- data.tar.gz: 86611eebed02b5c8980743bdfe17b6eb044835a6
2
+ SHA256:
3
+ metadata.gz: 9ec517999af227f154d38ca7c1a785fb061e292601e181213c83a108ffc1ac38
4
+ data.tar.gz: 389bedd716f094b97b1899afbf1c290a44393d7234ee44d328e5cfd512037cbc
5
5
  SHA512:
6
- metadata.gz: c626b106b2cf43412576b9592543092c43451158a1a041dc9f14e26c3e0be844fe4598a670282e6cffdb02899e6158618185b654957f5b9e1d19141439f43ecf
7
- data.tar.gz: f910a1fc6b3a7d4d355f9aef5586826032c1e1f6c24839510cb6cb9b9cfdafeeb1b6e9dade04e365490280c54f149c747b18a3fc265eed2e61f21678d1dc96f3
6
+ metadata.gz: bb5f93fde2f014659bf678b4da09866864e84a57d251a04464c03df739055ef09e9a0b5c24f35094a8b147f5c4ad4dbf47a6e6482d27af7e60ab2d38a6f39a6a
7
+ data.tar.gz: ca874151e7beb400e0819f3ea9ca74ca3489556ee29523d9eada5f3fefabd7eb8ab6374b6cc84b9ac67dd582db633a55e384fbaaa68ae1a657c484e0063d7d82
data/.gitignore CHANGED
@@ -1,10 +1,28 @@
1
- /.bundle/
2
- /.yardoc/
3
- /_yardoc/
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
4
  /coverage/
5
- /doc/
5
+ /InstalledFiles
6
6
  /pkg/
7
7
  /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
8
11
  /tmp/
9
- *.DS_Store
12
+
13
+ # Documentation cache and generated files:
14
+ /.yardoc/
15
+ /_yardoc/
16
+ /doc/
17
+ /rdoc/
18
+
19
+ # Environment normalization:
20
+ /.bundle/
21
+ /vendor/bundle
22
+ /lib/bundler/man/
23
+
24
+ # for a library or gem, you might want to ignore these files since the code is
25
+ # intended to run in multiple environments; otherwise, check them in:
10
26
  Gemfile.lock
27
+ # .ruby-version
28
+ # .ruby-gemset
@@ -0,0 +1,16 @@
1
+ detectors:
2
+ DuplicateMethodCall:
3
+ max_calls: 2
4
+ IrresponsibleModule:
5
+ enabled: false
6
+ TooManyStatements:
7
+ exclude:
8
+ - Svgeez::Builder#build
9
+ - Svgeez::Builder#initialize
10
+ - Svgeez::Commands::Watch#process
11
+ UtilityFunction:
12
+ exclude:
13
+ - Svgeez::Elements::SymbolElement#element_contents
14
+
15
+ exclude_paths:
16
+ - vendor/
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --color
2
- --format progress
1
+ --order random
3
2
  --require spec_helper
@@ -0,0 +1,3 @@
1
+ --display-style-guide
2
+ --extra-details
3
+ --parallel
@@ -1,5 +1,28 @@
1
- Metrics/LineLength:
1
+ require:
2
+ - rubocop-performance
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ NewCops: disable
7
+
8
+ Layout/LineLength:
2
9
  Enabled: false
3
10
 
11
+ Metrics/BlockLength:
12
+ Exclude:
13
+ - spec/**/*
14
+
15
+ Naming/RescuedExceptionsVariableName:
16
+ PreferredName: exception
17
+
18
+ RSpec/MultipleExpectations:
19
+ Max: 2
20
+
4
21
  Style/Documentation:
5
22
  Enabled: false
23
+
24
+ Style/FrozenStringLiteralComment:
25
+ Enabled: false
26
+
27
+ Style/SymbolArray:
28
+ Enabled: false
@@ -1 +1 @@
1
- 2.2.6
1
+ 2.4.10
@@ -0,0 +1,13 @@
1
+ require 'simplecov-console'
2
+
3
+ formatters = [SimpleCov::Formatter::HTMLFormatter]
4
+
5
+ # rubocop:disable Style/IfUnlessModifier
6
+ if RSpec.configuration.files_to_run.length > 1
7
+ formatters << SimpleCov::Formatter::Console
8
+ end
9
+ # rubocop:enable Style/IfUnlessModifier
10
+
11
+ SimpleCov.start do
12
+ formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
13
+ end
@@ -1,10 +1,22 @@
1
+ dist: bionic
1
2
  language: ruby
2
3
  rvm:
3
- - 2.2.6
4
- - 2.3.4
5
- - 2.4.1
4
+ - 2.4
5
+ - 2.5
6
+ - 2.6
7
+ - 2.7
8
+ cache: bundler
6
9
  before_install:
10
+ - nvm install node
7
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
8
18
  notifications:
9
19
  email: false
10
- slack: sixtwothree:yATLmjTW15443qR7jbCWr3RO
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=
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ ## 3.2.0 / 2020-08-11
4
+
5
+ - Add `--prefix` option (#79 and #80)
6
+ - Update development Ruby version to 2.4.10 (8d517c1)
7
+
8
+ ## 3.1.0 / 2020-01-20
9
+
10
+ - Expand supported Ruby versions to include 2.7 (bcc23b5)
11
+
12
+ ## 3.0.0 / 2019-08-02
13
+
14
+ ### Breaking Changes
15
+
16
+ - Bump required minimum SVGO version to 1.3.0 (afa24c6)
17
+
18
+ ### Additional Enhancements
19
+
20
+ - Refactor command classes (02f420c)
21
+ - Refactor specs ()
22
+ - Update development dependencies
23
+
24
+ ## 2.0.1 / 2019-01-03
25
+
26
+ - Expand supported Ruby versions to include 2.6 (0facfd0)
27
+
28
+ ## 2.0.0 / 2018-12-04
29
+
30
+ - Refactor classes to use `attr_reader`s (c62780f)
31
+ - Change required Ruby versions and liberalize dependency constraints (35fcadb)
32
+ - Change project Ruby version to 2.4.9 (301d341)
33
+ - Bump required SVGO version to 1.1.1 (28741fc)
34
+
35
+ ## Previous Releases
36
+
37
+ See [the Releases page on GitHub](https://github.com/jgarber623/svgeez/releases) for details on previously released versions.
@@ -5,9 +5,9 @@
5
5
  In the interest of fostering an open and welcoming environment, we as
6
6
  contributors and maintainers pledge to making participation in our project and
7
7
  our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
8
+ size, disability, ethnicity, sex characteristics, gender identity and expression,
9
+ level of experience, education, socio-economic status, nationality, personal
10
+ appearance, race, religion, or sexual identity and orientation.
11
11
 
12
12
  ## Our Standards
13
13
 
@@ -23,7 +23,7 @@ include:
23
23
  Examples of unacceptable behavior by participants include:
24
24
 
25
25
  * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
26
+ advances
27
27
  * Trolling, insulting/derogatory comments, and personal or political attacks
28
28
  * Public or private harassment
29
29
  * Publishing others' private information, such as a physical or electronic
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
55
55
  ## Enforcement
56
56
 
57
57
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
58
+ reported by contacting the project team at jason@sixtwothree.org. All
59
59
  complaints will be reviewed and investigated and will result in a response that
60
60
  is deemed necessary and appropriate to the circumstances. The project team is
61
61
  obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -68,7 +68,9 @@ members of the project's leadership.
68
68
  ## Attribution
69
69
 
70
70
  This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
71
+ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72
72
 
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
73
+ [homepage]: https://www.contributor-covenant.org
74
+
75
+ For answers to common questions about this code of conduct, see
76
+ https://www.contributor-covenant.org/faq
@@ -1,19 +1,16 @@
1
1
  # Contributing to svgeez
2
2
 
3
- I'd love to have your help improving svgeez! If you'd like to pitch in, you can do so in a number of ways:
3
+ There are a couple ways you can help improve svgeez:
4
4
 
5
- 1. Look through open [Issues](https://github.com/jgarber623/svgeez/issues).
6
- 1. Review any open [Pull Requests](https://github.com/jgarber623/svgeez/pulls).
7
- 1. [Fork svgeez](#get-set-up-to-contribute) and fix an open Issue or add your own feature.
8
- 1. File new Issues if you have a good idea or see a bug and don't know how to fix it yourself. _Only do this after you've made sure the behavior or problem you're seeing isn't already documented in an open Issue._
5
+ 1. Fix an existing [issue][issues] and submit a [pull request][pulls].
6
+ 1. Review open [pull requests][pulls].
7
+ 1. Report a new [issue][issues]. _Only do this after you've made sure the behavior or problem you're observing isn't already documented in an open issue._
9
8
 
10
- I definitely appreciate your interest in (and help improving) svgeez. Thanks!
9
+ ## Getting Started
11
10
 
12
- ## Installation
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).
13
12
 
14
- svgeez is written in [Ruby](https://www.ruby-lang.org/en/) (version 2.2.6) and development dependencies are managed using the [Bundler](http://bundler.io/) gem. [Travis CI builds](https://travis-ci.org/jgarber623/svgeez) use Ruby 2.2.6, 2.3.4, and 2.4.1.
15
-
16
- I manage Ruby versions with [rbenv](https://github.com/rbenv/rbenv). I'd recommend you do the same or use a similar Ruby version manager ([chruby](https://github.com/postmodern/chruby/) or [RVM](https://rvm.io/) come to mind). Once you've installed Ruby 2.2.6 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.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:
17
14
 
18
15
  ```sh
19
16
  bundle install
@@ -21,37 +18,31 @@ bundle install
21
18
 
22
19
  …from the root of the project.
23
20
 
24
- In order for the test suite to run properly, [SVGO](https://github.com/svg/svgo/) must be installed (and the `svgo` command must be available in your PATH). This is most easily achieved by installing [Node.js](https://nodejs.org/) and running:
21
+ In order for the test suite to run properly, [SVGO](https://github.com/svg/svgo) must be installed (and the `svgo` command must be available in your `PATH`). This is most easily achieved by installing [Node.js](https://nodejs.org) and running:
25
22
 
26
23
  ```sh
27
24
  npm install -g svgo
28
25
  ```
29
26
 
30
- ## Get set up to contribute
31
-
32
- Contributing to svgeez is pretty straightforward:
27
+ ## Making Changes
33
28
 
34
- 1. Fork the svgeez repo and clone it.
35
- 1. Install development dependencies as outlined [above](#installation).
36
- 1. Create a feature branch for the issue or new feature you're looking to tackle: `git checkout -b your-descriptive-branch-name`.
29
+ 1. Fork and clone the project's repo.
30
+ 1. Install development dependencies as outlined above.
31
+ 1. Create a feature branch for the code changes you're looking to make: `git checkout -b my-new-feature`.
37
32
  1. _Write some code!_
38
- 1. Build (`bundle exec rake build`) and install (`bundle exec rake install`) your updated code.
39
- 1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `bundle exec rake`.
40
- 1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`.
41
- 1. Push the branch to your fork of svgeez: `git push origin your-descriptive-branch-name`.
42
- 1. Create a new Pull Request and I'll give it a look!
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`.
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
+ 1. Push the branch to your fork: `git push -u origin my-new-feature`.
37
+ 1. Create a new [pull request][pulls] and we'll review your changes.
43
38
 
44
39
  ## Code Style
45
40
 
46
- Code styles are like opinions: Everyone's got one and yours is better than mine. Here's how svgeez should be written:
47
-
48
- - Use two-space indentation in Ruby.
49
- - No trailing whitespace and blank lines should have whitespace removed.
50
- - Prefer single quotes over double quotes unless interpolating.
51
- - Follow the conventions you see in the existing source code as best as you can.
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.
52
42
 
53
- svgeez's formatting guidelines are defined in the `.editorconfig` file which uses the [EditorConfig](http://editorconfig.org/) syntax. There are [a number of great plugins for a variety of editors](http://editorconfig.org/#download) that utilize the settings in the `.editorconfig` file. EditorConfig takes the hassle out of syntax-specific formatting.
54
-
55
- Additionally, [Rubocop](https://github.com/bbatsov/rubocop) can be used to help identify possible trouble areas in your code. Run `bundle exec rake rubocop` to generate Rubocop's static code analysis report.
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.
56
44
 
57
45
  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
+
47
+ [issues]: https://github.com/jgarber623/svgeez/issues
48
+ [pulls]: https://github.com/jgarber623/svgeez/pulls
data/Gemfile CHANGED
@@ -2,3 +2,13 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in svgeez.gemspec
4
4
  gemspec
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'
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
- The MIT License (MIT)
1
+ MIT License
2
2
 
3
- Copyright (c) 2015 Jason Garber
3
+ Copyright (c) 2015-present Jason Garber
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
9
  copies of the Software, and to permit persons to whom the Software is
10
10
  furnished to do so, subject to the following conditions:
11
11
 
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
14
 
15
15
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
16
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
17
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -2,11 +2,12 @@
2
2
 
3
3
  **A Ruby gem for automatically generating an SVG sprite from a folder of SVG icons.**
4
4
 
5
- [![Gem Version](https://img.shields.io/gem/v/svgeez.svg?label=gem%20version)](https://rubygems.org/gems/svgeez)
6
- [![Downloads](https://img.shields.io/gem/dt/svgeez.svg)](https://rubygems.org/gems/svgeez)
7
- [![Build Status](https://img.shields.io/travis/jgarber623/svgeez/master.svg?label=build%20status)](https://travis-ci.org/jgarber623/svgeez)
8
- [![Code Climate](https://img.shields.io/codeclimate/github/jgarber623/svgeez.svg)](https://codeclimate.com/github/jgarber623/svgeez)
9
- [![Coverage](https://img.shields.io/codeclimate/coverage/github/jgarber623/svgeez.svg)](https://codeclimate.com/github/jgarber623/svgeez/coverage)
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)
10
11
 
11
12
  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.
12
13
 
@@ -16,33 +17,33 @@ _For more on why SVG sprites are the bee's knees as far as icon systems go, give
16
17
 
17
18
  - Provides a [CLI](https://en.wikipedia.org/wiki/Command-line_interface) for generating SVG sprite files.
18
19
  - Integrates with existing projects (e.g. alongside a Rails application using [Foreman](https://github.com/ddollar/foreman)).
19
- - Optionally optimizes SVG files with [SVGO](https://github.com/svg/svgo/).
20
+ - Optionally optimizes SVG sprite file with [SVGO](https://github.com/svg/svgo).
20
21
 
21
22
  ## Getting Started
22
23
 
23
- Before installing and using svgeez, you'll want to have Ruby 2.2.6 (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). If you're developing on a Mac and using [Homebrew](http://brew.sh/), installing rbenv is [super easy](https://github.com/sstephenson/rbenv#homebrew-on-mac-os-x).
24
-
25
- svgeez _might_ work with other versions of Ruby, but it's developed in 2.2.6 and automatically tested against 2.3.4 and 2.4.1 by [Travis CI](https://travis-ci.org/jgarber623/svgeez).
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).
26
25
 
27
26
  ## Installation
28
27
 
29
- If you're using Bundler, add svgeez to your project's Gemfile:
28
+ If you're using [Bundler](http://bundler.io), add svgeez to your project's Gemfile:
30
29
 
31
30
  ```rb
32
- ruby '2.2.6'
31
+ source 'https://rubygems.org'
33
32
 
34
- source 'https://rubygems.org' do
35
- gem 'svgeez'
36
- end
33
+ gem 'svgeez', '~> 3.0'
37
34
  ```
38
35
 
39
36
  …and hop over to your command prompt and run…
40
37
 
41
- `$ bundle`
38
+ ```sh
39
+ bundle install
40
+ ```
42
41
 
43
42
  You may also install svgeez directly by issuing the following command:
44
43
 
45
- `$ gem install svgeez`
44
+ ```sh
45
+ gem install svgeez
46
+ ```
46
47
 
47
48
  ## Usage
48
49
 
@@ -55,18 +56,19 @@ You can manually generate an SVG sprite from a folder of SVGs with the `build` c
55
56
  A basic example:
56
57
 
57
58
  ```sh
58
- $ svgeez build --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg
59
+ svgeez build --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg
59
60
  ```
60
61
 
61
62
  The above example will combine all SVG files in `~/Sites/sixtwothree.org/images/icons` into a single SVG sprite file (`icons.svg`) in `~/Sites/sixtwothree.org/images`.
62
63
 
63
64
  #### Options and Defaults
64
65
 
65
- |Option|Description|
66
- |---|---|
67
- |`-s`<br>`--source`|Path to the folder of source SVGs (defaults to `./_svgeez`).|
68
- |`-d`<br>`--destination`|Path to the destination file or folder (defaults to `./svgeez.svg`)|
69
- |`--with-svgo`|Optimize source SVGs with [SVGO](https://github.com/svg/svgo/) before sprite generation (non-destructive)|
66
+ | Option | Description |
67
+ |:----------------------|:------------------------------------------------------------------|
68
+ | `-s`, `--source` | Path to folder of source SVGs (defaults to `./_svgeez`). |
69
+ | `-d`, `--destination` | Path to destination file or folder (defaults to `./svgeez.svg`) |
70
+ | `-p`, `--prefix` | Optional prefix to append to generated `id` attribute values |
71
+ | `--with-svgo` | Optimize SVG sprite file with [SVGO](https://github.com/svg/svgo) |
70
72
 
71
73
  ### The `watch` command
72
74
 
@@ -75,7 +77,7 @@ The `watch` command takes the same arguments as the `build` command but uses the
75
77
  Tweaking the example from above:
76
78
 
77
79
  ```sh
78
- $ svgeez watch --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg
80
+ svgeez watch --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg
79
81
  ```
80
82
 
81
83
  svgeez will remaing running, watching for new, removed, or updated SVG files in the provided source folder. As SVG files are added, deleted, or modified in the source folder, svgeez will pump out updated SVG sprite files to the destination folder.
@@ -88,13 +90,13 @@ The first section of Jayden Seric's post, [How to optimize SVG](http://jaydenser
88
90
 
89
91
  ### Optimizing generated files with SVGO
90
92
 
91
- 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 source SVGs before generating the sprite file.
93
+ 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.
92
94
 
93
95
  ```sh
94
- $ svgeez build --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg --with-svgo
96
+ svgeez build --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg --with-svgo
95
97
  ```
96
98
 
97
- Optimizing source SVG files with SVGO is done on-the-fly and the original files are left intact. Depending on the number of individual SVG files in the source folder, using the `--with-svgo` option can add considerable time to SVG sprite generation.
99
+ Depending on the number of individual SVG files in the source folder, using the `--with-svgo` option can add considerable time to SVG sprite generation.
98
100
 
99
101
  ## Working with SVG sprites
100
102
 
@@ -104,7 +106,7 @@ For example, a file named `menu.svg` in `~/Sites/sixtwothree.org/images/icons` w
104
106
 
105
107
  ```svg
106
108
  <symbol id="icons-menu" viewBox="0 0 32 32">
107
- <path d="…"/>
109
+ <path d="…"/>
108
110
  </symbol>
109
111
  ```
110
112
 
@@ -116,21 +118,21 @@ To use an svgeez-generated SVG sprite file, first include the file's contents at
116
118
 
117
119
  In a Rails 4.1.x or lower application:
118
120
 
119
- ```erb
121
+ ```html
120
122
  <body>
121
- <!-- Your page’s awesome content goes here! -->
123
+ <!-- Your page’s awesome content goes here! -->
122
124
 
123
- <%= raw Rails.application.assets.find_asset('icons.svg') %>
125
+ <%= raw Rails.application.assets.find_asset('icons.svg') %>
124
126
  </body>
125
127
  ```
126
128
 
127
129
  In a Rails 4.2.x or 5 application:
128
130
 
129
- ```erb
131
+ ```html
130
132
  <body>
131
- <!-- Your page’s awesome content goes here! -->
133
+ <!-- Your page’s awesome content goes here! -->
132
134
 
133
- <%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
135
+ <%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
134
136
  </body>
135
137
  ```
136
138
 
@@ -138,9 +140,9 @@ Or, with PHP:
138
140
 
139
141
  ```html
140
142
  <body>
141
- <!-- Your page’s awesome content goes here! -->
143
+ <!-- Your page’s awesome content goes here! -->
142
144
 
143
- <?php include_once('path/to/icons.svg'); ?>
145
+ <?php include_once('path/to/icons.svg'); ?>
144
146
  </body>
145
147
  ```
146
148
 
@@ -152,27 +154,27 @@ Next, wherever you want to include an icon in your user interface, use HTML simi
152
154
 
153
155
  A more complete example from a Rails 4.1.x or lower application's layout file:
154
156
 
155
- ```erb
157
+ ```html
156
158
  <body>
157
- <button>
158
- <svg><use xlink:href="#icons-menu"></svg>
159
- Menu
160
- </button>
159
+ <button>
160
+ <svg><use xlink:href="#icons-menu"></svg>
161
+ Menu
162
+ </button>
161
163
 
162
- <%= raw Rails.application.assets.find_asset('icons.svg') %>
164
+ <%= raw Rails.application.assets.find_asset('icons.svg') %>
163
165
  </body>
164
166
  ```
165
167
 
166
168
  A more complete example from a Rails 4.2.x or 5 application's layout file:
167
169
 
168
- ```erb
170
+ ```html
169
171
  <body>
170
- <button>
171
- <svg><use xlink:href="#icons-menu"></svg>
172
- Menu
173
- </button>
172
+ <button>
173
+ <svg><use xlink:href="#icons-menu"></svg>
174
+ Menu
175
+ </button>
174
176
 
175
- <%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
177
+ <%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
176
178
  </body>
177
179
  ```
178
180
 
@@ -184,26 +186,26 @@ For smaller icon sets, this may be an acceptable balance of user and developer n
184
186
 
185
187
  Icons embedded with the inline `<use>` technique will inherit their fill color from the nearest parent's `color` value, but this can be overriden with CSS:
186
188
 
187
- ```css
189
+ ```scss
188
190
  button {
189
- color: #333;
191
+ color: #333;
190
192
  }
191
193
 
192
194
  button svg {
193
- fill: #c00; // Absent this declaration, the icon’s fill color would be #333
195
+ fill: #c00; // Absent this declaration, the icon’s fill color would be #333
194
196
  }
195
197
  ```
196
198
 
197
199
  ## Improving svgeez
198
200
 
199
- You want to help make svgeez better? Hell yeah! I like your enthusiasm. For more on how you can help, check out [CONTRIBUTING.md](https://github.com/jgarber623/svgeez/blob/master/CONTRIBUTING.md).
201
+ You want to help make svgeez better? Hell yeah! I like your enthusiasm. For more on how you can help, check out [CONTRIBUTING.md](https://github.com/jgarber623/svgeez/blob/main/CONTRIBUTING.md).
200
202
 
201
203
  ### Donations
202
204
 
203
205
  If diving into Ruby isn't your thing, but you'd still like to support svgeez, consider making a donation! Any amount—large or small—is greatly appreciated. As a token of my gratitude, I'll add your name to the [Acknowledgments](#acknowledgments) below.
204
206
 
205
- [![Donate via Square Cash](https://img.shields.io/badge/square%20cash-$jgarber-28c101.svg)](https://cash.me/$jgarber)
206
- [![Donate via Paypal](https://img.shields.io/badge/paypal-jgarber-009cde.svg)](https://www.paypal.me/jgarber)
207
+ [![Donate via Square Cash](https://img.shields.io/badge/square%20cash-$jgarber-28c101.svg?style=for-the-badge)](https://cash.me/$jgarber)
208
+ [![Donate via Paypal](https://img.shields.io/badge/paypal-jgarber-009cde.svg?style=for-the-badge)](https://www.paypal.me/jgarber)
207
209
 
208
210
  ## Acknowledgments
209
211
 
@@ -214,14 +216,15 @@ svgeez benefited greatly from the hard work done by the folks working on the fol
214
216
  - [Mercenary](https://github.com/jekyll/mercenary)
215
217
  - [Listen](https://github.com/guard/listen)
216
218
 
217
- Additionally, Chris Coyier's [CSS Tricks](https://css-tricks.com/) posts linked above got me interested in SVG sprites.
219
+ Additionally, Chris Coyier's [CSS Tricks](https://css-tricks.com) posts linked above got me interested in SVG sprites.
218
220
 
219
221
  Lastly, the sample icons in `spec/fixtures/icons` are from [Brent Jackson](https://github.com/jxnblk)'s [Geomicons Open](https://github.com/jxnblk/geomicons-open) icon set.
220
222
 
221
- svgeez is written and maintained by [Jason Garber](https://github.com/jgarber623).
223
+ svgeez is written and maintained by [Jason Garber](https://sixtwothree.org).
222
224
 
223
225
  ### Additional Contributors
224
226
 
227
+ - [Abhinav Mishra](https://github.com/abhinavmsra)
225
228
  - [Brett Wilkins](https://github.com/bwilkins)
226
229
  - [danny](https://github.com/f96q)
227
230
  - [Denis Hovart](https://github.com/dhovart)
@@ -229,4 +232,4 @@ svgeez is written and maintained by [Jason Garber](https://github.com/jgarber623
229
232
 
230
233
  ## License
231
234
 
232
- svgeez is freely available under the [MIT License](http://opensource.org/licenses/MIT). Use it, learn from it, fork it, improve it, change it, tailor it to your needs.
235
+ svgeez is freely available under the [MIT License](https://opensource.org/licenses/MIT). Use it, learn from it, fork it, improve it, change it, tailor it to your needs.