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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/VERSION +1 -1
  3. data/dotcfg.gemspec +8 -13
  4. data/test/bench/dotcfg.rb +34 -0
  5. metadata +2 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f964a7addbfb3006ca34f04553321566d6a09ad17761fbb3bbf669e67e97f6dc
4
- data.tar.gz: a128c5f463ef83d716119ddb5550b7c63fbeafbf129ef952a894b5df93ee5981
3
+ metadata.gz: 3fc334ab3c8f2322825f4bacf206a0e705e68b48a51438e1948a9f726b948324
4
+ data.tar.gz: 2f8923d6da9315f4a8213b3b05b9e2fde9ea4a385890caa269b386fbb55c220a
5
5
  SHA512:
6
- metadata.gz: 02d40a7974aabd4cfe6a6e6732d5b2dec4858edf8b3eac072a8f20c87b3e45c6b48c4b8ad62336bde61a866b04125a966520ccc309f4ae8fdbe9f248c4369210
7
- data.tar.gz: d861cd602dd85604ec47e9d1742b1540ae9a853f10ccaacc78aecf3b3cd5ccf81c279f24e417ffdfc77d6e53e6755e2f19a640e1929400d484427e24196c1cfb
6
+ metadata.gz: cb0a11cfcdb0835b686a3faf9f05343322d61704a2355157d84dd36ec34dfc1f9b0f87bae7896eacf9eb2e01edf880c6a07ec468646103aaa8b437ee9dfff949
7
+ data.tar.gz: 55e09d163c3e99a9730c89b10b7e62257ff6c3e51d5805538dd23695db574c67fe6085730987302cf356bf39aa8b286ef33888971e290dae40c938e69c477dd0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1.1
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.author = 'Rick Hull'
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
- dotcfg.gemspec
18
- VERSION
19
- README.md
20
- Rakefile
21
- lib/dotcfg.rb
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.1.1
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: