spiderfw 0.6.12 → 0.6.13

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = 0.6.13
2
+ == 3 August, 2011
3
+ * Fixed bug in configuration editor
4
+
1
5
  = 0.6.12
2
6
  == 3 August, 2011
3
7
  * Minor fixes
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.12
1
+ 0.6.13
@@ -54,11 +54,8 @@ class ConfigCommand < CmdParse::Command
54
54
  set.set_execution_block do |args|
55
55
  require 'spiderfw/spider'
56
56
  require 'lib/spiderfw/config/configuration_editor'
57
- editor = Spider::ConfigurationEditor.new
58
57
  Spider.init_base
59
- Spider.config.loaded_files.each do |f|
60
- editor.load(f)
61
- end
58
+ editor = Spider.config.get_editor
62
59
  editor.set(*args)
63
60
  editor.save
64
61
  end
@@ -305,8 +305,12 @@ module Spider
305
305
 
306
306
  def get_editor
307
307
  require 'spiderfw/config/configuration_editor'
308
+ require 'pathname'
308
309
  editor = ConfigurationEditor.new
310
+ config_path = Pathname.new(Spider.paths[:config]).realpath.to_s
309
311
  @loaded_files.each do |f|
312
+ f = Pathname.new(f).realpath.to_s
313
+ next unless f.index(config_path) == 0
310
314
  editor.load(f)
311
315
  end
312
316
  editor
@@ -192,7 +192,8 @@ module Spider
192
192
 
193
193
  res.close
194
194
  end
195
- FileUtils.mv(file, ".#{file}.previous")
195
+ bak_file = File.join(dirname, ".#{basename}.previous")
196
+ FileUtils.mv(file, bak_file)
196
197
  FileUtils.mv(tmp_file, file)
197
198
  end
198
199
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 12
9
- version: 0.6.12
8
+ - 13
9
+ version: 0.6.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ivan Pirlik