imagetools 1.6.1 → 1.8.0

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
2
  SHA256:
3
- metadata.gz: b0c09a0e718e8e80afa71f207fb0eb68ae6a98cc37ce04a5105d15958a576885
4
- data.tar.gz: 2b8fba73e2c5ef832a0cdfb6f00afc3325b23a1a7d6d3a1607e09bf8b9d66d5b
3
+ metadata.gz: e1a3773ab194e825412e9f5cd7a6296b9dae8232b265df6099a1f505662ac21e
4
+ data.tar.gz: e306694b34e778ab2f18f60c55410c3307402f999633a4c288a740468aa181d6
5
5
  SHA512:
6
- metadata.gz: 2d2b036651994dd9dc0e4de301a903388df4f94ce224263c581be27842057abe3aa4028f6dccbf2a5b2a11fda85767c808b427d25fc360355da5effec4c197ac
7
- data.tar.gz: 65b25497223df286e43595d6d2eebb3629183d5a758ef93d36da47d196afd9689a586bbbcb46a6fa3f1ba703ebee86662a41c70d1466c85e9fea77653cee69b8
6
+ metadata.gz: 7939c3704ae59d12664951d529166379ac2029e3104dad8f33987f24f70927cb6c7eca88904ab5a76c2c07cde3e1699f05a1325dbe5e59248056c23b9a9b9cdb
7
+ data.tar.gz: 90efa73ede00e2712c32c9b05451f22ed0532adbf8ebd6ec02ba495e874d5a4249e44a44865fde03b06085701a583a1bd6c8cc9b214aebdf354f289d14c092f0
data/.idea/workspace.xml CHANGED
@@ -1,8 +1,13 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <project version="4">
3
+ <component name="AutoImportSettings">
4
+ <option name="autoReloadType" value="SELECTIVE" />
5
+ </component>
3
6
  <component name="ChangeListManager">
4
7
  <list default="true" id="b197c64f-57f8-4389-ab8d-dc9fe3cb05ba" name="Default" comment="">
5
8
  <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/lib/imagetools/imagefilter.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/imagetools/imagefilter.rb" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/lib/imagetools/version.rb" beforeDir="false" afterPath="$PROJECT_DIR$/lib/imagetools/version.rb" afterDir="false" />
6
11
  </list>
7
12
  <option name="SHOW_DIALOG" value="false" />
8
13
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -21,10 +26,13 @@
21
26
  <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
22
27
  </component>
23
28
  <component name="HighlightingSettingsPerFile">
24
- <setting file="file://$PROJECT_DIR$/exe/imageconcat" root0="FORCE_HIGHLIGHTING" />
25
- <setting file="file://$PROJECT_DIR$/test_imageconcat.sh" root0="FORCE_HIGHLIGHTING" />
26
29
  <setting file="file://$USER_HOME$/.anyenv/envs/rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/imagetools-1.5.2/lib/imagetools/imageconcat.rb" root0="FORCE_HIGHLIGHTING" />
30
+ <setting file="file://$PROJECT_DIR$/exe/imageconcat" root0="FORCE_HIGHLIGHTING" />
27
31
  <setting file="file://$PROJECT_DIR$/lib/imagetools/imageconcat.rb" root0="FORCE_HIGHLIGHTING" />
32
+ <setting file="file://$PROJECT_DIR$/test_imageconcat.sh" root0="FORCE_HIGHLIGHTING" />
33
+ </component>
34
+ <component name="MarkdownSettingsMigration">
35
+ <option name="stateVersion" value="1" />
28
36
  </component>
29
37
  <component name="ProjectFrameBounds">
30
38
  <option name="x" value="254" />
@@ -37,27 +45,20 @@
37
45
  <option name="hideEmptyMiddlePackages" value="true" />
38
46
  <option name="showLibraryContents" value="true" />
39
47
  </component>
