snippet_cli 0.1.9 → 0.2.4

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: ef5f398e53073e61d1e292e703791843ea18a28b21965f770afedbea4941b669
4
- data.tar.gz: c48624c9faba50b39a71a9a4febc499c48e0da0f9abc385a3c2a0d163b617754
3
+ metadata.gz: 60cf733e47298ec5146c4dd8643cd16a8f0afa3cc212077c95b9107437583f03
4
+ data.tar.gz: c1b0b44956600def2c2c1f18ea393f7b484fb237751dd8cd20bb8f77102afb46
5
5
  SHA512:
6
- metadata.gz: 0aba2c0886c0351788bd8ead17b066362d178c7647c49f6840b0f361276ed10595d82a5780529958f67c97d47097aff0959d8aeaf0c1c1e65b973830d781b513
7
- data.tar.gz: ffe16fa4b25c15059763e2b53d3d91e29ac7300a66178b15221fa7d60880ac5454113e3142fc95bebb38e5afb09f117f9b3112f30ed8a95291c798ac25bc274a
6
+ metadata.gz: de4b8f0e1177248a7329cad8dc32c7e10795d053c274b21c874b832b4e32353a554c41ccca5df3eceae5db6a97c35230358713a07f3347cee113571c7e180835
7
+ data.tar.gz: '08ceaf828f07bafdeb698b28d2e69a23044698c7f17f743ab9a6e4b45234aa52eeb6aa2b19c421fd86096ebb23da421ab51bf7ac4aa6c7de3ace9a8566d63e7a'
@@ -1,5 +1,5 @@
1
- require 'tty/prompt'
2
- require 'tty/box'
1
+ require 'tty-prompt'
2
+ require 'tty-box'
3
3
  prompt = TTY::Prompt.new
4
4
 
5
5
 
@@ -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 'snippet_generator'
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.9"
2
+ VERSION = "0.2.4"
3
3
  end
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
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.9
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - AJ Markow
@@ -173,6 +173,20 @@ files:
173
173
  - lib/snippet_cli/templates/setup/.gitkeep
174
174
  - lib/snippet_cli/version.rb
175
175
  - lib/snippet_generator.rb
176
+ - snippet_cli-0.1.0.gem
177
+ - snippet_cli-0.1.1.gem
178
+ - snippet_cli-0.1.2.gem
179
+ - snippet_cli-0.1.3.gem
180
+ - snippet_cli-0.1.4.gem
181
+ - snippet_cli-0.1.5.gem
182
+ - snippet_cli-0.1.6.gem
183
+ - snippet_cli-0.1.7.gem
184
+ - snippet_cli-0.1.8.gem
185
+ - snippet_cli-0.1.9.gem
186
+ - snippet_cli-0.2.0.gem
187
+ - snippet_cli-0.2.1.gem
188
+ - snippet_cli-0.2.2.gem
189
+ - snippet_cli-0.2.3.gem
176
190
  - snippet_cli.gemspec
177
191
  homepage: https://github.com/ajmarkow/snippet_cli
178
192
  licenses: