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 +4 -4
- data/lib/yap/configuration.rb +5 -5
- data/lib/yap/shell/version.rb +1 -1
- data/lib/yap/world/addons.rb +15 -12
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9694f89f2c9e5c706fd5366e9d9cd3d3030137f
|
4
|
+
data.tar.gz: 45d092310b1f1a1aba4f0c50a356393c123798b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6cacce91721d91e0aab0a805f22d1b01e006c7de639f4f779f0ae8e2b7c00e48144ab608f43aa8fe686d1720d768f2d1ee47217a659d010c668459d42f7bbb9
|
7
|
+
data.tar.gz: ef3856b79228091b42dbbbe1b8ea1ef5618c63031433ce40a34549125283f0faaab5ba8e180b67676578e4c0e6a49b88112dd69ee00203bfff7236c2ee30d6be
|
data/lib/yap/configuration.rb
CHANGED
@@ -13,13 +13,13 @@ module Yap
|
|
13
13
|
|
14
14
|
def initialize
|
15
15
|
@addon_paths = [
|
16
|
-
|
17
|
-
|
18
|
-
]
|
16
|
+
"#{File.dirname(__FILE__)}/../../addons",
|
17
|
+
"#{ENV['HOME']}/.yap/addons"
|
18
|
+
]
|
19
19
|
|
20
20
|
@rcfiles = [
|
21
|
-
|
22
|
-
]
|
21
|
+
"#{ENV['HOME']}/.yaprc"
|
22
|
+
]
|
23
23
|
end
|
24
24
|
|
25
25
|
def path_for(part)
|
data/lib/yap/shell/version.rb
CHANGED
data/lib/yap/world/addons.rb
CHANGED
@@ -68,27 +68,30 @@ module Yap
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def self.load_rcfiles(files)
|
71
|
-
Treefell['shell'].puts
|
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 "
|
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(
|
82
|
-
Treefell['shell'].puts
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
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
|
90
|
-
Treefell['shell'].puts "loaded addons: #{results.inspect}"
|
91
|
-
end
|
94
|
+
end.flatten.compact
|
92
95
|
end
|
93
96
|
|
94
97
|
class RcFile < Addon
|