40
- <component name="PropertiesComponent">
41
- <property name="GoToClass.includeLibraries" value="false" />
42
- <property name="GoToClass.toSaveIncludeLibraries" value="false" />
43
- <property name="GoToFile.includeJavaFiles" value="false" />
44
- <property name="MemberChooser.copyJavadoc" value="false" />
45
- <property name="MemberChooser.showClasses" value="true" />
46
- <property name="MemberChooser.sorted" value="false" />
47
- <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
48
- <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
49
- <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
50
- <property name="WebServerToolWindowFactoryState" value="false" />
51
- <property name="aspect.path.notification.shown" value="true" />
52
- <property name="last_opened_file_path" value="$PROJECT_DIR$" />
53
- <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
54
- <property name="nodejs_npm_path_reset_for_default_project" value="true" />
55
- <property name="project.structure.last.edited" value="Modules" />
56
- <property name="project.structure.proportion" value="0.15" />
57
- <property name="project.structure.side.proportion" value="0.208413" />
58
- <property name="settings.editor.selected.configurable" value="preferences.keymap" />
59
- </component>
60
- <component name="RunManager" selected="Ruby.imageconcat">
48
+ <component name="PropertiesComponent">{
49
+ &quot;keyToString&quot;: {
50
+ &quot;WebServerToolWindowFactoryState&quot;: &quot;false&quot;,
51
+ &quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
52
+ &quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
53
+ &quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
54
+ &quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
55
+ &quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
56
+ &quot;ruby.rails.projectView.checked&quot;: &quot;true&quot;,
57
+ &quot;ruby.structure.view.model.defaults.configured&quot;: &quot;true&quot;,
58
+ &quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
59
+ }
60
+ }</component>
61
+ <component name="RunManager" selected="Test::Unit/Shoulda/Minitest.test_replace_image2webp">
61
62
  <configuration default="true" type="Application" factoryName="Application">
62
63
  <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
63
64
  <method v="2">
@@ -78,7 +79,7 @@
78
79
  <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
79
80
  <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
80
81
  <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
81
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
82
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
82
83
  <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
83
84
  <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_FORKED_COVERAGE="true">
84
85
  <COVERAGE_PATTERN ENABLED="true">
@@ -99,7 +100,7 @@
99
100
  <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
100
101
  <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
101
102
  <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
102
- <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
103
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
103
104
  <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
104
105
  <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_FORKED_COVERAGE="true">
105
106
  <COVERAGE_PATTERN ENABLED="true">
@@ -122,6 +123,134 @@
122
123
  <option name="Make" enabled="true" />
123
124
  </method>
124
125
  </configuration>
