jpeg 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a38f85970789b149b8328172ba08dcd4ace974bf
4
+ data.tar.gz: a92cf8cd4a996d755cdd69c913f3ffcce965421e
5
+ SHA512:
6
+ metadata.gz: 2e54c57d3c1bb861f3ac3788ec9e37720c995ac9ee33d710c09478574a3bf493c823d7ae1b9e8015889da2b7e8c716dc2bd1dab035d5c523eda65beb3eaf0394
7
+ data.tar.gz: 17fc49472ca3c05554c875bb67df6ae9e5ba7bbdc9342fe462aa1c7ab57b46bf1071a06af1e0193c1d52be8c6809cc31ffef20b5e5730c5ded8128e0884a5650
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/.travis.yml CHANGED
@@ -1,7 +1,6 @@
1
1
  before_script:
2
2
  - rake compile
3
3
  rvm:
4
- - 1.8.7
5
4
  - 1.9.3
6
- - ruby-head
7
- - ree
5
+ - 2.0.0
6
+ - 2.1.1
data/Gemfile CHANGED
@@ -1,14 +1,4 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
1
+ source 'https://rubygems.org'
5
2
 
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- gem 'rake-compiler'
9
- group :development do
10
- gem "rspec"
11
- gem "rdoc"
12
- gem "bundler"
13
- gem "jeweler"
14
- end
3
+ # Specify your gem's dependencies in jpeg.gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -1,5 +1,7 @@
1
1
  Copyright (c) 2012 masarakki
2
2
 
3
+ MIT License
4
+
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
5
7
  "Software"), to deal in the Software without restriction, including
