peak_flow_utils 0.1.7 → 0.1.12

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.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +30 -5
  3. data/app/controllers/peak_flow_utils/application_controller.rb +6 -1
  4. data/app/controllers/peak_flow_utils/pings/postgres_connections_controller.rb +9 -0
  5. data/app/controllers/peak_flow_utils/pings/{sidekiq_pings_controller.rb → sidekiq_controller.rb} +4 -2
  6. data/app/handlers/peak_flow_utils/validations_handler.rb +3 -3
  7. data/app/{migrations → services}/peak_flow_utils/application_migration.rb +0 -0
  8. data/app/services/peak_flow_utils/database_initializer_service.rb +1 -1
  9. data/app/services/peak_flow_utils/erb_inspector/file_inspector.rb +4 -4
  10. data/app/services/peak_flow_utils/erb_inspector/translation_inspector.rb +7 -7
  11. data/app/services/peak_flow_utils/model_inspector.rb +1 -0
  12. data/config/routes.rb +4 -0
  13. data/lib/peak_flow_utils.rb +15 -0
  14. data/{app → lib/peak_flow_utils}/migrations/20150902155200_create_translation_keys.rb +0 -0
  15. data/{app → lib/peak_flow_utils}/migrations/20150907070909_create_groups.rb +0 -0
  16. data/{app → lib/peak_flow_utils}/migrations/20150907090900_create_handlers.rb +0 -0
  17. data/{app → lib/peak_flow_utils}/migrations/20150908085500_create_translation_values.rb +0 -0
  18. data/{app → lib/peak_flow_utils}/migrations/20150908090800_create_handler_texts.rb +0 -0
  19. data/{app → lib/peak_flow_utils}/migrations/20160411190500_create_scanned_files.rb +0 -0
  20. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/application_record.rb +0 -0
  21. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/group.rb +0 -0
  22. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/handler.rb +0 -0
  23. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/handler_text.rb +0 -0
  24. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/scanned_file.rb +0 -0
  25. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/translation_key.rb +0 -0
  26. data/{app/models/peak_flow_utils → lib/peak_flow_utils/models}/translation_value.rb +0 -0
  27. data/lib/peak_flow_utils/notifier.rb +83 -0
  28. data/lib/peak_flow_utils/notifier_error_parser.rb +53 -0
  29. data/lib/peak_flow_utils/notifier_rack.rb +22 -0
  30. data/lib/peak_flow_utils/notifier_rails.rb +5 -0
  31. data/lib/peak_flow_utils/notifier_response.rb +11 -0
  32. data/lib/peak_flow_utils/notifier_sidekiq.rb +11 -0
  33. data/lib/peak_flow_utils/rspec_helper.rb +2 -2
  34. data/lib/peak_flow_utils/version.rb +1 -1
  35. metadata +25 -25
  36. data/app/assets/config/peak_flow_utils_manifest.js +0 -2
  37. data/app/assets/javascripts/peak_flow_utils/application.js +0 -14
  38. data/app/assets/stylesheets/peak_flow_utils/application.css +0 -15
  39. data/app/helpers/peak_flow_utils/application_helper.rb +0 -2
  40. data/app/jobs/peak_flow_utils/application_job.rb +0 -2
  41. data/app/mailers/peak_flow_utils/application_mailer.rb +0 -4
  42. data/app/views/layouts/peak_flow_utils/application.html.erb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: def8657575651d82bd17a2a147cb6168e0f203d60b79baeb5a6174f0b2c5e7e9
4
- data.tar.gz: a669cb340a9eb3a2d1258027214a12636248c06760f8db31736c37debb342fd6
3
+ metadata.gz: 27b80fe472694a76875b46c4bc5e393e6bf02acb13e4ff2b194e5ce4b61698b7
4
+ data.tar.gz: 4e4bd827165ad878970df19990af1d80ab229188f7d590464faadb772945b324
5
5
  SHA512:
6
- metadata.gz: 34025fc9eb4b72bd82bd94a23e239271aadf02364356a9c7cb9d8d14d354f0a7ad5534ab1fdcc7accb63a32635d15bd6f7fcd79e59b05be337390698cb0569aa
7
- data.tar.gz: 13908a5163f27a93d77cdd3a6d596ac215ad3ecb6dca124afede8e737256849857ebd7fffd0c96e712c601bc3e03502538ae4ff5076ba37cf1d32a1d221fa59b
6
+ metadata.gz: 11cc3ae6a4bed2cec6209846fbe5463e2133c4a5ff3873a63ef93bec83fbf1a58c90282aa279307dc090e3d1ac30d27bcb93193dc7489914b500939d8a389bb1
7
+ data.tar.gz: 2b20aedf4ba6b0ae8ad2a6882e8f8664c9212310ce4cd2f555ac6c6436cb5943b6096d23e64502deaf6ea3c02f105e7c941614e1b549e767878a08fe9a4d0080
data/README.md CHANGED
@@ -1,14 +1,12 @@
1
- # PeakFlowUtils
2
- Short description and motivation.
1
+ # PeakflowUtils
3
2
 
4
- ## Usage
5
- How to use my plugin.
3
+ Various tools to use with www.peakflow.io.
6
4
 
7
5
  ## Installation
8
6
  Add this line to your application's Gemfile:
9
7
 
10
8
  ```ruby
11
- gem 'peak_flow_utils'
9
+ gem "peak_flow_utils"
12
10
  ```
13
11
 
14
12
  And then execute:
@@ -21,6 +19,33 @@ Or install it yourself as:
21
19
  $ gem install peak_flow_utils
22
20
  ```
23
21
 
22
+ Add this to `config/peakflow.rb`:
23
+ ```ruby
24
+ PeakFlowUtils::Notifier.configure(auth_token: "your-token")
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ ### Reporting errors manually
30
+
31
+ ```ruby
32
+ PeakFlowUtils::Notifier.notify(error: error)
33
+ ```
34
+
35
+ ### Reporting Rails errors
36
+
37
+ Add this to `config/peakflow.rb`:
38
+ ```ruby
39
+ PeakFlowUtils::NotifierRails.configure
40
+ ```
41
+
42
+ ### Reporting Sidekiq errors in Rails:
43
+
44
+ Add this to `config/peakflow.rb`:
45
+ ```ruby
46
+ PeakFlowUtils::NotifierSidekiq.configure
47
+ ```
48
+
24
49
  ## Contributing
25
50
  Contribution directions go here.
26
51
 
@@ -7,7 +7,12 @@ private
7
7
 
8
8
  def authenticate
9
9
  authenticate_or_request_with_http_basic do |username, password|
10
- username == ENV.fetch("PEAK_FLOW_PINGS_USERNAME") && password == ENV.fetch("PEAK_FLOW_PINGS_PASSWORD")
10
+ if ENV["PEAKFLOW_PINGS_USERNAME"].blank? || ENV["PEAKFLOW_PINGS_PASSWORD"].blank?
11
+ Rails.logger.error "Peakflow utils: Pings called but PEAKFLOW_PINGS_USERNAME or PEAKFLOW_PINGS_PASSWORD wasn't set"
12
+ false
13
+ end
14
+
15
+ username == ENV.fetch("PEAKFLOW_PINGS_USERNAME") && password == ENV.fetch("PEAKFLOW_PINGS_PASSWORD")
11
16
  end
12
17
  end
13
18
  end
@@ -0,0 +1,9 @@
1
+ class PeakFlowUtils::Pings::PostgresConnectionsController < PeakFlowUtils::ApplicationController
2
+ def count
3
+ postgres_connections_count = ActiveRecord::Base.connection.execute("SELECT SUM(numbackends) AS connections_count FROM pg_stat_database").to_a.first
4
+
5
+ render json: {
6
+ postgres_connections_count: postgres_connections_count.fetch("connections_count")
7
+ }
8
+ end
9
+ end
@@ -1,5 +1,7 @@
1
- class PeakFlowUtils::Pings::SidekiqPings < PeakFlowUtils::ApplicationController
2
- def create
1
+ require "sidekiq/api"
2
+
3
+ class PeakFlowUtils::Pings::SidekiqController < PeakFlowUtils::ApplicationController
4
+ def index
3
5
  sidekiq_queue = Sidekiq::Queue.new
4
6
 
