mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
crew: Remove activesupport gem, implement .blank? logic in lib/convenience_functions (#12081)
* crew: Remove `activesupport` gem Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Remove activesupport require lines Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Make rubocop happy Signed-off-by: SupeChicken666 <me@supechicken666.dev> * Add a comment for `.blank?` methods Signed-off-by: SupeChicken666 <me@supechicken666.dev> --------- Signed-off-by: SupeChicken666 <me@supechicken666.dev>
This commit is contained in:
@@ -5,8 +5,6 @@ require_relative '../package_utils'
|
||||
require_relative '../report_buildsystem_methods'
|
||||
require_relative '../require_gem'
|
||||
|
||||
require_gem('activesupport', 'active_support/core_ext/object/blank')
|
||||
|
||||
def check_gem_binary_build_needed(ruby_gem_name = nil, ruby_gem_version = nil)
|
||||
puts "Checking to see if gem compile for #{ruby_gem_name} is needed..."
|
||||
@extract_dir = "#{ruby_gem_name}.#{Time.now.utc.strftime('%Y%m%d%H%M%S')}.dir"
|
||||
|
||||
@@ -6,6 +6,14 @@ require_relative 'const'
|
||||
require_relative 'crewlog'
|
||||
require_relative 'downloader'
|
||||
|
||||
# Reimplementation of .blank? method from ActiveSupport
|
||||
class NilClass; def blank? = true; end
|
||||
class Numeric; def blank? = false; end
|
||||
class Array; def blank? = empty?; end
|
||||
class Hash; def blank? = empty?; end
|
||||
class Symbol; def blank? = empty?; end
|
||||
class String; def blank? = strip.empty?; end
|
||||
|
||||
class ConvenienceFunctions
|
||||
def self.determine_conflicts(pkg_name, filelist = File.join(CREW_META_PATH, "#{pkg_name}.filelist"), exclude_suffix = nil, verbose: false)
|
||||
conflicts = {}
|
||||
|
||||
@@ -6,7 +6,6 @@ require_relative 'color'
|
||||
require_relative 'progress_bar'
|
||||
require_relative 'require_gem'
|
||||
|
||||
require_gem('activesupport', 'active_support/core_ext/object/blank')
|
||||
require_gem('ptools')
|
||||
|
||||
begin
|
||||
|
||||
@@ -7,7 +7,6 @@ require_relative 'color'
|
||||
require_relative 'package'
|
||||
require_relative 'require_gem'
|
||||
|
||||
require_gem('activesupport', 'active_support/core_ext/object/blank')
|
||||
require_gem('highline')
|
||||
|
||||
# All needed constants & variables should be defined here in case they
|
||||
|
||||
Reference in New Issue
Block a user