Skip to content

Commit

Permalink
Styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtchavez committed Nov 30, 2014
1 parent 0c7a36b commit e593051
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RSpec::Core::RakeTask.new('spec') do |t|
t.pattern = 'spec/**/*_spec.rb'
end

task :default => 'spec'
task default: 'spec'

YARD::Rake::YardocTask.new(:doc) do |t|
t.files = ['lib/**/*.rb', '-', 'README.md']
Expand Down
2 changes: 1 addition & 1 deletion lib/al_papi/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def initialize
@host = DEFAULT_HOST
@port = DEFAULT_PORT
end

end

end
2 changes: 1 addition & 1 deletion lib/al_papi/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def post(path, params = {})
end

def build_params(params = {})
params.merge(:auth_token => @config.api_key, :format => 'json')
params.merge(auth_token: @config.api_key, format: 'json')
end

def request(http_verb, path, params = nil)
Expand Down
8 changes: 4 additions & 4 deletions lib/al_papi/keyword.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module AlPapi

class Keyword

##
#
# POST a keyword/engine/locale combination to get SERP for.
Expand All @@ -16,11 +16,11 @@ def self.post(params = {}, priority = false)
path = priority ? '/keywords/priority' : '/keywords'
AlPapi.http.post path, params
end

##
#
# See post method {AlPapi::Keyword.post} for required params

def self.priority_post(params = {})
post params, true
end
Expand All @@ -41,5 +41,5 @@ def self.get(params = {})
end

end

end
2 changes: 1 addition & 1 deletion lib/al_papi/response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def initialize(http, _code, _path, _params) # @private
@over_limit, @suspended = http.over_limit, http.suspended
@code, @path, @params = _code, _path, _params
end

##
#
# Convenience method to determine if request was successfull or not
Expand Down
4 changes: 2 additions & 2 deletions spec/keywords_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
expect(@res).to_not be_suspended
expect(@res.body).to_not be_nil
expect(@res.code).to eql(200)
expect(@res.params).to eql({ :keyword => 'splash town', :auth_token => TEST_KEY, :format => 'json'})
expect(@res.params).to eql({ keyword: 'splash town', auth_token: TEST_KEY, format: 'json'})
expect(@res.path).to eql('/keywords')
end

Expand Down Expand Up @@ -47,7 +47,7 @@
expect(@res).to_not be_suspended
expect(@res.body).to_not be_nil
expect(@res.code).to eql 200
expect(@res.params).to eql({ :keyword => 'splash town', :auth_token => TEST_KEY, :format => 'json'})
expect(@res.params).to eql({ keyword: 'splash town', auth_token: TEST_KEY, format: 'json'})
expect(@res.path).to eql '/keywords/priority'
end

Expand Down
6 changes: 3 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
require 'coveralls'
Coveralls.wear!

project_root = File.expand_path(File.dirname(__FILE__) + "/..")
project_root = File.expand_path(File.dirname(__FILE__) + '/..')
$LOAD_PATH << "#{project_root}/lib"

require 'rubygems'
require 'al_papi'
require 'vcr'
require 'pry'

Dir[("#{project_root}/spec/support/**/*.rb")].each {|f| require f}
Dir[("#{project_root}/spec/support/**/*.rb")].each { |f| require f }

RSpec.configure do |config|
config.run_all_when_everything_filtered = true
Expand All @@ -35,5 +35,5 @@
config.hook_into :webmock
config.cassette_library_dir = 'spec/support'
config.ignore_localhost = true
config.default_cassette_options = { :record => :none }
config.default_cassette_options = { record: :none }
end

0 comments on commit e593051

Please sign in to comment.