snippet_cli 0.1.8 → 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: ccbf700db3c17b88e2542348d9ef7e940babe62b11650b6accb1c76b3e7977b0
4
- data.tar.gz: 69f358de7bd55d095f80d5a64389f327be5bf3eb7fb1a0f124001c5392d1f843
3
+ metadata.gz: ef970184ca46c2d009feb5b35a23cf83b258a63aee81e1b3a61259ae2c7b0ccf
4
+ data.tar.gz: 06f97fc1903a6eaed6c8280d04db9e46d588818916dee30cbf600eb4c786cc73
5
5
  SHA512:
6
- metadata.gz: 564b1ff1c293092c4dccdf08bb9926a9e203e013f420245864c533210517a7d43a8b3e1dc2d82c2034073bb5c9d76f3bd79bb2898ee3d65cb2fbb0aa40f54097
7
- data.tar.gz: 7d61d090d8f6759249c49af21a73fbe65f1c4ea75accc626ff36290726f257dd83447a2a59817452efd2b2114fd4cea064645cd90abf14935966581e08f407b2
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
@@ -2,7 +2,7 @@
2
2
  require 'bundler/setup'
3
3
  require 'tty-box'
4
4
  require 'tty-prompt'
5
- require_relative './lib/snippet_generator.rb'
5
+ require_relative '../../snippet_generator'
6
6
  require 'httparty'
7
7
  require 'json'
8
8
  require 'ascii'
@@ -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
 
@@ -55,7 +55,7 @@ module SnippetCli
55
55
  elsif (platform.mac? == true)
56
56
  config_path = "#{ENV["HOME"]}/Library/Preferences/espanso/default.yml"
57
57
  else (platform.linux? == true)
58
- config_path = "#{ENV["XDG_CONFIG_HOME"]}/espanso/default.yml"
58
+ config_path = "#{ENV["HOME"]}/.config/espanso/default.yml"
59
59
  end
60
60
  puts @leading
61
61
  self.config_path=config_path
@@ -1,3 +1,3 @@
1
1
  module SnippetCli
2
- VERSION = "0.1.8"
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.1.8
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AJ Markow