photein 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/photein/config.rb +6 -2
- data/lib/photein/media_file.rb +1 -1
- data/lib/photein/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d67c47b483c2b3525960fa4aa80221a2143b7b4bf92d67e74622ffe3ecbcf40f
|
4
|
+
data.tar.gz: 215db5531f34667eab5bd8524a51c9497697e6bb56acf8ccac51acca94aa19ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 356351ee9bdb21340d47b57c12bc11857e774f8a81741f4aa2567b60555d8adc290daad8ddaea9a3ee9d48197b0a3e923fd6e2f6eaea67ef00ca51112e5895b1
|
7
|
+
data.tar.gz: f24b64e2a9faafd6ba95e85b7c3e198bc526e4f8dc216fc71e1dfab9ea3e1affacac3b8ce472b880202b13899abb98eb758504c06045380aa4e0c0ceeaa0b293
|
data/lib/photein/config.rb
CHANGED
@@ -25,10 +25,14 @@ module Photein
|
|
25
25
|
.map { |option| option[/\w[a-z\-]+/] }
|
26
26
|
.map(&:to_sym)
|
27
27
|
|
28
|
+
@params = {}
|
29
|
+
|
28
30
|
class << self
|
29
|
-
def
|
30
|
-
@params
|
31
|
+
def set(**params)
|
32
|
+
@params.replace(params).freeze
|
33
|
+
end
|
31
34
|
|
35
|
+
def parse_opts!
|
32
36
|
parser = OptionParser.new do |opts|
|
33
37
|
opts.version = Photein::VERSION
|
34
38
|
opts.banner = <<~BANNER
|
data/lib/photein/media_file.rb
CHANGED
@@ -120,7 +120,7 @@ module Photein
|
|
120
120
|
when 1 # if one file found, WITH OR WITHOUT COUNTER, reset counter to a
|
121
121
|
if Dir[collision_glob].first != collision_glob.sub('*', 'a') # don't try if it's already a lone, correctly-countered file
|
122
122
|
Photein::Logger.info('conflicting timestamp found; adding counter to existing file')
|
123
|
-
FileUtils.mv(Dir[collision_glob].first, collision_glob.sub('*', 'a'))
|
123
|
+
FileUtils.mv(Dir[collision_glob].first, collision_glob.sub('*', 'a'), noop: Photein::Config.dry_run)
|
124
124
|
end
|
125
125
|
else # TODO: if multiple files found, rectify them?
|
126
126
|
end
|
data/lib/photein/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: photein
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Lue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mediainfo
|