mojo_magick 0.5.6 → 0.6.4

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
- SHA1:
3
- metadata.gz: 50a45302825af74fc985fd903d6f493407c243f4
4
- data.tar.gz: 7d535139b1d46cf04ffa4b003d290b3c806e7e2a
2
+ SHA256:
3
+ metadata.gz: 5025141b52e80347c3b807c7afca3e1282842903423ca47f635a32a09c1a8cad
4
+ data.tar.gz: d9d10064df6a22210782fb0320b1151053eeb58fc7f3092a4d08b14b64b8e032
5
5
  SHA512:
6
- metadata.gz: fd3cfe567c2f35d7a87a68843b7139f728ad388fdecbbac03ef0a1f97468dfe3c0b71fb4705372e5b36044c9a0f0cc2346efe8fa86119cf6493bcb462dfaedc3
7
- data.tar.gz: 9b8db5160797881095e8551a4540cd4e10ef8f23efb4d8d2d22bcef9d2cc45f703c263442822caf04f169ff64192a511259eb1bbd44b2c5bdcbf523b79fa509c
6
+ metadata.gz: 786f4d9acc00dff0577cad9c0c0f647cb53febc3d02526d9581fe2864bf1cbec727ce41b65cef814c6bde79f602242c078d039d397d0a701075a39fef1ee59b2
7
+ data.tar.gz: 700adfed1fcad75866b26ad724fc2b7ffdf7413d1568f5ef026110e7938ade12d22d4aadc70d55cf47771cf4f31760a4244f41678f39503e03343f6dc624bf3f
@@ -0,0 +1,25 @@
1
+ version: 2.1
2
+ orbs:
3
+ ruby: circleci/ruby@1.1.2
4
+
5
+ jobs:
6
+ build:
7
+ docker:
8
+ - image: circleci/ruby:2.6.6-browsers
9
+ executor: ruby/default
10
+ steps:
11
+ - checkout
12
+ - run:
13
+ name: Which bundler?
14
+ command: bundle -v
15
+ - ruby/install-deps
16
+ - run:
17
+ name: install imagemagick
18
+ command: sudo apt-get install imagemagick ghostscript
19
+ - run:
20
+ name: tests
21
+ command: bundle exec rake
22
+ - run:
23
+ name: audit
24
+ command: bundle exec bundle-audit update && bundle exec bundle-audit check
25
+ - ruby/rubocop-check
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: monthly
7
+ time: "13:00"
8
+ open-pull-requests-limit: 10
@@ -0,0 +1,99 @@
1
+ AllCops:
2
+ NewCops: enable
3
+ DisplayCopNames: true
4
+ DisplayStyleGuide: true
5
+ Exclude:
6
+ - "bin/*"
7
+ - "db/schema.rb"
8
+ - "lib/templates/**/*"
9
+ - "**/node_modules/**/*"
10
+ - "tmp/**/*"
11
+ - "vendor/**/*"
12
+ - "log/**/*"
13
+
14
+ Layout/CaseIndentation:
15
+ Enabled: false
16
+
17
+ Layout/FirstArrayElementIndentation:
18
+ EnforcedStyle: consistent
19
+
20
+ Layout/HashAlignment:
21
+ Enabled: false
22
+
23
+ Layout/LineLength:
24
+ Max: 120
25
+
26
+ Layout/MultilineMethodCallIndentation:
27
+ EnforcedStyle: indented
28
+
29
+ Lint/AmbiguousBlockAssociation:
30
+ Enabled: false
31
+
32
+ Lint/ScriptPermission:
33
+ Exclude:
34
+ - "Rakefile"
35
+
36
+ Metrics/AbcSize:
37
+ Max: 35
38
+ Exclude:
39
+ - "spec/**/*"
40
+
41
+ Metrics/BlockLength:
42
+ CountComments: false
43
+ Max: 50
44
+ Exclude:
45
+ - "config/**/*"
46
+ - "spec/**/*"
47
+
48
+ Metrics/ClassLength:
49
+ Max: 250
50
+ Exclude:
51
+ - "spec/**/*"
52
+
53
+ Metrics/MethodLength:
54
+ Max: 25
55
+ Exclude:
56
+ - "db/migrate/*"
57
+ - "spec/**/*"
58
+
59
+ Naming/PredicateName:
60
+ Enabled: false
61
+
62
+ Security/YAMLLoad:
63
+ Enabled: false
64
+
65
+ Style/BarePercentLiterals:
66
+ EnforcedStyle: percent_q
67
+
68
+ Style/BlockDelimiters:
69
+ EnforcedStyle: braces_for_chaining
70
+
71
+ Style/Documentation:
72
+ Enabled: false
73
+
74
+ Style/EmptyMethod:
75
+ EnforcedStyle: expanded
76
+
77
+ Style/FrozenStringLiteralComment:
78
+ EnforcedStyle: never
79
+
80
+ Style/Lambda:
81
+ EnforcedStyle: literal
82
+
83
+ Style/ModuleFunction:
84
+ EnforcedStyle: extend_self
85
+
86
+ Style/MutableConstant:
87
+ Enabled: false
88
+
89
+ Style/PreferredHashMethods:
90
+ Enabled: false
91
+
92
+ Style/StringLiterals:
93
+ EnforcedStyle: double_quotes
94
+
95
+ Style/StringLiteralsInInterpolation:
96
+ EnforcedStyle: double_quotes
97
+
98
+ Style/TernaryParentheses:
99
+ EnforcedStyle: require_parentheses_when_complex
@@ -0,0 +1,2 @@
1
+ Performance/Casecmp:
2
+ Enabled: false
@@ -0,0 +1,11 @@
1
+ require:
2
+ - rubocop-performance
3
+
4
+ inherit_from:
5
+ - ./.rubocop-common.yml
6
+ - ./.rubocop-performance.yml
7
+
8
+ Metrics/CyclomaticComplexity:
9
+ Max: 10
10
+ Metrics/PerceivedComplexity:
11
+ Max: 10
@@ -1 +1 @@
1
- 2.1.5
1
+ 2.6.6
data/Gemfile CHANGED
@@ -1,3 +1,8 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
+
3
+ group :test, :development do
4
+ gem "irb", require: false
5
+ gem "simplecov", require: false
6
+ end
2
7
 
