app-configs 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ee7136673ea33c00302c032a8f0ecc707055b977ac632bf57dbc77ff1518f9b
4
- data.tar.gz: 5dece7059581ae470d10b03299b524ef65b0db3ed2a8b8d3132cee4cb21d76eb
3
+ metadata.gz: 0160d1605f93c53445ddcd2a31b679e69d4af5c3d9ba5d67111e380a77e6456c
4
+ data.tar.gz: 56eb231ee00dcae9c6df1ab7b14c0634362deb1817f3a2b8397b07e982e9bf2b
5
5
  SHA512:
6
- metadata.gz: 88a4b4c61dfe2e3f687897a6a740a63fc02981e75fccb3d0b0ca74a31ecfc9e68bafee3933f1fce0690c30c757961cf72b52915f828423eb223c175d12070cc7
7
- data.tar.gz: 1f5f9ef8f8f15aa07369405b0da3a3df799b01e34b46d06eed856673548f7b057dccb422cbdd5d7d4998d61c2905cb285baf3b1d1855b93908e420c4d63e3db1
6
+ metadata.gz: c9aa2965e105f2b7ff30ba6f03908729b5af9bc829a7bd12f013a5f9060788208fa4d932a195213f8bf98e32a444ff89ad0d7d0b566a876355b776c761f09a9e
7
+ data.tar.gz: 0361c9214279e394c4f7b442a3b056d77c006794698ff301a8752a4806ae74500f63cdd9f063d4c355369782956ae8f46bb59194d09c77a6899112599324accc
@@ -1,6 +1,6 @@
1
1
  = App::Config
2
2
 
3
- Yet another library for load/save configuration files.
3
+ Yet another library for load/save app config files.
4
4
 
5
5
  == Features
6
6
 
@@ -1,6 +1,6 @@
1
1
  = App::Config
2
2
 
3
- またもや構成ファイル読み込み/書き出しライブラリ.
3
+ またもやアプリ構成ファイル読み込み/書き出しライブラリ.
4
4
 
5
5
  == 特徴
6
6
 
data/Rakefile CHANGED
@@ -13,7 +13,7 @@ class Bundler::GemHelper
13
13
  dest_path = File.join(dir, "#{name}-#{version}.zip")
14
14
  cmnd = "git archive --format zip --prefix=#{name}/ HEAD > #{dest_path}"
15
15
 
16
- out, code = sh_with_status( cmnd )
16
+ _, code = sh_with_status( cmnd )
17
17
  raise "Couldn't archive gem," unless code == 0
18
18
 
19
19
  Bundler.ui.confirm "#{name} #{version} archived to #{dest_path}."
@@ -23,11 +23,11 @@ class Bundler::GemHelper
23
23
  ver = version.to_s
24
24
 
25
25
  cmnd = "git push origin #{ver} "
26
- out, code = sh_with_status( cmnd )
26
+ _, code = sh_with_status( cmnd )
27
27
  raise "Couldn't git push origin." unless code == 0
28
28
 
29
29
  cmnd = "git push "
30
- out, code = sh_with_status( cmnd )
30
+ _, code = sh_with_status( cmnd )
31
31
  raise "Couldn't git push." unless code == 0
32
32
 
33
33
  Bundler.ui.confirm "Git Push #{ver}."
@@ -43,15 +43,15 @@ class Bundler::GemHelper
43
43
  end
44
44
 
45
45
  cmnd = "git add #{version_pathname} "
46
- out, code = sh_with_status( cmnd )
46
+ _, code = sh_with_status( cmnd )
47
47
  raise "Couldn't git add," unless code == 0
48
48
 
49
49
  cmnd = "git commit -m '#{new_version}' "
50
- out, code = sh_with_status( cmnd )
50
+ _, code = sh_with_status( cmnd )
51
51
  raise "Couldn't git commit." unless code == 0
52
52
 
53
53
  cmnd = "git tag #{new_version} "
54
- out, code = sh_with_status( cmnd )
54
+ _, code = sh_with_status( cmnd )
55
55
  raise "Couldn't git tag." unless code == 0
56
56
 
57
57
  Bundler.ui.confirm "Update Tags to #{new_version}."
@@ -80,14 +80,14 @@ Bundler::GemHelper.new(Dir.pwd).instance_eval do
80
80
 
81
81
  desc "Update Version Minor"
82
82
  task 'minor' do
83
- major, minor, tiny = version.to_s.split('.')
83
+ major, minor, _tiny = version.to_s.split('.')
84
84
  new_version = [major, minor.to_i + 1, 0].join('.')
85
85
  update_version( new_version )
86
86
  end
87
87
 
88
88
  desc "Update Version Major"
89
89
  task 'major' do
90
- major, minor, tiny = version.to_s.split('.')
90
+ major, _minor, _tiny = version.to_s.split('.')
91
91
  new_version = [major.to_i + 1, 0, 0].join('.')
92
92
  update_version( new_version )
93
93
  end
@@ -5,7 +5,7 @@ class Hash
5
5
  def deeply_symbolize_keys!
6
6
  temp = self.deeply_symbolize_keys
7
7
  self.clear
8
- self.merge( temp )
8
+ self.merge!( temp )
9
9
  end
10
10
 
11
11
  def deeply_symbolize_keys
@@ -47,7 +47,7 @@ class Hash
47
47
  def deeply_stringify_keys!
48
48
  temp = self.deeply_stringify_keys
49
49
  self.clear
50
- self.merge( temp )
50
+ self.merge!( temp )
51
51
  end
52
52
 
53
53
  def deeply_stringify_keys
@@ -12,6 +12,7 @@ module App
12
12
  DEFAULT_SUFFIX = ".json"
13
13
 
14
14
  def initialize( **opts )
15
+ super
15
16
  self.default_proc = proc do |hash, key|
16
17
  hash[key] = {}
17
18
  end
@@ -9,6 +9,7 @@ module App
9
9
  DEFAULT_SUFFIX = ".rb"
10
10
 
11
11
  def initialize( **opts )
12
+ super
12
13
  self.default_proc = proc do |hash, key|
13
14
  hash[key] = {}
14
15
  end
@@ -1,5 +1,5 @@
1
1
  module App
2
2
  module Config
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -10,6 +10,7 @@ module App
10
10
  DEFAULT_SUFFIX = ".yaml"
11
11
 
12
12
  def initialize( **opts )
13
+ super
13
14
  self.default_proc = proc do |hash, key|
14
15
  hash[key] = {}
15
16
  end
@@ -4,21 +4,21 @@ path = "$ROOT/config/defaults/:$ROOT/config:$ROOT/var"
4
4
 
5
5
  # initialize variation
6
6
 
7
- pp config = App::Config.new
8
- pp config = App::Config.new( root: Dir.pwd )
9
- pp config = App::Config.new( path: path )
7
+ pp App::Config.new
8
+ pp App::Config.new( root: Dir.pwd )
9
+ pp App::Config.new( path: path )
10
10
 
11
- pp config = App::Config.new( :YAML )
12
- pp config = App::Config.new( "YAML" )
13
- pp config = App::Config.new( :YAML, path: path )
14
- pp config = App::Config.new( "YAML", path: path )
15
- pp config = App::Config::YAML.new
16
- pp config = App::Config::YAML.new( path: path )
11
+ pp App::Config.new( :YAML )
12
+ pp App::Config.new( "YAML" )
13
+ pp App::Config.new( :YAML, path: path )
14
+ pp App::Config.new( "YAML", path: path )
15
+ pp App::Config::YAML.new
16
+ pp App::Config::YAML.new( path: path )
17
17
 
18
- pp config = App::Config.new( :JSON )
19
- pp config = App::Config.new( "JSON" )
20
- pp config = App::Config.new( :JSON, path: path )
21
- pp config = App::Config.new( "JSON", path: path )
22
- pp config = App::Config::JSON.new
23
- pp config = App::Config::JSON.new( path: path )
18
+ pp App::Config.new( :JSON )
19
+ pp App::Config.new( "JSON" )
20
+ pp App::Config.new( :JSON, path: path )
21
+ pp App::Config.new( "JSON", path: path )
22
+ pp App::Config::JSON.new
23
+ pp App::Config::JSON.new( path: path )
24
24
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app-configs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - arimay
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-26 00:00:00.000000000 Z
11
+ date: 2020-10-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake