cmd_tools 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,36 +1,34 @@
1
- module CmdTools
2
- module Config
3
- require 'yaml'
4
- require 'fileutils'
5
- require 'ruby_patch'
6
- extend ::RubyPatch::AutoLoad
1
+ module ::CmdTools::Config
2
+ require 'yaml'
3
+ require 'fileutils'
4
+ require 'ruby_patch'
5
+ extend ::RubyPatch::AutoLoad
7
6
 
8
- CONFIG_DIR = File.join(ENV['HOME'], '.config/cmd_tools')
9
- CONFIG_FILE = File.join(CONFIG_DIR, 'config.yaml')
10
- CONFIG_DEFAULT = {
11
- emacs: ENV['ALTERNATE_EDITOR'] || 'emacs',
12
- }
7
+ CONFIG_DIR = File.join(ENV['HOME'], '.config/cmd_tools')
8
+ CONFIG_FILE = File.join(CONFIG_DIR, 'config.yaml')
9
+ CONFIG_DEFAULT = {
10
+ emacs: ENV['ALTERNATE_EDITOR'] || 'emacs',
11
+ }
13
12
 
14
- # (Re)load config file.
15
- def self.load
16
- @config = if File.size?(CONFIG_FILE) and File.readable?(CONFIG_FILE)
17
- CONFIG_DEFAULT.merge(YAML.load_file(CONFIG_FILE))
18
- else
19
- FileUtils.mkdir_p(CONFIG_DIR)
20
- open(CONFIG_FILE, 'w'){|io|
21
- io.write(CONFIG_DEFAULT.to_yaml)
22
- io.flush
23
- }
24
- CONFIG_DEFAULT
25
- end
13
+ # (Re)load config file.
14
+ def self.load
15
+ @config = if File.size?(CONFIG_FILE) and File.readable?(CONFIG_FILE)
16
+ CONFIG_DEFAULT.merge(YAML.load_file(CONFIG_FILE))
17
+ else
18
+ FileUtils.mkdir_p(CONFIG_DIR)
19
+ open(CONFIG_FILE, 'w'){|io|
20
+ io.write(CONFIG_DEFAULT.to_yaml)
21
+ io.flush
22
+ }
23
+ CONFIG_DEFAULT
24
+ end
26
25
 
27
- self
28
- end
29
-
30
- def self.emacs
31
- @config[:emacs]
32
- end
26
+ self
27
+ end
33
28
 
34
- self.load
29
+ def self.emacs
30
+ @config[:emacs]
35
31
  end
32
+
33
+ self.load
36
34
  end
@@ -1,3 +1,3 @@
1
1
  module CmdTools
2
- VERSION = '2.0.2'
2
+ VERSION = '2.0.3'
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: 2.0.2
4
+ version: 2.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-09-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ruby_patch
16
- requirement: &78789870 !ruby/object:Gem::Requirement
16
+ requirement: &72814280 !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: *78789870
24
+ version_requirements: *72814280
25
25
  description: ! 'Command line tools. Please type
26
26
 
27
27