3
8
  gemspec
@@ -1,26 +1,68 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mojo_magick (0.5.6)
4
+ mojo_magick (0.6.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.2.4)
10
- multi_json (1.8.2)
11
- rake (0.9.2.2)
12
- rspec-expectations (2.14.3)
13
- diff-lcs (>= 1.1.3, < 2.0)
14
- simplecov (0.7.1)
15
- multi_json (~> 1.0)
16
- simplecov-html (~> 0.7.1)
17
- simplecov-html (0.7.1)
9
+ ast (2.4.1)
10
+ bundle-audit (0.1.0)
11
+ bundler-audit
12
+ bundler-audit (0.7.0.1)
13
+ bundler (>= 1.2.0, < 3)
14
+ thor (>= 0.18, < 2)
15
+ docile (1.3.5)
16
+ io-console (0.5.7)
17
+ irb (1.3.2)
18
+ reline (>= 0.1.5)
19
+ minitest (5.14.2)
20
+ parallel (1.19.2)
21
+ parser (2.7.2.0)
22
+ ast (~> 2.4.1)
23
+ rainbow (3.0.0)
24
+ rake (13.0.3)
25
+ regexp_parser (1.8.2)
26
+ reline (0.2.2)
27
+ io-console (~> 0.5)
28
+ rexml (3.2.4)
29
+ rubocop (1.1.0)
30
+ parallel (~> 1.10)
31
+ parser (>= 2.7.1.5)
32
+ rainbow (>= 2.2.2, < 4.0)
33
+ regexp_parser (>= 1.8)
34
+ rexml
35
+ rubocop-ast (>= 1.0.1)
36
+ ruby-progressbar (~> 1.7)
37
+ unicode-display_width (>= 1.4.0, < 2.0)
38
+ rubocop-ast (1.1.1)
39
+ parser (>= 2.7.1.5)
40
+ rubocop-performance (1.8.1)
41
+ rubocop (>= 0.87.0)
42
+ rubocop-ast (>= 0.4.0)
43
+ ruby-progressbar (1.10.1)
44
+ simplecov (0.21.2)
45
+ docile (~> 1.1)
46
+ simplecov-html (~> 0.11)
47
+ simplecov_json_formatter (~> 0.1)
48
+ simplecov-html (0.12.3)
49
+ simplecov_json_formatter (0.1.2)
50
+ thor (1.0.1)
51
+ unicode-display_width (1.7.0)
18
52
 
