yap-shell 0.4.4 → 0.4.5

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
  SHA1:
3
- metadata.gz: e5e98defe8356bb996354db08976f8e762a1b483
4
- data.tar.gz: da5bca87b69f4ba413825a9e3acbc028c92f96a6
3
+ metadata.gz: d9694f89f2c9e5c706fd5366e9d9cd3d3030137f
4
+ data.tar.gz: 45d092310b1f1a1aba4f0c50a356393c123798b5
5
5
  SHA512:
6
- metadata.gz: e5478a09a56148a96a97cf821bc1781982c45ba39e631a9b36e3d99f51389bbbf95b66f4c3ad999b9b98aa66a9d0898b5b65ff305948f68dc326a91590b58fe5
7
- data.tar.gz: 8a0c2e941931074975163d0292620e25fd1d432afcf66c8cedb9bc4cde1f56780f6a2a3176709e7f8f18af2a8c15639b4cf932bdbc313834e7ed0d0b84c2b333
6
+ metadata.gz: d6cacce91721d91e0aab0a805f22d1b01e006c7de639f4f779f0ae8e2b7c00e48144ab608f43aa8fe686d1720d768f2d1ee47217a659d010c668459d42f7bbb9
7
+ data.tar.gz: ef3856b79228091b42dbbbe1b8ea1ef5618c63031433ce40a34549125283f0faaab5ba8e180b67676578e4c0e6a49b88112dd69ee00203bfff7236c2ee30d6be
@@ -13,13 +13,13 @@ module Yap
13
13
 
14
14
  def initialize
15
15
  @addon_paths = [
16
- Dir["#{File.dirname(__FILE__)}/../../addons/*"],
17
- Dir["#{ENV['HOME']}/.yap/addons/*"]
18
- ].flatten
16
+ "#{File.dirname(__FILE__)}/../../addons",
17
+ "#{ENV['HOME']}/.yap/addons"
18
+ ]
19
19
 
20
20
  @rcfiles = [
21
- Dir["#{ENV['HOME']}/.yaprc"]
22
- ].flatten
21
+ "#{ENV['HOME']}/.yaprc"
22
+ ]
23
23
  end
24
24
 
25
25
  def path_for(part)
@@ -1,5 +1,5 @@
1
1
  module Yap
2
2
  module Shell
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  end
5
5
  end
@@ -68,27 +68,30 @@ module Yap
68
68
  end
69
69
 
70
70
  def self.load_rcfiles(files)
71
- Treefell['shell'].puts "loading rcfiles #{files.inspect}"
71
+ Treefell['shell'].puts %|searching for rcfiles:\n * #{files.join("\n * ")}|
72
72
  files.map do |file|
73
73
  if File.exists?(file)
74
+ Treefell['shell'].puts "rcfile #{file} found, loading."
74
75
  RcFile.new file
75
76
  else
76
- Treefell['shell'].puts "skipping non-existent rcfile #{file.inspect} "
77
+ Treefell['shell'].puts "rcfile #{file} not found, skipping."
77
78
  end
78
79
  end.flatten.compact
79
80
  end
80
81
 
81
- def self.load_directories(directories)
82
- Treefell['shell'].puts "loading addon directories: #{directories.inspect}"
83
- directories.map do |d|
84
- if File.directory?(d)
85
- load_directory(d).map(&:new)
86
- else
87
- Treefell['shell'].puts "skipping addon directory #{d.inspect}, does not exist or is not a directory"
82
+ def self.load_directories(search_paths)
83
+ Treefell['shell'].puts %|searching for addons in:\n * #{search_paths.join("\n * ")}|
84
+ search_paths.map do |directory|
85
+ Dir["#{directory}/*"].map do |d|
86
+ if File.directory?(d)
87
+ Treefell['shell'].puts %|addon found: #{d}|
88
+ load_directory(d).map(&:new)
89
+ else
90
+ Treefell['shell'].puts %|file found in add-on search path, skipping.|
91
+ nil
92
+ end
88
93
  end
89
- end.flatten.compact.tap do |results|
90
- Treefell['shell'].puts "loaded addons: #{results.inspect}"
91
- end
94
+ end.flatten.compact
92
95
  end
93
96
 
94
97
  class RcFile < Addon
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yap-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis