console_buddy 0.1.5 → 0.1.7
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 +4 -4
- data/lib/console_buddy/version.rb +1 -1
- data/lib/console_buddy.rb +15 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1e406a859233d5cdbad0f209d2920194f845210b8362eb34a1e9e80506847e0
|
4
|
+
data.tar.gz: 8c412f227c4b96c87e1f2b7ff3d5dc27ba6a308bc89f2e886925b04185add0c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 795674e62d2ba1252846e07c52523e57c5497a0ec2768a14b9cefd9ece962c5bac95c63d2ca12b6cb85234c6f94033578f355740d56492b9b6be326e001e3b5f
|
7
|
+
data.tar.gz: 5fdee70a3ba51e3d5267f434ec72dd669fd5a0c6d0c03a207b983e0f4f95836265349a27ecdbf2f6eb729083fa7af4ed13fe5b306a0f4cc146b9c95e493fdc48
|
data/lib/console_buddy.rb
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'pathname'
|
4
|
+
|
5
|
+
# Check if .console_buddy directory exists
|
6
|
+
def console_buddy_directory_exists?
|
7
|
+
console_buddy_path = Pathname.new(File.join(Dir.pwd, '.console_buddy'))
|
8
|
+
console_buddy_path.exist? && console_buddy_path.directory?
|
9
|
+
end
|
10
|
+
|
11
|
+
if !console_buddy_directory_exists?
|
12
|
+
return
|
13
|
+
end
|
14
|
+
|
4
15
|
require 'active_support'
|
5
16
|
require 'active_support/all'
|
6
17
|
|
@@ -130,9 +141,10 @@ module ConsoleBuddy
|
|
130
141
|
def load_console_buddy_files
|
131
142
|
console_buddy_path = Pathname.new(File.join(Dir.pwd, '.console_buddy'))
|
132
143
|
if console_buddy_path.exist? && console_buddy_path.directory?
|
133
|
-
console_buddy_path.
|
134
|
-
next unless
|
135
|
-
|
144
|
+
console_buddy_path.find do |path|
|
145
|
+
next unless path.file?
|
146
|
+
next if path.basename.to_s == 'config.rb' # Skip config.rb as it's loaded separately
|
147
|
+
require path.to_s
|
136
148
|
end
|
137
149
|
else
|
138
150
|
puts ".console_buddy folder not found in the root of the project."
|