Skip to content

Commit 85e5045

Browse files
committed
Move require inside functions for update_gems
1 parent 3dd571b commit 85e5045

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tasks/update_gems.rake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ require 'uri'
66
require 'net/http'
77
require 'rubygems/version'
88
require 'rubygems/requirement'
9-
require 'colorize'
10-
require 'tty-table'
119
require 'set'
1210

1311
# ----- Constants -----
@@ -47,6 +45,9 @@ end
4745

4846
# ----- Table and progress output -----
4947
def color_status(s)
48+
# Put this here so that things don't blow up for other tasks
49+
# if the development bundle isn't installed.
50+
require 'colorize'
5051
case s
5152
when 'UP TO DATE' then s.green
5253
when 'UPDATED' then s.yellow
@@ -58,6 +59,9 @@ def color_status(s)
5859
end
5960

6061
def print_table(headers, rows)
62+
# Put this here so that things don't blow up for other tasks
63+
# if the development bundle isn't installed.
64+
require 'tty-table'
6165
comp_w, status_w, version_w = 50, 12, 32
6266
deps_w = [MAX_TABLE_WIDTH - (comp_w + status_w + version_w + 13), 10].max
6367
table = TTY::Table.new headers, rows

0 commit comments

Comments
 (0)