spritely 0.2.3 → 0.2.4

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: 8475bf3d5de44389a2b22548ed5b18a21c175999
4
- data.tar.gz: e938bd6b921b04ad885420df9b442a89c1515b59
3
+ metadata.gz: afdb0ce6c5a3d4ee39e589c275a08792d19451ac
4
+ data.tar.gz: e0a57c9e6b613413a0b8a722217fc5a8831c3859
5
5
  SHA512:
6
- metadata.gz: 209137aed9b515b869b4e43a582b8b465feb94ea340fbdd9d352342ed3e77584edcebb7479fb313d6cb24b7a65ea07b97ed3a19002f3aa19ae31fdba99a7bdb3
7
- data.tar.gz: b34cd23a18552ff8eac8162601290bf8ff783c7fd1a6df810680e0ea7c6aa0a1a1057bb188db68938be7999d0d94beb6a163d38a840320622098b674f280cecf
6
+ metadata.gz: f258b1330dd8cf6c4c1923dd09d75ac0c3ac406268a956f42b31c610d2d64993c56372d7adf5832e16950766df495d999f8af2efffd3ac687c89afa0d2ed7a9d
7
+ data.tar.gz: fcb594854102456fa9aca4b28cca288af2c6aec98e84ce3b93111b079a9b377fd60feda1150f345da00a0f7f168a426608e6370fa177bdf99a63983319898642
@@ -58,7 +58,7 @@ module Spritely
58
58
  private
59
59
 
60
60
  def image_sets
61
- @image_sets ||= files.collect { |file| ImageSet.new(file, options[File.basename(file, ".png")]) }.sort_by(&:width).reverse
61
+ @image_sets ||= files.collect { |file| ImageSet.new(file, options[File.basename(file, ".png")]) }
62
62
  end
63
63
 
64
64
  def heights
@@ -52,7 +52,7 @@ module Spritely
52
52
  end
53
53
 
54
54
  def files
55
- Spritely.environment.paths.flat_map { |path| Dir.glob(File.join(path, glob)) }
55
+ Spritely.environment.paths.flat_map { |path| Dir.glob(File.join(path, glob)) }.sort
56
56
  end
57
57
  end
58
58
  end
@@ -1,3 +1,3 @@
1
1
  module Spritely
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
Binary file
@@ -8,7 +8,7 @@ describe 'Stylesheet generation', :integration do
8
8
  it { should include(<<-CSS.strip_heredoc
9
9
  body {
10
10
  background-image: url(/assets/sprites/application.png);
11
- background-position: 0 -952px;
11
+ background-position: 0 0;
12
12
  }
13
13
  CSS
14
14
  ) }
@@ -18,7 +18,7 @@ describe 'Stylesheet generation', :integration do
18
18
  it { should include(<<-CSS.strip_heredoc
19
19
  #mario {
20
20
  background-image: url(/assets/sprites/application.png);
21
- background-position: -150px -728px;
21
+ background-position: -150px -806px;
22
22
  width: 200px;
23
23
  height: 214px;
24
24
  }
@@ -13,7 +13,7 @@ describe Spritely::Collection do
13
13
 
14
14
  its(:files) { should eq(['file-1.png', 'file-2.png']) }
15
15
  its(:options) { should eq({'file-1' => {repeat: true}}) }
16
- its(:images) { should eq([2, 3, 1]) }
16
+ its(:images) { should eq([1, 2, 3]) }
17
17
  its(:height) { should eq(110) }
18
18
 
19
19
  describe '.create' do
@@ -81,10 +81,10 @@ describe Spritely::Collection do
81
81
 
82
82
  describe '#position!' do
83
83
  it 'should call out to each image set in turn' do
84
- expect(second_set).to receive(:top=).with(0)
85
- expect(second_set).to receive(:position_in!).with(100)
86
- expect(first_set).to receive(:top=).with(100)
84
+ expect(first_set).to receive(:top=).with(0)
87
85
  expect(first_set).to receive(:position_in!).with(100)
86
+ expect(second_set).to receive(:top=).with(10)
87
+ expect(second_set).to receive(:position_in!).with(100)
88
88
  subject.position!
89
89
  end
90
90
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spritely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Robbin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-11 00:00:00.000000000 Z
11
+ date: 2014-06-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chunky_png