Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ gemspec
gem 'thor', '0.19.4', :require => false

group :test do
gem 'irb' # for fakefs (https://github.com/fakefs/fakefs/pull/494)
# "irb was loaded from the standard library, but is not part of the default gems starting from Ruby 3.5.0"
gem 'rake'
gem 'fakefs'
gem 'rspec', '~> 3.5'
Expand All @@ -16,5 +18,4 @@ group :development do
gem 'aws-s3'
gem 'ronn-ng'
gem 'yard', '~> 0.9.11'
gem 'automatiek'
end
3 changes: 1 addition & 2 deletions lib/foreman/export/base.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "foreman/export"
require "ostruct"
require "pathname"
require "shellwords"

Expand Down Expand Up @@ -35,7 +34,7 @@ def template
def @engine.procfile
Foreman::Export::Base.warn_deprecation!
@processes.map do |process|
OpenStruct.new(
Struct.new(
:name => @names[process],
:process => process
)
Expand Down
10 changes: 5 additions & 5 deletions lib/foreman/vendor/thor/lib/thor/line_editor/readline.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
begin
require "readline"
rescue LoadError
end

class Foreman::Thor
module LineEditor
class Readline < Basic
def self.available?
begin
require "readline"
rescue LoadError
end

Object.const_defined?(:Readline)
end

Expand Down
1 change: 0 additions & 1 deletion spec/foreman/process_spec.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'spec_helper'
require 'foreman/process'
require 'ostruct'
require 'timeout'
require 'tmpdir'

Expand Down
18 changes: 17 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,23 @@ def preserving_env
end

def normalize_space(s)
s.gsub(/\n[\n\s]*/, "\n")

normalized = s.gsub(/\n[\n\s]*/, "\n")

if RUBY_VERSION >= "3.4"
# Hash#inspect changed from Ruby 3.4
# used in data/export/bluepill/master.pill.erb
#
# $ chruby-exec 3.3.7 -- ruby -e 'puts "#{{"PORT"=>"5000"}.inspect}"'
# {"PORT"=>"5000"}
#
# $ chruby-exec 3.4.1 -- ruby -e 'puts "#{{"PORT"=>"5000"}.inspect}"'
# {"PORT" => "5000"}

normalized.gsub(/{"PORT"=>"(\d+)"}/, '{"PORT" => "\1"}')
else
normalized
end
end

def capture_stdout
Expand Down
13 changes: 0 additions & 13 deletions tasks/vendor.rake

This file was deleted.