console_buddy 0.1.5 → 0.1.8

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: e04be1adeb863f4260dab25a81cce777e2a4e433904998f69482b0f1dfb22399
4
- data.tar.gz: 0625fe84308248a4cce330dda74f9aae56904ef9be087e55bed9c29ab1907332
3
+ metadata.gz: d35fbaa7b27ba6c31c7d4e42ca6755c26acf262087e6e30ab6621f34d13b3353
4
+ data.tar.gz: 0f83b27f617bf7240e804efff72696ec3d1cc760adfd1ddb2ad22a64e4f0175d
5
5
  SHA512:
6
- metadata.gz: 3bf5f09899139d81888c8bb30e987b96b924496bde533f4a563fe114da2f0f8d5368dd0751a5618a2ea2736675c99e780ee307da6f77f67d4d78ec6436af720e
7
- data.tar.gz: d92805d82a145126a57ec78c04044ec084c950957bcfcf2d4527063b80d7762b61d0a7d070a72912b689ff46de073755ebf75db0b063e1d2895472a2f2bb7417
6
+ metadata.gz: 22b7a2954f507a6b734591822d64f105f1e263a976bb9a3c2c1657adf5dd70f81646baa68fb3b3c195977c5bad38f2f72a3750fdfe8ee5842c6bf395a44c873a
7
+ data.tar.gz: 2bfea75dc6096159a1f7352796be9892052794382ed03bdea7acf8689548771db41ba7ae6ae371474e377658dff4134615b1cb20729e45d75bce631752892a23
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConsoleBuddy
4
- VERSION = "0.1.5"
4
+ VERSION = "0.1.8"
5
5
  end
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
 
@@ -55,6 +66,8 @@ module ConsoleBuddy
55
66
  end
56
67
 
57
68
  def start!
69
+ return if !console_buddy_directory_exists?
70
+
58
71
  # Initialize the default values
59
72
  set_config_defaults
60
73
  # Check if there is a .console_buddy/config file
@@ -130,9 +143,10 @@ module ConsoleBuddy
130
143
  def load_console_buddy_files
131
144
  console_buddy_path = Pathname.new(File.join(Dir.pwd, '.console_buddy'))
132
145
  if console_buddy_path.exist? && console_buddy_path.directory?
133
- console_buddy_path.each_child do |file|
134
- next unless file.file?
135
- require file.to_s
146
+ console_buddy_path.find do |path|
147
+ next unless path.file?
148
+ next if path.basename.to_s == 'config.rb' # Skip config.rb as it's loaded separately
149
+ require path.to_s
136
150
  end
137
151
  else
138
152
  puts ".console_buddy folder not found in the root of the project."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: console_buddy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Bowie