user_space 4.0.210114 → 4.1.210122

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 (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/lib/user_space.rb +6 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e2c25f25272f9f0af6d080d708bc07b09b580c273943d654ff51562c54e78073
4
- data.tar.gz: 6d33316656f0d3536fb76bde0d0c1f2980c1c6f122ad084ab254b081a64964d4
3
+ metadata.gz: affe703bd77f1caf7cd1196cf3d24ccc66340bda26163a4d333ac446bc6249a7
4
+ data.tar.gz: 9e0ab93da71eefc3bbc90630f26788ffc7fa4f65a5f581d7da3799c9da9aac37
5
5
  SHA512:
6
- metadata.gz: e3db74fdfba700b3bab9139a7b728dc20edf901d47ee5498cc4a7d546eaa21f31f197ff1b82ec487b584118e4746952ffea0160e770e962ae14093bc8e68ccc1
7
- data.tar.gz: 76728fce0b2081d921ba4258607464f228f2279a055e9c1b13db4665ce4eabea35cfccb58251461ab90d0fa49059a53ea021fd92aa377346dba2d4cec6ff93db
6
+ metadata.gz: ef0d5faf595eb3980161f5725bf9bc1092d63bfd1ce1b46fdd3cc1b6283ee5046033cdd7b8ab881edbff0a4c6fafac54bc46593b5c342695bd303d629880608a
7
+ data.tar.gz: e9a9fe8cd05890af3f8527e24c1314c76be12f830ec33682b25834c561a2d9f79b25f058ebbd7d2502210078c2fe7451f796cb3eb6af4b744070c589d88a9aa3
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # UserSpace
2
2
 
3
- * [VERSION 4.0.210114](https://github.com/carlosjhr64/user_space/releases)
3
+ * [VERSION 4.1.210122](https://github.com/carlosjhr64/user_space/releases)
4
4
  * [github](https://www.github.com/carlosjhr64/user_space)
5
5
  * [rubygems](https://rubygems.org/gems/user_space)
6
6
 
@@ -3,19 +3,23 @@ require 'fileutils'
3
3
  #`ruby`
4
4
 
5
5
  class UserSpace
6
- VERSION = '4.0.210114'
6
+ VERSION = '4.1.210122'
7
7
  XDG = {
8
8
  'cache' => ENV['XDG_CACHE_HOME'] || File.expand_path('~/.cache'),
9
9
  'config' => ENV['XDG_CONFIG_HOME'] || File.expand_path('~/.config'),
10
10
  'data' => ENV['XDG_DATA_HOME'] || File.expand_path('~/.local/share'),
11
11
  }
12
12
 
13
+ def self.appdir
14
+ File.dirname File.dirname File.expand_path caller(1..2)[1].split(':',2)[0]
15
+ end
16
+
13
17
  attr_reader :parser,:ext,:appname,:xdgbases,:appdir,:config
14
18
  def initialize( parser:,
19
+ appdir: UserSpace.appdir,
15
20
  ext: parser.to_s.downcase,
16
21
  appname: File.basename($0),
17
22
  xdgbases: ['cache', 'config', 'data'],
18
- appdir: File.dirname(__dir__),
19
23
  config: 'config')
20
24
  @parser,@ext,@appname,@xdgbases,@appdir,@config = parser,ext,appname,xdgbases,appdir,config
21
25
  install(false) # install with no overwrite
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: user_space
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.210114
4
+ version: 4.1.210122
5
5
  platform: ruby
6
6
  authors:
7
7
  - carlosjhr64
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-01-22 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  Maintains the user's cache, config, and data directories