cmd_tools 1.1.0 → 1.1.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.
@@ -13,11 +13,14 @@ module CmdTools
13
13
 
14
14
  # (Re)load config file.
15
15
  def self.load
16
- @config = if File.readable?(CONFIG_FILE)
16
+ @config = if File.size?(CONFIG_FILE) and File.readable?(CONFIG_FILE)
17
17
  CONFIG_DEFAULT.merge(YAML.load_file(CONFIG_FILE))
18
18
  else
19
19
  FileUtils.mkdir_p(CONFIG_DIR)
20
- open(CONFIG_FILE, 'w').write(CONFIG_DEFAULT.to_yaml)
20
+ open(CONFIG_FILE, 'w'){|io|
21
+ io.write(CONFIG_DEFAULT.to_yaml)
22
+ io.flush
23
+ }
21
24
  CONFIG_DEFAULT
22
25
  end
23
26
 
@@ -1,3 +1,3 @@
1
1
  module CmdTools
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmd_tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-23 00:00:00.000000000 Z
12
+ date: 2012-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_patch
16
- requirement: &2156021280 !ruby/object:Gem::Requirement
16
+ requirement: &75179250 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0.3'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *2156021280
24
+ version_requirements: *75179250
25
25
  description: ! "Command line tools:\n tsh: mv files to ~/.myTrash.\n bak: backup
26
26
  files.\n emacs_launcher_(g|c)ui: launch emacsclient and daemon (if necessary).\n"
27
27
  email:
@@ -77,9 +77,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 1.8.15
80
+ rubygems_version: 1.8.11
81
81
  signing_key:
82
82
  specification_version: 3
83
83
  summary: Command line tools.
84
84
  test_files: []
85
- has_rdoc: