css_sprite 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
data/css_sprite.gemspec CHANGED
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{css_sprite}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Richard Huang"]
12
- s.date = %q{2009-10-16}
12
+ s.date = %q{2010-01-25}
13
13
  s.description = %q{css_sprite is a rails plugin/gem to generate css sprite image automatically.}
14
14
  s.email = %q{flyerhzm@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -21,17 +21,14 @@ Gem::Specification.new do |s|
21
21
  "Rakefile",
22
22
  "VERSION",
23
23
  "css_sprite.gemspec",
24
- "init.rb",
25
- "install.rb",
26
24
  "lib/css_sprite.rb",
27
25
  "lib/css_sprite/sprite.rb",
28
- "spec/css_sprite_spec.rb",
26
+ "spec/css_sprite/sprite_spec.rb",
29
27
  "spec/resources/good_topic.gif",
30
28
  "spec/resources/mid_topic.gif",
31
29
  "spec/spec.opts",
32
30
  "spec/spec_helper.rb",
33
- "tasks/css_sprite_tasks.rake",
34
- "uninstall.rb"
31
+ "tasks/css_sprite_tasks.rake"
35
32
  ]
36
33
  s.homepage = %q{}
37
34
  s.rdoc_options = ["--charset=UTF-8"]
@@ -39,8 +36,8 @@ Gem::Specification.new do |s|
39
36
  s.rubygems_version = %q{1.3.5}
40
37
  s.summary = %q{css_sprite is a rails plugin/gem to generate css sprite image automatically.}
41
38
  s.test_files = [
42
- "spec/css_sprite_spec.rb",
43
- "spec/spec_helper.rb"
39
+ "spec/spec_helper.rb",
40
+ "spec/css_sprite/sprite_spec.rb"
44
41
  ]
45
42
 
46
43
  if s.respond_to? :specification_version then
@@ -53,3 +50,4 @@ Gem::Specification.new do |s|
53
50
  else
54
51
  end
55
52
  end
53
+
data/lib/css_sprite.rb CHANGED
@@ -1,4 +1,5 @@
1
+ require 'rake'
2
+
1
3
  unless Rake::Task.task_defined? "css_sprite:build"
2
4
  load File.join(File.dirname(__FILE__), '..', 'tasks', 'css_sprite_tasks.rake')
3
5
  end
4
-
@@ -1,36 +1,36 @@
1
- require File.dirname(__FILE__) + '/spec_helper'
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
2
 
3
- describe CssSprite do
3
+ describe Sprite do
4
4
  before(:all) do
5
- @sprite = CssSprite.new
5
+ @sprite = Sprite.new
6
6
  end
7
7
 
8
8
  context "get_image" do
9
9
  it "should get a image" do
10
- @sprite.get_image(File.join(File.dirname(__FILE__), 'resources/good_topic.gif')).class.should == Magick::Image
10
+ @sprite.get_image(File.join(File.dirname(__FILE__), '../resources/good_topic.gif')).class.should == Magick::Image
11
11
  end
12
12
  end
13
13
 
14
14
  context "image_properties" do
15
15
  it "should get image properties" do
16
- image = @sprite.get_image(File.join(File.dirname(__FILE__), 'resources/good_topic.gif'))
16
+ image = @sprite.get_image(File.join(File.dirname(__FILE__), '../resources/good_topic.gif'))
17
17
  @sprite.image_properties(image).should == {:name => 'good_topic', :width => 20, :height => 19}
18
18
  end
19
19
  end
20
20
 
21
21
  context "composite_images" do
22
22
  it "should composite two images into one horizontally" do
23
- image1 = @sprite.get_image(File.join(File.dirname(__FILE__), 'resources/good_topic.gif'))
24
- image2 = @sprite.get_image(File.join(File.dirname(__FILE__), 'resources/mid_topic.gif'))
23
+ image1 = @sprite.get_image(File.join(File.dirname(__FILE__), '../resources/good_topic.gif'))
24
+ image2 = @sprite.get_image(File.join(File.dirname(__FILE__), '../resources/mid_topic.gif'))
25
25
  image = @sprite.composite_images(image1, image2, image1.columns, 0)
26
26
  @sprite.image_properties(image).should == {:name => nil, :width => 40, :height => 19}
27
27
  end
28
28
 
29
29
  it "should composite two images into one verically" do
30
- image1 = @sprite.get_image(File.join(File.dirname(__FILE__), 'resources/good_topic.gif'))
31
- image2 = @sprite.get_image(File.join(File.dirname(__FILE__), 'resources/mid_topic.gif'))
30
+ image1 = @sprite.get_image(File.join(File.dirname(__FILE__), '../resources/good_topic.gif'))
31
+ image2 = @sprite.get_image(File.join(File.dirname(__FILE__), '../resources/mid_topic.gif'))
32
32
  image = @sprite.composite_images(image1, image2, 0, image1.rows)
33
33
  @sprite.image_properties(image).should == {:name => nil, :width => 20, :height => 38}
34
34
  end
35
35
  end
36
- end
36
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: css_sprite
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-16 00:00:00 +08:00
12
+ date: 2010-01-25 00:00:00 +08:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -27,17 +27,14 @@ files:
27
27
  - Rakefile
28
28
  - VERSION
29
29
  - css_sprite.gemspec
30
- - init.rb
31
- - install.rb
32
30
  - lib/css_sprite.rb
33
31
  - lib/css_sprite/sprite.rb
34
- - spec/css_sprite_spec.rb
32
+ - spec/css_sprite/sprite_spec.rb
35
33
  - spec/resources/good_topic.gif
36
34
  - spec/resources/mid_topic.gif
37
35
  - spec/spec.opts
38
36
  - spec/spec_helper.rb
39
37
  - tasks/css_sprite_tasks.rake
40
- - uninstall.rb
41
38
  has_rdoc: true
42
39
  homepage: ""
43
40
  licenses: []
@@ -67,5 +64,5 @@ signing_key:
67
64
  specification_version: 3
68
65
  summary: css_sprite is a rails plugin/gem to generate css sprite image automatically.
69
66
  test_files:
70
- - spec/css_sprite_spec.rb
71
67
  - spec/spec_helper.rb
68
+ - spec/css_sprite/sprite_spec.rb
data/init.rb DELETED
@@ -1 +0,0 @@
1
- # Include hook code here
data/install.rb DELETED
@@ -1 +0,0 @@
1
- # Install hook code here
data/uninstall.rb DELETED
@@ -1 +0,0 @@
1
- # Uninstall hook code here