pig-ci-rails 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/changelog.yml +14 -10
  3. data/.github/workflows/gempush.yml +4 -15
  4. data/.github/workflows/rspec.yml +11 -24
  5. data/.github/workflows/standard.yml +27 -0
  6. data/CHANGELOG.md +36 -8
  7. data/Gemfile +1 -1
  8. data/README.md +30 -21
  9. data/Rakefile +2 -2
  10. data/config/locales/pig_ci/en.yml +1 -1
  11. data/lib/pig_ci.rb +20 -20
  12. data/lib/pig_ci/configuration.rb +2 -2
  13. data/lib/pig_ci/decorator.rb +1 -1
  14. data/lib/pig_ci/decorator/report_terminal_decorator.rb +3 -3
  15. data/lib/pig_ci/metric.rb +2 -2
  16. data/lib/pig_ci/metric/current.rb +1 -1
  17. data/lib/pig_ci/metric/historial/change_percentage.rb +1 -1
  18. data/lib/pig_ci/metric/historical.rb +5 -5
  19. data/lib/pig_ci/profiler.rb +7 -7
  20. data/lib/pig_ci/profiler/memory.rb +1 -1
  21. data/lib/pig_ci/profiler_engine.rb +2 -2
  22. data/lib/pig_ci/profiler_engine/rails.rb +11 -8
  23. data/lib/pig_ci/report.rb +7 -7
  24. data/lib/pig_ci/report/memory.rb +1 -1
  25. data/lib/pig_ci/summary.rb +3 -3
  26. data/lib/pig_ci/summary/ci.rb +7 -7
  27. data/lib/pig_ci/summary/html.rb +8 -8
  28. data/lib/pig_ci/summary/terminal.rb +3 -3
  29. data/lib/pig_ci/test_frameworks.rb +1 -1
  30. data/lib/pig_ci/test_frameworks/rspec.rb +15 -14
  31. data/lib/pig_ci/version.rb +1 -1
  32. data/lib/pig_ci/views/index.erb +4 -4
  33. data/pig_ci.gemspec +34 -32
  34. metadata +31 -32
  35. data/.dockerignore +0 -58
  36. data/.env +0 -3
  37. data/.github/FUNDING.yml +0 -3
  38. data/.github/workflows/linters.yml +0 -78
  39. data/.rubocop.yml +0 -17
  40. data/.ruby-version +0 -1
  41. data/.travis.yml +0 -27
  42. data/Aptfile +0 -0
  43. data/Dockerfile +0 -45
  44. data/docker-compose.yml +0 -20
@@ -1,4 +1,4 @@
1
- require 'colorized_string'
1
+ require "colorized_string"
2
2
 
3
3
  class PigCI::Decorator::ReportTerminalDecorator < PigCI::Decorator
4
4
  %i[key max min mean number_of_requests].each do |field|
@@ -8,9 +8,9 @@ class PigCI::Decorator::ReportTerminalDecorator < PigCI::Decorator
8
8
  end
9
9
 
10
10
  def max_change_percentage
11
- if @object[:max_change_percentage].start_with?('-')
11
+ if @object[:max_change_percentage].start_with?("-")
12
12
  ColorizedString[@object[:max_change_percentage]].colorize(:green)
13
- elsif @object[:max_change_percentage].start_with?('0.0')
13
+ elsif @object[:max_change_percentage].start_with?("0.0")
14
14
  @object[:max_change_percentage]
15
15
  else
16
16
  ColorizedString[@object[:max_change_percentage]].colorize(:red)
data/lib/pig_ci/metric.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class PigCI::Metric; end
2
2
 
3
- require 'pig_ci/metric/current'
4
- require 'pig_ci/metric/historical'
3
+ require "pig_ci/metric/current"
4
+ require "pig_ci/metric/historical"
@@ -7,7 +7,7 @@ class PigCI::Metric::Current
7
7
  @to_h = {}
8
8
 
9
9
  File.foreach(@log_file) do |f|
10
- key, value = f.strip.split('|')
10
+ key, value = f.strip.split("|")
11
11
  value = value.to_i
12
12
 
13
13
  @to_h[key] ||= {
@@ -11,7 +11,7 @@ class PigCI::Metric::Historical::ChangePercentage
11
11
  previous_run_data = previous_run_data_for_key(data[:key]) || data
12
12
 
13
13
  data[:max_change_percentage] = (((BigDecimal(data[:max]) - BigDecimal(previous_run_data[:max])) / BigDecimal(previous_run_data[:max])) * 100).round(PigCI.max_change_percentage_precision)
14
- data[:max_change_percentage] = BigDecimal('0') if data[:max_change_percentage].to_s == 'NaN' || data[:max_change_percentage] == BigDecimal('-0.0')
14
+ data[:max_change_percentage] = BigDecimal("0") if data[:max_change_percentage].to_s == "NaN" || data[:max_change_percentage] == BigDecimal("-0.0")
15
15
  data[:max_change_percentage] = data[:max_change_percentage].to_f
16
16
 
17
17
  data
@@ -29,15 +29,15 @@ class PigCI::Metric::Historical
29
29
 
30
30
  def remove_old_historical_data!
31
31
  new_historical_data = @to_h
32
- .sort_by { |timestamp, _data| timestamp.to_s.to_i * -1 }[0..(PigCI.historical_data_run_limit - 1)]
33
- .to_h
34
- .sort_by { |timestamp, _data| timestamp.to_s.to_i * -1 }.to_h
32
+ .sort_by { |timestamp, _data| timestamp.to_s.to_i * -1 }[0..(PigCI.historical_data_run_limit - 1)]
33
+ .to_h
34
+ .sort_by { |timestamp, _data| timestamp.to_s.to_i * -1 }.to_h
35
35
  @to_h = new_historical_data
36
36
  end
37
37
 
38
38
  def read_historical_log_file
39
39
  if File.exist?(@historical_log_file)
40
- JSON.parse(File.open(@historical_log_file, 'r').read, symbolize_names: true)
40
+ JSON.parse(File.open(@historical_log_file, "r").read, symbolize_names: true)
41
41
  else
42
42
  {}
43
43
  end
@@ -49,4 +49,4 @@ class PigCI::Metric::Historical
49
49
  end
50
50
  end
51
51
 
52
- require 'pig_ci/metric/historial/change_percentage'
52
+ require "pig_ci/metric/historial/change_percentage"
@@ -2,14 +2,14 @@ class PigCI::Profiler
2
2
  attr_accessor :log_value, :log_file, :historical_log_file, :i18n_key
3
3
 
4
4
  def initialize(i18n_key: nil, log_file: nil, historical_log_file: nil)
5
- @i18n_key = i18n_key || self.class.name.underscore.split('/').last
5
+ @i18n_key = i18n_key || self.class.name.underscore.split("/").last
6
6
  @log_file = log_file || PigCI.tmp_directory.join("#{@i18n_key}.txt")
7
7
  @historical_log_file = historical_log_file || PigCI.tmp_directory.join("#{@i18n_key}.json")
8
8
  @log_value = 0
9
9
  end
10
10
 
11
11
  def setup!
12
- File.open(log_file, 'w') { |file| file.truncate(0) }
12
+ File.open(log_file, "w") { |file| file.truncate(0) }
13
13
  end
14
14
 
15
15
  def reset!
@@ -17,8 +17,8 @@ class PigCI::Profiler
17
17
  end
18
18
 
19
19
  def log_request!(request_key)
20
- File.open(log_file, 'a+') do |f|
21
- f.puts([request_key, log_value].join('|'))
20
+ File.open(log_file, "a+") do |f|
21
+ f.puts([request_key, log_value].join("|"))
22
22
  end
23
23
  end
24
24
 
@@ -36,6 +36,6 @@ class PigCI::Profiler
36
36
  end
37
37
  end
38
38
 
39
- require 'pig_ci/profiler/memory'
40
- require 'pig_ci/profiler/request_time'
41
- require 'pig_ci/profiler/database_request'
39
+ require "pig_ci/profiler/memory"
40
+ require "pig_ci/profiler/request_time"
41
+ require "pig_ci/profiler/database_request"
@@ -1,4 +1,4 @@
1
- require 'get_process_mem'
1
+ require "get_process_mem"
2
2
 
3
3
  class PigCI::Profiler::Memory < PigCI::Profiler
4
4
  def reset!
@@ -8,7 +8,7 @@ class PigCI::ProfilerEngine
8
8
  end
9
9
 
10
10
  def request_key?
11
- !@request_key.nil? && @request_key != ''
11
+ !@request_key.nil? && @request_key != ""
12
12
  end
13
13
 
14
14
  def request_captured?
@@ -37,4 +37,4 @@ class PigCI::ProfilerEngine
37
37
  end
38
38
  end
39
39
 
40
- require 'pig_ci/profiler_engine/rails'
40
+ require "pig_ci/profiler_engine/rails"
@@ -31,10 +31,13 @@ class PigCI::ProfilerEngine::Rails < ::PigCI::ProfilerEngine
31
31
  def precompile_assets!
32
32
  # From: https://github.com/rails/sprockets-rails/blob/e9ca63edb6e658cdfcf8a35670c525b369c2ccca/test/test_railtie.rb#L7-L13
33
33
  ::Rails.application.load_tasks
34
- ::Rake.application['assets:precompile'].execute
34
+ ::Rake.application["assets:precompile"].execute
35
35
  end
36
36
 
37
37
  def eager_load_rails!
38
+ # None of these methods will work pre-rails 5.
39
+ return unless ::Rails.version.to_f >= 5.0
40
+
38
41
  # Eager load rails to give more accurate memory levels.
39
42
  ::Rails.application.eager_load!
40
43
  ::Rails.application.routes.eager_load!
@@ -45,25 +48,25 @@ class PigCI::ProfilerEngine::Rails < ::PigCI::ProfilerEngine
45
48
  def make_blank_application_request!
46
49
  # Make a call to the root path to load up as much of rails as possible
47
50
  # Done within a timezone block as it affects the timezone.
48
- Time.use_zone('UTC') do
49
- ::Rails.application.call(::Rack::MockRequest.env_for('/'))
51
+ Time.use_zone("UTC") do
52
+ ::Rails.application.call(::Rack::MockRequest.env_for("/"))
50
53
  end
51
54
  end
52
55
 
53
56
  def attach_listeners!
54
- ::ActiveSupport::Notifications.subscribe 'start_processing.action_controller' do |_name, _started, _finished, _unique_id, payload|
57
+ ::ActiveSupport::Notifications.subscribe "start_processing.action_controller" do |_name, _started, _finished, _unique_id, payload|
55
58
  request_key_from_payload!(payload)
56
59
 
57
60
  profilers.each(&:reset!)
58
61
  end
59
62
 
60
- ::ActiveSupport::Notifications.subscribe 'sql.active_record' do |_name, _started, _finished, _unique_id, payload|
61
- if request_key? && PigCI.enabled? && ( !PigCI.ignore_cached_queries? || ( PigCI.ignore_cached_queries? && !payload[:cached] ))
62
- profilers.select { |profiler| profiler.class == PigCI::Profiler::DatabaseRequest }.each(&:increment!)
63
+ ::ActiveSupport::Notifications.subscribe "sql.active_record" do |_name, _started, _finished, _unique_id, payload|
64
+ if request_key? && PigCI.enabled? && (!PigCI.ignore_cached_queries? || (PigCI.ignore_cached_queries? && !payload[:cached]))
65
+ profilers.select { |profiler| profiler.instance_of?(PigCI::Profiler::DatabaseRequest) }.each(&:increment!)
63
66
  end
64
67
  end
65
68
 
66
- ::ActiveSupport::Notifications.subscribe 'process_action.action_controller' do |_name, _started, _finished, _unique_id, _payload|
69
+ ::ActiveSupport::Notifications.subscribe "process_action.action_controller" do |_name, _started, _finished, _unique_id, _payload|
67
70
  if PigCI.enabled?
68
71
  profilers.each do |profiler|
69
72
  profiler.log_request!(request_key)
data/lib/pig_ci/report.rb CHANGED
@@ -2,7 +2,7 @@ class PigCI::Report
2
2
  attr_accessor :historical_log_file, :i18n_key
3
3
 
4
4
  def initialize(historical_log_file: nil, i18n_key: nil, timestamp: nil)
5
- @i18n_key = i18n_key || self.class.name.underscore.split('/').last
5
+ @i18n_key = i18n_key || self.class.name.underscore.split("/").last
6
6
  @historical_log_file = historical_log_file || PigCI.tmp_directory.join("#{@i18n_key}.json")
7
7
  @timestamp = timestamp || PigCI.run_timestamp
8
8
  end
@@ -12,7 +12,7 @@ class PigCI::Report
12
12
  end
13
13
 
14
14
  def i18n_name
15
- I18n.t('.name', scope: i18n_scope, locale: PigCI.locale)
15
+ I18n.t(".name", scope: i18n_scope, locale: PigCI.locale)
16
16
  end
17
17
 
18
18
  def max_for(timestamp)
@@ -30,9 +30,9 @@ class PigCI::Report
30
30
  end
31
31
 
32
32
  def sorted_and_formatted_data_for(timestamp)
33
- data_for(timestamp)[@i18n_key.to_sym].sort_by do |data|
33
+ data_for(timestamp)[@i18n_key.to_sym].sort_by { |data|
34
34
  PigCI.report_row_sort_by(data)
35
- end.collect do |data|
35
+ }.collect do |data|
36
36
  self.class.format_row(data)
37
37
  end
38
38
  end
@@ -73,6 +73,6 @@ class PigCI::Report
73
73
  end
74
74
  end
75
75
 
76
- require 'pig_ci/report/memory'
77
- require 'pig_ci/report/request_time'
78
- require 'pig_ci/report/database_request'
76
+ require "pig_ci/report/memory"
77
+ require "pig_ci/report/request_time"
78
+ require "pig_ci/report/database_request"
@@ -10,6 +10,6 @@ class PigCI::Report::Memory < PigCI::Report
10
10
  end
11
11
 
12
12
  def self.bytes_in_a_megabyte
13
- @bytes_in_a_megabyte ||= BigDecimal(1_048_576)
13
+ @bytes_in_a_megabyte ||= BigDecimal("1_048_576")
14
14
  end
15
15
  end
@@ -1,5 +1,5 @@
1
1
  class PigCI::Summary; end
2
2
 
3
- require 'pig_ci/summary/ci'
4
- require 'pig_ci/summary/html'
5
- require 'pig_ci/summary/terminal'
3
+ require "pig_ci/summary/ci"
4
+ require "pig_ci/summary/html"
5
+ require "pig_ci/summary/terminal"
@@ -1,4 +1,4 @@
1
- require 'colorized_string'
1
+ require "colorized_string"
2
2
 
3
3
  class PigCI::Summary::CI < PigCI::Summary
4
4
  def initialize(reports:)
@@ -7,8 +7,8 @@ class PigCI::Summary::CI < PigCI::Summary
7
7
  end
8
8
 
9
9
  def call!
10
- puts ''
11
- puts I18n.t('pig_ci.summary.ci_start')
10
+ puts ""
11
+ puts I18n.t("pig_ci.summary.ci_start")
12
12
 
13
13
  over_threshold = false
14
14
  @reports.each do |report|
@@ -17,22 +17,22 @@ class PigCI::Summary::CI < PigCI::Summary
17
17
  end
18
18
 
19
19
  fail_with_error! if over_threshold
20
- puts ''
20
+ puts ""
21
21
  end
22
22
 
23
23
  private
24
24
 
25
25
  def fail_with_error!
26
- puts I18n.t('pig_ci.summary.ci_failure')
26
+ puts I18n.t("pig_ci.summary.ci_failure")
27
27
  Kernel.exit(2)
28
28
  end
29
29
 
30
30
  def print_report(report)
31
31
  max_and_threshold = [
32
32
  report.max_for(@timestamp).to_s,
33
- '/',
33
+ "/",
34
34
  report.threshold
35
- ].join(' ')
35
+ ].join(" ")
36
36
 
