snippet_cli 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11d2b16cb6d1de9f5e5c8a4204250bc87696dd049bd4a3c4e752c10bf9525c8c
4
- data.tar.gz: 3e2d9e5f878b524e3c989881dceb1dacd752d644228f4dffdd47412c87ec9464
3
+ metadata.gz: ef970184ca46c2d009feb5b35a23cf83b258a63aee81e1b3a61259ae2c7b0ccf
4
+ data.tar.gz: 06f97fc1903a6eaed6c8280d04db9e46d588818916dee30cbf600eb4c786cc73
5
5
  SHA512:
6
- metadata.gz: 827c6dc7cd14e9a7441d0d555f3cfccc04f6c65884f667b047d55ebcbb3be7ff1c759c1acca75a8b33284a90f1e1601712dfa4c1dfeee8ee1b1b5343152b0a67
7
- data.tar.gz: f70d5df7abb1405ef5275fdd813aeac4555e013e0581ba0e96c446c4740525e73fab4f2e2852bf488eea3d8554a99307117f6935ae32ba5b5481130360442fc5
6
+ metadata.gz: 4d13812aa194e42b1f185d890212825b99f58f135eaa632cd989f29e2bb24e537e0fae8b1b73607756b5da1802550788919856e94241f7c6792166a832ecc708
7
+ data.tar.gz: d3f1c06832065c52e40b2d96503e2447f3d2112660c79a33e44ecbeee557afd8387fa870f0a7b15d8f0938e84f595cdf1aa46080c2ec806d4dffd38468f6f346
@@ -37,9 +37,9 @@ class Setup
37
37
  if (config_path.include? "Windows")
38
38
  return config_path = "\\Roaming\\AppData\\espanso\\default.yml"
39
39
  elsif (config_path.include?"OS X")
40
- return config_path = "$HOME/Library/Preferences/espanso/default.yml"
40
+ return config_path = "#{ENV["HOME"]}/Library/Preferences/espanso/default.yml"
41
41
  else config_path.include?("Linux")
42
- return config_path = "$XDG_CONFIG_HOME/espanso/default.yml"
42
+ return config_path = "#{ENV["HOME"]}/.config/espanso/default.yml"
43
43
  end
44
44
  puts @leading
45
45
  self.user_os=config_path
@@ -62,13 +62,13 @@ class Setup
62
62
  end
63
63
 
64
64
  def generate_config()
65
- if File.exist?("./snippet_cli_config.txt") then
65
+ if File.exist?("#{ENV["HOME"]}/snippet_cli_config.txt") then
66
66
 
67
67
  else
68
- File.open("./snippet_cli_config.txt", "a") { |f| f.write "NAME = #{self.user_name}\n"}
69
- File.open("./snippet_cli_config.txt", "a") { |f| f.write "OS = #{self.user_os}\n"}
70
- File.open("./snippet_cli_config.txt", "a") { |f| f.write "STORAGE = #{self.user_storage}\n"}
71
- File.open("./snippet_cli_config.txt", "a") { |f| f.write "CONFIG_PRESENT = TRUE\n"}
68
+ File.open("#{ENV["HOME"]}/snippet_cli_config.txt", "a") { |f| f.write "NAME = #{self.user_name}\n"}
69
+ File.open("#{ENV["HOME"]}/snippet_cli_config.txt", "a") { |f| f.write "OS = #{self.user_os}\n"}
70
+ File.open("#{ENV["HOME"]}/snippet_cli_config.txt", "a") { |f| f.write "STORAGE = #{self.user_storage}\n"}
71
+ File.open("#{ENV["HOME"]}/snippet_cli_config.txt", "a") { |f| f.write "CONFIG_PRESENT = TRUE\n"}
72
72
  end
73
73
  end
74
74
  end
@@ -33,7 +33,7 @@ module SnippetCli
33
33
  prompt=TTY::Prompt.new
34
34
  def initialize(options)
35
35
  @options = options
36
- @file_path = File.readlines("#{ENV["HOMEPATH"]}/snippet_cli_config.txt")[1]
36
+ @file_path = File.readlines("#{ENV["HOME"]}/snippet_cli_config.txt")[1]
37
37
  @file_path = Ascii.process(@file_path)
38
38
  end
39
39
 
@@ -1,3 +1,3 @@
1
1
  module SnippetCli
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snippet_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AJ Markow