126
+ <configuration name="test_exclude_image" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
127
+ <module name="imagetools" />
128
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
129
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
130
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
131
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
132
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
133
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
134
+ <envs>
135
+ <env name="JRUBY_OPTS" value="-X+O" />
136
+ </envs>
137
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
138
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
139
+ <COVERAGE_PATTERN ENABLED="true">
140
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
141
+ </COVERAGE_PATTERN>
142
+ </EXTENSION>
143
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
144
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
145
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
146
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
147
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
148
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_exclude_image$" />
149
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
150
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
151
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
152
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
153
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
154
+ <method v="2">
155
+ <option name="Make" enabled="true" />
156
+ </method>
157
+ </configuration>
158
+ <configuration name="test_replace_image2webp" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
159
+ <module name="imagetools" />
160
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
161
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
162
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
163
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
164
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
165
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
166
+ <envs>
167
+ <env name="JRUBY_OPTS" value="-X+O" />
168
+ </envs>
169
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
170
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
171
+ <COVERAGE_PATTERN ENABLED="true">
172
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
173
+ </COVERAGE_PATTERN>
174
+ </EXTENSION>
175
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
176
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
177
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
178
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
179
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
180
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_replace_image2webp$" />
181
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
182
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
183
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
184
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
185
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
186
+ <method v="2">
187
+ <option name="Make" enabled="true" />
188
+ </method>
189
+ </configuration>
190
+ <configuration name="test_replace_image_filename" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
191
+ <module name="imagetools" />
192
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
193
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
194
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
195
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
196
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
197
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
198
+ <envs>
199
+ <env name="JRUBY_OPTS" value="-X+O" />
200
+ </envs>
201
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
202
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
203
+ <COVERAGE_PATTERN ENABLED="true">
204
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
205
+ </COVERAGE_PATTERN>
206
+ </EXTENSION>
207
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
208
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
209
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
210
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
211
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
212
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_replace_image_filename$" />
213
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
214
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
215
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
216
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
217
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
218
+ <method v="2">
219
+ <option name="Make" enabled="true" />
220
+ </method>
221
+ </configuration>
222
+ <configuration name="test_replace_png2jpg" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest" temporary="true" nameIsGenerated="true">
223
+ <module name="imagetools" />
224
+ <predefined_log_file enabled="true" id="RUBY_TESTUNIT" />
225
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-Ilib:test" />
226
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
227
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
228
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
229
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
230
+ <envs>
231
+ <env name="JRUBY_OPTS" value="-X+O" />
232
+ </envs>
233
+ <EXTENSION ID="BundlerRunConfigurationExtension" BUNDLE_MODE="AUTO" bundleExecEnabled="true" />
234
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" track_test_folders="true" runner="rcov" ENABLE_BRANCH_COVERAGE="true" ENABLE_FORKED_COVERAGE="true">
235
+ <COVERAGE_PATTERN ENABLED="true">
236
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
237
+ </COVERAGE_PATTERN>
238
+ </EXTENSION>
239
+ <EXTENSION ID="org.jetbrains.plugins.ruby.rails.run.RailsRunConfigurationExtension" SCRATCH_USE_RAILS_RUNNER="false" />
240
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
241
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
242
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPTS_PATHS" VALUE="$PROJECT_DIR$/test/imagefilter_test.rb" />
243
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
244
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="^test_replace_png2jpg$" />
245
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_METHOD" />
246
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
247
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
248
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
249
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
250
+ <method v="2">
251
+ <option name="Make" enabled="true" />
252
+ </method>
253
+ </configuration>
125
254
  <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType">
126
255
  <module name="" />
127
256
  <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
@@ -134,7 +263,19 @@
134
263
  <list>
135
264
  <item itemvalue="Ruby.iconcreator" />
136
265
  <item itemvalue="Ruby.imageconcat" />
266
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_exclude_image" />
267
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_replace_image2webp" />
268
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_replace_image_filename" />
269
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_replace_png2jpg" />
137
270
  </list>
271
+ <recent_temporary>
272
+ <list>
273
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_replace_image2webp" />
274
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_exclude_image" />
275
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_replace_png2jpg" />
276
+ <item itemvalue="Test::Unit/Shoulda/Minitest.test_replace_image_filename" />
277
+ </list>
278
+ </recent_temporary>
138
279
  </component>
139
280
  <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
140
281
  <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" RAKE_SPRING_PRE_LOADER_OPTION="false" RAILS_SPRING_PRE_LOADER_OPTION="false" />
@@ -152,6 +293,10 @@
152
293
  <workItem from="1646719315550" duration="10000" />
153
294
  <workItem from="1669361560975" duration="7318000" />
154
295
  <workItem from="1669384174219" duration="2215000" />
296
+ <workItem from="1678251388689" duration="1190000" />
297
+ <workItem from="1682834450840" duration="2235000" />
298
+ <workItem from="1682836714784" duration="506000" />
299
+ <workItem from="1683773814394" duration="2723000" />
155
300
  </task>
156
301
  <servers />
157
302
  </component>
@@ -159,12 +304,13 @@
159
304
  <option name="version" value="3" />
160
305
  </component>
161
306
  <component name="Vcs.Log.History.Properties">
162
- <option name="COLUMN_ORDER">
307
+ <option name="COLUMN_ID_ORDER">
163
308
  <list>
164
- <option value="0" />
165
- <option value="2" />
166
- <option value="3" />
167
- <option value="1" />
309
+ <option value="Default.Root" />
310
+ <option value="Default.Author" />
311
+ <option value="Default.Date" />
312
+ <option value="Default.Subject" />
313
+ <option value="Space.CommitStatus" />
168
314
  </list>
