dotcfg 1.0.1.1 → 1.0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/dotcfg.gemspec +8 -13
- data/test/bench/dotcfg.rb +34 -0
- metadata +2 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3fc334ab3c8f2322825f4bacf206a0e705e68b48a51438e1948a9f726b948324
|
4
|
+
data.tar.gz: 2f8923d6da9315f4a8213b3b05b9e2fde9ea4a385890caa269b386fbb55c220a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cb0a11cfcdb0835b686a3faf9f05343322d61704a2355157d84dd36ec34dfc1f9b0f87bae7896eacf9eb2e01edf880c6a07ec468646103aaa8b437ee9dfff949
|
7
|
+
data.tar.gz: 55e09d163c3e99a9730c89b10b7e62257ff6c3e51d5805538dd23695db574c67fe6085730987302cf356bf39aa8b286ef33888971e290dae40c938e69c477dd0
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.2.1
|
data/dotcfg.gemspec
CHANGED
@@ -1,24 +1,19 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'dotcfg'
|
3
3
|
s.summary = 'simple filesystem de/serialization for app configs'
|
4
|
-
s.
|
4
|
+
s.description = 'JSON and YAML config serialization and persistence'
|
5
|
+
s.authors = ['Rick Hull']
|
5
6
|
s.homepage = 'https://github.com/rickhull/dotcfg'
|
6
7
|
s.license = 'MIT'
|
7
|
-
s.description = 'JSON and YAML config serialization and persistence'
|
8
8
|
|
9
9
|
s.required_ruby_version = '>= 2'
|
10
|
-
s.add_runtime_dependency 'json', '~> 2.5'
|
11
|
-
s.add_runtime_dependency 'yaml', '~> 0.1'
|
12
|
-
s.add_development_dependency 'buildar', '~> 2'
|
13
10
|
|
14
11
|
s.version = File.read(File.join(__dir__, 'VERSION')).chomp
|
15
12
|
|
16
|
-
s.files = %w[
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
test/dotcfg.rb
|
23
|
-
]
|
13
|
+
s.files = %w[dotcfg.gemspec VERSION README.md Rakefile]
|
14
|
+
s.files += Dir['lib/**/*.rb']
|
15
|
+
s.files += Dir['test/**/*.rb']
|
16
|
+
|
17
|
+
s.add_runtime_dependency 'json', '~> 2.5'
|
18
|
+
s.add_runtime_dependency 'yaml', '~> 0.1'
|
24
19
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'dotcfg'
|
2
|
+
require 'benchmark/ips'
|
3
|
+
|
4
|
+
def new_filename
|
5
|
+
begin
|
6
|
+
Dir::Tmpname.make_tmpname('/tmp/dotcfg', nil)
|
7
|
+
rescue
|
8
|
+
['/tmp/dotcfg', rand(9**9)].join('-')
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
fn = new_filename
|
13
|
+
dc = DotCfg.new(fn)
|
14
|
+
dc['foo'] = 0
|
15
|
+
|
16
|
+
Benchmark.ips do |b|
|
17
|
+
b.config time: 5, warmup: 0.5
|
18
|
+
b.report("write #{fn}") {
|
19
|
+
dc['foo'] += 1
|
20
|
+
dc.save
|
21
|
+
}
|
22
|
+
|
23
|
+
b.report("rewrite #{fn}") {
|
24
|
+
dc.load
|
25
|
+
dc['foo'] += 1
|
26
|
+
dc.save
|
27
|
+
}
|
28
|
+
|
29
|
+
b.compare!
|
30
|
+
end
|
31
|
+
|
32
|
+
p dc.to_h
|
33
|
+
|
34
|
+
File.unlink fn
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotcfg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rick Hull
|
@@ -38,20 +38,6 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.1'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: buildar
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '2'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '2'
|
55
41
|
description: JSON and YAML config serialization and persistence
|
56
42
|
email:
|
57
43
|
executables: []
|
@@ -63,6 +49,7 @@ files:
|
|
63
49
|
- VERSION
|
64
50
|
- dotcfg.gemspec
|
65
51
|
- lib/dotcfg.rb
|
52
|
+
- test/bench/dotcfg.rb
|
66
53
|
- test/dotcfg.rb
|
67
54
|
homepage: https://github.com/rickhull/dotcfg
|
68
55
|
licenses:
|