confrb 2.2 → 2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/confrb.rb +7 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9165a2a0d73d5f050509c432b20151a6ca29d6f25d271169e61eb74a17dde60b
4
- data.tar.gz: '02708d9d9994f7298115067e855a42d6944458e74526713f665739b04d722659'
3
+ metadata.gz: 2f0f8e1b1e6920ca34695bfa2e65463bb95de3702d583909346e9020ad98cbe5
4
+ data.tar.gz: 30e5c46215d3a817b6b618a1e65954ed7498f935faaac5d0c7ce039c7bda482e
5
5
  SHA512:
6
- metadata.gz: 0de222c4e4fbb0f3f136645e58550387a1ff496861f7a32e51a60528088ed7b3537520de3444787cf19566a71706794c630f04899442a0523617129586f6fe43
7
- data.tar.gz: 47b3c588de6c4372120de9c113b074a60c082844a4e3a00ab00c1f7bcda346dbd91b6dcccd700aa643d74b60d9a5b7f78423c3aefaea01e3ac9aa690eec62d1c
6
+ metadata.gz: 5204fc8808a8521be1a22f6ad78e3c1c808f7bcfa7162d9f10c1990fa1446eb7469bfa41bc2c177064c0e47c1b2290a749a1627d11d94f1f64c7a22dcaee9012
7
+ data.tar.gz: 3c97a8b56b59219e53ab6997630f80103d3a0fbd7ab292ab4f48078697f2cfbc08dc42e894ef53178b938f6e846560f81a13251134d3f2713d83a2b2c897df78
@@ -162,4 +162,11 @@ class Confrb
162
162
  File.write(cfgpath, content, mode: "a")
163
163
  end
164
164
  end
165
+ ##
166
+ # Check if a file exists.
167
+ # @param [String] filename the filename to check existence of
168
+ # @return Boolean showing if file exists or not.
169
+ def exist?(filename)
170
+ return File.exist?(File.join(@db + ".", filename))
171
+ end
165
172
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: confrb
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.2'
4
+ version: '2.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gurjus Bhasin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-18 00:00:00.000000000 Z
11
+ date: 2020-02-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Ruby Gem which allows you to store configuration files using hidden
14
14
  directories. Supports JSON, YAML, and plaintext. Data is unencrypted, but you can