169
315
  </option>
170
316
  </component>
@@ -192,6 +338,10 @@
192
338
  </component>
193
339
  <component name="com.intellij.coverage.CoverageDataManagerImpl">
194
340
  <SUITE FILE_PATH="coverage/imagetools@imageconcat.rcov" NAME="imageconcat Coverage Results" MODIFIED="1669384701671" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imagetools" />
341
+ <SUITE FILE_PATH="coverage/imagetools@test_replace_image_filename.rcov" NAME="test_replace_image_filename Coverage Results" MODIFIED="1682834940900" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imagetools" />
342
+ <SUITE FILE_PATH="coverage/imagetools@test_replace_image2webp.rcov" NAME="test_replace_image2webp Coverage Results" MODIFIED="1682835456004" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imagetools" />
343
+ <SUITE FILE_PATH="coverage/imagetools@test_replace_png2jpg.rcov" NAME="test_replace_png2jpg Coverage Results" MODIFIED="1682834990939" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imagetools" />
344
+ <SUITE FILE_PATH="coverage/imagetools@test_exclude_image.rcov" NAME="test_exclude_image Coverage Results" MODIFIED="1682835322829" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" MODULE_NAME="imagetools" />
195
345
  <SUITE FILE_PATH="coverage/imagetools@iconcreator.rcov" NAME="iconcreator Coverage Results" MODIFIED="1669377776099" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="rcov" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/exe" MODULE_NAME="imagetools" />
196
346
  </component>
197
347
  <component name="masterDetails">
data/Gemfile.lock CHANGED
@@ -1,16 +1,16 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- imagetools (1.6.1)
4
+ imagetools (1.8.0)
5
5
  rmagick
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- minitest (5.16.3)
10
+ minitest (5.18.0)
11
11
  pkg-config (1.5.1)
12
12
  rake (13.0.6)
13
- rmagick (5.1.0)
13
+ rmagick (5.2.0)
14
14
  pkg-config (~> 1.4)
15
15
 
16
16
  PLATFORMS
@@ -23,4 +23,4 @@ DEPENDENCIES
23
23
  rake (~> 13.0)
24
24
 
25
25
  BUNDLED WITH
26
- 2.3.19
26
+ 2.4.9
data/imagetools.iml CHANGED
@@ -6,21 +6,21 @@
6
6
  <orderEntry type="jdk" jdkName="rbenv: 3.0.4" jdkType="RUBY_SDK" />
7
7
  <orderEntry type="sourceFolder" forTests="false" />
8
8
  <orderEntry type="module-library">
9
- <library name="minitest (vbundled(5.16.3)) [path][gem]" type="rubylib">
9
+ <library name="minitest (vbundled(5.18.0)) [path][gem]" type="rubylib">
10
10
  <properties>
11
11
  <option name="version" value="4" />
12
12
  </properties>
13
13
  <CLASSES>
14
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.16.3/lib" />
15
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.16.3/test" />
14
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.18.0/lib" />
15
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.18.0/test" />
16
16
  </CLASSES>
17
17
  <JAVADOC />
18
18
  <SOURCES>
19
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.16.3/lib" />
20
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.16.3/test" />
19
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.18.0/lib" />
20
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.18.0/test" />
21
21
  </SOURCES>
22
22
  <excluded>
23
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.16.3/test" />
23
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/minitest-5.18.0/test" />
24
24
  </excluded>
25
25
  </library>
26
26
  </orderEntry>
@@ -66,31 +66,63 @@
66
66
  </library>
67
67
  </orderEntry>
68
68
  <orderEntry type="module-library">
69
- <library name="rmagick (vbundled(5.1.0)) [path][gem]" type="rubylib">
69
+ <library name="rmagick (vbundled(5.2.0)) [path][gem]" type="rubylib">
70
70
  <properties>
71
71
  <option name="version" value="4" />
72
72
  </properties>
73
73
  <CLASSES>
74
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/ext" />
75
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/lib" />
76
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/.github" />
77
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/.devcontainer" />
74
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/ext" />
75
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/lib" />
76
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/.github" />
77
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/.devcontainer" />
78
78
  </CLASSES>
79
79
  <JAVADOC />
80
80
  <SOURCES>
81
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/ext" />
82
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/lib" />
83
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/.github" />
84
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/.devcontainer" />
81
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/ext" />
82
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/lib" />
83
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/.github" />
84
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/.devcontainer" />
85
85
  </SOURCES>
86
86
  <excluded>
87
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/ext" />
88
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/.github" />
89
- <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.1.0/.devcontainer" />
87
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/ext" />
88
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/.github" />
89
+ <root url="file://$MODULE_DIR$/vendor/bundle/ruby/3.0.0/gems/rmagick-5.2.0/.devcontainer" />
90
90
  </excluded>
91
91
  </library>
92
92
  </orderEntry>
93
- <orderEntry type="library" scope="PROVIDED" name="bundler (v2.3.19, rbenv: 3.0.4) [gem]" level="application" />
94
- <orderEntry type="library" scope="PROVIDED" name="rbs (v1.4.0, rbenv: 3.0.4) [gem]" level="application" />
93
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.9, rbenv: 3.0.4) [gem]" level="application" />
94
+ </component>
95
+ <component name="RakeTasksCache">
96
+ <option name="myRootTask">
97
+ <RakeTaskImpl id="rake">
98
+ <subtasks>
99
+ <RakeTaskImpl description="Build imagetools-1.7.0.gem into the pkg directory" fullCommand="build" id="build" />
100
+ <RakeTaskImpl id="build">
101
+ <subtasks>
102
+ <RakeTaskImpl description="Generate SHA512 checksum if imagetools-1.7.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
103
+ </subtasks>
104
+ </RakeTaskImpl>
105
+ <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
106
+ <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
107
+ <RakeTaskImpl description="Build and install imagetools-1.7.0.gem into system gems" fullCommand="install" id="install" />
108
+ <RakeTaskImpl id="install">
109
+ <subtasks>
110
+ <RakeTaskImpl description="Build and install imagetools-1.7.0.gem into system gems without network access" fullCommand="install:local" id="local" />
111
+ </subtasks>
112
+ </RakeTaskImpl>
113
+ <RakeTaskImpl description="Create tag v1.7.0 and build and push imagetools-1.7.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
114
+ <RakeTaskImpl description="Run tests" fullCommand="test" id="test" />
115
+ <RakeTaskImpl description="" fullCommand="default" id="default" />
116
+ <RakeTaskImpl description="" fullCommand="release" id="release" />
117
+ <RakeTaskImpl id="release">
118
+ <subtasks>
119
+ <RakeTaskImpl description="" fullCommand="release:guard_clean" id="guard_clean" />
120
+ <RakeTaskImpl description="" fullCommand="release:rubygem_push" id="rubygem_push" />
121
+ <RakeTaskImpl description="" fullCommand="release:source_control_push" id="source_control_push" />
122
+ </subtasks>
123
+ </RakeTaskImpl>
124
+ </subtasks>
125
+ </RakeTaskImpl>
126
+ </option>
95
127
  </component>
96
128
  </module>
@@ -64,20 +64,23 @@ module Imagetools
64
64
 
65
65
  CONVERT_CMD = "convert"
66
66
  DWEBP_CMD = "dwebp"
67
+ CWEBP_CMD = "cwebp"
67
68
  RESIZE_CMD = "mogrify -background white -resize %dx\\> "
68
69
  ROTATE_CMD = "exiftran -ai "
69
70
  COMPRESS_CMD = "jpegoptim --strip-all --max=90 "
70
- EXTERNAL_CMDS = [CONVERT_CMD, RESIZE_CMD, ROTATE_CMD, COMPRESS_CMD, DWEBP_CMD]
71
+ EXTERNAL_CMDS = [CONVERT_CMD, RESIZE_CMD, ROTATE_CMD, COMPRESS_CMD, DWEBP_CMD, CWEBP_CMD]
71
72
 
