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 +4 -4
- data/README.adoc +1 -1
- data/README.ja.adoc +1 -1
- data/Rakefile +8 -8
- data/lib/app/config/deeply.rb +2 -2
- data/lib/app/config/json.rb +1 -0
- data/lib/app/config/ruby.rb +1 -0
- data/lib/app/config/version.rb +1 -1
- data/lib/app/config/yaml.rb +1 -0
- data/sample/sample_1.rb +15 -15
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0160d1605f93c53445ddcd2a31b679e69d4af5c3d9ba5d67111e380a77e6456c
|
4
|
+
data.tar.gz: 56eb231ee00dcae9c6df1ab7b14c0634362deb1817f3a2b8397b07e982e9bf2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9aa2965e105f2b7ff30ba6f03908729b5af9bc829a7bd12f013a5f9060788208fa4d932a195213f8bf98e32a444ff89ad0d7d0b566a876355b776c761f09a9e
|
7
|
+
data.tar.gz: 0361c9214279e394c4f7b442a3b056d77c006794698ff301a8752a4806ae74500f63cdd9f063d4c355369782956ae8f46bb59194d09c77a6899112599324accc
|
data/README.adoc
CHANGED
data/README.ja.adoc
CHANGED
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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,
|
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,
|
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
|
data/lib/app/config/deeply.rb
CHANGED
@@ -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
|
data/lib/app/config/json.rb
CHANGED
data/lib/app/config/ruby.rb
CHANGED
data/lib/app/config/version.rb
CHANGED
data/lib/app/config/yaml.rb
CHANGED
data/sample/sample_1.rb
CHANGED
@@ -4,21 +4,21 @@ path = "$ROOT/config/defaults/:$ROOT/config:$ROOT/var"
|
|
4
4
|
|
5
5
|
# initialize variation
|
6
6
|
|
7
|
-
pp
|
8
|
-
pp
|
9
|
-
pp
|
7
|
+
pp App::Config.new
|
8
|
+
pp App::Config.new( root: Dir.pwd )
|
9
|
+
pp App::Config.new( path: path )
|
10
10
|
|
11
|
-
pp
|
12
|
-
pp
|
13
|
-
pp
|
14
|
-
pp
|
15
|
-
pp
|
16
|
-
pp
|
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
|
19
|
-
pp
|
20
|
-
pp
|
21
|
-
pp
|
22
|
-
pp
|
23
|
-
pp
|
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.
|
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-
|
11
|
+
date: 2020-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|