imatcher 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile +8 -1
- data/README.md +6 -6
- data/imatcher.gemspec +2 -5
- data/lib/imatcher/version.rb +1 -1
- metadata +17 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b732a5e76b22bb7714bb9512bec50a08089fccc
|
4
|
+
data.tar.gz: d34d75b437e24c191579310f666b7e6ebc2e8a9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46736e8879c8e68a89aca66911176994f757a1fbb9e5268084cc78441de5984512982addaf951a82f56ac839f4f883b69a42d4b5234ba22c5235f2693134ea7a
|
7
|
+
data.tar.gz: c1ce2be3a848a6ca138f2899dba757868c9c43f3115d815f2c15348abac1e17636198fd19244d74b849adb2e3dc73d466b00de4b9f4576f792a069e551e2462f
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,6 +1,13 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
3
|
+
gem "rake", "~> 10.0"
|
4
|
+
gem "rspec", "~> 3.0"
|
5
|
+
|
6
|
+
if RUBY_PLATFORM =~ /java/
|
7
|
+
gem "chunky_png", "~> 1.3.5"
|
8
|
+
else
|
9
|
+
gem "oily_png", "~> 1.2"
|
10
|
+
end
|
4
11
|
|
5
12
|
gem 'pry-byebug' if RUBY_VERSION >= "2.0.0" && RUBY_PLATFORM != 'java'
|
6
13
|
local_gemfile = 'Gemfile.local'
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![Build Status](https://travis-ci.org/teachbase/imatcher.svg?branch=master)](https://travis-ci.org/teachbase/imatcher)
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/imatcher.svg)](https://rubygems.org/gems/imatcher) [![Build Status](https://travis-ci.org/teachbase/imatcher.svg?branch=master)](https://travis-ci.org/teachbase/imatcher)
|
2
2
|
|
3
3
|
# Imatcher
|
4
4
|
|
@@ -88,21 +88,21 @@ res = Imatcher::Matcher.new(options).compare(path_1, path_2)
|
|
88
88
|
|
89
89
|
```
|
90
90
|
|
91
|
-
## Excluding
|
91
|
+
## Excluding rectangle
|
92
92
|
|
93
93
|
<img src="https://raw.githubusercontent.com/teachbase/imatcher/master/spec/fixtures/a.png" width="300" />
|
94
94
|
<img src="https://raw.githubusercontent.com/teachbase/imatcher/master/spec/fixtures/a1.png" width="300" />
|
95
95
|
|
96
|
-
You can exclude
|
96
|
+
You can exclude rectangle from comparing by passing `:exclude_rect` to `compare`.
|
97
97
|
E.g., if `path_1` and `path_2` contain images above
|
98
98
|
```ruby
|
99
|
-
Imatcher.compare(path_1, path_2,
|
99
|
+
Imatcher.compare(path_1, path_2, exclude_rect: [200, 150, 275, 200]).match? # => true
|
100
100
|
```
|
101
101
|
`[200, 150, 275, 200]` is array of two vertices of rectangle -- (200, 150) is left-top vertex and (275, 200) is right-bottom.
|
102
102
|
|
103
|
-
## Including
|
103
|
+
## Including rectangle
|
104
104
|
|
105
|
-
You can set bounds of comparing by passing `:
|
105
|
+
You can set bounds of comparing by passing `:include_rect` to `compare` with array similar to previous example
|
106
106
|
|
107
107
|
## Contributing
|
108
108
|
|
data/imatcher.gemspec
CHANGED
@@ -14,11 +14,8 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.files = `git ls-files`.split($/)
|
15
15
|
spec.require_paths = ["lib"]
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
else
|
20
|
-
spec.add_dependency "oily_png", "~> 1.2"
|
21
|
-
end
|
17
|
+
spec.add_dependency "chunky_png", "~> 1.3.5"
|
18
|
+
spec.add_dependency "oily_png", "~> 1.2" if spec.platform == "ruby"
|
22
19
|
|
23
20
|
spec.add_development_dependency "simplecov", ">= 0.3.8"
|
24
21
|
spec.add_development_dependency "rake", "~> 10.0"
|
data/lib/imatcher/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: imatcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: chunky_png
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.3.5
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.5
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: oily_png
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,9 +150,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
150
|
version: '0'
|
137
151
|
requirements: []
|
138
152
|
rubyforge_project:
|
139
|
-
rubygems_version: 2.
|
153
|
+
rubygems_version: 2.6.4
|
140
154
|
signing_key:
|
141
155
|
specification_version: 4
|
142
156
|
summary: Image comparison lib
|
143
157
|
test_files: []
|
144
|
-
has_rdoc:
|