72
73
  WEBP_SEARCH = /(.+)\.webp/i
73
- WEBP_REPLACE = '\1.png'
74
-
74
+
75
75
  PNG_SEARCH = /(.+)\.png/i
76
- PNG_REPLACE = '\1.jpg'
77
76
  JPG_SEARCH = /(.+)\.jpe?g/i
78
77
  HEIC_SEARCH = /(.+)\.heic/i
79
- HEIC_REPLACE = '\1.jpg'
80
-
78
+
79
+ WEBP_REPLACE = '\1.webp'
80
+ JPG_REPLACE = '\1.jpg'
81
+ PNG_REPLACE = '\1.png'
82
+
83
+
81
84
  EXCLUDE_PAT = /^_/ # 先頭が"_"の場合は除外
82
85
 
83
86
  def self.run(argv)
@@ -105,7 +108,10 @@ EOM
105
108
  opt.on('-n', '--dry-run', 'Message only') {|v| opts[:n] = v}
106
109
  opt.on('-t', '--self-test', 'Run Self Test') {|v| opts[:t] = v}
107
110
  opt.on('-c', '--config', 'Config file'){|v| opts[:c] = v }
111
+ types = ['jpg', 'wepp']
112
+ opt.on('-output-type=OUTPUTTYPE', types, types.join("|") + "(default jpg)") {|v| opts[:o] = v}
108
113
  opt.parse!(argv)
114
+ opts[:o] ||= types[0]
109
115
 
110
116
  config_file = opts[:c] || "~/.imagefilterrc"
111
117
  config_file = File.expand_path(config_file)
@@ -151,22 +157,35 @@ EOM
151
157
  filename.sub(OTHER_JPG_SEARCH, OTHER_JPG_REPLACE)
152
158
  end
153
159
 
154
- def self.replace_webp2png(filename)
155
- filename.sub(WEBP_SEARCH, WEBP_REPLACE)
156
- end
160
+ def self.replace_webp2png(filename)
161
+ filename.sub(WEBP_SEARCH, PNG_REPLACE)
162
+ end
157
163
 
158
- def self.replace_png2jpg(filename)
159
- filename.sub(PNG_SEARCH, PNG_REPLACE)
160
- end
164
+ def self.replace_png2jpg(filename)
165
+ filename.sub(PNG_SEARCH, JPG_REPLACE)
166
+ end
161
167
 
162
168
  def self.replace_heic2jpg(filename)
163
- filename.sub(HEIC_SEARCH, HEIC_REPLACE)
169
+ filename.sub(HEIC_SEARCH, JPG_REPLACE)
170
+ end
171
+
172
+ def self.replace_image2webp(filename)
173
+ # PNGとJPGに対応(WEBPはそのまま)
174
+ str = filename.dup
175
+ if str.sub!(PNG_SEARCH, WEBP_REPLACE)
176
+ return str
177
+ end
178
+ if str.sub!(JPG_SEARCH, WEBP_REPLACE)
179
+ return str
180
+ end
181
+ return str
164
182
  end
165
183
 
166
184
  def self.match_exclude_image?(filename)
167
185
  filename =~ EXCLUDE_PAT
168
186
  end
169
187
 
188
+
170
189
  def self.selftest
171
190
  EXTERNAL_CMDS.each do |cmd|
172
191
  args = cmd.split
@@ -193,13 +212,31 @@ EOM
193
212
  if exclude_image?(filepath)
194
213
  return
195
214
  end
215
+
216
+ # ファイル名変換
196
217
  filepath = rename_image(filepath)
197
- filepath = webp2png(filepath)
198
- filepath = png2jpg(filepath)
199
- filepath = heic2jpg(filepath)
200
- filepath = resize_jpg(filepath)
218
+
219
+ # filepath = webp2png(filepath)
220
+ # filepath = png2jpg(filepath)
221
+
222
+ # HEICをJPEGに
223
+ filepath = heic2jpg(filepath)
224
+
225
+ # JPEGの回転
201
226
  filepath = rotate_jpg(filepath)
