console_buddy 0.1.7 → 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 -3
- 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
|
@@ -86,7 +86,10 @@ module ConsoleBuddy
|
|
|
86
86
|
start_buddy_in_byebug
|
|
87
87
|
puts "ConsoleBuddy session started! Debugger: #{use_in_debuggers} | Test: #{current_env}" if verbose_console
|
|
88
88
|
rescue ::StandardError => error
|
|
89
|
-
|
|
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
|
|
90
93
|
end
|
|
91
94
|
end
|
|
92
95
|
|
|
@@ -190,7 +193,7 @@ module ConsoleBuddy
|
|
|
190
193
|
def start_buddy_in_irb
|
|
191
194
|
if defined? IRB::ExtendCommandBundle
|
|
192
195
|
IRB::ExtendCommandBundle.include(ConsoleBuddy::IRB)
|
|
193
|
-
|
|
196
|
+
load_progress_bar
|
|
194
197
|
end
|
|
195
198
|
end
|
|
196
199
|
|
|
@@ -199,10 +202,17 @@ module ConsoleBuddy
|
|
|
199
202
|
def start_buddy_in_rails
|
|
200
203
|
if defined? Rails::ConsoleMethods
|
|
201
204
|
Rails::ConsoleMethods.include(ConsoleBuddy::IRB)
|
|
202
|
-
|
|
205
|
+
load_progress_bar
|
|
203
206
|
end
|
|
204
207
|
end
|
|
205
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
|
+
|
|
206
216
|
# This will add the buddy methods to the Byebug console
|
|
207
217
|
# TODO: Add support for Pry
|
|
208
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:
|