Skip to content

Commit

Permalink
Merge pull request #49 from ParentSquare/fix-doc-errors
Browse files Browse the repository at this point in the history
Fix yard warnings
  • Loading branch information
justinhoward authored Feb 5, 2022
2 parents 58f8c0e + ee1c64d commit a5a3631
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
bundler-cache: true
- run: bundle exec rubocop
if: matrix.ruby == '2.7'
- run: bin/yardoc --fail-on-warning
if: matrix.ruby == '2.7'
- run: bin/check-version
- name: start MySQL
run: sudo /etc/init.d/mysql start
- run: bundle exec rspec --format doc
Expand All @@ -48,7 +51,6 @@ jobs:
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: coverage/lcov/faulty.lcov
- run: bin/check-version

release:
needs: test
Expand Down
2 changes: 1 addition & 1 deletion .yardopts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--markup markdown
--markup-provider redcarpet
- guides/*
- LICENSE.txt CHANGELOG.md
4 changes: 2 additions & 2 deletions lib/faulty.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ def disable!
@disabled = true
end

# Re-enable Faulty if disabled with {#disable!}
# Re-enable Faulty if disabled with {.disable!}
#
# @return [void]
def enable!
@disabled = false
end

# Check whether Faulty was disabled with {#disable!}
# Check whether Faulty was disabled with {.disable!}
#
# @return [Boolean] True if disabled
def disabled?
Expand Down
8 changes: 7 additions & 1 deletion lib/faulty/patch/elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,10 @@ def perform_request(*args)
end
end

::Elasticsearch::Transport::Client.prepend(Faulty::Patch::Elasticsearch)
module Elasticsearch
module Transport
class Client
prepend(Faulty::Patch::Elasticsearch)
end
end
end
6 changes: 5 additions & 1 deletion lib/faulty/patch/mysql2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,8 @@ def query(*args)
end
end

::Mysql2::Client.prepend(Faulty::Patch::Mysql2)
module Mysql2
class Client
prepend(Faulty::Patch::Mysql2)
end
end
6 changes: 5 additions & 1 deletion lib/faulty/patch/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ def io(&block)
end
end

::Redis::Client.prepend(Faulty::Patch::Redis)
class Redis
class Client
prepend(Faulty::Patch::Redis)
end
end
6 changes: 3 additions & 3 deletions lib/faulty/storage/auto_wire.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def wrap(storage, **options, &block)

# Wrap an array of storage backends in a fault-tolerant FallbackChain
#
# @param [Array<Storage::Interface>] The array to wrap
# @param array [Array<Storage::Interface>] The array to wrap
# @param options [Options]
# @return [Storage::Interface] A fault-tolerant fallback chain
def wrap_array(array, options)
Expand All @@ -81,7 +81,7 @@ def wrap_array(array, options)

# Wrap one storage backend in fault-tolerant backends
#
# @param [Storage::Interface] The storage to wrap
# @param storage [Storage::Interface] The storage to wrap
# @param options [Options]
# @return [Storage::Interface] A fault-tolerant storage backend
def wrap_one(storage, options)
Expand All @@ -93,7 +93,7 @@ def wrap_one(storage, options)

# Wrap storage in a CircuitProxy
#
# @param [Storage::Interface] The storage to wrap
# @param storage [Storage::Interface] The storage to wrap
# @param options [Options]
# @return [CircuitProxy]
def circuit_proxy(storage, options)
Expand Down
2 changes: 1 addition & 1 deletion lib/faulty/storage/interface.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_options(circuit)
# They should be returned exactly as given by {#set_options}
#
# @param circuit [Circuit] The circuit to set options for
# @param options [Hash<Symbol, Object>] A hash of symbol option names to
# @param stored_options [Hash<Symbol, Object>] A hash of symbol option names to
# circuit options. These option values are guranteed to be primive
# values.
# @return [void]
Expand Down

0 comments on commit a5a3631

Please sign in to comment.