202
- filepath = compress_jpg(filepath)
227
+
228
+ # JPEG/PNG/WEBP 画像のリサイズ
229
+ filepath = resize_image(filepath)
230
+ if @opts[:o] == 'webp'
231
+ # JPEG/PNGをWEBPに変換(WEBPはそのまま)
232
+ filepath = image2webp(filepath)
233
+ else
234
+ # PNGとWebPをJPEGに変換
235
+ filepath = webp2png(filepath)
236
+ filepath = png2jpg(filepath)
237
+ filepath = compress_jpg(filepath)
238
+ end
239
+
203
240
  filepath
204
241
  end
205
242
 
@@ -236,7 +273,7 @@ EOM
236
273
  dir = File.dirname(filepath)
237
274
  topath = File.join(dir, toname)
238
275
  puts "convert: #{filepath} => #{topath}"
239
- # dwebp ~/Desktop/1.webp -o ~/Desktop/1.jpg
276
+ # dwebp ~/Desktop/1.webp -o ~/Desktop/1.jpg
240
277
  cmd = "#{DWEBP_CMD} \"#{filepath}\" -o \"#{topath}\""
241
278
  if system(cmd)
242
279
  FileUtils.rm(filepath)
@@ -277,9 +314,11 @@ EOM
277
314
  return topath
278
315
  end
279
316
 
280
- def resize_jpg(filepath)
317
+ def resize_image(filepath)
281
318
  fromname = File.basename(filepath)
282
- unless fromname =~ JPG_SEARCH
319
+ # .JPEG .PNG .WEBPを許す
320
+ is_image = (fromname =~ JPG_SEARCH || fromname =~ PNG_SEARCH || fromname =~ WEBP_SEARCH)
321
+ unless is_image
283
322
  return filepath
284
323
  end
285
324
  puts "resize: #{filepath}"
@@ -303,12 +342,28 @@ EOM
303
342
  def compress_jpg(filepath)
304
343
  fromname = File.basename(filepath)
305
344
  unless fromname =~ JPG_SEARCH
306
- return filepath
345
+ return filepath
307
346
  end
308
347
  puts "compress: #{filepath}"
309
348
  cmd = "#{COMPRESS_CMD} \"#{filepath}\""
310
349
  system(cmd)
311
350
  return filepath
312
351
  end
352
+
353
+ def image2webp(filepath)
354
+ fromname = File.basename(filepath)
355
+ toname = self.class.replace_image2webp(fromname)
356
+ return filepath if fromname == toname
357
+ dir = File.dirname(filepath)
358
+ topath = File.join(dir, toname)
359
+ puts "image2webp: #{filepath} => #{topath}"
360
+ # cwebp ~/Desktop/1.webp -o ~/Desktop/1.jpg
361
+ cmd = "#{CWEBP_CMD} -quiet \"#{filepath}\" -o \"#{topath}\""
362
+ # puts cmd
363
+ if system(cmd)
364
+ FileUtils.rm(filepath)
365
+ end
366
+ return topath
367
+ end
313
368
  end
314
369
  end
@@ -1,3 +1,3 @@
1
1
  module Imagetools
2
- VERSION = "1.6.1"
2
+ VERSION = "1.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: imagetools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - src
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-03 00:00:00.000000000 Z
11
+ date: 2023-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rmagick
@@ -87,7 +87,6 @@ files:
87
87
  - ".idea/inspectionProfiles/Project_Default.xml"
88
88
  - ".idea/misc.xml"
89
89
  - ".idea/modules.xml"
90
- - ".idea/runConfigurations.xml"
91
90
  - ".idea/vcs.xml"
92
91
  - ".idea/workspace.xml"
93
92
  - ".ruby-version"
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="RunConfigurationProducerService">
4
- <option name="ignoredProducers">
5
- <set>
6
- <option value="com.android.tools.idea.compose.preview.runconfiguration.ComposePreviewRunConfigurationProducer" />
7
- </set>
8
- </option>
9
- </component>
10
- </project>