37
37
  if report.over_threshold_for?(@timestamp)
38
38
  puts "#{report.i18n_name}: #{ColorizedString[max_and_threshold].colorize(:red)}\n"
@@ -2,7 +2,7 @@
2
2
  # It aims to save to the project root in /pig-ci.
3
3
  # It is inspired by https://github.com/colszowka/simplecov-html
4
4
 
5
- require 'erb'
5
+ require "erb"
6
6
 
7
7
  class PigCI::Summary::HTML < PigCI::Summary
8
8
  def initialize(reports:)
@@ -11,15 +11,15 @@ class PigCI::Summary::HTML < PigCI::Summary
11
11
 
12
12
  def save!
13
13
  copy_assets!
14
- File.write(index_file_path, template('index').result(binding))
14
+ File.write(index_file_path, template("index").result(binding))
15
15
 
16
- puts I18n.t('pig_ci.summary.saved_successfully', output_directory: PigCI.output_directory)
16
+ puts I18n.t("pig_ci.summary.saved_successfully", output_directory: PigCI.output_directory)
17
17
  end
18
18
 
19
19
  private
20
20
 
21
21
  def render_report(report)
22
- template('report').result(binding)
22
+ template("report").result(binding)
23
23
  end
24
24
 
25
25
  def timestamps
@@ -27,11 +27,11 @@ class PigCI::Summary::HTML < PigCI::Summary
27
27
  end
28
28
 
29
29
  def template(name)
30
- ERB.new(File.read(File.join(File.dirname(__FILE__), '../views', "#{name}.erb")))
30
+ ERB.new(File.read(File.join(File.dirname(__FILE__), "../views", "#{name}.erb")))
31
31
  end
32
32
 
33
33
  def index_file_path
34
- PigCI.output_directory.join('index.html')
34
+ PigCI.output_directory.join("index.html")
35
35
  end
36
36
 
37
37
  def copy_assets!
@@ -40,10 +40,10 @@ class PigCI::Summary::HTML < PigCI::Summary
40
40
  end
41
41
 
42
42
  def output_assets_directory
43
- PigCI.output_directory.join('assets')
43
+ PigCI.output_directory.join("assets")
44
44
  end
45
45
 
46
46
  def assets_directory
47
- File.join(File.dirname(__FILE__), '../../../public/assets')
47
+ File.join(File.dirname(__FILE__), "../../../public/assets")
48
48
  end
49
49
  end
@@ -1,4 +1,4 @@
1
- require 'terminal-table'
1
+ require "terminal-table"
2
2
 
3
3
  class PigCI::Summary::Terminal < PigCI::Summary
4
4
  def initialize(reports:)
@@ -19,8 +19,8 @@ class PigCI::Summary::Terminal < PigCI::Summary
19
19
 
20
20
  table = ::Terminal::Table.new headings: report.headings do |t|
21
21
  report.sorted_and_formatted_data_for(@timestamp)[0..PigCI.terminal_report_row_limit]
22
- .collect { |data| PigCI::Decorator::ReportTerminalDecorator.new(data) }
23
- .each do |data|
22
+ .collect { |data| PigCI::Decorator::ReportTerminalDecorator.new(data) }
23
+ .each do |data|
24
24
  t << report.column_keys.collect { |key| data.send(key) }
25
25
  end
26
26
  end
@@ -1,3 +1,3 @@
1
1
  module PigCI::TestFrameworks; end
2
2
 
3
- require 'pig_ci/test_frameworks/rspec'
3
+ require "pig_ci/test_frameworks/rspec"
@@ -1,20 +1,21 @@
1
1
  class PigCI::TestFrameworks::Rspec
2
2
  def self.configure!
3
- ::RSpec.configure do |config|
4
- config.around(:each, pig_ci: false) do |example|
5
- @pig_ci_enabled = PigCI.enabled?
6
- PigCI.enabled = false
7
- example.run
8
- PigCI.enabled = @pig_ci_enabled
9
- end
3
+ if defined?(::RSpec)
4
+ ::RSpec.configure do |config|
5
+ config.around(:each, pig_ci: false) do |example|
6
+ @pig_ci_enabled = PigCI.enabled?
7
+ PigCI.enabled = false
8
+ example.run
9
+ PigCI.enabled = @pig_ci_enabled
10
+ end
10
11
 
11
- config.around(:each, pig_ci: true) do |example|
12
- @pig_ci_enabled = PigCI.enabled?
13
- PigCI.enabled = true
14
- example.run
15
- PigCI.enabled = @pig_ci_enabled
12
+ config.around(:each, pig_ci: true) do |example|
13
+ @pig_ci_enabled = PigCI.enabled?
14
+ PigCI.enabled = true
15
+ example.run
16
+ PigCI.enabled = @pig_ci_enabled
17
+ end
16
18
  end
17
-
18
- end if defined?(::RSpec)
19
+ end
19
20
  end
20
21
  end
@@ -1,3 +1,3 @@
1
1
  module PigCI
2
- VERSION = '1.0.1'.freeze
2
+ VERSION = "1.1.0".freeze
3
3
  end
@@ -10,8 +10,8 @@
10
10
  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
11
11
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
12
12
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
13
- <link rel="shortcut icon" href="https://pigci.com/images/favicon.png"/>
14
- <link rel="icon" type="image/ico" href="https://pigci.com/images/favicon.ico"/>
13
+ <link rel="shortcut icon" href="https://pigci.mikerogers.io/images/favicon.png"/>
14
+ <link rel="icon" type="image/ico" href="https://pigci.mikerogers.io/images/favicon.ico"/>
15
15
  </head>
16
16
  <body>
17
17
 
@@ -19,8 +19,8 @@
19
19
  <header class="py-3">
20
20
  <div class="row">
21
21
  <div class="col-6">
22
- <a href="https://pigci.com/" target="_blank" rel="noopener">
23
- <img src="https://pigci.com/images/logo_pigci.svg" class="float-left mr-4" alt="PigCI Logo" />
22
+ <a href="https://pigci.mikerogers.io/" target="_blank" rel="noopener">
23
+ <img src="https://pigci.mikerogers.io/images/logo_pigci.svg" class="float-left mr-4" alt="PigCI Logo" />
24
24
  </a>
25
25
  <h1><%= I18n.t('.pig_ci.summary.title') %></h1>
26
26
  </div>
