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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b5e6d929efa9fcb5c48283aada61cf024d4bdb7
4
- data.tar.gz: 86611eebed02b5c8980743bdfe17b6eb044835a6
3
+ metadata.gz: ffc434b8172b66099c912055ef13b35c80e77c81
4
+ data.tar.gz: 8fcc4b68c1524106727b9763eb72c857ede85571
5
5
  SHA512:
6
- metadata.gz: c626b106b2cf43412576b9592543092c43451158a1a041dc9f14e26c3e0be844fe4598a670282e6cffdb02899e6158618185b654957f5b9e1d19141439f43ecf
7
- data.tar.gz: f910a1fc6b3a7d4d355f9aef5586826032c1e1f6c24839510cb6cb9b9cfdafeeb1b6e9dade04e365490280c54f149c747b18a3fc265eed2e61f21678d1dc96f3
6
+ metadata.gz: b50e59f7247e21a0312e82dd6382b7eb0bd452825007569173c6d68826a4cf6bf06185222c63c66793c07a12fc2ffbf605e3d15158be13e0ee54fe48f7f66aaf
7
+ data.tar.gz: a80f431e5289595e059dd8e11a7cd73508d204b45f1513690911301ac24494157825ffea391fd3b6c0a359aabaf119d937f0f6aa40343280fb2a550a7c2ec49d
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
data/.rspec CHANGED
@@ -1,3 +1,2 @@
1
- --color
2
- --format progress
1
+ --order random
3
2
  --require spec_helper
data/.rubocop ADDED
@@ -0,0 +1,3 @@
1
+ --display-style-guide
2
+ --extra-details
3
+ --parallel
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.2.6
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.2.6
4
- - 2.3.4
5
- - 2.4.1
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: sixtwothree:yATLmjTW15443qR7jbCWr3RO
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, 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
data/CONTRIBUTING.md CHANGED
@@ -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.4 and is additionally tested against Ruby 2.5.3 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.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/) 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/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/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 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.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
- 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', '~> 2.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
 
@@ -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 source SVGs with [SVGO](https://github.com/svg/svgo/) before sprite generation (non-destructive)|
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/) 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.
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
- 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.
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
- <path d="…"/>
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
- ```erb
120
+ ```html
120
121
  <body>
121
- <!-- Your page’s awesome content goes here! -->
122
+ <!-- Your page’s awesome content goes here! -->
122
123
 
123
- <%= raw Rails.application.assets.find_asset('icons.svg') %>
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
- ```erb
130
+ ```html
130
131
  <body>
131
- <!-- Your page’s awesome content goes here! -->
132
+ <!-- Your page’s awesome content goes here! -->
132
133
 
133
- <%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
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
- <!-- Your page’s awesome content goes here! -->
142
+ <!-- Your page’s awesome content goes here! -->
142
143
 
143
- <?php include_once('path/to/icons.svg'); ?>
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
- ```erb
156
+ ```html
156
157
  <body>
157
- <button>
158
- <svg><use xlink:href="#icons-menu"></svg>
159
- Menu
160
- </button>
158
+ <button>
159
+ <svg><use xlink:href="#icons-menu"></svg>
160
+ Menu
161
+ </button>
161
162
 
162
- <%= raw Rails.application.assets.find_asset('icons.svg') %>
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
- ```erb
169
+ ```html
169
170
  <body>
170
- <button>
171
- <svg><use xlink:href="#icons-menu"></svg>
172
- Menu
173
- </button>
171
+ <button>
172
+ <svg><use xlink:href="#icons-menu"></svg>
173
+ Menu
174
+ </button>
174
175
 
175
- <%= raw Rails.application.assets_manifest.find_sources('icons.svg').first %>
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
- ```css
188
+ ```scss
188
189
  button {
189
- color: #333;
190
+ color: #333;
190
191
  }
191
192
 
192
193
  button svg {
193
- fill: #c00; // Absent this declaration, the icon’s fill color would be #333
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/) posts linked above got me interested in SVG sprites.
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://github.com/jgarber623).
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](http://opensource.org/licenses/MIT). Use it, learn from it, fork it, improve it, change it, tailor it to your needs.
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
@@ -1,8 +1,6 @@
1
1
  require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
- require 'rubocop/rake_task'
4
3
 
5
4
  RSpec::Core::RakeTask.new
6
- RuboCop::RakeTask.new
7
5
 
8
6
  task default: :spec
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
@@ -1,6 +1,7 @@
1
1
  require 'fileutils'
2
2
  require 'listen'
3
3
  require 'logger'
4
+ require 'mercenary'
4
5
  require 'mkmf'
5
6
  require 'securerandom'
6
7
 
@@ -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
- @options = options
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 @options['svgo']
37
+ file_contents = Optimizer.new.optimize(file_contents) if @svgo
42
38
 
43
39
  file_contents.insert(4, ' style="display: none;"')
44
40
  end
@@ -9,10 +9,10 @@ module Svgeez
9
9
  super(base)
10
10
  end
11
11
 
12
- def self.add_build_options(c)
13
- c.option 'source', '-s', '--source [FOLDER]', 'Source folder (defaults to ./_svgeez)'
14
- c.option 'destination', '-d', '--destination [OUTPUT]', 'Destination file or folder (defaults to ./svgeez.svg)'
15
- c.option 'svgo', '--with-svgo', 'Optimize source SVGs with SVGO before sprite generation (non-destructive)'
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(p)
5
- p.command(:build) do |c|
6
- c.description 'Builds an SVG sprite from a folder of SVG icons'
7
- c.syntax 'build [options]'
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(c)
9
+ add_build_options(command)
10
10
 
11
- c.action do |_, options|
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(p)
5
- p.command(:watch) do |c|
6
- c.description 'Watches a folder of SVG icons for changes'
7
- c.syntax 'watch [options]'
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(c)
9
+ add_build_options(command)
10
10
 
11
- c.action do |_, options|
11
+ command.action do |_, options|
12
12
  Build.process(options)
13
13
  Watch.process(options)
14
14
  end
@@ -3,7 +3,7 @@ module Svgeez
3
3
  DEFAULT_DESTINATION_FILE_NAME = 'svgeez.svg'.freeze
4
4
 
5
5
  def initialize(options = {})
6
- @options = options
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
@@ -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
- @options = options
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
@@ -6,13 +6,15 @@ module Svgeez
6
6
  end
7
7
 
8
8
  def build
9
- %(<svg id="#{@destination.file_id}" version="1.1" xmlns="http://www.w3.org/2000/svg">#{element_contents}</svg>)
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 element_contents
15
- @source.file_paths.map { |file_path| SymbolElement.new(file_path, @destination.file_id).build }.join
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
@@ -1,3 +1,3 @@
1
1
  module Svgeez
2
- VERSION = '1.0.3'.freeze
2
+ VERSION = '2.0.0'.freeze
3
3
  end
data/svgeez.gemspec CHANGED
@@ -1,10 +1,10 @@
1
- # coding: utf-8
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{^(test|spec|features)/}) }
20
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
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.10'
24
- spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.6.0'
25
- spec.add_development_dependency 'rake', '~> 10.0'
26
- spec.add_development_dependency 'rspec', '~> 3.5'
27
- spec.add_development_dependency 'rubocop', '~> 0.42.0'
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.0'
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: 1.0.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Garber
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-17 00:00:00.000000000 Z
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.10'
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.10'
26
+ version: '1.17'
27
27
  - !ruby/object:Gem::Dependency
28
- name: codeclimate-test-reporter
28
+ name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.6.0
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: 0.6.0
40
+ version: '12.3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.0'
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: '10.0'
54
+ version: '3.8'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: rubocop
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.5'
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: '3.5'
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: 0.42.0
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: 0.42.0
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.0'
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.0'
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: '0.3'
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: '0.3'
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
- - bin/svgeez
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.2.6
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.4.5.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
@@ -1,17 +0,0 @@
1
- ---
2
- engines:
3
- duplication:
4
- enabled: true
5
- config:
6
- languages:
7
- - ruby
8
- fixme:
9
- enabled: true
10
- rubocop:
11
- enabled: true
12
- ratings:
13
- paths:
14
- - bin/
15
- - lib/
16
- exclude_paths:
17
- - spec/
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