atk_toolbox 0.0.134 → 0.0.135

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c8547c094c0776ccc49a4f81b4db4c3d895b0a545c2fad417a4a635179ac8a44
4
- data.tar.gz: e32165b8ee0dcce88a235dc3b656af1af742aca39c6c7daab1f3714668bf2ce4
3
+ metadata.gz: 497f584b02fd452d58548f8f28f315469c8998e7c9ac04c9f8f6fb7216bb049e
4
+ data.tar.gz: dd6509b4814cba3598cbdc6d0dc0f5581f04308617bee5d1737f52e48447a895
5
5
  SHA512:
6
- metadata.gz: 5d95da0117bc36d4030650c39ee6bed3c88532c50fda2c632cf19cf247a65fa5e6d1efbc39059a36a8557381db51eee0b9f2d33b5aec6373aa7de2572d35a19a
7
- data.tar.gz: e706e87c839abbd2095d565ce0558104afd19bbc64d63a7a9c47abba18d40088f3b26618aacfdb0fb8ed6a5b84787dfbca65f9b0ca477f1c2b42087c713e1285
6
+ metadata.gz: 3e2a0a6ac3951482a019c3912cbab7e35d99b8c3cc34a18254c8602b9463ea518f0c3f627aaa0633b96049f7c5a15b2c754e8b0a72714c67b1b6d92868d3d46d
7
+ data.tar.gz: 5a070d7fd10dba01652c0aee20c49adbace3a5b5ca35e0398bae9d0e80a051f4321663956416b9192edc22392dfce0db8b77f76d48f8b28a16e45185efe220c1
data/lib/atk/atk_info.rb CHANGED
@@ -270,6 +270,8 @@ class AtkPackage
270
270
 
271
271
  def ensure_cached()
272
272
  if @is_cached == nil
273
+ puts "self.cache_location is: #{self.cache_location} "
274
+ puts "self.url is: #{self.url} "
273
275
  Git.ensure_cloned_and_up_to_date(self.cache_location, self.url)
274
276
  @is_cached = true
275
277
  end
@@ -441,24 +441,26 @@ module FileSystem
441
441
  @unqiue_id = unqiue_id
442
442
  end
443
443
 
444
- @bash_comment_out = comment_out_line = ->(code) do
445
- "### #{code}"
444
+ def bash_comment_out
445
+ ->(code) do
446
+ "### #{code}"
447
+ end
446
448
  end
447
449
 
448
450
  def add_to_bash_profile(code)
449
- uniquely_append(code, HOME/".bash_profile", @bash_comment_out)
451
+ uniquely_append(code, HOME/".bash_profile", bash_comment_out)
450
452
  end
451
453
 
452
454
  def add_to_zsh_profile(code)
453
- uniquely_append(code, HOME/".zprofile", @bash_comment_out)
455
+ uniquely_append(code, HOME/".zprofile", bash_comment_out)
454
456
  end
455
457
 
456
458
  def add_to_bash_rc(code)
457
- uniquely_append(code, HOME/".bashrc", @bash_comment_out)
459
+ uniquely_append(code, HOME/".bashrc", bash_comment_out)
458
460
  end
459
461
 
460
462
  def add_to_zsh_rc(code)
461
- uniquely_append(code, HOME/".zshrc", @bash_comment_out)
463
+ uniquely_append(code, HOME/".zshrc", bash_comment_out)
462
464
  end
463
465
 
464
466
  def uniquely_append(string_to_add, location_of_file, comment_out_line)
data/lib/atk/git.rb CHANGED
@@ -5,10 +5,12 @@ module Git
5
5
  # check if its a git repo
6
6
  if FS.folder?(target_dir/".git")
7
7
  # fetch master
8
- system("git fetch origin master")
9
- if $?.success?
10
- # force pull
11
- system("git reset --hard origin/master")
8
+ FS.in_dir(target_dir) do
9
+ system("git fetch origin master")
10
+ if $?.success?
11
+ # force pull
12
+ system("git reset --hard origin/master")
13
+ end
12
14
  end
13
15
  return
14
16
  else
data/lib/atk/info.rb CHANGED
@@ -259,6 +259,7 @@ class Info
259
259
  rescue
260
260
  @paths = {}
261
261
  end
262
+ @root = FileSystem.dirname(@path)
262
263
  for each_key, each_value in @paths
263
264
  # if its an array, just join it together
264
265
  if each_value.is_a?(Array)
@@ -273,7 +274,7 @@ class Info
273
274
  # Dont add a source_path if its an absolute path
274
275
  if not each_value.size > 0 && each_value[0] == '/'
275
276
  # convert the path into an absolute path
276
- @paths[each_key] = FileSystem.join(@path, each_value)
277
+ @paths[each_key] = FileSystem.join(@root, each_value)
277
278
  end
278
279
  end
279
280
  end
@@ -1,3 +1,3 @@
1
1
  module AtkToolbox
2
- VERSION = '0.0.134'
2
+ VERSION = '0.0.135'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atk_toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.134
4
+ version: 0.0.135
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Hykin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-12 00:00:00.000000000 Z
11
+ date: 2020-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-prompt