confrb 0.3alpha

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 +25 -0
  3. metadata +44 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: bc83b0c0e9dd43952563c604fede93aa2fdbca4809098261900aa3f89ae271f1
4
+ data.tar.gz: 6093deb8ddabd6e130ce7174fdde7c1fe3e2ad9992d578e62e85729780733cc3
5
+ SHA512:
6
+ metadata.gz: 9431a83400d3a022191adc437124d6c0de9ed4083a951c903cf6e77944eec4d59531f9ff767d5425bbafe1c431f71b79df42662fc84b940e28366624c7eadba3
7
+ data.tar.gz: 335f5ff6e680c175d48d3a7eb5c829b4956907915bf153cde4a97794b95312f6d0fa27b55b835d66fc06dd83da43627bc8ad1f552dff09aeb3b86ab06f268aec
@@ -0,0 +1,25 @@
1
+ require 'fileutils'
2
+ def setup(name)
3
+ dotname = "." + name
4
+ FileUtils.mkdir_p(dotname)
5
+ end
6
+ def mkcfg(dir, cfgname, content)
7
+ dotdir = "." + dir
8
+ begin
9
+ cfgpath = dotdir + "/" + cfgname
10
+ FileUtils.touch(cfgpath)
11
+ File.write(cfgpath, content)
12
+ rescue
13
+ cfgpath = dotdir + "\\" + cfgname
14
+ FileUtils.touch(cfgpath)
15
+ File.write(cfgpath, content)
16
+ end
17
+ end
18
+ def mknested(dir, nesteddir)
19
+ dotdir = "." + dir
20
+ begin
21
+ FileUtils.mkdir_p(dotdir + '/' + nesteddir)
22
+ rescue
23
+ FileUtils.mkdir_p(dotdir + '\\' + nesteddir)
24
+ end
25
+ end
metadata ADDED
@@ -0,0 +1,44 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: confrb
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3alpha
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
+ email: gsbhasin84@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - lib/confrb.rb
21
+ homepage: https://gitlab.com/Gsbhasin84/confrb
22
+ licenses:
23
+ - MIT
24
+ metadata: {}
25
+ post_install_message:
26
+ rdoc_options: []
27
+ require_paths:
28
+ - lib
29
+ required_ruby_version: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ required_rubygems_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">"
37
+ - !ruby/object:Gem::Version
38
+ version: 1.3.1
39
+ requirements: []
40
+ rubygems_version: 3.0.6
41
+ signing_key:
42
+ specification_version: 4
43
+ summary: Plaintext configuration library for Ruby
44
+ test_files: []