colorscore 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3fc4af274f3e7812e7ee317953903f1168eb9ce3
4
+ data.tar.gz: fb352ffb3dbb9d7c10f8e53c9fb37417aff3fb9e
5
+ SHA512:
6
+ metadata.gz: 5c60e976a5325c896bc95f4db4e9c7b03f27121bc4a6277e729781ea740a3bf20f014cf09186f8d04bce49579248a37be6d5eec1e1c332412dd215adb65d0d33
7
+ data.tar.gz: 345cc568269cea15e0f7e5afc9f4843a9ec95744796065001bbec5e357c4ade75be1b7b985e3f93541865a92ea62981b77d4a9463a89548f11c29fe8fe2fc3f1
@@ -12,6 +12,7 @@ Gem::Specification.new do |s|
12
12
 
13
13
  s.add_dependency "color"
14
14
  s.add_development_dependency "rake"
15
+ s.add_development_dependency "test-unit"
15
16
 
16
17
  s.files = `git ls-files`.split("\n")
17
18
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -1,7 +1,9 @@
1
+ require "shellwords"
2
+
1
3
  module Colorscore
2
4
  class Histogram
3
5
  def initialize(image_path, colors=16, depth=8)
4
- output = `convert #{image_path} -resize 400x400 -format %c -dither None -quantize YIQ -colors #{colors} -depth #{depth} histogram:info:-`
6
+ output = `convert #{image_path.shellescape} -resize 400x400 -format %c -dither None -quantize YIQ -colors #{colors.to_i} -depth #{depth.to_i} histogram:info:-`
5
7
  @lines = output.lines.sort.reverse.map(&:strip).reject(&:empty?)
6
8
  end
7
9
 
@@ -1,3 +1,3 @@
1
1
  module Colorscore
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,46 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colorscore
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
5
- prerelease:
4
+ version: 0.0.5
6
5
  platform: ruby
7
6
  authors:
8
7
  - Milo Winningham
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-11-18 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: color
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: rake
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: test-unit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
44
53
  - !ruby/object:Gem::Version
45
54
  version: '0'
46
55
  description: Finds the dominant colors in an image and scores them against a user-defined
@@ -51,7 +60,7 @@ executables: []
51
60
  extensions: []
52
61
  extra_rdoc_files: []
53
62
  files:
54
- - .gitignore
63
+ - ".gitignore"
55
64
  - Gemfile
56
65
  - README.md
57
66
  - Rakefile
@@ -69,27 +78,26 @@ files:
69
78
  - test/test_helper.rb
70
79
  homepage:
71
80
  licenses: []
81
+ metadata: {}
72
82
  post_install_message:
73
83
  rdoc_options: []
74
84
  require_paths:
75
85
  - lib
76
86
  required_ruby_version: !ruby/object:Gem::Requirement
77
- none: false
78
87
  requirements:
79
- - - ! '>='
88
+ - - ">="
80
89
  - !ruby/object:Gem::Version
81
90
  version: '0'
82
91
  required_rubygems_version: !ruby/object:Gem::Requirement
83
- none: false
84
92
  requirements:
85
- - - ! '>='
93
+ - - ">="
86
94
  - !ruby/object:Gem::Version
87
95
  version: '0'
88
96
  requirements: []
89
97
  rubyforge_project:
90
- rubygems_version: 1.8.23
98
+ rubygems_version: 2.5.1
91
99
  signing_key:
92
- specification_version: 3
100
+ specification_version: 4
93
101
  summary: Finds the dominant colors in an image.
94
102
  test_files:
95
103
  - test/fixtures/skydiver.jpg