spriteful 0.0.4 → 0.0.5

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: f6a3467b29b4f0d94a39ffecd6d769b3c2ce87a7
4
- data.tar.gz: 05d120f9e634b12107fa1f65b6ea0e61e837ad49
3
+ metadata.gz: 73d334005f825ad6112c391af3a52fc0f798b438
4
+ data.tar.gz: 96c043607fc238a36029ca89877f5607b534d6c7
5
5
  SHA512:
6
- metadata.gz: aec4ebca88f1ed0f8444a849fb95db9d944f18e79b618bfd9f2fa9360036b0511943e1db5d4b6edf535ce5c9b4277513a78694bd283fd1dd3af022ee60a519e4
7
- data.tar.gz: d78f09c1211e45df2f94462deda97294dd8cc5bf673ae5b75db28a7500ee2abab54af1d5c6ea71ae871308bd41b090647130d419eab4b9b8ce4f1aa35e2ccdc8
6
+ metadata.gz: 3d1064cdcf852ac57d17a5ca6bed3105a9211563a03886855f24e1af4b9cfc2e1ce7a5cac790c8e96820299f3e65d50629ef7f6b06d6b153d81fd403049d677f
7
+ data.tar.gz: d62e19d7926ab8e76dbe5bdee58600a86fca3cb871a5946c845bba25447f9f51d8b9da82fb3071f1e969ebf9706a7fe47568aff5688b03aaad4f4def731bf358
@@ -7,4 +7,8 @@ require 'spriteful/stylesheet'
7
7
 
8
8
  module Spriteful
9
9
  class EmptySourceError < Thor::Error; end
10
+
11
+ class << self
12
+ attr_accessor :options
13
+ end
10
14
  end
@@ -44,6 +44,7 @@ module Spriteful
44
44
  end
45
45
 
46
46
  prepare_options!
47
+ Spriteful.options = ARGV.dup
47
48
  if sources.empty?
48
49
  self.class.help(shell)
49
50
  exit(1)
@@ -1,5 +1,8 @@
1
1
  /*
2
- * This Stylesheet was generated by the 'spriteful' gem.
2
+ * This Stylesheet was generated by the 'spriteful' gem, with the following options:
3
+ <%- if Spriteful.options -%>
4
+ * 'spriteful <%= Spriteful.options.join(' ') %>'.
5
+ <%- end -%>
3
6
  * Below there are several CSS classes to use the '<%= sprite.name %>'
4
7
  * sprite on you HTML code, as in:
5
8
  *
@@ -1,5 +1,8 @@
1
1
  // ============================================================================
2
- // This Stylesheet was generated by the 'spriteful' gem.
2
+ // This Stylesheet was generated by the 'spriteful' gem, with the following options:
3
+ <%- if Spriteful.options -%>
4
+ // 'spriteful <%= Spriteful.options.join(' ') %>'.
5
+ <%- end -%>
3
6
  <%- if mixin? -%>
4
7
  // Below there are several [Mixin Directives]
5
8
  // (http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins)
@@ -1,3 +1,3 @@
1
1
  module Spriteful
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -6,4 +6,8 @@ RSpec.configure do |config|
6
6
  config.filter_run :focus
7
7
 
8
8
  config.order = 'random'
9
+
10
+ config.after do
11
+ Spriteful.options = nil
12
+ end
9
13
  end
@@ -35,5 +35,14 @@ describe Spriteful::Stylesheet do
35
35
  expect(output).to match(/@include simple-sprite;/)
36
36
  expect(output).to match(/@mixin simple-sprite-red \{/)
37
37
  end
38
+
39
+ it 'documents the Spriteful options used to generate the stylesheet' do
40
+ Spriteful.options = %w(one two three)
41
+ sprite = Spriteful::Sprite.new(source, destination)
42
+ stylesheet = Spriteful::Stylesheet.new(sprite, destination, format: 'css')
43
+ output = stylesheet.render
44
+
45
+ expect(output).to match(/'spriteful one two three'/)
46
+ end
38
47
  end
39
48
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spriteful
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Mazza
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-02 00:00:00.000000000 Z
11
+ date: 2013-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  version: '0'
132
132
  requirements: []
133
133
  rubyforge_project:
134
- rubygems_version: 2.0.3
134
+ rubygems_version: 2.0.6
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: ''