Skip to content

Commit

Permalink
Fix unsafe offenses in production code (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala authored Jan 17, 2025
1 parent 85285d1 commit 6653b07
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 27 deletions.
27 changes: 1 addition & 26 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# Bundler
require 'bundler/setup'

Expand Down
2 changes: 2 additions & 0 deletions lib/colore-client.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# frozen_string_literal: true

require_relative 'colore/errors'
require_relative 'colore/client'
4 changes: 3 additions & 1 deletion lib/colore/client.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

require 'faraday'
require 'json'
require 'logger'
Expand Down Expand Up @@ -240,7 +242,7 @@ def send_request(type, path, params = {}, expect = :binary)

raise error
rescue Faraday::ConnectionFailed
raise Errors::ColoreUnavailable.new
raise Errors::ColoreUnavailable
end

private
Expand Down
2 changes: 2 additions & 0 deletions lib/colore/client/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Colore
class Client
VERSION = '1.0.0'
Expand Down
2 changes: 2 additions & 0 deletions lib/colore/errors.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module Colore
module Errors
class ColoreUnavailable < StandardError
Expand Down

0 comments on commit 6653b07

Please sign in to comment.