smartimage 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -50,3 +50,25 @@ Rake::RDocTask.new do |rdoc|
50
50
  rdoc.rdoc_files.include('README*')
51
51
  rdoc.rdoc_files.include('lib/**/*.rb')
52
52
  end
53
+
54
+ namespace :java do
55
+ desc 'Munge the Jeweler gemspec into a JRuby compatible one'
56
+ task :gemspec => 'rake:gemspec' do
57
+ gemspec = File.read('smartimage.gemspec')
58
+
59
+ # Remove the last end statement
60
+ gemspec.sub!(/end\s*\Z/m, '')
61
+
62
+ # Add the Java platform requirement
63
+ gemspec << " s.platform = %q{java}\n"
64
+
65
+ # Readd the end statement
66
+ gemspec << "end\n"
67
+
68
+ # Remove RMagic dependencies
69
+ gemspec = gemspec.split("\n").reject { |line| line["<rmagick>"] }.join("\n")
70
+
71
+ # Write the Java gemspec
72
+ File.open("smartimage-java.gemspec", "w") { |file| file << gemspec }
73
+ end
74
+ end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.0
1
+ 0.0.1
@@ -29,8 +29,6 @@ class SmartImage
29
29
 
30
30
  image.thumbnail! opts[:width], opts[:height]
31
31
  @canvas.composite! image, opts[:x], opts[:y], OverCompositeOp
32
- ensure
33
- image.destroy!
34
32
  end
35
33
 
36
34
  # Load the given file as an alpha mask for the image
@@ -41,8 +39,6 @@ class SmartImage
41
39
  # Disable this image's alpha channel to use the opacity data as a mask
42
40
  mask.matte = false
43
41
  @canvas.composite! mask, NorthWestGravity, CopyOpacityCompositeOp
44
- ensure
45
- mask.destroy!
46
42
  end
47
43
 
48
44
  # Encode this image into the given format (as a file extension)
@@ -54,4 +50,4 @@ class SmartImage
54
50
 
55
51
  # RMagick is our Canvas on everything besides JRuby. Hope it works for you!
56
52
  Canvas = RMagickCanvas
57
- end
53
+ end
@@ -0,0 +1,69 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{smartimage}
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Tony Arcieri"]
12
+ s.date = %q{2010-03-26}
13
+ s.description = %q{ SmartImage provides a cross-platform solution for image compositing that works on both MRI and JRuby.
14
+ If using RMagick feels like swatting a fly with a nucler missile, and ImageScience just doesn't get
15
+ you there, SmartImage is hopefully at that sweet spot in the middle
16
+ }
17
+ s.email = %q{tony@medioh.com}
18
+ s.extra_rdoc_files = [
19
+ "LICENSE",
20
+ "README.textile"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ ".gitignore",
25
+ "LICENSE",
26
+ "README.textile",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/smart_image.rb",
30
+ "lib/smart_image/base_canvas.rb",
31
+ "lib/smart_image/java_canvas.rb",
32
+ "lib/smart_image/ratio_calculator.rb",
33
+ "lib/smart_image/rmagick_canvas.rb",
34
+ "smartimage-java.gemspec",
35
+ "smartimage.gemspec",
36
+ "spec/fixtures/mask.png",
37
+ "spec/fixtures/mongoose.jpg",
38
+ "spec/smart_image_spec.rb",
39
+ "spec/spec.opts",
40
+ "spec/spec_helper.rb",
41
+ "spec/tmp/.gitignore"
42
+ ]
43
+ s.homepage = %q{http://github.com/tarcieri/smartimage}
44
+ s.rdoc_options = ["--charset=UTF-8"]
45
+ s.require_paths = ["lib"]
46
+ s.rubygems_version = %q{1.3.5}
47
+ s.summary = %q{It's like a Swiss Army Knife for images, but one of those tiny ones you can keep on your keychain}
48
+ s.test_files = [
49
+ "spec/smart_image_spec.rb",
50
+ "spec/spec_helper.rb"
51
+ ]
52
+
53
+ if s.respond_to? :specification_version then
54
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
55
+ s.specification_version = 3
56
+
57
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
58
+ s.add_runtime_dependency(%q<imagesize>, [">= 0.1.1"])
59
+ s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
60
+ else
61
+ s.add_dependency(%q<imagesize>, [">= 0.1.1"])
62
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
63
+ end
64
+ else
65
+ s.add_dependency(%q<imagesize>, [">= 0.1.1"])
66
+ s.add_dependency(%q<rspec>, [">= 1.2.9"])
67
+ end
68
+ s.platform = %q{java}
69
+ end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{smartimage}
8
- s.version = "0.0.0"
8
+ s.version = "0.0.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Tony Arcieri"]
@@ -31,6 +31,7 @@ Gem::Specification.new do |s|
31
31
  "lib/smart_image/java_canvas.rb",
32
32
  "lib/smart_image/ratio_calculator.rb",
33
33
  "lib/smart_image/rmagick_canvas.rb",
34
+ "smartimage-java.gemspec",
34
35
  "smartimage.gemspec",
35
36
  "spec/fixtures/mask.png",
36
37
  "spec/fixtures/mongoose.jpg",
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smartimage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
@@ -63,6 +63,7 @@ files:
63
63
  - lib/smart_image/java_canvas.rb
64
64
  - lib/smart_image/ratio_calculator.rb
65
65
  - lib/smart_image/rmagick_canvas.rb
66
+ - smartimage-java.gemspec
66
67
  - smartimage.gemspec
67
68
  - spec/fixtures/mask.png
68
69
  - spec/fixtures/mongoose.jpg