exif 1.0.1 → 2.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,19 +0,0 @@
1
- $: << File.expand_path('../../lib', __FILE__)
2
- require 'benchmark'
3
- require 'mini_exiftool'
4
- require 'exifr'
5
- require 'exif'
6
-
7
- N = 50
8
- FILE_PATH = File.expand_path('../../spec/sample.jpg', __FILE__)
9
- Benchmark.bmbm do |x|
10
- x.report 'mini_exiftool' do
11
- N.times{ MiniExiftool.new(FILE_PATH).image_width }
12
- end
13
- x.report 'exifr' do
14
- N.times{ EXIFR::JPEG.new(FILE_PATH).width }
15
- end
16
- x.report 'exif' do
17
- N.times{ Exif::Data.new(FILE_PATH).image_width }
18
- end
19
- end
data/exif.gemspec DELETED
@@ -1,26 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'exif/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "exif"
8
- spec.version = Exif::VERSION
9
- spec.authors = ["Jian Weihang"]
10
- spec.email = ["tonytonyjan@gmail.com"]
11
- spec.extensions = ["ext/exif/extconf.rb"]
12
- spec.summary = %q{Ruby EXIF reader written in C extension.}
13
- spec.description = %q{Ruby EXIF reader written in C extension.}
14
- spec.homepage = "https://github.com/tonytonyjan/exif"
15
- spec.license = "MIT"
16
-
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"]
21
-
22
- spec.add_development_dependency "bundler", "~> 1.7"
23
- spec.add_development_dependency "rake", "~> 10.0"
24
- spec.add_development_dependency "rake-compiler"
25
- spec.add_development_dependency "rspec"
26
- end
data/ext/exif/exif.h DELETED
@@ -1,6 +0,0 @@
1
- #ifndef EXIF_H
2
- #define EXIF_H 1
3
-
4
- #include "ruby.h"
5
-
6
- #endif /* EXIF_H */
data/spec/exif_spec.rb DELETED
@@ -1,14 +0,0 @@
1
- require 'exif'
2
-
3
- describe Exif do
4
- before :all do
5
- @data = Exif::Data.new(File.expand_path('../sample.jpg', __FILE__))
6
- end
7
-
8
- it 'works' do
9
- expect(@data.model).to eq 'NIKON D600'
10
- expect(@data.image_width).to eq 4000
11
- expect(@data.gps_latitude).to be_within(0.0001).of(24.178028333333334)
12
- expect(@data.date_time).to eq Time.new(2013,12,8,21,14,11)
13
- end
14
- end
data/spec/sample.jpg DELETED
Binary file
data/spec/spec_helper.rb DELETED
@@ -1,89 +0,0 @@
1
- # This file was generated by the `rspec --init` command. Conventionally, all
2
- # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
- # The generated `.rspec` file contains `--require spec_helper` which will cause this
4
- # file to always be loaded, without a need to explicitly require it in any files.
5
- #
6
- # Given that it is always loaded, you are encouraged to keep this file as
7
- # light-weight as possible. Requiring heavyweight dependencies from this file
8
- # will add to the boot time of your test suite on EVERY test run, even for an
9
- # individual file that may not need all of that loaded. Instead, consider making
10
- # a separate helper file that requires the additional dependencies and performs
11
- # the additional setup, and require it from the spec files that actually need it.
12
- #
13
- # The `.rspec` file also contains a few flags that are not defaults but that
14
- # users commonly want.
15
- #
16
- # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
17
- RSpec.configure do |config|
18
- # rspec-expectations config goes here. You can use an alternate
19
- # assertion/expectation library such as wrong or the stdlib/minitest
20
- # assertions if you prefer.
21
- config.expect_with :rspec do |expectations|
22
- # This option will default to `true` in RSpec 4. It makes the `description`
23
- # and `failure_message` of custom matchers include text for helper methods
24
- # defined using `chain`, e.g.:
25
- # be_bigger_than(2).and_smaller_than(4).description
26
- # # => "be bigger than 2 and smaller than 4"
27
- # ...rather than:
28
- # # => "be bigger than 2"
29
- expectations.include_chain_clauses_in_custom_matcher_descriptions = true
30
- end
31
-
32
- # rspec-mocks config goes here. You can use an alternate test double
33
- # library (such as bogus or mocha) by changing the `mock_with` option here.
34
- config.mock_with :rspec do |mocks|
35
- # Prevents you from mocking or stubbing a method that does not exist on
36
- # a real object. This is generally recommended, and will default to
37
- # `true` in RSpec 4.
38
- mocks.verify_partial_doubles = true
39
- end
40
-
41
- # The settings below are suggested to provide a good initial experience
42
- # with RSpec, but feel free to customize to your heart's content.
43
- =begin
44
- # These two settings work together to allow you to limit a spec run
45
- # to individual examples or groups you care about by tagging them with
46
- # `:focus` metadata. When nothing is tagged with `:focus`, all examples
47
- # get run.
48
- config.filter_run :focus
49
- config.run_all_when_everything_filtered = true
50
-
51
- # Limits the available syntax to the non-monkey patched syntax that is recommended.
52
- # For more details, see:
53
- # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
54
- # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
55
- # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
56
- config.disable_monkey_patching!
57
-
58
- # This setting enables warnings. It's recommended, but in some cases may
59
- # be too noisy due to issues in dependencies.
60
- config.warnings = true
61
-
62
- # Many RSpec users commonly either run the entire suite or an individual
63
- # file, and it's useful to allow more verbose output when running an
64
- # individual spec file.
65
- if config.files_to_run.one?
66
- # Use the documentation formatter for detailed output,
67
- # unless a formatter has already been configured
68
- # (e.g. via a command-line flag).
69
- config.default_formatter = 'doc'
70
- end
71
-
72
- # Print the 10 slowest examples and example groups at the
73
- # end of the spec run, to help surface which specs are running
74
- # particularly slow.
75
- config.profile_examples = 10
76
-
77
- # Run specs in random order to surface order dependencies. If you find an
78
- # order dependency and want to debug it, you can fix the order by providing
79
- # the seed, which is printed after each run.
80
- # --seed 1234
81
- config.order = :random
82
-
83
- # Seed global randomization in this process using the `--seed` CLI option.
84
- # Setting this allows you to use `--seed` to deterministically reproduce
85
- # test failures related to randomization by passing the same `--seed` value
86
- # as the one that triggered the failure.
87
- Kernel.srand config.seed
88
- =end
89
- end