sindex 0.2.0 → 0.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/sindex +18 -15
  3. data/lib/sindex/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 552391a571ac690c5883cad63976f6d31e96ae41
4
- data.tar.gz: 8f91d85665809cd30d74bcd99cdd555e170181a4
3
+ metadata.gz: 5aec829f6610cada2f5663bb6eeb0f816edd32db
4
+ data.tar.gz: ec0494340ce02b8bdcd5dab412943c6dd1e611e3
5
5
  SHA512:
6
- metadata.gz: 07a5e6a260d79bb1ea5f85cca815f8c65fdc95d9485c337137218631f3dfad2e837d16ee3177ee261e142542db40acc8ab733be0e304de21a7abb465634fb231
7
- data.tar.gz: dedc4575e054849f9f426ccc68dbacf03497532d0a128f251e47db7663caa5096eb92e1976119c664e8ce7a802420198562a9f9d522f066effa0c462c61a1f90
6
+ metadata.gz: d060609adaf165a45950010ca28207e515c73f26c292fa75f458d68947d40c4d7d8cc07e9749fa5ec025e595689f402a303e932a4496a45c30b565f8bcc8f0ca
7
+ data.tar.gz: 87ef7a97b9fe1601d093758183aaf53f76f2f00a2cea6e11cadc364eea30c19628da73a510172dcb2933f85d458951aceab37cccaa9b41813ae84a712055e085
data/bin/sindex CHANGED
@@ -29,6 +29,7 @@ STANDARD_CONFIG = {
29
29
  :information_store_path =>
30
30
  File.join(File.expand_path("~"), ".serienrenamer/information_storage.yml"),
31
31
  :byte_count_for_md5 => 2048,
32
+ :ask_before_writing_new_index => true,
32
33
  }
33
34
 
34
35
  config = STANDARD_CONFIG.merge_with_serialized(CONFIG_FILE)
@@ -191,24 +192,26 @@ class Cmdline
191
192
 
192
193
  def write_new_index_if_wanted
193
194
 
194
- if agree("\nShould I write the new index? ", true)
195
- @series_index.dump_index_to_file(@config[:index_file])
196
- puts "New Index version has been written\n"
197
-
198
- # Post process all the episodes with a different hook
199
- if @config[:episode_hook] and @config[:episode_hook].match(/\w+/)
200
- @processed_episodes.each do |filename,series|
201
- puts "Calling Episode Hook for '#{filename}'"
202
- cmd = '%s "%s" "%s"' % [ @config[:episode_hook], filename, series ]
203
- system(cmd) or fail("Episode-Hook failed")
204
- end
195
+ if @config[:ask_before_writing_new_index]
196
+ if not agree("\nShould I write the new index? ", true)
197
+ puts "the index was not changed"
198
+ exit
205
199
  end
200
+ end
206
201
 
207
- call_post_processing_hook
208
- else
209
- puts "the index was not changed"
210
- exit
202
+ @series_index.dump_index_to_file(@config[:index_file])
203
+ puts "New Index version has been written\n"
204
+
205
+ # Post process all the episodes with a different hook
206
+ if @config[:episode_hook] and @config[:episode_hook].match(/\w+/)
207
+ @processed_episodes.each do |filename,series|
208
+ puts "Calling Episode Hook for '#{filename}'"
209
+ cmd = '%s "%s" "%s"' % [ @config[:episode_hook], filename, series ]
210
+ system(cmd) or fail("Episode-Hook failed")
211
+ end
211
212
  end
213
+
214
+ call_post_processing_hook
212
215
  end
213
216
 
214
217
  #############################################################################
@@ -1,3 +1,3 @@
1
1
  module Sindex
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sindex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Philipp Böhm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-05-08 00:00:00.000000000 Z
11
+ date: 2013-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri