console_buddy 0.1.8 → 0.1.9
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/jobs/sidekiq.rb +1 -1
- data/lib/console_buddy/report.rb +0 -6
- data/lib/console_buddy/version.rb +1 -1
- data/lib/console_buddy.rb +13 -5
- metadata +7 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3405d3e352a7082a232730e28352f8724badbbf069380fa80450c955997454f
|
|
4
|
+
data.tar.gz: 0cbc27a23dda483e14ce75818560b42dde9dc7ed034e870074d8d36b278eee1c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: eafabb5a03cfe5a5229d3f5e1042f52592ecb6d324d940208918a5037695c9d5fdf381816648bf0ecb5df572bf45b32c21753f0953a67b7a198740164fe0e397
|
|
7
|
+
data.tar.gz: 48ba1b2de4bc2627a32a656f7edfb9191f1de62d5c165f61ebe34d2f8138aa5934dd93c59dd0c1ddcf86da6bfed5af847785bd81be7189ee25940380f169cd9c
|
data/lib/console_buddy/report.rb
CHANGED
|
@@ -6,9 +6,6 @@ require 'terminal-table'
|
|
|
6
6
|
module ConsoleBuddy
|
|
7
7
|
module Report
|
|
8
8
|
# Example Usage:
|
|
9
|
-
# ConsoleBuddy::Report.table_print(User.all, "username")
|
|
10
|
-
#
|
|
11
|
-
# Example 2:
|
|
12
9
|
# table_print User.all, "username"
|
|
13
10
|
def table_print(data, options = {})
|
|
14
11
|
puts ::TablePrint::Printer.table_print(data, options)
|
|
@@ -16,9 +13,6 @@ module ConsoleBuddy
|
|
|
16
13
|
alias print_data table_print
|
|
17
14
|
|
|
18
15
|
# Example Usage:
|
|
19
|
-
# ConsoleBuddy::Report.table_for([["foo", "bar"], ["baz", "qux"]], ["col1", "col2"])
|
|
20
|
-
#
|
|
21
|
-
# Example 2:
|
|
22
16
|
# table_for([["foo", "bar"], ["baz", "qux"]], ["col1", "col2"])
|
|
23
17
|
def table_for(rows, headers = [])
|
|
24
18
|
table = ::Terminal::Table.new(headings: headers, rows: rows)
|
data/lib/console_buddy.rb
CHANGED
|
@@ -66,8 +66,6 @@ module ConsoleBuddy
|
|
|
66
66
|
end
|
|
67
67
|
|
|
68
68
|
def start!
|
|
69
|
-
return if !console_buddy_directory_exists?
|
|
70
|
-
|
|
71
69
|
# Initialize the default values
|
|
72
70
|
set_config_defaults
|
|
73
71
|
# Check if there is a .console_buddy/config file
|
|
@@ -88,7 +86,10 @@ module ConsoleBuddy
|
|
|
88
86
|
start_buddy_in_byebug
|
|
89
87
|
puts "ConsoleBuddy session started! Debugger: #{use_in_debuggers} | Test: #{current_env}" if verbose_console
|
|
90
88
|
rescue ::StandardError => error
|
|
91
|
-
|
|
89
|
+
unless ignore_startup_errors
|
|
90
|
+
puts "ConsoleBuddy encountered an error during startup. [Error]: #{error.message}"
|
|
91
|
+
puts error.backtrace.first(5).join("\n")
|
|
92
|
+
end
|
|
92
93
|
end
|
|
93
94
|
end
|
|
94
95
|
|
|
@@ -192,7 +193,7 @@ module ConsoleBuddy
|
|
|
192
193
|
def start_buddy_in_irb
|
|
193
194
|
if defined? IRB::ExtendCommandBundle
|
|
194
195
|
IRB::ExtendCommandBundle.include(ConsoleBuddy::IRB)
|
|
195
|
-
|
|
196
|
+
load_progress_bar
|
|
196
197
|
end
|
|
197
198
|
end
|
|
198
199
|
|
|
@@ -201,10 +202,17 @@ module ConsoleBuddy
|
|
|
201
202
|
def start_buddy_in_rails
|
|
202
203
|
if defined? Rails::ConsoleMethods
|
|
203
204
|
Rails::ConsoleMethods.include(ConsoleBuddy::IRB)
|
|
204
|
-
|
|
205
|
+
load_progress_bar
|
|
205
206
|
end
|
|
206
207
|
end
|
|
207
208
|
|
|
209
|
+
def load_progress_bar
|
|
210
|
+
require 'progress_bar/core_ext/enumerable_with_progress'
|
|
211
|
+
rescue StandardError
|
|
212
|
+
# progress_bar iterates all Enumerable-including modules via ObjectSpace
|
|
213
|
+
# and fails if any are frozen, which is common in Rails apps
|
|
214
|
+
end
|
|
215
|
+
|
|
208
216
|
# This will add the buddy methods to the Byebug console
|
|
209
217
|
# TODO: Add support for Pry
|
|
210
218
|
def start_buddy_in_byebug
|
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.
|
|
4
|
+
version: 0.1.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Micah Bowie
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2026-02-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rails
|
|
@@ -169,6 +169,7 @@ description: Define custom methods, helper, and aliases for your app and use the
|
|
|
169
169
|
in your rails console or IRB session.
|
|
170
170
|
email:
|
|
171
171
|
- micahbowie20@gmail.com
|
|
172
|
+
- micah@goodfornothing.tech
|
|
172
173
|
executables: []
|
|
173
174
|
extensions: []
|
|
174
175
|
extra_rdoc_files: []
|
|
@@ -206,10 +207,10 @@ files:
|
|
|
206
207
|
homepage:
|
|
207
208
|
licenses: []
|
|
208
209
|
metadata:
|
|
209
|
-
bug_tracker_uri: https://github.com/
|
|
210
|
-
changelog_uri: https://github.com/
|
|
211
|
-
documentation_uri: https://github.com/
|
|
212
|
-
source_code_uri: https://github.com/
|
|
210
|
+
bug_tracker_uri: https://github.com/GoodForNothingTech/console_buddy/issues
|
|
211
|
+
changelog_uri: https://github.com/GoodForNothingTech/console_buddy/CHANGELOG.md
|
|
212
|
+
documentation_uri: https://github.com/GoodForNothingTech/console_buddy
|
|
213
|
+
source_code_uri: https://github.com/GoodForNothingTech/console_buddy
|
|
213
214
|
post_install_message:
|
|
214
215
|
rdoc_options: []
|
|
215
216
|
require_paths:
|