data/README.md CHANGED
@@ -1,43 +1,43 @@
1
- jpeg
2
- ====
1
+ [![Build Status](https://secure.travis-ci.org/masarakki/jpeg.png)](http://travis-ci.org/masarakki/jpeg)
2
+ [![Dependency Status](https://gemnasium.com/masarakki/jpeg.png)](http://gemnasium.com/masarakki/jpeg)
3
+
4
+ # Jpeg
5
+
3
6
  A libjpeg wrapper for ruby
4
- Install
5
- -------
6
- gem install jpeg
7
-
8
- or
9
- echo 'gem "jpeg"' >> Gemfile
10
- bundle install
11
-
12
- Usage
13
- -----
14
- jpeg = Jpeg.open('path/to/file')
15
- jpeg.size # => [1920, 1080]
16
- jpeg.width # => 1920
17
- jpeg.height # => 1080
18
- jpeg.color_info # => :rgb or :gray
19
- jpeg.rgb? # => true
20
- jpeg.gray? # => false
21
-
22
- What can do
23
- -----------
24
- * get size
25
- * get color_info
26
-
27
- Contributing to jpeg
28
- --------------------
29
-
30
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
31
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
32
- * Fork the project.
33
- * Start a feature/bugfix branch.
34
- * Commit and push until you are happy with your contribution.
35
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
36
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
37
-
38
- Copyright
39
- ---------
40
-
41
- Copyright (c) 2012 masarakki. See LICENSE.txt for
42
- further details.
43
7
 
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ gem 'jpeg'
13
+
14
+ And then execute:
15
+
16
+ $ bundle
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install jpeg
21
+
22
+ ## Usage
23
+
24
+ - get size
25
+ - get color_info
26
+
27
+ ```ruby
28
+ jpeg = Jpeg.open('path/to/file')
29
+ jpeg.size # => [1920, 1080]
30
+ jpeg.width # => 1920
31
+ jpeg.height # => 1080
32
+ jpeg.color_info # => :rgb or :gray
33
+ jpeg.rgb? # => true
34
+ jpeg.gray? # => false
35
+ ```
36
+
37
+ ## Contributing
38
+
39
+ 1. Fork it ( https://github.com/[my-github-username]/jpeg/fork )
40
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
41
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
42
+ 4. Push to the branch (`git push origin my-new-feature`)
43
+ 5. Create a new Pull Request
data/Rakefile CHANGED
@@ -1,57 +1,12 @@
1
- # encoding: utf-8
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
2
3
 
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "jpeg"
18
- gem.homepage = "http://github.com/masarakki/jpeg"
19
- gem.license = "MIT"
20
- gem.summary = %Q{libjpeg wrapper for ruby}
21
- gem.description = %Q{libjpeg wrapper for ruby}
22
- gem.email = "masaki@hisme.net"
23
- gem.authors = ["masarakki"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rspec/core'
29
- require 'rspec/core/rake_task'
30
- RSpec::Core::RakeTask.new(:spec) do |spec|
31
- spec.pattern = FileList['spec/**/*_spec.rb']
32
- end
33
-
34
- RSpec::Core::RakeTask.new(:rcov) do |spec|
35
- spec.pattern = 'spec/**/*_spec.rb'
36
- spec.rcov = true
37
- end
4
+ RSpec::Core::RakeTask.new(:spec)
38
5
 
39
6
  task :default => :spec
40
7
 
41
- require 'rdoc/task'
42
- Rake::RDocTask.new do |rdoc|
43
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
44
-
45
- rdoc.rdoc_dir = 'rdoc'
46
- rdoc.title = "jpeg #{version}"
47
- rdoc.rdoc_files.include('README*')
48
- rdoc.rdoc_files.include('lib/**/*.rb')
49
- end
8
+ require 'rake/extensiontask'
50
9
 
51
- if RUBY_PLATFORM =~ /java/
52
- require 'rake/javaextensiontask'
53
- Rake::JavaExtensionTask.new('jpeg')
54
- else
55
- require 'rake/extensiontask'
56
- Rake::ExtensionTask.new('jpeg')
10
+ Rake::ExtensionTask.new("jpeg") do |ext|
11
+ ext.lib_dir = "lib/jpeg"
57
12
  end
data/jpeg.gemspec CHANGED
@@ -1,73 +1,26 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jpeg/version'
5
5
 
6
- Gem::Specification.new do |s|
7
- s.name = "jpeg"
8
- s.version = "0.3.3"
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "jpeg"
8
+ spec.version = Jpeg::VERSION
9
+ spec.authors = ["masarakki"]
10
+ spec.email = ["masaki@hisme.net"]
11
+ spec.extensions = ["ext/jpeg/extconf.rb"]
12
+ spec.summary = "libjpeg wrapper for ruby"
13
+ spec.description = "libjpeg wrapper for ruby"
14
+ spec.homepage = "http://github.com/masarakki/jpeg"
15
+ spec.license = "MIT"
9
16
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["masarakki"]
12
- s.date = "2012-06-28"
13
- s.description = "libjpeg wrapper for ruby"
14
- s.email = "masaki@hisme.net"
15
- s.extensions = ["ext/jpeg/extconf.rb"]
16
- s.extra_rdoc_files = [
17
- "LICENSE.txt",
18
- "README.md"
19
- ]
20
- s.files = [
21
- ".document",
22
- ".rspec",
23
- ".travis.yml",
24
- "Gemfile",
25
- "LICENSE.txt",
26
- "README.md",
27
- "Rakefile",
28
- "VERSION",
29
- "ext/jpeg/extconf.rb",
30
- "ext/jpeg/jpeg.c",
31
- "ext/jpeg/jpeg.h",
32
- "ext/jpeg/jpeg_error.c",
33
- "ext/jpeg/jpeg_error.h",
34
- "ext/jpeg/jpeg_jpeg.c",
35
- "ext/jpeg/jpeg_jpeg.h",
36
- "jpeg.gemspec",
37
- "lib/jpeg.rb",
38
- "spec/jpeg_spec.rb",
39
- "spec/samples/sample.jpg",
40
- "spec/samples/sample.png",
41
- "spec/spec_helper.rb"
42
- ]
43
- s.homepage = "http://github.com/masarakki/jpeg"
44
- s.licenses = ["MIT"]
45
- s.require_paths = ["lib"]
46
- s.rubygems_version = "1.8.24"
47
- s.summary = "libjpeg wrapper for ruby"
17
+ spec.files = `git ls-files -z`.split("\x0")
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
48
21
 
49
- if s.respond_to? :specification_version then
50
- s.specification_version = 3
51
-
52
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
53
- s.add_runtime_dependency(%q<rake-compiler>, [">= 0"])
54
- s.add_development_dependency(%q<rspec>, [">= 0"])
55
- s.add_development_dependency(%q<rdoc>, [">= 0"])
56
- s.add_development_dependency(%q<bundler>, [">= 0"])
57
- s.add_development_dependency(%q<jeweler>, [">= 0"])
58
- else
59
- s.add_dependency(%q<rake-compiler>, [">= 0"])
60
- s.add_dependency(%q<rspec>, [">= 0"])
61
- s.add_dependency(%q<rdoc>, [">= 0"])
62
- s.add_dependency(%q<bundler>, [">= 0"])
63
- s.add_dependency(%q<jeweler>, [">= 0"])
64
- end
65
- else
66
- s.add_dependency(%q<rake-compiler>, [">= 0"])
67
- s.add_dependency(%q<rspec>, [">= 0"])
68
- s.add_dependency(%q<rdoc>, [">= 0"])
69
- s.add_dependency(%q<bundler>, [">= 0"])
70
- s.add_dependency(%q<jeweler>, [">= 0"])
71
- end
22
+ spec.add_development_dependency "bundler", "~> 1.6"
23
+ spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rspec"
25
+ spec.add_development_dependency "rake-compiler"
72
26
  end
73
-
data/lib/jpeg.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'tempfile'
2
- require 'jpeg.so'
2
+ require 'jpeg/jpeg'
3
+
3
4
  class Jpeg
4
5
  def self.open_buffer(str)
5
6
  tmp = Tempfile::new("ruby-jpeg")
@@ -0,0 +1,3 @@
1
+ class Jpeg
2
+ VERSION = "0.4.0"
3
+ end
metadata CHANGED
@@ -1,106 +1,81 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - masarakki
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-06-28 00:00:00.000000000 Z
11
+ date: 2014-05-19 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: rake-compiler
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
22
- type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ! '>='
28
- - !ruby/object:Gem::Version
29
- version: '0'
30
- - !ruby/object:Gem::Dependency
31
- name: rspec
14
+ name: bundler
32
15
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
16
  requirements:
35
- - - ! '>='
17
+ - - ~>
36
18
  - !ruby/object:Gem::Version
37
- version: '0'
19
+ version: '1.6'
38
20
  type: :development
39
21
  prerelease: false
40
22
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
23
  requirements:
43
- - - ! '>='
24
+ - - ~>
44
25
  - !ruby/object:Gem::Version
45
- version: '0'
26
+ version: '1.6'
46
27
  - !ruby/object:Gem::Dependency
47
- name: rdoc
28
+ name: rake
48
29
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
30
  requirements:
51
- - - ! '>='
31
+ - - '>='
52
32
  - !ruby/object:Gem::Version
53
33
  version: '0'
54
34
  type: :development
55
35
  prerelease: false
56
36
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
37
  requirements:
59
- - - ! '>='
38
+ - - '>='
60
39
  - !ruby/object:Gem::Version
61
40
  version: '0'
62
41
  - !ruby/object:Gem::Dependency
63
- name: bundler
42
+ name: rspec
64
43
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
44
  requirements:
67
- - - ! '>='
45
+ - - '>='
68
46
  - !ruby/object:Gem::Version
69
47
  version: '0'
70
48
  type: :development
71
49
  prerelease: false
72
50
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
51
  requirements:
75
- - - ! '>='
52
+ - - '>='
76
53
  - !ruby/object:Gem::Version
77
54
  version: '0'
78
55
  - !ruby/object:Gem::Dependency
79
- name: jeweler
56
+ name: rake-compiler
80
57
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
58
  requirements:
83
- - - ! '>='
59
+ - - '>='
84
60
  - !ruby/object:Gem::Version
85
61
  version: '0'
86
62
  type: :development
87
63
  prerelease: false
88
64
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
65
  requirements:
91
- - - ! '>='
66
+ - - '>='
92
67
  - !ruby/object:Gem::Version
93
68
  version: '0'
94
69
  description: libjpeg wrapper for ruby
95
- email: masaki@hisme.net
70
+ email:
71
+ - masaki@hisme.net
96
72
  executables: []
97
73
  extensions:
98
74
  - ext/jpeg/extconf.rb
99
- extra_rdoc_files:
100
- - LICENSE.txt
101
- - README.md
75
+ extra_rdoc_files: []
102
76
  files:
103
77
  - .document
78
+ - .gitignore
104
79
  - .rspec
105
80
  - .travis.yml
106
81
  - Gemfile
@@ -117,6 +92,7 @@ files:
117
92
  - ext/jpeg/jpeg_jpeg.h
118
93
  - jpeg.gemspec
119
94
  - lib/jpeg.rb
95
+ - lib/jpeg/version.rb
120
96
  - spec/jpeg_spec.rb
121
97
  - spec/samples/sample.jpg
122
98
  - spec/samples/sample.png
@@ -124,29 +100,29 @@ files:
124
100
  homepage: http://github.com/masarakki/jpeg
125
101
  licenses:
126
102
  - MIT
103
+ metadata: {}
127
104
  post_install_message:
128
105
  rdoc_options: []
129
106
  require_paths:
130
107
  - lib
131
108
  required_ruby_version: !ruby/object:Gem::Requirement
132
- none: false
133
109
  requirements:
134
- - - ! '>='
110
+ - - '>='
135
111
  - !ruby/object:Gem::Version
136
112
  version: '0'
137
- segments:
138
- - 0
139
- hash: 3946472519539915744
140
113
  required_rubygems_version: !ruby/object:Gem::Requirement
141
- none: false
142
114
  requirements:
143
- - - ! '>='
115
+ - - '>='
144
116
  - !ruby/object:Gem::Version
145
117
  version: '0'
146
118
  requirements: []
147
119
  rubyforge_project:
148
- rubygems_version: 1.8.24
120
+ rubygems_version: 2.2.2
149
121
  signing_key:
150
- specification_version: 3
122
+ specification_version: 4
151
123
  summary: libjpeg wrapper for ruby
152
- test_files: []
124
+ test_files:
125
+ - spec/jpeg_spec.rb
126
+ - spec/samples/sample.jpg
127
+ - spec/samples/sample.png
128
+ - spec/spec_helper.rb