Skip to content

Commit

Permalink
Merge pull request #7 from jpalumickas/upgrade-gems
Browse files Browse the repository at this point in the history
Upgrade CodeClimate test reporter
  • Loading branch information
jpalumickas committed Nov 29, 2016
2 parents 5e584cb + fe792be commit e2e50b4
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 22 deletions.
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@ sudo: false
before_install:
- gem install bundler

after_success:
- bundle exec codeclimate-test-reporter

bundler_args: --without development

language: ruby

rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.0
- 2.3.0
- ruby-head
- jruby-19mode
- jruby-head
- rbx
- rbx-2

matrix:
allow_failures:
- rvm: ruby-head
- rvm: jruby-head
- rvm: rbx
- rvm: rbx-2
18 changes: 13 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
source 'https://rubygems.org'

group :development do
gem 'guard-rspec', '~> 4.7.3'
end

group :test do
gem 'codeclimate-test-reporter', require: false
gem 'coveralls', '~> 0.8.13', require: false
gem 'guard-rspec', '~> 4.6.5'
gem 'coveralls', '~> 0.8.16', require: false
gem 'rake' # We need a rake gem for Travis CI.
gem 'rspec', '~> 3.4.0'
gem 'simplecov', '~> 0.11.2', require: false
gem 'webmock', '~> 1.24.3'
gem 'rspec', '~> 3.5.0'
gem 'simplecov', '~> 0.12', require: false
gem 'webmock', '~> 2.1.0'
end

platforms :rbx do
gem 'psych'
gem 'rubysl', '~> 2.0'
end

gemspec
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ Ivapi.server.information
This library aims to support and is [tested against][travis] the following Ruby
implementations:

* Ruby 1.9.3
* Ruby 2.0.0
* Ruby 2.1.0
* Ruby 2.2.0
Expand Down
4 changes: 4 additions & 0 deletions lib/ivapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ def method_missing(method_name, *args, &block)
return super unless client.respond_to?(method_name)
client.send(method_name, *args, &block)
end

def respond_to_missing?(method_name, include_private = false)
client.respond_to?(method_name, include_private)
end
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/ivapi/client/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def information
params = { command: 'account_info' }
get('/json.php', params)
end
alias_method :info, :information
alias info information

# Get account orders.
#
Expand Down
4 changes: 2 additions & 2 deletions lib/ivapi/client/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def information
params = { command: 'server_info', id: server_id }
get('/json.php', params)
end
alias_method :info, :information
alias info information

# Get server tasks.
#
Expand Down Expand Up @@ -146,7 +146,7 @@ def domain(domain)
params = { command: 'server_domain', id: server_id, domain: domain }
get('/json.php', params)
end
alias_method :hostname, :domain
alias hostname domain
end
end
end
2 changes: 1 addition & 1 deletion lib/ivapi/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def reset!
end
self
end
alias_method :setup, :reset!
alias setup reset!

private

Expand Down
4 changes: 4 additions & 0 deletions spec/ivapi/client/account_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
it 'should return account name' do
expect(@info.name).to eq('Name Surname')
end

it 'has alias info' do
expect(Ivapi.account.info).to eq(Ivapi.account.information)
end
end

describe 'account credits' do
Expand Down
9 changes: 4 additions & 5 deletions spec/ivapi_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
require 'spec_helper'

describe Ivapi do
# describe '.respond_to?' do
# it 'is true if method exists' do
# expect(Ivapi.respond_to?(:new, true)).to eq(true)
# end
# end
it 'responds to config' do
expect(Ivapi.respond_to?(:configure)).to be_truthy
end

# describe '.new' do
# it 'is a Ivapi::Client' do
Expand Down
4 changes: 1 addition & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
require 'simplecov'
require 'coveralls'
require 'codeclimate-test-reporter'

SimpleCov.formatters = [
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter,
CodeClimate::TestReporter::Formatter
Coveralls::SimpleCov::Formatter
]

SimpleCov.start
Expand Down

0 comments on commit e2e50b4

Please sign in to comment.