ruby_marks 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 37a5334e1a3c2ea8f16932a3e7a6717169c44992
4
- data.tar.gz: 8b3c73f1b8ad991af9a8d31d138c30d630faa616
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YTRhMGZhMThjYzgwMjA4NWMzZDg2MjJmMDA0NGI4MTNiOTdhNjFmNA==
5
+ data.tar.gz: !binary |-
6
+ ZGE0OTk3YTRlZmQyZDZlNTNkNjdlM2EyOTg0MWYyODgwYjM1MGViNA==
5
7
  SHA512:
6
- metadata.gz: a82005142fcfd71856f789ba472bf8c40ec10fac8e5896d28443f5adc147c7f1f3d5683add03fd16f786f87a32642e473d782c4c518b1bd92434f2b6177c7045
7
- data.tar.gz: 4daa86c2fc1a53c61c355436b14ce56694bf760e1a38605f637a9bc0e0e6fed9d7fe087965b2318455a7315a247000e96a3377c980fa81a07839e9b366934a3b
8
+ metadata.gz: !binary |-
9
+ NTY5ODQ4Y2YzOTJlNGJhYTQyZjZmMWY0YzhiZTA2NGYwOGE0MjJkZjFkMTYx
10
+ MjYyN2NiNGYwMzk0ZDlhYjcwMDBlMTA3YmFhNDhmZjE0NTQ0NDgzZDVjNTBl
11
+ NWI5ZWUxYjA4MDE4NjZkYzk4MzY1MWUyN2U0Mzg5ZDZjY2U5OTA=
12
+ data.tar.gz: !binary |-
13
+ MmFkM2NkYjUyNDUyMDdhMjJkZDUyNGY3Njc1Y2ZmODhlNDFlNTliNzQ2MzEw
14
+ YzljZjhlNmExODgwZjg4Yzg5NjA1MDM2OGJhNzQwYjQwZjc0NDM1NjZiZDdh
15
+ MzI5MWRhZDE3ZGE2YWM3ODVlYmY4NzM2OTQxMzFlODc3MTM0MGY=
@@ -4,12 +4,13 @@ module RubyMarks
4
4
  class Recognizer
5
5
 
6
6
  attr_reader :file, :raised_watchers, :groups, :watchers, :file_str, :original_file_str
7
- attr_accessor :config, :groups_detected
7
+ attr_accessor :config, :groups_detected, :groups_not_detected
8
8
 
9
9
 
10
10
  def initialize
11
11
  self.reset_document
12
- @groups = {}
12
+ @groups = {}
13
+ @groups_not_detected=Array.new()
13
14
  self.create_config
14
15
  end
15
16
 
@@ -130,7 +131,7 @@ module RubyMarks
130
131
  height = RubyMarks::ImageUtils.calc_height(group.expected_coordinates[:y1], group.expected_coordinates[:y2])
131
132
 
132
133
  block = scaner.scan(@file.dup, Magick::Point.new(x, y), width, height)
133
- if block
134
+ if !block.empty?
134
135
  group.coordinates = {x1: block[:x1], x2: block[:x2], y1: block[:y1], y2: block[:y2]}
135
136
  marks_blocks = find_marks_grid(group)
136
137
  marks_blocks.each do |mark|
@@ -142,7 +143,9 @@ module RubyMarks
142
143
  image_str: RubyMarks::ImageUtils.export_file_to_str(mark_file),
143
144
  line: mark[:line]
144
145
  group.marks[mark[:line]] << o_mark
145
- end
146
+ end
147
+ else
148
+ @groups_not_detected << group.label
146
149
  end
147
150
  end
148
151
  else
@@ -1,3 +1,3 @@
1
1
  module RubyMarks
2
- VERSION = "0.4.0".freeze
2
+ VERSION = "0.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_marks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - André Rodrigues
@@ -53,7 +53,7 @@ homepage: https://github.com/andrerpbts/ruby_marks.git
53
53
  licenses:
54
54
  - MIT
55
55
  metadata: {}
56
- post_install_message: "\n *** NOTE: You are running the ImageMagick under 16bits
56
+ post_install_message: ! "\n *** NOTE: You are running the ImageMagick under 16bits
57
57
  quantum depth. This configuration is used\n in very specific cases and
58
58
  can cause RMagick work a bit slow. See more details in this forum post\n http://rubyforge.org/forum/forum.php?thread_id=10975&forum_id=1618
59
59
  ***\n\n We changed the way it recognizes the marks. It's not based on clocks
@@ -65,12 +65,12 @@ require_paths:
65
65
  - lib
66
66
  required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - '>='
68
+ - - ! '>='
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []