confrb 0.7alpha

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 +7 -0
  2. data/lib/confrb.rb +26 -0
  3. metadata +45 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e9fc9264e5cc25cd970c063222961e919694c344e14b43884d5f8febee8a6f93
4
+ data.tar.gz: 941fcf29e8d95390d9c2a9e80ab8cf41f4267769cdc104de5abfbe7241e75042
5
+ SHA512:
6
+ metadata.gz: 7dde539b225d4457eca653bbdb470fe43dc72050be22dd08d3626b6c0fea0a2c71360081116ade4ca56499866b72a1e900b9a48b7d07dc1781ed195bba6a0938
7
+ data.tar.gz: 6a03a8360922eeb309c4c11fe673c1665757795ab5d6ed82ad7e539e7331515867bac2ecb5828775480c0068e90b7e39e44a0edc2f05f9e8d8935df20ac4cd76
@@ -0,0 +1,26 @@
1
+ require 'fileutils'
2
+ module BasicCfrb
3
+ extend self
4
+ def setup(name)
5
+ dotname = "." + name
6
+ FileUtils.mkdir_p(dotname)
7
+ end
8
+
9
+ def mkcfg(dir, cfgname, content)
10
+ dotdir = "." + dir
11
+ cfgpath = File.join(dotdir, cfgname)
12
+ FileUtils.touch(cfgpath)
13
+ File.write(cfgpath, content)
14
+ end
15
+
16
+ def mknested(dir, nesteddir)
17
+ dotdir = "." + dir
18
+ FileUtils.mkdir_p(File.join(dotdir, nesteddir))
19
+ end
20
+
21
+ def readcfg(dir, cfgname)
22
+ dotdir = "." + dir
23
+ output = File.read(File.join(dotdir, cfgname))
24
+ return output
25
+ end
26
+ end
metadata ADDED
@@ -0,0 +1,45 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: confrb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7alpha
5
+ platform: ruby
6
+ authors:
7
+ - Gurjus Bhasin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-12-18 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: A Ruby Gem which allows you to store configuration files using hidden
14
+ directories. Plaintext, unencrypted. Useful for simple text adventure games, etc.
15
+ Docs at https://gitlab.com/Gsbhasin84/confrb
16
+ email: gsbhasin84@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - lib/confrb.rb
22
+ homepage: https://gitlab.com/Gsbhasin84/confrb
23
+ licenses:
24
+ - MIT
25
+ metadata: {}
26
+ post_install_message:
27
+ rdoc_options: []
28
+ require_paths:
29
+ - lib
30
+ required_ruby_version: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ required_rubygems_version: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">"
38
+ - !ruby/object:Gem::Version
39
+ version: 1.3.1
40
+ requirements: []
41
+ rubygems_version: 3.0.6
42
+ signing_key:
43
+ specification_version: 4
44
+ summary: Plaintext configuration library for Ruby
45
+ test_files: []