svgeez 1.0.3 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +23 -5
- data/.rspec +1 -2
- data/.rubocop +3 -0
- data/.rubocop.yml +19 -0
- data/.ruby-version +1 -1
- data/.simplecov +11 -0
- data/.travis.yml +18 -4
- data/CHANGELOG.md +12 -0
- data/CODE_OF_CONDUCT.md +10 -8
- data/CONTRIBUTING.md +22 -31
- data/LICENSE +6 -6
- data/README.md +49 -48
- data/Rakefile +0 -2
- data/exe/svgeez +23 -0
- data/lib/svgeez.rb +1 -0
- data/lib/svgeez/builder.rb +6 -10
- data/lib/svgeez/command.rb +4 -4
- data/lib/svgeez/commands/build.rb +6 -6
- data/lib/svgeez/commands/watch.rb +6 -6
- data/lib/svgeez/destination.rb +6 -12
- data/lib/svgeez/optimizer.rb +8 -1
- data/lib/svgeez/source.rb +3 -5
- data/lib/svgeez/svg_element.rb +5 -3
- data/lib/svgeez/version.rb +1 -1
- data/svgeez.gemspec +16 -12
- metadata +58 -25
- data/.codeclimate.yml +0 -17
- data/bin/svgeez +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffc434b8172b66099c912055ef13b35c80e77c81
|
4
|
+
data.tar.gz: 8fcc4b68c1524106727b9763eb72c857ede85571
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b50e59f7247e21a0312e82dd6382b7eb0bd452825007569173c6d68826a4cf6bf06185222c63c66793c07a12fc2ffbf605e3d15158be13e0ee54fe48f7f66aaf
|
7
|
+
data.tar.gz: a80f431e5289595e059dd8e11a7cd73508d204b45f1513690911301ac24494157825ffea391fd3b6c0a359aabaf119d937f0f6aa40343280fb2a550a7c2ec49d
|
data/.gitignore
CHANGED
@@ -1,10 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
4
|
/coverage/
|
5
|
-
/
|
5
|
+
/InstalledFiles
|
6
6
|
/pkg/
|
7
7
|
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
8
11
|
/tmp/
|
9
|
-
|
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
|
data/.rspec
CHANGED
data/.rubocop
ADDED
data/.rubocop.yml
CHANGED
@@ -1,5 +1,24 @@
|
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
|
4
|
+
Metrics/BlockLength:
|
5
|
+
Exclude:
|
6
|
+
- "spec/**/*"
|
7
|
+
|
1
8
|
Metrics/LineLength:
|
2
9
|
Enabled: false
|
3
10
|
|
11
|
+
RSpec/AnyInstance:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
RSpec/MessageSpies:
|
15
|
+
EnforcedStyle: receive
|
16
|
+
|
17
|
+
RSpec/MultipleExpectations:
|
18
|
+
Max: 2
|
19
|
+
|
4
20
|
Style/Documentation:
|
5
21
|
Enabled: false
|
22
|
+
|
23
|
+
Style/FrozenStringLiteralComment:
|
24
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.4
|
data/.simplecov
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'simplecov-console'
|
2
|
+
|
3
|
+
formatters = [SimpleCov::Formatter::HTMLFormatter]
|
4
|
+
|
5
|
+
if RSpec.configuration.files_to_run.length > 1
|
6
|
+
formatters << SimpleCov::Formatter::Console
|
7
|
+
end
|
8
|
+
|
9
|
+
SimpleCov.start do
|
10
|
+
formatter SimpleCov::Formatter::MultiFormatter.new(formatters)
|
11
|
+
end
|
data/.travis.yml
CHANGED
@@ -1,10 +1,24 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- 2.3
|
5
|
-
|
3
|
+
- 2.4.4
|
4
|
+
- 2.5.3
|
5
|
+
cache:
|
6
|
+
- bundler
|
6
7
|
before_install:
|
8
|
+
- gem install bundler
|
9
|
+
- nvm install node
|
7
10
|
- npm install -g svgo
|
11
|
+
before_script:
|
12
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
13
|
+
- chmod +x ./cc-test-reporter
|
14
|
+
- ./cc-test-reporter before-build
|
15
|
+
script:
|
16
|
+
- bundle exec rubocop
|
17
|
+
- bundle exec rake
|
18
|
+
after_script:
|
19
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
8
20
|
notifications:
|
9
21
|
email: false
|
10
|
-
slack:
|
22
|
+
slack:
|
23
|
+
rooms:
|
24
|
+
secure: nA0yP2h64kUBM4bs1PrLBfoMvj/u8S1g/Yc0BICCJWpcahUnZiX4Kd87+zprfg0r1nX1Eu+5ileM9U4Z9CeOfNHVma/o5PISliRMgWe3k9na+I66oEybj1u4+a3wA+upXsZQ+RpnJh1aE3A99EdA8plGhAjts3cmdYzcEknDM5wLRxj0V4H7lVzYGHBC4wKWTJ3dEq3uSnYvymxuJI29a8H1bgrlTsTutzwLmEiyDfiXEjUUfoUIE3EVjJdEswJUXmjUPGKB7a/O63ExZj1vtmPAFITw9MeTChbV+5suG0Ibv7dOwqACidqj868HGYHQ7I/G+SwRvJvwWyzmbbFzclupJqudDLPWLKOT8SeUDrezdi9cGg6NI4domRcKRlSSqX1uBDrI7yvhtPeAsB5GFSBCbZVobvVcc1oDitM0KXsQ1kzAKSxnoT0w+egVMfD15ga656agu2qVjiivBBscfSyoNIsQD90j+xGdKBysXGUFE1SxVJ3WtJ6X22PVpDRvjmFmdeT2vnpdA0YB00zvBibGvT+WFP2Iw45YBpXzc3bXj5zRlni79CsehWs44aUfQxNMaPi5G7Dzp+0C/cxDA7DgdU/aVjg6lkXgkuuKE0uybYrTQvWSQ43c8k3eExEMmy3/vFgG82rwGA6STfXf0EUmZ2N6MRI8E1eIU5M78OE=
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 2.0.0 / 2018-12-04
|
4
|
+
|
5
|
+
- Refactor classes to use `attr_reader`s ([c62780f](https://github.com/jgarber623/svgeez/commit/c62780f))
|
6
|
+
- Change required Ruby versions and liberalize dependency constraints ([35fcadb](https://github.com/jgarber623/svgeez/commit/35fcadb))
|
7
|
+
- Change project Ruby version to 2.4.4 ([301d341](https://github.com/jgarber623/svgeez/commit/301d341))
|
8
|
+
- Bump required SVGO version to 1.1.1 ([28741fc](https://github.com/jgarber623/svgeez/commit/28741fc))
|
9
|
+
|
10
|
+
## Previous Releases
|
11
|
+
|
12
|
+
See [the Releases page on GitHub](https://github.com/jgarber623/svgeez/releases) for details on previously released versions.
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -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,
|
9
|
-
|
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
|
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
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
72
|
|
73
|
-
[homepage]:
|
74
|
-
|
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
|
data/CONTRIBUTING.md
CHANGED
@@ -1,19 +1,16 @@
|
|
1
1
|
# Contributing to svgeez
|
2
2
|
|
3
|
-
|
3
|
+
There are a couple ways you can help improve svgeez:
|
4
4
|
|
5
|
-
1.
|
6
|
-
1. Review
|
7
|
-
1. [
|
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
|
-
|
9
|
+
## Getting Started
|
11
10
|
|
12
|
-
|
11
|
+
svgeez is developed using Ruby 2.4.4 and is additionally tested against Ruby 2.5.3 using [Travis CI](https://travis-ci.org/jgarber623/svgeez).
|
13
12
|
|
14
|
-
svgeez
|
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.4. 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.4 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
|
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
|
-
##
|
31
|
-
|
32
|
-
Contributing to svgeez is pretty straightforward:
|
27
|
+
## Making Changes
|
33
28
|
|
34
|
-
1. Fork the
|
35
|
-
1. Install development dependencies as outlined
|
36
|
-
1. Create a feature branch for the
|
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 (`
|
39
|
-
1. If your changes would benefit from testing, add the necessary tests and verify everything passes by running `
|
40
|
-
1. Commit your changes: `git commit -am 'Add some new feature or fix some issue'`.
|
41
|
-
1. Push the branch to your fork
|
42
|
-
1. Create a new
|
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
|
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
|
-
|
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/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
|
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
|
-
|
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
|
-
|
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
|
6
|
-
[![Downloads](https://img.shields.io/gem/dt/svgeez.svg)](https://rubygems.org/gems/svgeez)
|
7
|
-
[![Build
|
8
|
-
[![
|
9
|
-
[![
|
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/master.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
|
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.
|
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.4 and automatically tested against 2.4.4 and 2.5.3 by [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
|
-
|
31
|
+
source 'https://rubygems.org'
|
33
32
|
|
34
|
-
|
35
|
-
gem 'svgeez'
|
36
|
-
end
|
33
|
+
gem 'svgeez', '~> 2.0'
|
37
34
|
```
|
38
35
|
|
39
36
|
…and hop over to your command prompt and run…
|
40
37
|
|
41
|
-
|
38
|
+
```sh
|
39
|
+
$ bundle install
|
40
|
+
```
|
42
41
|
|
43
42
|
You may also install svgeez directly by issuing the following command:
|
44
43
|
|
45
|
-
|
44
|
+
```sh
|
45
|
+
$ gem install svgeez
|
46
|
+
```
|
46
47
|
|
47
48
|
## Usage
|
48
49
|
|
@@ -66,7 +67,7 @@ The above example will combine all SVG files in `~/Sites/sixtwothree.org/images/
|
|
66
67
|
|---|---|
|
67
68
|
|`-s`<br>`--source`|Path to the folder of source SVGs (defaults to `./_svgeez`).|
|
68
69
|
|`-d`<br>`--destination`|Path to the destination file or folder (defaults to `./svgeez.svg`)|
|
69
|
-
|`--with-svgo`|Optimize
|
70
|
+
|`--with-svgo`|Optimize SVG sprite file with [SVGO](https://github.com/svg/svgo)|
|
70
71
|
|
71
72
|
### The `watch` command
|
72
73
|
|
@@ -88,13 +89,13 @@ The first section of Jayden Seric's post, [How to optimize SVG](http://jaydenser
|
|
88
89
|
|
89
90
|
### Optimizing generated files with SVGO
|
90
91
|
|
91
|
-
If you have the excellent [SVGO](https://github.com/svg/svgo
|
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.
|
92
93
|
|
93
94
|
```sh
|
94
95
|
$ svgeez build --source ~/Sites/sixtwothree.org/images/icons --destination ~/Sites/sixtwothree.org/images/icons.svg --with-svgo
|
95
96
|
```
|
96
97
|
|
97
|
-
|
98
|
+
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
99
|
|
99
100
|
## Working with SVG sprites
|
100
101
|
|
@@ -104,7 +105,7 @@ For example, a file named `menu.svg` in `~/Sites/sixtwothree.org/images/icons` w
|
|
104
105
|
|
105
106
|
```svg
|
106
107
|
<symbol id="icons-menu" viewBox="0 0 32 32">
|
107
|
-
|
108
|
+
<path d="…"/>
|
108
109
|
</symbol>
|
109
110
|
```
|
110
111
|
|
@@ -116,21 +117,21 @@ To use an svgeez-generated SVG sprite file, first include the file's contents at
|
|
116
117
|
|
117
118
|
In a Rails 4.1.x or lower application:
|
118
119
|
|
119
|
-
```
|
120
|
+
```html
|
120
121
|
<body>
|
121
|
-
|
122
|
+
<!-- Your page’s awesome content goes here! -->
|
122
123
|
|
123
|
-
|
124
|
+
<%= raw Rails.application.assets.find_asset('icons.svg') %>
|
124
125
|
</body>
|
125
126
|
```
|
126
127
|
|
127
128
|
In a Rails 4.2.x or 5 application:
|
128
129
|
|
129
|
-
```
|
130
|
+
```html
|
130
131
|
<body>
|
131
|
-
|
132
|
+
<!-- Your page’s awesome content goes here! -->
|
132
133
|
|
133
|
-
|
134
|
+
<%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
|
134
135
|
</body>
|
135
136
|
```
|
136
137
|
|
@@ -138,9 +139,9 @@ Or, with PHP:
|
|
138
139
|
|
139
140
|
```html
|
140
141
|
<body>
|
141
|
-
|
142
|
+
<!-- Your page’s awesome content goes here! -->
|
142
143
|
|
143
|
-
|
144
|
+
<?php include_once('path/to/icons.svg'); ?>
|
144
145
|
</body>
|
145
146
|
```
|
146
147
|
|
@@ -152,27 +153,27 @@ Next, wherever you want to include an icon in your user interface, use HTML simi
|
|
152
153
|
|
153
154
|
A more complete example from a Rails 4.1.x or lower application's layout file:
|
154
155
|
|
155
|
-
```
|
156
|
+
```html
|
156
157
|
<body>
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
158
|
+
<button>
|
159
|
+
<svg><use xlink:href="#icons-menu"></svg>
|
160
|
+
Menu
|
161
|
+
</button>
|
161
162
|
|
162
|
-
|
163
|
+
<%= raw Rails.application.assets.find_asset('icons.svg') %>
|
163
164
|
</body>
|
164
165
|
```
|
165
166
|
|
166
167
|
A more complete example from a Rails 4.2.x or 5 application's layout file:
|
167
168
|
|
168
|
-
```
|
169
|
+
```html
|
169
170
|
<body>
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
171
|
+
<button>
|
172
|
+
<svg><use xlink:href="#icons-menu"></svg>
|
173
|
+
Menu
|
174
|
+
</button>
|
174
175
|
|
175
|
-
|
176
|
+
<%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
|
176
177
|
</body>
|
177
178
|
```
|
178
179
|
|
@@ -184,13 +185,13 @@ For smaller icon sets, this may be an acceptable balance of user and developer n
|
|
184
185
|
|
185
186
|
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
187
|
|
187
|
-
```
|
188
|
+
```scss
|
188
189
|
button {
|
189
|
-
|
190
|
+
color: #333;
|
190
191
|
}
|
191
192
|
|
192
193
|
button svg {
|
193
|
-
|
194
|
+
fill: #c00; // Absent this declaration, the icon’s fill color would be #333
|
194
195
|
}
|
195
196
|
```
|
196
197
|
|
@@ -202,8 +203,8 @@ You want to help make svgeez better? Hell yeah! I like your enthusiasm. For more
|
|
202
203
|
|
203
204
|
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
205
|
|
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)
|
206
|
+
[![Donate via Square Cash](https://img.shields.io/badge/square%20cash-$jgarber-28c101.svg?style=for-the-badge)](https://cash.me/$jgarber)
|
207
|
+
[![Donate via Paypal](https://img.shields.io/badge/paypal-jgarber-009cde.svg?style=for-the-badge)](https://www.paypal.me/jgarber)
|
207
208
|
|
208
209
|
## Acknowledgments
|
209
210
|
|
@@ -214,11 +215,11 @@ svgeez benefited greatly from the hard work done by the folks working on the fol
|
|
214
215
|
- [Mercenary](https://github.com/jekyll/mercenary)
|
215
216
|
- [Listen](https://github.com/guard/listen)
|
216
217
|
|
217
|
-
Additionally, Chris Coyier's [CSS Tricks](https://css-tricks.com
|
218
|
+
Additionally, Chris Coyier's [CSS Tricks](https://css-tricks.com) posts linked above got me interested in SVG sprites.
|
218
219
|
|
219
220
|
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
221
|
|
221
|
-
svgeez is written and maintained by [Jason Garber](https://
|
222
|
+
svgeez is written and maintained by [Jason Garber](https://sixtwothree.org).
|
222
223
|
|
223
224
|
### Additional Contributors
|
224
225
|
|
@@ -229,4 +230,4 @@ svgeez is written and maintained by [Jason Garber](https://github.com/jgarber623
|
|
229
230
|
|
230
231
|
## License
|
231
232
|
|
232
|
-
svgeez is freely available under the [MIT License](
|
233
|
+
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.
|
data/Rakefile
CHANGED
data/exe/svgeez
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
4
|
+
|
5
|
+
require 'mercenary'
|
6
|
+
require 'svgeez'
|
7
|
+
|
8
|
+
Mercenary.program(:svgeez) do |program|
|
9
|
+
program.version Svgeez::VERSION
|
10
|
+
program.description 'Generate an SVG sprite from a folder of SVG icons.'
|
11
|
+
program.syntax 'svgeez <subcommand> [options]'
|
12
|
+
|
13
|
+
Svgeez::Command.subclasses.each do |command|
|
14
|
+
command.init_with_program(program)
|
15
|
+
end
|
16
|
+
|
17
|
+
program.action do |args, _|
|
18
|
+
if args.empty?
|
19
|
+
puts program
|
20
|
+
abort
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/svgeez.rb
CHANGED
data/lib/svgeez/builder.rb
CHANGED
@@ -3,8 +3,12 @@ module Svgeez
|
|
3
3
|
SOURCE_IS_DESTINATION_MESSAGE = "Setting `source` and `destination` to the same path isn't allowed!".freeze
|
4
4
|
NO_SVGS_IN_SOURCE_MESSAGE = 'No SVGs were found in `source` folder.'.freeze
|
5
5
|
|
6
|
+
attr_reader :source, :destination
|
7
|
+
|
6
8
|
def initialize(options = {})
|
7
|
-
@
|
9
|
+
@source = Source.new(options)
|
10
|
+
@destination = Destination.new(options)
|
11
|
+
@svgo = options.fetch('svgo', false)
|
8
12
|
end
|
9
13
|
|
10
14
|
# rubocop:disable Metrics/AbcSize
|
@@ -26,19 +30,11 @@ module Svgeez
|
|
26
30
|
end
|
27
31
|
# rubocop:enable Metrics/AbcSize
|
28
32
|
|
29
|
-
def destination
|
30
|
-
@destination ||= Destination.new(@options)
|
31
|
-
end
|
32
|
-
|
33
|
-
def source
|
34
|
-
@source ||= Source.new(@options)
|
35
|
-
end
|
36
|
-
|
37
33
|
private
|
38
34
|
|
39
35
|
def destination_file_contents
|
40
36
|
file_contents = SvgElement.new(source, destination).build
|
41
|
-
file_contents = Optimizer.new.optimize(file_contents) if @
|
37
|
+
file_contents = Optimizer.new.optimize(file_contents) if @svgo
|
42
38
|
|
43
39
|
file_contents.insert(4, ' style="display: none;"')
|
44
40
|
end
|
data/lib/svgeez/command.rb
CHANGED
@@ -9,10 +9,10 @@ module Svgeez
|
|
9
9
|
super(base)
|
10
10
|
end
|
11
11
|
|
12
|
-
def self.add_build_options(
|
13
|
-
|
14
|
-
|
15
|
-
|
12
|
+
def self.add_build_options(command)
|
13
|
+
command.option 'source', '-s', '--source [FOLDER]', 'Source folder (defaults to ./_svgeez)'
|
14
|
+
command.option 'destination', '-d', '--destination [OUTPUT]', 'Destination file or folder (defaults to ./svgeez.svg)'
|
15
|
+
command.option 'svgo', '--with-svgo', 'Optimize source SVGs with SVGO before sprite generation (non-destructive)'
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Svgeez
|
2
2
|
module Commands
|
3
3
|
class Build < Command
|
4
|
-
def self.init_with_program(
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
def self.init_with_program(program)
|
5
|
+
program.command(:build) do |command|
|
6
|
+
command.description 'Builds an SVG sprite from a folder of SVG icons'
|
7
|
+
command.syntax 'build [options]'
|
8
8
|
|
9
|
-
add_build_options(
|
9
|
+
add_build_options(command)
|
10
10
|
|
11
|
-
|
11
|
+
command.action do |_, options|
|
12
12
|
Build.process(options)
|
13
13
|
end
|
14
14
|
end
|
@@ -1,14 +1,14 @@
|
|
1
1
|
module Svgeez
|
2
2
|
module Commands
|
3
3
|
class Watch < Command
|
4
|
-
def self.init_with_program(
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
def self.init_with_program(program)
|
5
|
+
program.command(:watch) do |command|
|
6
|
+
command.description 'Watches a folder of SVG icons for changes'
|
7
|
+
command.syntax 'watch [options]'
|
8
8
|
|
9
|
-
add_build_options(
|
9
|
+
add_build_options(command)
|
10
10
|
|
11
|
-
|
11
|
+
command.action do |_, options|
|
12
12
|
Build.process(options)
|
13
13
|
Watch.process(options)
|
14
14
|
end
|
data/lib/svgeez/destination.rb
CHANGED
@@ -3,7 +3,7 @@ module Svgeez
|
|
3
3
|
DEFAULT_DESTINATION_FILE_NAME = 'svgeez.svg'.freeze
|
4
4
|
|
5
5
|
def initialize(options = {})
|
6
|
-
@
|
6
|
+
@destination = File.expand_path(options.fetch('destination', "./#{DEFAULT_DESTINATION_FILE_NAME}"))
|
7
7
|
end
|
8
8
|
|
9
9
|
def file_id
|
@@ -12,8 +12,8 @@ module Svgeez
|
|
12
12
|
|
13
13
|
def file_name
|
14
14
|
@file_name ||=
|
15
|
-
if destination.end_with?('.svg')
|
16
|
-
File.split(destination)[1]
|
15
|
+
if @destination.end_with?('.svg')
|
16
|
+
File.split(@destination)[1]
|
17
17
|
else
|
18
18
|
DEFAULT_DESTINATION_FILE_NAME
|
19
19
|
end
|
@@ -25,17 +25,11 @@ module Svgeez
|
|
25
25
|
|
26
26
|
def folder_path
|
27
27
|
@folder_path ||=
|
28
|
-
if destination.end_with?('.svg')
|
29
|
-
File.split(destination)[0]
|
28
|
+
if @destination.end_with?('.svg')
|
29
|
+
File.split(@destination)[0]
|
30
30
|
else
|
31
|
-
destination
|
31
|
+
@destination
|
32
32
|
end
|
33
33
|
end
|
34
|
-
|
35
|
-
private
|
36
|
-
|
37
|
-
def destination
|
38
|
-
@destination ||= File.expand_path(@options.fetch('destination', "./#{DEFAULT_DESTINATION_FILE_NAME}"))
|
39
|
-
end
|
40
34
|
end
|
41
35
|
end
|
data/lib/svgeez/optimizer.rb
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
module Svgeez
|
2
2
|
class Optimizer
|
3
|
+
SVGO_MINIMUM_VERSION = '1.1.1'.freeze
|
4
|
+
SVGO_MINIMUM_VERSION_MESSAGE = "svgeez relies on SVGO #{SVGO_MINIMUM_VERSION} or newer. Continuing with standard sprite generation...".freeze
|
3
5
|
SVGO_NOT_INSTALLED = 'Unable to find `svgo` in your PATH. Continuing with standard sprite generation...'.freeze
|
4
6
|
|
5
7
|
def optimize(file_contents)
|
6
8
|
return Svgeez.logger.warn(SVGO_NOT_INSTALLED) unless installed?
|
9
|
+
return Svgeez.logger.warn(SVGO_MINIMUM_VERSION_MESSAGE) unless supported?
|
7
10
|
|
8
|
-
`cat <<EOF | svgo --disable=cleanupIDs -i - -o -\n#{file_contents}\nEOF`
|
11
|
+
`cat <<EOF | svgo --disable=cleanupIDs --disable=removeViewBox -i - -o -\n#{file_contents}\nEOF`
|
9
12
|
end
|
10
13
|
|
11
14
|
private
|
@@ -13,5 +16,9 @@ module Svgeez
|
|
13
16
|
def installed?
|
14
17
|
@installed ||= find_executable0('svgo')
|
15
18
|
end
|
19
|
+
|
20
|
+
def supported?
|
21
|
+
@supported ||= Gem::Version.new(`svgo -v`.strip) >= Gem::Version.new(SVGO_MINIMUM_VERSION)
|
22
|
+
end
|
16
23
|
end
|
17
24
|
end
|
data/lib/svgeez/source.rb
CHANGED
@@ -2,18 +2,16 @@ module Svgeez
|
|
2
2
|
class Source
|
3
3
|
DEFAULT_INPUT_FOLDER_PATH = './_svgeez'.freeze
|
4
4
|
|
5
|
+
attr_reader :folder_path
|
6
|
+
|
5
7
|
def initialize(options = {})
|
6
|
-
@
|
8
|
+
@folder_path = File.expand_path(options.fetch('source', DEFAULT_INPUT_FOLDER_PATH))
|
7
9
|
end
|
8
10
|
|
9
11
|
def file_paths
|
10
12
|
Dir.glob(file_paths_pattern)
|
11
13
|
end
|
12
14
|
|
13
|
-
def folder_path
|
14
|
-
@folder_path ||= File.expand_path(@options.fetch('source', DEFAULT_INPUT_FOLDER_PATH))
|
15
|
-
end
|
16
|
-
|
17
15
|
private
|
18
16
|
|
19
17
|
def file_paths_pattern
|
data/lib/svgeez/svg_element.rb
CHANGED
@@ -6,13 +6,15 @@ module Svgeez
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def build
|
9
|
-
%(<svg id="#{@destination.file_id}"
|
9
|
+
%(<svg id="#{@destination.file_id}" xmlns="http://www.w3.org/2000/svg">#{symbol_elements.join}</svg>)
|
10
10
|
end
|
11
11
|
|
12
12
|
private
|
13
13
|
|
14
|
-
def
|
15
|
-
@source.file_paths.map
|
14
|
+
def symbol_elements
|
15
|
+
@source.file_paths.map do |file_path|
|
16
|
+
SymbolElement.new(file_path, @destination.file_id).build
|
17
|
+
end
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
data/lib/svgeez/version.rb
CHANGED
data/svgeez.gemspec
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
4
|
require 'svgeez/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.required_ruby_version = '>= 2.2.6'
|
7
|
+
spec.required_ruby_version = ['>= 2.4', '< 2.6']
|
8
8
|
|
9
9
|
spec.name = 'svgeez'
|
10
10
|
spec.version = Svgeez::VERSION
|
@@ -16,16 +16,20 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.homepage = 'https://github.com/jgarber623/svgeez'
|
17
17
|
spec.license = 'MIT'
|
18
18
|
|
19
|
-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(
|
20
|
-
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin|spec)/}) }
|
20
|
+
|
21
|
+
spec.bindir = 'exe'
|
22
|
+
spec.executables = ['svgeez']
|
21
23
|
spec.require_paths = ['lib']
|
22
24
|
|
23
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
24
|
-
spec.add_development_dependency '
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency 'rubocop', '~>
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.17'
|
26
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.8'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.60.0'
|
29
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 1.30'
|
30
|
+
spec.add_development_dependency 'simplecov', '~> 0.16.1'
|
31
|
+
spec.add_development_dependency 'simplecov-console', '~> 0.4.2'
|
28
32
|
|
29
|
-
spec.add_runtime_dependency 'listen', '~> 3.
|
30
|
-
spec.add_runtime_dependency 'mercenary', '~> 0.3'
|
33
|
+
spec.add_runtime_dependency 'listen', '~> 3.1'
|
34
|
+
spec.add_runtime_dependency 'mercenary', '~> 0.3.6'
|
31
35
|
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:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Garber
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,98 +16,126 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.17'
|
20
20
|
type: :development
|
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: '1.
|
26
|
+
version: '1.17'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '12.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:
|
40
|
+
version: '12.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '3.8'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '3.8'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 0.60.0
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 0.60.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: rubocop
|
70
|
+
name: rubocop-rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '1.30'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '1.30'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: simplecov
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.16.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.16.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov-console
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.4.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.4.2
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: listen
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
86
114
|
requirements:
|
87
115
|
- - "~>"
|
88
116
|
- !ruby/object:Gem::Version
|
89
|
-
version: '3.
|
117
|
+
version: '3.1'
|
90
118
|
type: :runtime
|
91
119
|
prerelease: false
|
92
120
|
version_requirements: !ruby/object:Gem::Requirement
|
93
121
|
requirements:
|
94
122
|
- - "~>"
|
95
123
|
- !ruby/object:Gem::Version
|
96
|
-
version: '3.
|
124
|
+
version: '3.1'
|
97
125
|
- !ruby/object:Gem::Dependency
|
98
126
|
name: mercenary
|
99
127
|
requirement: !ruby/object:Gem::Requirement
|
100
128
|
requirements:
|
101
129
|
- - "~>"
|
102
130
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
131
|
+
version: 0.3.6
|
104
132
|
type: :runtime
|
105
133
|
prerelease: false
|
106
134
|
version_requirements: !ruby/object:Gem::Requirement
|
107
135
|
requirements:
|
108
136
|
- - "~>"
|
109
137
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
138
|
+
version: 0.3.6
|
111
139
|
description: Automatically generate an SVG sprite from a folder of SVG icons.
|
112
140
|
email:
|
113
141
|
- jason@sixtwothree.org
|
@@ -116,20 +144,22 @@ executables:
|
|
116
144
|
extensions: []
|
117
145
|
extra_rdoc_files: []
|
118
146
|
files:
|
119
|
-
- ".codeclimate.yml"
|
120
147
|
- ".editorconfig"
|
121
148
|
- ".gitignore"
|
122
149
|
- ".rspec"
|
150
|
+
- ".rubocop"
|
123
151
|
- ".rubocop.yml"
|
124
152
|
- ".ruby-version"
|
153
|
+
- ".simplecov"
|
125
154
|
- ".travis.yml"
|
155
|
+
- CHANGELOG.md
|
126
156
|
- CODE_OF_CONDUCT.md
|
127
157
|
- CONTRIBUTING.md
|
128
158
|
- Gemfile
|
129
159
|
- LICENSE
|
130
160
|
- README.md
|
131
161
|
- Rakefile
|
132
|
-
-
|
162
|
+
- exe/svgeez
|
133
163
|
- lib/svgeez.rb
|
134
164
|
- lib/svgeez/builder.rb
|
135
165
|
- lib/svgeez/command.rb
|
@@ -154,7 +184,10 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
154
184
|
requirements:
|
155
185
|
- - ">="
|
156
186
|
- !ruby/object:Gem::Version
|
157
|
-
version: 2.
|
187
|
+
version: '2.4'
|
188
|
+
- - "<"
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
version: '2.6'
|
158
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
159
192
|
requirements:
|
160
193
|
- - ">="
|
@@ -162,7 +195,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
195
|
version: '0'
|
163
196
|
requirements: []
|
164
197
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
198
|
+
rubygems_version: 2.6.14.1
|
166
199
|
signing_key:
|
167
200
|
specification_version: 4
|
168
201
|
summary: Automatically generate an SVG sprite from a folder of SVG icons.
|
data/.codeclimate.yml
DELETED
data/bin/svgeez
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w(.. lib))
|
4
|
-
|
5
|
-
require 'mercenary'
|
6
|
-
require 'svgeez'
|
7
|
-
|
8
|
-
Mercenary.program(:svgeez) do |p|
|
9
|
-
p.version Svgeez::VERSION
|
10
|
-
p.description 'Generate an SVG sprite from a folder of SVG icons.'
|
11
|
-
p.syntax 'svgeez <subcommand> [options]'
|
12
|
-
|
13
|
-
Svgeez::Command.subclasses.each { |c| c.init_with_program(p) }
|
14
|
-
|
15
|
-
p.action do |args, _|
|
16
|
-
if args.empty?
|
17
|
-
puts p
|
18
|
-
abort
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|