5
7
  render json: {
@@ -23,11 +23,11 @@ class PeakFlowUtils::ValidationsHandler < PeakFlowUtils::ApplicationHandler
23
23
  translations_for_format_validator(validator, model_inspector, attribute_name, yielder)
24
24
  elsif validator.is_a?(ActiveRecord::Validations::UniquenessValidator)
25
25
  translations_for_uniqueness_validator(validator, model_inspector, attribute_name, yielder)
26
- elsif validator.class.name == "ActiveRecord::Validations::PresenceValidator"
26
+ elsif validator.class.name == "ActiveRecord::Validations::PresenceValidator" # rubocop:disable Style/ClassEqualityComparison
27
27
  translations_for_presence_validator(validator, model_inspector, attribute_name, yielder)
28
- elsif validator.class.name == "EmailValidator"
28
+ elsif validator.class.name == "EmailValidator" # rubocop:disable Style/ClassEqualityComparison
29
29
  translations_for_email_validator(validator, model_inspector, attribute_name, yielder)
30
- elsif validator.class.name == "ActiveModel::Validations::ConfirmationValidator"
30
+ elsif validator.class.name == "ActiveModel::Validations::ConfirmationValidator" # rubocop:disable Style/ClassEqualityComparison
31
31
  translations_for_confirmation_validator(validator, model_inspector, attribute_name, yielder)
32
32
  else
33
33
  Rails.logger.error "Unhandeled validator: #{validator.class.name}"
@@ -1,6 +1,6 @@
1
1
  class PeakFlowUtils::DatabaseInitializerService < PeakFlowUtils::ApplicationService
2
2
  def execute
3
- path = File.realpath("#{File.dirname(__FILE__)}/../../migrations")
3
+ path = File.realpath("#{File.dirname(__FILE__)}/../../../lib/peak_flow_utils/migrations")
4
4
  create_schema_table unless schema_table_exists?
5
5
 
6
6
  Dir["#{path}/[0-9]*_*.rb"].sort.map do |filename|
@@ -58,19 +58,19 @@ class PeakFlowUtils::ErbInspector::FileInspector
58
58
  private
59
59
 
60
60
  def parse_content_liquid(line_no, line, translations_found, yielder)
61
- line.scan(/\"([^\"]+?)\"\s+\|\s+t\s*(\%}|\}\}|\|)/) do |match|
61
+ line.scan(/"([^"]+?)"\s+\|\s+t\s*(%}|\}\}|\|)/) do |match|
62
62
  add_translation(line_no, "t", match[0], translations_found, yielder)
63
63
  end
64
64
 
65
- line.scan(/\'([^\']+?)\'\s+\|\s+t\s*(\%}|\}\}|\|)/) do |match|
65
+ line.scan(/'([^']+?)'\s+\|\s+t\s*(%}|\}\}|\|)/) do |match|
66
66
  add_translation(line_no, "t", match[0], translations_found, yielder)
67
67
  end
68
68
 
69
- line.scan(/\"([^\"]+?)\"\s+\|\s+val:\s*\"([^\"]+?)\"\s*,\s*(.+?)\s*\|\s+t\s*/) do |match|
69
+ line.scan(/"([^"]+?)"\s+\|\s+val:\s*"([^"]+?)"\s*,\s*(.+?)\s*\|\s+t\s*/) do |match|
70
70
  add_translation(line_no, "t", match[0], translations_found, yielder)
71
71
  end
72
72
 
73
- line.scan(/'([^\"]+?)'\s+\|\s+val:\s*'([^\"]+?)'\s*,\s*(.+?)\s*\|\s+t\s*/) do |match|
73
+ line.scan(/'([^"]+?)'\s+\|\s+val:\s*'([^"]+?)'\s*,\s*(.+?)\s*\|\s+t\s*/) do |match|
74
74
  add_translation(line_no, "t", match[0], translations_found, yielder)
75
75
  end
76
76
  end
@@ -27,7 +27,7 @@ class PeakFlowUtils::ErbInspector::TranslationInspector
27
27
  end
28
28
 
29
29
  def global?
30
- !relative? && !key.include?(".")
30
+ !relative? && key.exclude?(".")
31
31
  end
32
32
 
33
33
  def relative?
@@ -49,16 +49,16 @@ private
49
49
  is_mailer = true
50
50
  elsif @full_key.start_with?("app/views/")
51
51
  # Remove "app/views" from view-translations since that doesn't get used in keys.
52
- @full_key.gsub!(/\Aapp\/views\//, "")
52
+ @full_key.delete_prefix!("app/views/")
53
53
  elsif @full_key.start_with?("app/controllers")
54
54
  # Remove "app/controllers" from controller-translations since that doesn't get used in keys.
55
55
  @full_key.gsub!(/\Aapp\/controllers(\/?)/, "")
56
56
  is_controller = true
57
57
  elsif @full_key.start_with?("app/cells")
58
- @full_key.gsub!(/\Aapp\/cells\//, "")
58
+ @full_key.delete_prefix!("app/cells/")
59
59
  elsif @full_key.start_with?("app/")
60
60
  # Remove "app" from controller- and helper-translations since that doesn't get used.
61
- @full_key.gsub!(/\Aapp\//, "")
61
+ @full_key.delete_prefix!("app/")
62
62
  end
63
63
 
64
64
  @full_key.tr!("/", ".")
@@ -66,7 +66,7 @@ private
66
66
  @full_key << file_key(@file_path)
67
67
  @full_key << ".#{@last_method}" if (is_mailer || is_controller) && @last_method && @method != "controller_t"
68
68
  @full_key << "."
69
- @full_key << @key.gsub(/\A\./, "")
69
+ @full_key << @key.delete_prefix(".")
70
70
  elsif @method == "I18n-js.t" || @method == "t" || @method == "helper_t" || @method == "controller_t"
71
71
  @full_key = @key
72
72
  else
@@ -81,10 +81,10 @@ private
81
81
  key = key.match(/\A(.+?)\./)[1]
82
82
 
83
83
  # Remove leading "_" from partials
84
- key = key.gsub(/\A_/, "")
84
+ key.delete_prefix!("_")
85
85
 
86
86
  # Remove '_controller' from controllers
87
- key = key.gsub(/_controller\Z/, "")
87
+ key.delete_suffix!("_controller")
88
88
 
89
89
  key
90
90
  end
@@ -1,5 +1,6 @@
1
1
  class PeakFlowUtils::ModelInspector
2
2
  attr_reader :clazz
3
+
3
4
  cattr_accessor :models_loaded
4
5
 
5
6
  # Yields a model-inspector for each model found in the application.
@@ -1,2 +1,6 @@
1
1
  PeakFlowUtils::Engine.routes.draw do
2
+ namespace :pings do
3
+ get "postgres_connections", to: "postgres_connections#count"
4
+ get "sidekiq", to: "sidekiq#index"
5
+ end
2
6
  end
@@ -5,7 +5,22 @@ require "service_pattern"
5
5
 
6
6
  module PeakFlowUtils
7
7
  path = "#{File.dirname(__FILE__)}/peak_flow_utils"
8
+ models_path = "#{File.dirname(__FILE__)}/peak_flow_utils/models"
8
9
 
10
+ autoload :Notifier, "#{path}/notifier"
11
+ autoload :NotifierErrorParser, "#{path}/notifier_error_parser"
12
+ autoload :NotifierRack, "#{path}/notifier_rack"
13
+ autoload :NotifierRails, "#{path}/notifier_rails"
14
+ autoload :NotifierResponse, "#{path}/notifier_response"
15
+ autoload :NotifierSidekiq, "#{path}/notifier_sidekiq"
9
16
  autoload :RspecHelper, "#{path}/rspec_helper"
10
17
  autoload :HandlerHelper, "#{path}/handler_helper"
18
+
19
+ autoload :ApplicationRecord, "#{models_path}/application_record"
20
+ autoload :Group, "#{models_path}/group"
21
+ autoload :HandlerText, "#{models_path}/handler_text"
22
+ autoload :Handler, "#{models_path}/handler"
23
+ autoload :ScannedFile, "#{models_path}/scanned_file"
24
+ autoload :TranslationKey, "#{models_path}/translation_key"
25
+ autoload :TranslationValue, "#{models_path}/translation_value"
11
26
  end
@@ -0,0 +1,83 @@
1
+ class PeakFlowUtils::Notifier
2
+ class FailedToReportError < RuntimeError; end
3
+ class NotConfiguredError < RuntimeError; end
4
+
5
+ attr_reader :auth_token
6
+
7
+ def self.configure(auth_token:)
8
+ @current = PeakFlowUtils::Notifier.new(auth_token: auth_token)
9
+ end
10
+
11
+ def self.current
12
+ raise PeakFlowUtils::Notifier::NotConfiguredError, "Hasn't been configured" if !@current && Rails.env.test?
13
+
14
+ @current
15
+ end
16
+
17
+ def self.notify(*args)
18
+ PeakFlowUtils::Notifier.current.notify(*args)
19
+ end
20
+
21
+ def initialize(auth_token:)
22
+ @auth_token = auth_token
23
+ end
24
+
25
+ def notify(error:, environment: nil, parameters: nil)
26
+ error_parser = PeakFlowUtils::NotifierErrorParser.new(
27
+ backtrace: error.backtrace,
28
+ environment: environment,
29
+ error: error
30
+ )
31
+
32
+ uri = URI("https://www.peakflow.io/errors/reports")
33
+
34
+ https = Net::HTTP.new(uri.host, uri.port)
35
+ https.use_ssl = true
36
+
37
+ data = {
38
+ auth_token: auth_token,
39
+ error: {
40
+ backtrace: error.backtrace,
41
+ environment: error_parser.cleaned_environment,
42
+ error_class: error.class.name,
43
+ file_path: error_parser.file_path,
44
+ line_number: error_parser.line_number,
45
+ message: error.message,
46
+ parameters: parameters,
47
+ remote_ip: error_parser.remote_ip,
48
+ url: error_parser.url,
49
+ user_agent: error_parser.user_agent
50
+ }
51
+ }
52
+
53
+ request = Net::HTTP::Post.new(uri.path)
54
+ request["Content-Type"] = "application/json"
55
+ request.body = JSON.generate(data)
56
+
57
+ response = https.request(request)
58
+
59
+ raise FailedToReportError, error_message_from_response(response) unless response.code == "200"
60
+
61
+ response_data = JSON.parse(response.body)
62
+
63
+ # Data not always present so dont use fetch
64
+ PeakFlowUtils::NotifierResponse.new(
65
+ bug_report_id: response_data["bug_report_id"],
66
+ bug_report_instance_id: response_data["bug_report_instance_id"],
67
+ project_id: response_data["project_id"],
68
+ project_slug: response_data["project_slug"],
69
+ url: response_data["url"]
70
+ )
71
+ end
72
+
73
+ def error_message_from_response(response)
74
+ message = "Couldn't report error to Peakflow (code #{response.code})"
75
+
76
+ if response["content-type"]&.starts_with?("application/json")
77
+ response_data = JSON.parse(response.body)
78
+ message << ": #{response_data.fetch("errors").join(". ")}" if response_data["errors"]
79
+ end
80
+
81
+ message
82
+ end
83
+ end
@@ -0,0 +1,53 @@
1
+ class PeakFlowUtils::NotifierErrorParser
2
+ attr_reader :backtrace, :environment, :error, :file_path, :line_number
3
+
4
+ def initialize(backtrace:, environment:, error:)
5
+ @backtrace = backtrace
6
+ @environment = environment || {}
7
+ @error = error
8
+
9
+ detect_file_path_and_line_number
10
+ end
11
+
12
+ def detect_file_path_and_line_number
13
+ backtrace.each do |trace|
14
+ match = trace.match(/^((.+)\.([A-z]{2,4})):(\d+)(:|$)/)
15
+ next unless match
16
+
17
+ file_path = match[1]
18
+ line_number = match[4].to_i
19
+
20
+ next if file_path.include?("/.rvm/")
21
+
22
+ @file_path ||= file_path
23
+ @line_number ||= line_number
24
+
25
+ break
26
+ end
27
+ end
28
+
29
+ def cleaned_environment
30
+ environment.reject do |key, _value|
31
+ key.start_with?("action_controller.", "action_dispatch.", "puma.", "rack.") || key == "warden"
32
+ end
33
+ end
34
+
35
+ def remote_ip
36
+ environment["HTTP_X_FORWARDED_FOR"] || environment["REMOTE_ADDR"]
37
+ end
38
+
39
+ def url
40
+ return unless environment["REQUEST_URI"]
41
+
42
+ url = "http"
43
+ url << "s" if environment["SERVER_PORT"] == 443 || environment["rack.url_scheme"] == "https" || environment["HTTPS"] == "on"
44
+ url << "://"
45
+ url << environment["HTTP_HOST"]
46
+ url << environment["REQUEST_URI"]
47
+ url
48
+ end
49
+
50
+ def user_agent
51
+ environment["HTTP_USER_AGENT"]
52
+ end
53
+ end
@@ -0,0 +1,22 @@
1
+ class PeakFlowUtils::NotifierRack
2
+ def initialize(app, options = {})
3
+ @app = app
4
+ @options = options
5
+ end
6
+
7
+ def call(env)
8
+ @app.call(env)
9
+ rescue Exception => e # rubocop:disable Lint/RescueException
10
+ controller = env["action_controller.instance"]
11
+ request = controller&.request
12
+ parameters = {}.merge(request.GET).merge(request.POST)
13
+
14
+ PeakFlowUtils::Notifier.notify(
15
+ environment: env,
16
+ error: e,
17
+ parameters: parameters
18
+ )
19
+
20
+ raise e
21
+ end
22
+ end
@@ -0,0 +1,5 @@
1
+ class PeakFlowUtils::NotifierRails
2
+ def self.configure
3
+ Rails.application.config.app_middleware.use PeakFlowUtils::NotifierRack
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class PeakFlowUtils::NotifierResponse
2
+ attr_reader :bug_report_id, :bug_report_instance_id, :project_id, :project_slug, :url
3
+
4
+ def initialize(bug_report_id:, bug_report_instance_id:, project_id:, project_slug:, url:)
5
+ @bug_report_id = bug_report_id
6
+ @bug_report_instance_id = bug_report_instance_id
7
+ @project_id = project_id
8
+ @project_slug = project_slug
9
+ @url = url
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ class PeakFlowUtils::NotifierSidekiq
2
+ def self.configure
3
+ require "sidekiq"
4
+
5
+ Sidekiq.configure_server do |config|
6
+ config.error_handlers << proc do |error, _context|
7
+ PeakFlowUtils::Notifier.notify(error: error)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -118,7 +118,7 @@ class PeakFlowUtils::RspecHelper
118
118
  value1 = file1.fetch(:points)
119
119
  end
120
120
 
121
- if file2_data && file2_data && file2_data.fetch(:seconds) != 0.0 && file2_data.fetch(:seconds) != 0.0
121
+ if file2_data && file1_data && file2_data.fetch(:seconds) != 0.0 && file2_data.fetch(:seconds) != 0.0
122
122
  value2 = file2_data[:seconds]
123
123
  else
124
124
  value2 = file2.fetch(:points)
@@ -175,7 +175,7 @@ private
175
175
  end
176
176
 
177
177
  def ignore_type?(type)
178
- only_types && !only_types.include?(type)
178
+ only_types && !only_types.include?(type) # rubocop:disable Rails/NegateInclude:, Style/SafeNavigation
179
179
  end
180
180
 
181
181
  def type_from_path(file_path)
@@ -1,3 +1,3 @@
1
1
  module PeakFlowUtils
2
- VERSION = "0.1.7".freeze
2
+ VERSION = "0.1.12".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peak_flow_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - kaspernj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-02 00:00:00.000000000 Z
11
+ date: 2020-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -119,11 +119,9 @@ files:
119
119
  - MIT-LICENSE
120
120
  - README.md
121
121
  - Rakefile
122
- - app/assets/config/peak_flow_utils_manifest.js
123
- - app/assets/javascripts/peak_flow_utils/application.js
124
- - app/assets/stylesheets/peak_flow_utils/application.css
125
122
  - app/controllers/peak_flow_utils/application_controller.rb
126
- - app/controllers/peak_flow_utils/pings/sidekiq_pings_controller.rb
123
+ - app/controllers/peak_flow_utils/pings/postgres_connections_controller.rb
124
+ - app/controllers/peak_flow_utils/pings/sidekiq_controller.rb
127
125
  - app/handlers/peak_flow_utils/application_handler.rb
128
126
  - app/handlers/peak_flow_utils/devise_handler.rb
129
127
  - app/handlers/peak_flow_utils/file_handler.rb
@@ -132,23 +130,7 @@ files:
132
130
  - app/handlers/peak_flow_utils/simple_form_handler.rb
133
131
  - app/handlers/peak_flow_utils/validations_handler.rb
134
132
  - app/handlers/peak_flow_utils/will_paginate_handler.rb
135
- - app/helpers/peak_flow_utils/application_helper.rb
136
- - app/jobs/peak_flow_utils/application_job.rb
137
- - app/mailers/peak_flow_utils/application_mailer.rb
138
- - app/migrations/20150902155200_create_translation_keys.rb
139
- - app/migrations/20150907070909_create_groups.rb
140
- - app/migrations/20150907090900_create_handlers.rb
141
- - app/migrations/20150908085500_create_translation_values.rb
142
- - app/migrations/20150908090800_create_handler_texts.rb
143
- - app/migrations/20160411190500_create_scanned_files.rb
144
- - app/migrations/peak_flow_utils/application_migration.rb
145
- - app/models/peak_flow_utils/application_record.rb
146
- - app/models/peak_flow_utils/group.rb
147
- - app/models/peak_flow_utils/handler.rb
148
- - app/models/peak_flow_utils/handler_text.rb
149
- - app/models/peak_flow_utils/scanned_file.rb
150
- - app/models/peak_flow_utils/translation_key.rb
151
- - app/models/peak_flow_utils/translation_value.rb
133
+ - app/services/peak_flow_utils/application_migration.rb
152
134
  - app/services/peak_flow_utils/application_service.rb
153
135
  - app/services/peak_flow_utils/attribute_service.rb
154
136
  - app/services/peak_flow_utils/configuration_service.rb
@@ -161,12 +143,30 @@ files:
161
143
  - app/services/peak_flow_utils/model_inspector.rb
162
144
  - app/services/peak_flow_utils/translation_service.rb
163
145
  - app/services/peak_flow_utils/translations_parser_service.rb
164
- - app/views/layouts/peak_flow_utils/application.html.erb
165
146
  - bin/peak_flow_rspec_files
166
147
  - config/routes.rb
167
148
  - lib/peak_flow_utils.rb
168
149
  - lib/peak_flow_utils/engine.rb
169
150
  - lib/peak_flow_utils/handler_helper.rb
151
+ - lib/peak_flow_utils/migrations/20150902155200_create_translation_keys.rb
152
+ - lib/peak_flow_utils/migrations/20150907070909_create_groups.rb
153
+ - lib/peak_flow_utils/migrations/20150907090900_create_handlers.rb
154
+ - lib/peak_flow_utils/migrations/20150908085500_create_translation_values.rb
155
+ - lib/peak_flow_utils/migrations/20150908090800_create_handler_texts.rb
156
+ - lib/peak_flow_utils/migrations/20160411190500_create_scanned_files.rb
157
+ - lib/peak_flow_utils/models/application_record.rb
158
+ - lib/peak_flow_utils/models/group.rb
159
+ - lib/peak_flow_utils/models/handler.rb
160
+ - lib/peak_flow_utils/models/handler_text.rb
161
+ - lib/peak_flow_utils/models/scanned_file.rb
162
+ - lib/peak_flow_utils/models/translation_key.rb
163
+ - lib/peak_flow_utils/models/translation_value.rb
164
+ - lib/peak_flow_utils/notifier.rb
165
+ - lib/peak_flow_utils/notifier_error_parser.rb
166
+ - lib/peak_flow_utils/notifier_rack.rb
167
+ - lib/peak_flow_utils/notifier_rails.rb
168
+ - lib/peak_flow_utils/notifier_response.rb
169
+ - lib/peak_flow_utils/notifier_sidekiq.rb
170
170
  - lib/peak_flow_utils/rspec_helper.rb
171
171
  - lib/peak_flow_utils/version.rb
172
172
  - lib/tasks/peak_flow_utils_tasks.rake
@@ -182,7 +182,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
182
182
  requirements:
183
183
  - - ">="
184
184
  - !ruby/object:Gem::Version
185
- version: '0'
185
+ version: '2.5'
186
186
  required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  requirements:
188
188
  - - ">="
@@ -1,2 +0,0 @@
1
- //= link_directory ../javascripts/peak_flow_utils .js
2
- //= link_directory ../stylesheets/peak_flow_utils .css
@@ -1,14 +0,0 @@
1
- // This is a manifest file that'll be compiled into application.js, which will include all the files
2
- // listed below.
3
- //
4
- // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
- // or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
6
- //
7
- // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
- // compiled file. JavaScript code in this file should be added after the last require_* statement.
9
- //
10
- // Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require activestorage
14
- //= require_tree .
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,2 +0,0 @@
1
- module PeakFlowUtils::ApplicationHelper
2
- end
@@ -1,2 +0,0 @@
1
- class PeakFlowUtils::ApplicationJob < ActiveJob::Base
2
- end
@@ -1,4 +0,0 @@
1
- class PeakFlowUtils::ApplicationMailer < ActionMailer::Base
2
- default from: "from@example.com"
3
- layout "mailer"
4
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Peak flow utils</title>
5
- <%= stylesheet_link_tag "peak_flow_utils/application", media: "all" %>
6
- <%= javascript_include_tag "peak_flow_utils/application" %>
7
- <%= csrf_meta_tags %>
8
- </head>
9
- <body>
10
-
11
- <%= yield %>
12
-
13
- </body>
14
- </html>