ruby-vips 1.0.0 → 1.0.1

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: a944b8cabe34780ee544fb8504a6618efd94c674
4
- data.tar.gz: b5740fa6840ce9905fa30870a6100b49b9adc1f2
3
+ metadata.gz: 26ee6acc5cc2b52057dc2c045f0170e46a0635d4
4
+ data.tar.gz: 778e1c53fa604169a65efe64cb02e6f97b8f7408
5
5
  SHA512:
6
- metadata.gz: f1b926ab064590c3f67ce2f346af93696d413c05787e56263ef1d46ef89d8a16f0f705c9edd6d85e1560a660cbae644f456eab17c4f8df81da2844781b221438
7
- data.tar.gz: 3c337597296afec5e3464fd12052823780a0cde94774dbc2bb39cc289be21230604d3774d72d85fc2498d9acb1ac7e17c7ebca4567b7d1a961b36829e30eb757
6
+ metadata.gz: abe4349238cd5bec8766a2735a9c3517500b1f79bad646c575ffcce660104e2fa0f4eaec9e836421f23c9e1a5746dd5fd6ffb298bc83dd6a9bd8375513aea914
7
+ data.tar.gz: aacc23f98ce85f81f0a59c008250cecdfc4805c6f95528fe2c5abc5ff7ce343a93faf346f5931e54f2e67134cdd5dc89493df44d12f06bfed25f0e8cc80d211b
@@ -0,0 +1,7 @@
1
+ .yardoc
2
+ *.swp
3
+ doc
4
+ pkg/*.gem
5
+
6
+ # skip Gemfile.lock since this is a gem
7
+ Gemfile.lock
@@ -1,5 +1,11 @@
1
1
  # master
2
2
 
3
+ # Version 1.0.1
4
+
5
+ * simplify gemspec [sandstrom]
6
+ * remove jeweler dependency [John Cupitt]
7
+ * add `.to_a` to Image [John Cupitt]
8
+
3
9
  # Version 1.0.0
4
10
 
5
11
  * complete rewrite, API break [John Cupitt]
data/Gemfile CHANGED
@@ -1,15 +1,4 @@
1
- source 'http://rubygems.org'
1
+ source 'https://rubygems.org'
2
2
 
3
- # runtime deps
4
- gem "gobject-introspection", "~> 3.0"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "rspec", "~> 3.3"
10
- gem "yard", "~> 0.8"
11
- gem "redcarpet", "~> 3.3"
12
- gem "github-markup", "~> 1.4"
13
- gem "bundler", "~> 1.0"
14
- gem "jeweler", "~> 2.0"
15
- end
3
+ # all gems are handled by .gemspec (since this repo is for a gem)
4
+ gemspec
data/Rakefile CHANGED
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'rubygems'
4
- require 'bundler'
3
+ require 'bundler/gem_tasks'
5
4
 
6
5
  begin
7
6
  Bundler.setup(:default, :development)
@@ -13,21 +12,6 @@ end
13
12
 
14
13
  require 'rake'
15
14
 
16
- require 'jeweler'
17
-
18
- Jeweler::Tasks.new do |gem|
19
- # gem is a Gem::Specification... see http://guides.rubygems.org/specification-reference/ for more options
20
- gem.name = "ruby-vips"
21
- gem.homepage = "http://github.com/jcupitt/ruby-vips"
22
- gem.license = "MIT"
23
- gem.summary = %Q{Ruby extension for the vips image processing library.}
24
- gem.description = %Q{ruby-vips is a ruby extension for vips. It is extremely fast and it can process huge images without requiring the entire image to be loaded into memory.}
25
- gem.email = "jcupitt@gmail.com"
26
- gem.authors = ["John Cupitt"]
27
- # dependencies defined in Gemfile
28
- end
29
- Jeweler::RubygemsDotOrgTasks.new
30
-
31
15
  require 'rspec/core'
32
16
  require 'rspec/core/rake_task'
33
17
  RSpec::Core::RakeTask.new(:spec) do |spec|
data/TODO CHANGED
@@ -1,5 +1,9 @@
1
- - need something like ruby-vips occasional GC stuff, we can fill memory before
2
- a GC is triggered
1
+ # Notes
2
+
3
+ - need something like the old ruby-vips occasional GC stuff, we can fill
4
+ memory before a GC is triggered
5
+
6
+ need a test case
3
7
 
4
8
  - mail about the getpoint unimplemented error
5
9
 
@@ -12,3 +16,47 @@
12
16
  Complex(1, 2)
13
17
  => (1+2i)
14
18
 
19
+ - fix travis ... the difficulty is getting a libvips with goi built first,
20
+ perhaps copy-paste from libvips .travis.yml
21
+
22
+ this is almost enough to do the ruby side:
23
+
24
+ ----------
25
+ env:
26
+ global:
27
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
28
+
29
+ language: ruby
30
+ rvm:
31
+ - 2.1
32
+ - 2.2
33
+ - 2.3
34
+
35
+ script: "bundle exec rake"
36
+
37
+ gemfile:
38
+ - Gemfile
39
+
40
+ before_install:
41
+ - uname -a
42
+ - sudo apt-get update
43
+ - sudo apt-get install libvips-dev
44
+ -----------
45
+
46
+ # Common operations
47
+
48
+ - version bump
49
+
50
+ edit lib/vips/version.rb
51
+
52
+ - reinstall local copy of gem after a change
53
+
54
+ bundle exec rake install
55
+
56
+ - run test suite
57
+
58
+ bundle exec rake
59
+
60
+ - push new gem to rubygems, tag repository with version
61
+
62
+ bundle exec rake release
@@ -91,6 +91,7 @@ module Vips
91
91
  require 'vips/operation'
92
92
  require 'vips/call'
93
93
  require 'vips/image'
94
+ require 'vips/version'
94
95
  end
95
96
  end
96
97
 
@@ -926,6 +926,21 @@ module Vips
926
926
  end
927
927
  end
928
928
 
929
+ # Convert to an Array. This will be very slow for large images.
930
+ #
931
+ # @return [Array] array of Fixnum
932
+ def to_a
933
+ ar = Array.new(height)
934
+ for y in 0...height
935
+ ar[y] = Array.new(width)
936
+ for x in 0...width
937
+ ar[y][x] = getpoint(x, y)
938
+ end
939
+ end
940
+
941
+ return ar
942
+ end
943
+
929
944
  # Return the largest integral value not greater than the argument.
930
945
  #
931
946
  # @return [Image] floor of image
@@ -0,0 +1,4 @@
1
+ module Vips
2
+ VERSION = "1.0.1"
3
+ end
4
+
@@ -0,0 +1,42 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path('../lib', __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require 'vips/version'
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "ruby-vips"
9
+ spec.version = Vips::VERSION
10
+ spec.authors = ["John Cupitt"]
11
+ spec.date = "2016-06-07"
12
+ spec.email = "jcupitt@gmail.com"
13
+
14
+ spec.summary = "Ruby extension for the vips image processing library."
15
+ spec.description = "ruby-vips is a ruby extension for vips. It is extremely fast and it can process huge images without requiring the entire image to be loaded into memory."
16
+ spec.homepage = "http://github.com/jcupitt/ruby-vips"
17
+ spec.licenses = ["MIT"]
18
+
19
+ spec.required_ruby_version = ">= 2.1"
20
+ spec.rubygems_version = "2.5.1"
21
+ spec.require_paths = ["lib"]
22
+ spec.extra_rdoc_files = [
23
+ "LICENSE.txt",
24
+ "README.md",
25
+ "TODO"
26
+ ]
27
+
28
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
29
+ f.match(%r{^(test|spec|features)/})
30
+ end
31
+
32
+ spec.add_runtime_dependency "gobject-introspection", ["~> 3.0"]
33
+
34
+ spec.add_development_dependency "rake", ["~> 11.0"]
35
+ spec.add_development_dependency "rspec", ["~> 3.3"]
36
+ spec.add_development_dependency "yard", ["~> 0.8"]
37
+ spec.add_development_dependency "redcarpet", ["~> 3.3"]
38
+ spec.add_development_dependency "github-markup", ["~> 1.4"]
39
+ spec.add_development_dependency "bundler", ["~> 1.0"]
40
+
41
+ end
42
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-vips
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Cupitt
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '11.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '11.0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: rspec
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -94,20 +108,6 @@ dependencies:
94
108
  - - "~>"
95
109
  - !ruby/object:Gem::Version
96
110
  version: '1.0'
97
- - !ruby/object:Gem::Dependency
98
- name: jeweler
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '2.0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '2.0'
111
111
  description: ruby-vips is a ruby extension for vips. It is extremely fast and it can
112
112
  process huge images without requiring the entire image to be loaded into memory.
113
113
  email: jcupitt@gmail.com
@@ -118,10 +118,9 @@ extra_rdoc_files:
118
118
  - README.md
119
119
  - TODO
120
120
  files:
121
- - ".travis.yml"
121
+ - ".gitignore"
122
122
  - CHANGELOG.md
123
123
  - Gemfile
124
- - Gemfile.lock
125
124
  - LICENSE.txt
126
125
  - README.md
127
126
  - Rakefile
@@ -156,20 +155,8 @@ files:
156
155
  - lib/vips/interpretation.rb
157
156
  - lib/vips/methods.rb
158
157
  - lib/vips/operation.rb
159
- - ruby-vips8.gemspec
160
- - spec/image_spec.rb
161
- - spec/samples/balloon.v
162
- - spec/samples/ghost.ppm
163
- - spec/samples/huge.jpg
164
- - spec/samples/icc.jpg
165
- - spec/samples/lcd.icc
166
- - spec/samples/lion.svg
167
- - spec/samples/sample.csv
168
- - spec/samples/sample.exr
169
- - spec/samples/wagon.jpg
170
- - spec/samples/wagon.v
171
- - spec/spec_helper.rb
172
- - spec/vips_spec.rb
158
+ - lib/vips/version.rb
159
+ - ruby-vips.gemspec
173
160
  homepage: http://github.com/jcupitt/ruby-vips
174
161
  licenses:
175
162
  - MIT
@@ -182,7 +169,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
169
  requirements:
183
170
  - - ">="
184
171
  - !ruby/object:Gem::Version
185
- version: '0'
172
+ version: '2.1'
186
173
  required_rubygems_version: !ruby/object:Gem::Requirement
187
174
  requirements:
188
175
  - - ">="
@@ -195,3 +182,4 @@ signing_key:
195
182
  specification_version: 4
196
183
  summary: Ruby extension for the vips image processing library.
197
184
  test_files: []
185
+ has_rdoc:
@@ -1,22 +0,0 @@
1
- env:
2
- global:
3
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
4
-
5
- sudo: false
6
- cache: bundler
7
-
8
- language: ruby
9
- rvm:
10
- - 1.9.3
11
- - 2.0
12
- - 2.1
13
-
14
- script: "rake"
15
-
16
- gemfile:
17
- - Gemfile
18
-
19
- before_install:
20
- - uname -a
21
- - apt-get update
22
- - apt-get install libvips-dev
@@ -1,83 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- addressable (2.4.0)
5
- builder (3.2.2)
6
- descendants_tracker (0.0.4)
7
- thread_safe (~> 0.3, >= 0.3.1)
8
- diff-lcs (1.2.5)
9
- faraday (0.9.2)
10
- multipart-post (>= 1.2, < 3)
11
- git (1.3.0)
12
- github-markup (1.4.0)
13
- github_api (0.14.0)
14
- addressable (~> 2.4.0)
15
- descendants_tracker (~> 0.0.4)
16
- faraday (~> 0.8, < 0.10)
17
- hashie (>= 3.4)
18
- oauth2
19
- glib2 (3.0.8)
20
- pkg-config
21
- gobject-introspection (3.0.8)
22
- glib2 (= 3.0.8)
23
- hashie (3.4.4)
24
- highline (1.7.8)
25
- jeweler (2.1.1)
26
- builder
27
- bundler (>= 1.0)
28
- git (>= 1.2.5)
29
- github_api
30
- highline (>= 1.6.15)
31
- nokogiri (>= 1.5.10)
32
- rake
33
- rdoc
34
- semver
35
- json (1.8.3)
36
- jwt (1.5.1)
37
- multi_json (1.12.1)
38
- multi_xml (0.5.5)
39
- multipart-post (2.0.0)
40
- nokogiri (1.6.7.2)
41
- oauth2 (1.1.0)
42
- faraday (>= 0.8, < 0.10)
43
- jwt (~> 1.0, < 1.5.2)
44
- multi_json (~> 1.3)
45
- multi_xml (~> 0.5)
46
- rack (>= 1.2, < 3)
47
- pkg-config (1.1.7)
48
- rack (1.6.4)
49
- rake (11.1.2)
50
- rdoc (4.2.2)
51
- json (~> 1.4)
52
- redcarpet (3.3.4)
53
- rspec (3.4.0)
54
- rspec-core (~> 3.4.0)
55
- rspec-expectations (~> 3.4.0)
56
- rspec-mocks (~> 3.4.0)
57
- rspec-core (3.4.4)
58
- rspec-support (~> 3.4.0)
59
- rspec-expectations (3.4.0)
60
- diff-lcs (>= 1.2.0, < 2.0)
61
- rspec-support (~> 3.4.0)
62
- rspec-mocks (3.4.1)
63
- diff-lcs (>= 1.2.0, < 2.0)
64
- rspec-support (~> 3.4.0)
65
- rspec-support (3.4.1)
66
- semver (1.0.1)
67
- thread_safe (0.3.5)
68
- yard (0.8.7.6)
69
-
70
- PLATFORMS
71
- ruby
72
-
73
- DEPENDENCIES
74
- bundler (~> 1.0)
75
- github-markup (~> 1.4)
76
- gobject-introspection (~> 3.0)
77
- jeweler (~> 2.0)
78
- redcarpet (~> 3.3)
79
- rspec (~> 3.3)
80
- yard (~> 0.8)
81
-
82
- BUNDLED WITH
83
- 1.11.2
@@ -1,112 +0,0 @@
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 -*-
5
- # stub: ruby-vips8 0.1.0 ruby lib
6
-
7
- Gem::Specification.new do |s|
8
- s.name = "ruby-vips8"
9
- s.version = "0.1.0"
10
-
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
- s.require_paths = ["lib"]
13
- s.authors = ["John Cupitt"]
14
- s.date = "2016-01-25"
15
- s.description = "ruby-vips8 is a ruby extension for vips8. It is extremely fast and it can process huge images without requiring the entire image to be loaded into memory."
16
- s.email = "jcupitt@gmail.com"
17
- s.extra_rdoc_files = [
18
- "LICENSE.txt",
19
- "README.md",
20
- "TODO"
21
- ]
22
- s.files = [
23
- ".rspec",
24
- ".yardopts",
25
- "CHANGELOG.md",
26
- "Gemfile",
27
- "Gemfile.lock",
28
- "LICENSE.txt",
29
- "README.md",
30
- "Rakefile",
31
- "TODO",
32
- "VERSION",
33
- "example/annotate.rb",
34
- "example/daltonize8.rb",
35
- "example/example1.rb",
36
- "example/example2.rb",
37
- "example/example3.rb",
38
- "example/example4.rb",
39
- "example/example5.rb",
40
- "example/trim8.rb",
41
- "example/watermark.rb",
42
- "example/wobble.rb",
43
- "lib/vips8.rb",
44
- "lib/vips8/access.rb",
45
- "lib/vips8/align.rb",
46
- "lib/vips8/angle.rb",
47
- "lib/vips8/angle45.rb",
48
- "lib/vips8/argument.rb",
49
- "lib/vips8/bandformat.rb",
50
- "lib/vips8/call.rb",
51
- "lib/vips8/coding.rb",
52
- "lib/vips8/demandstyle.rb",
53
- "lib/vips8/direction.rb",
54
- "lib/vips8/error.rb",
55
- "lib/vips8/extend.rb",
56
- "lib/vips8/foreignflags.rb",
57
- "lib/vips8/image.rb",
58
- "lib/vips8/interpolate.rb",
59
- "lib/vips8/interpretation.rb",
60
- "lib/vips8/methods.rb",
61
- "lib/vips8/operation.rb",
62
- "ruby-vips8.gemspec",
63
- "spec/image_spec.rb",
64
- "spec/samples/balloon.v",
65
- "spec/samples/ghost.ppm",
66
- "spec/samples/huge.jpg",
67
- "spec/samples/icc.jpg",
68
- "spec/samples/lcd.icc",
69
- "spec/samples/lion.svg",
70
- "spec/samples/sample.csv",
71
- "spec/samples/sample.exr",
72
- "spec/samples/wagon.jpg",
73
- "spec/samples/wagon.v",
74
- "spec/spec_helper.rb",
75
- "spec/vips_spec.rb"
76
- ]
77
- s.homepage = "http://github.com/jcupitt/ruby-vips8"
78
- s.licenses = ["MIT"]
79
- s.rubygems_version = "2.2.2"
80
- s.summary = "Ruby extension for the vips8 image processing library."
81
-
82
- if s.respond_to? :specification_version then
83
- s.specification_version = 4
84
-
85
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
86
- s.add_runtime_dependency(%q<gobject-introspection>, ["~> 3.0"])
87
- s.add_development_dependency(%q<rspec>, ["~> 3.3"])
88
- s.add_development_dependency(%q<yard>, ["~> 0.8"])
89
- s.add_development_dependency(%q<redcarpet>, ["~> 3.3"])
90
- s.add_development_dependency(%q<github-markup>, ["~> 1.4"])
91
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
92
- s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
93
- else
94
- s.add_dependency(%q<gobject-introspection>, ["~> 3.0"])
95
- s.add_dependency(%q<rspec>, ["~> 3.3"])
96
- s.add_dependency(%q<yard>, ["~> 0.8"])
97
- s.add_dependency(%q<redcarpet>, ["~> 3.3"])
98
- s.add_dependency(%q<github-markup>, ["~> 1.4"])
99
- s.add_dependency(%q<bundler>, ["~> 1.0"])
100
- s.add_dependency(%q<jeweler>, ["~> 2.0"])
101
- end
102
- else
103
- s.add_dependency(%q<gobject-introspection>, ["~> 3.0"])
104
- s.add_dependency(%q<rspec>, ["~> 3.3"])
105
- s.add_dependency(%q<yard>, ["~> 0.8"])
106
- s.add_dependency(%q<redcarpet>, ["~> 3.3"])
107
- s.add_dependency(%q<github-markup>, ["~> 1.4"])
108
- s.add_dependency(%q<bundler>, ["~> 1.0"])
109
- s.add_dependency(%q<jeweler>, ["~> 2.0"])
110
- end
111
- end
112
-