glitch3d 0.2.3.0 → 0.2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7ce49988a7ab1cee9c39361b111a21bad4f1a1b1
4
- data.tar.gz: 83db6ce2c18d0be3ea93da87076b9569a92850a8
3
+ metadata.gz: 6775b3b3c86229218bb34aa964b3657c5e666b9c
4
+ data.tar.gz: 37aaeedca5f9d492f9b92c28b40667733fbaff0a
5
5
  SHA512:
6
- metadata.gz: 987801548e975c36e054216650b0d5e4b8c2673c4056b21b74d9d6e890ad5802a5e4f0adf5842ca6902027145a8eb145346b314e4f2c0753bf159272aaa73af4
7
- data.tar.gz: 15fa6d775fa8a3c3d11a59cd85ee33c89be83072eabd48053007d0c6acc534ec90548883a6aed0a48c3eb87e4807a0c43ceea334047197b861f37866e6cb6f4f
6
+ metadata.gz: 10a77625348cfe97db04312ea725c3062637eecd25cda1ddf232ed91d69615f53e706e8d197b4c1f1ab7b2e03fe43c3281a5009830a952cc0c1d1495dda8c648
7
+ data.tar.gz: 4173496d16ea6bf9c025f2d39f9435b3a056f3ba672ba4c93679db43b034fa5ced33bd6a694917fcc1a1c7ee95a8495456e71213a3f7c16b52068719307e5658
data/bin/glitch3d CHANGED
@@ -2,6 +2,8 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require 'glitch3d'
5
-
6
5
  include Glitch3d
7
- process_model(ARGV[0])
6
+
7
+ args = Hash[ARGV.join(' ').scan(/--?([^=\s]+)(?:=(\S+))?/)] if args.nil?
8
+ source_file = ARGV[0].start_with?('--') ? nil : ARGV[0]
9
+ process_model(source_file, args)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Glitch3d
3
- VERSION = '0.2.3.0'
3
+ VERSION = '0.2.3.1'
4
4
  end
data/lib/glitch3d.rb CHANGED
@@ -27,11 +27,10 @@ module Glitch3d
27
27
 
28
28
  # @param String source_file, 3d model file to take as input
29
29
  # @param Hash args, parameters { 'stuff' => 'shit' }
30
- def process_model(source_file, args = nil)
30
+ def process_model(source_file, args)
31
31
  raise 'Make sure Blender is correctly installed' if BLENDER_EXECUTABLE_PATH.nil?
32
- source_file = random_fixture if source_file.nil?
33
- args = Hash[ARGV.join(' ').scan(/--?([^=\s]+)(?:=(\S+))?/)] if args.nil?
34
32
  return clean_model(source_file) if args['clean']
33
+ source_file = random_fixture if source_file.nil?
35
34
 
36
35
  if args.has_key?('version')
37
36
  puts Glitch3d::VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glitch3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3.0
4
+ version: 0.2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - pskl