data/pig_ci.gemspec CHANGED
@@ -1,46 +1,48 @@
1
- lib = File.expand_path('lib', __dir__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'pig_ci/version'
3
+ require "pig_ci/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'pig-ci-rails'
7
- spec.version = PigCI::VERSION
8
- spec.authors = ['Mike Rogers']
9
- spec.email = ['me@mikerogers.io']
6
+ spec.name = "pig-ci-rails"
7
+ spec.version = PigCI::VERSION
8
+ spec.authors = ["Mike Rogers"]
9
+ spec.email = ["me@mikerogers.io"]
10
10
 
11
- spec.summary = 'Monitor your Ruby Applications metrics via your test suite.'
12
- spec.description = 'A gem for Ruby on Rails that will track key metrics (memory, request time & SQL Requests) for request & feature tests.'
13
- spec.homepage = 'https://github.com/PigCI/pig-ci-rails'
14
- spec.license = 'MIT'
11
+ spec.summary = "Monitor your Ruby Applications metrics via your test suite."
12
+ spec.description = "A gem for Ruby on Rails that will track key metrics (memory, request time & SQL Requests) for request & feature tests."
13
+ spec.homepage = "https://github.com/PigCI/pig-ci-rails"
14
+ spec.license = "MIT"
15
+
16
+ spec.metadata = {
17
+ "bug_tracker_uri" => "#{spec.homepage}/issues",
18
+ "changelog_uri" => "#{spec.homepage}/blob/master/CHANGELOG.md",
19
+ "documentation_uri" => spec.homepage,
20
+ "homepage_uri" => spec.homepage,
21
+ "source_code_uri" => spec.homepage,
22
+ "funding_uri" => "https://www.buymeacoffee.com/MikeRogers0"
23
+ }
15
24
 
16
25
  # Specify which files should be added to the gem when it is released.
17
26
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
18
27
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
28
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20
29
  end
21
- spec.require_paths = ['lib']
22
- spec.required_ruby_version = '>= 2.3'
23
-
24
- spec.add_dependency 'activesupport', '>= 4.2'
25
- spec.add_dependency 'colorize', '>= 0.8.1'
26
- spec.add_dependency 'get_process_mem', '~> 0.2.3'
27
- spec.add_dependency 'i18n', '>= 0.9', '< 2'
28
- spec.add_dependency 'rails', '>= 4.2.0'
29
- spec.add_dependency 'terminal-table', '~> 1.8.0'
30
+ spec.require_paths = ["lib"]
31
+ spec.required_ruby_version = ">= 2.5"
30
32
 
31
- spec.add_development_dependency 'bundler', '~> 2.0'
32
- spec.add_development_dependency 'rake', '~> 13.0'
33
- spec.add_development_dependency 'webmock', '~> 3.8.0'
33
+ spec.add_dependency "activesupport", ">= 4.2"
34
+ spec.add_dependency "colorize", ">= 0.8.1"
35
+ spec.add_dependency "get_process_mem", "~> 0.2.3"
36
+ spec.add_dependency "i18n", ">= 0.9", "< 2"
37
+ spec.add_dependency "rails", ">= 4.2.0"
38
+ spec.add_dependency "terminal-table", ">= 1.8", "< 2.1"
34
39
 
35
- spec.add_development_dependency 'json-schema', '~> 2.8.1'
36
- spec.add_development_dependency 'rspec', '~> 3.9.0'
37
- spec.add_development_dependency 'simplecov', '~> 0.17.0'
38
- spec.add_development_dependency 'yard', '~> 0.9.24'
40
+ spec.add_development_dependency "bundler", "~> 2.0"
41
+ spec.add_development_dependency "rake", "~> 13.0"
42
+ spec.add_development_dependency "webmock", "~> 3.11.0"
39
43
 
40
- spec.post_install_message = [
41
- 'Thank you for installing Pig CI!',
42
- 'Upgrade Notes:',
43
- 'The latest version adds a "config.thresholds" option which replaces the PigCI.com GitHub integration.',
44
- 'See https://github.com/PigCI/pig-ci-rails#configuring-thresholds for more information :)'
45
- ].join("\n")
44
+ spec.add_development_dependency "json-schema", "~> 2.8.1"
45
+ spec.add_development_dependency "rspec", "~> 3.10.0"
46
+ spec.add_development_dependency "simplecov", "~> 0.20.0"
47
+ spec.add_development_dependency "yard", "~> 0.9.24"
46
48
  end