dotcfg 1.0.0.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 +9 -14
  4. data/test/bench/dotcfg.rb +34 -0
  5. metadata +5 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0007d2541e8532fec0e178a746ee16fdb912f11982fde3a37c02b8773af76691
4
- data.tar.gz: 31312857a1ae306544500c59262275e4905509e8250d2192042c4db47dc561e3
3
+ metadata.gz: 3fc334ab3c8f2322825f4bacf206a0e705e68b48a51438e1948a9f726b948324
4
+ data.tar.gz: 2f8923d6da9315f4a8213b3b05b9e2fde9ea4a385890caa269b386fbb55c220a
5
5
  SHA512:
6
- metadata.gz: d3ac6d4557968bdfecffbe73fedf152b1db4e5a6d0274bae11b595ee9b84694ed0db682da902735aa54c1a0fe25eab512cb1ea7c5c87475a80686e2d0dc72201
7
- data.tar.gz: 802a1677fe69d411a9d21fe5bb86cc3c01e5a250d368d4c2647dcf0479e426bb9f06b786eacdc7b22160eacb07793d3aa05c93177cf0a6bb48c53eed1a596640
6
+ metadata.gz: cb0a11cfcdb0835b686a3faf9f05343322d61704a2355157d84dd36ec34dfc1f9b0f87bae7896eacf9eb2e01edf880c6a07ec468646103aaa8b437ee9dfff949
7
+ data.tar.gz: 55e09d163c3e99a9730c89b10b7e62257ff6c3e51d5805538dd23695db574c67fe6085730987302cf356bf39aa8b286ef33888971e290dae40c938e69c477dd0
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0.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
- s.required_ruby_version = '~> 3.0'
10
- s.add_runtime_dependency 'json', '~> 2.5'
11
- s.add_runtime_dependency 'yaml', '~> 0.1'
12
- s.add_development_dependency 'buildar', '~> 2'
9
+ s.required_ruby_version = '>= 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.0.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:
@@ -74,16 +61,16 @@ require_paths:
74
61
  - lib
75
62
  required_ruby_version: !ruby/object:Gem::Requirement
76
63
  requirements:
77
- - - "~>"
64
+ - - ">="
78
65
  - !ruby/object:Gem::Version
79
- version: '3.0'
66
+ version: '2'
80
67
  required_rubygems_version: !ruby/object:Gem::Requirement
81
68
  requirements:
82
69
  - - ">="
83
70
  - !ruby/object:Gem::Version
84
71
  version: '0'
85
72
  requirements: []
86
- rubygems_version: 3.2.26
73
+ rubygems_version: 3.4.4
87
74
  signing_key:
88
75
  specification_version: 4
89
76
  summary: simple filesystem de/serialization for app configs