19
53
  PLATFORMS
20
54
  ruby
21
55
 
22
56
  DEPENDENCIES
57
+ bundle-audit
58
+ bundler
59
+ irb
60
+ minitest
23
61
  mojo_magick!
24
62
  rake
25
- rspec-expectations
63
+ rubocop
64
+ rubocop-performance
26
65
  simplecov
66
+
67
+ BUNDLED WITH
68
+ 1.17.2
data/README.md CHANGED
@@ -10,6 +10,7 @@ This tool came about because I wanted a fast, simple, lightweight, nothing-goes-
10
10
  because-it's-too-simple-to-break image tool.
11
11
 
12
12
  [![Gem Version](https://badge.fury.io/rb/mojo_magick.png)](http://badge.fury.io/rb/mojo_magick)
13
+ [![Build Status](https://circleci.com/gh/rcode5/mojo_magick/tree/master.svg?style=shield&circle-token=8d2252bd460bf1a7cdaad5c2e169698605afb981)]()
13
14
 
14
15
  Using it
15
16
  ========
@@ -17,11 +18,11 @@ Using it
17
18
  Add to your Gemfile
18
19
 
19
20
  gem 'mojo_magick'
20
-
21
+
21
22
  Require it in your ruby code
22
23
 
23
24
  require 'mojo_magick'
24
-
25
+
25
26
  Go to town! Check out a couple of simple [examples, here](examples/)
26
27
 
27
28
  Examples
@@ -138,7 +139,7 @@ complex commands.
138
139
 
139
140
  ### Get a list of available fonts
140
141
 
141
- fonts = MojoMagick::get_fonts
142
+ fonts = MojoMagick::available_fonts
142
143
 
143
144
  fonts.first
144
145
  => #<MojoMagick::Font:0x000001015a8b90 @name="AvantGarde-Book", @family="AvantGarde", @style="Normal", @stretch="Normal", @weight="400", @glyphs="/usr/local/share/ghostscript/fonts/a010013l.pfb">
@@ -196,7 +197,7 @@ Availablility
196
197
  Contributions
197
198
  =============
198
199
 
199
- Got a fix? Got a feature?
200
+ Got a fix? Got a feature?
200
201
 
201
202
  * fork it
202
203
  * make a branch (named appropriately)
@@ -210,6 +211,36 @@ in the new code
210
211
 
211
212
  Recent Changes
212
213
  ==============
214
+ #### Version 0.6.3
215
+
216
+ * Major cleanup and refactor (https://github.com/rcode5/mojo_magick/pull/33)
217
+ * Deprecated `MojoMagick.get_fonts` in favor of `MojoMagick.available_fonts`
218
+ * Moved `raw_command` and `execute` and `execute!` methods into their own module (and added deprecation warnings)
219
+ * Renamed `Util::Parser` to `Util::FontParser` because that's what it does
220
+ * Overall rubocop and ruby clean up
221
+
222
+ #### Version 0.6.2
223
+
224
+ * fix `annotate` option. Now it takes keyword arguments for geometry.
225
+
226
+ #### Version 0.6.1
227
+
228
+ * pushed and yanked - defunct version
229
+
230
+ #### Version 0.6.0
231
+
232
+ * general cleanup and update gems - ready for ImageMagick 7
233
+ * dumped resource limit handling
234
+ * PR #29, #30
235
+
236
+ #### Version 0.5.6
237
+
238
+ * add `get_format` method to help with quoted source file
239
+
240
+ #### Version 0.5.5
241
+
242
+ * Refactor raw_command into execute! and execute methods so that for cases where we don't care about exit status, it can be easily ignored
243
+
213
244
  #### Version 0.5.4
214
245
 
215
246
  * Include image magick commandline failure from raw_command (on failure)
data/Rakefile CHANGED
@@ -1,20 +1,22 @@
1
- require 'rubygems'
1
+ require "rubygems"
2
+ require "simplecov"
3
+ require "rake/testtask"
2
4
 
3
- task 'default' => :test
5
+ task default: [:test]
4
6
 
5
- desc "Default: run tests"
6
- task :test do
7
- require 'simplecov'
8
- SimpleCov.start
9
- require 'rake/runtest'
10
- files = Dir.glob(File.join(File.dirname(__FILE__), 'test/*_test.rb'))
11
- files.each do |f|
12
- Rake.run_tests f
13
- end
7
+ Rake::TestTask.new do |t|
8
+ t.libs = ["minitest"]
9
+ t.test_files = Dir.glob(File.join(File.dirname(__FILE__), "test/*_test.rb"))
10
+ t.verbose = true
14
11
  end
15
12
 
16
13
  desc "Build gem"
17
14
  task :build do
18
15
  `rm mojo_magick-*.gem`
19
- puts `gem build mojo_magick.gemspec`
16
+ puts `gem build mojo_magick.gemspec`
17
+ end
18
+
19
+ desc "Release"
20
+ task release: :build do
21
+ puts `gem push mojo_magick-*.gem`
20
22
  end
@@ -1,22 +1,19 @@
1
1
  #!/usr/bin/env ruby
2
- #
2
+ require "mojo_magick"
3
3
 
4
- require 'mojo_magick'
5
-
6
- MojoMagick::convert(nil, 'animated.gif') do |c|
7
- c.size '200x200'
4
+ MojoMagick.convert(nil, "animated.gif") do |c|
5
+ c.size "200x200"
8
6
  c.delay 100
9
7
  c.image_block do # first layer
10
- c.background 'blue'
11
- c.fill 'white'
12
- c.gravity 'northwest'
13
- c.label 'NW'
8
+ c.background "blue"
9
+ c.fill "white"
10
+ c.gravity "northwest"
11
+ c.label "NW"
14
12
  end
15
13
  c.image_block do # second layer
16
- c.background 'transparent'
17
- c.fill 'red'
18
- c.gravity 'southeast'
19
- c.label 'SE'
14
+ c.background "transparent"
15
+ c.fill "red"
16
+ c.gravity "southeast"
17
+ c.label "SE"
20
18
  end
21
19
  end
22
-
@@ -1,23 +1,20 @@
1
1
  #!/usr/bin/env ruby
2
- #
2
+ require "mojo_magick"
3
3
 
4
- require 'mojo_magick'
5
-
6
- MojoMagick::convert(nil, 'composite_out.png') do |c|
7
- c.size '200x200'
4
+ MojoMagick.convert(nil, "composite_out.png") do |c|
5
+ c.size "200x200"
8
6
  c.delay 100
9
7
  c.image_block do # first layer
10
- c.background 'blue'
11
- c.fill 'white'
12
- c.gravity 'northwest'
13
- c.label 'NW'
8
+ c.background "blue"
9
+ c.fill "white"
10
+ c.gravity "northwest"
11
+ c.label "NW"
14
12
  end
15
13
  c.image_block do # second layer
16
- c.background 'transparent'
17
- c.fill 'red'
18
- c.gravity 'southeast'
19
- c.label 'SE'
14
+ c.background "transparent"
15
+ c.fill "red"
16
+ c.gravity "southeast"
17
+ c.label "SE"
20
18
  end
21
19
  c.composite
22
20
  end
23
-
data/init.rb CHANGED
@@ -1,3 +1 @@
1
- require File::expand_path(File::join(File::dirname(__FILE__), 'lib', 'mojo_magick'))
2
-
3
-
1
+ require File.expand_path(File.join(File.dirname(__FILE__), "lib", "mojo_magick"))