Skip to content
This repository has been archived by the owner on Dec 7, 2022. It is now read-only.

Commit

Permalink
Switch from fail to raise
Browse files Browse the repository at this point in the history
There has been a change to the Ruby Style Guide. See here for recent
discussion: rubocop/rubocop#2732
  • Loading branch information
johnallen3d committed Mar 9, 2016
1 parent 0fe6f01 commit 825bc0f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion grape-apiary.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rspec', '~> 2.14'
spec.add_development_dependency 'bundler', '~> 1.5'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rubocop', '~> 0.36'
spec.add_development_dependency 'rubocop', '>= 0.37', '< 1.0'
spec.add_development_dependency 'pry', '~> 0.9'
spec.add_development_dependency 'guard', '~> 2.4'
spec.add_development_dependency 'guard-rspec', '~> 4.2'
Expand Down
2 changes: 1 addition & 1 deletion lib/grape-apiary/blueprint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def generate
end

def write
fail 'Not yet supported'
raise 'Not yet supported'
end

def routes
Expand Down
4 changes: 2 additions & 2 deletions lib/grape-apiary/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ def supported_id_types
end

def example_id_type=(value)
fail UnsupportedIDType unless supported_id_types.include?(value)
raise UnsupportedIDType unless supported_id_types.include?(value)

if value.to_sym == :bson && !Object.const_defined?('BSON')
fail BSONNotDefinied
raise BSONNotDefinied
end

@example_id_type = value
Expand Down
2 changes: 1 addition & 1 deletion lib/grape-apiary/tasks/grape-apiary.rake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ namespace :ga do
desc 'Produce documentation'
task docs: :environment do
api = ENV['API'] || ARGV[1]
fail 'You must provide the name of an API to document' if api.nil?
raise 'You must provide the name of an API to document' if api.nil?
begin
api_class = Object.const_get(api)
api_docs = GrapeApiary::Blueprint.new(api_class).generate
Expand Down

0 comments on commit 825bc0f

Please sign in to comment.