ivapi 1.4.0 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1812f258195ad8e60796f3d69c8ceb2970e3dfe8
4
- data.tar.gz: cb36492270d13fb6cc574c35eed4598cd9bea76c
2
+ SHA256:
3
+ metadata.gz: 93427d4d6fc8a64c97748850eb8a6be15959009e34652c30b504017d8e9af889
4
+ data.tar.gz: '0084fd3d8166682e08cd15bbfe78bf4aee922cc30fff91fee6655e00611b0f8b'
5
5
  SHA512:
6
- metadata.gz: c6c5598e4ad005d0863ffffb2604650e2d30d3479984de63151b3ec6a5d77b895ed8da5219d1f12188bd177508a4576c7e91f773253b8d5e71389af2c1bc91b9
7
- data.tar.gz: a3c5d180ef3c0d73561aca64757b0c5dff266c547c967214e8a8b2945bd01f696f45ce02fd16a55ef14978aea13bf22d0f48f18f631c4d8f7f6baa81f3061df0
6
+ metadata.gz: f806c029ea495397be54aad4407161d28fd7db5c630712ac27b92c379dfb07be2f21cde883b3b17a12e581f07d37d8bcedb7409b266883c3984cd0799695b7bc
7
+ data.tar.gz: 8252f607f692b68eb9f213bf25bbd28944edaa30673ccffd13d55cb600c55921d1a0df1502879947d7c28a48fa7a7bca9c6413e41d0cbe70bb91ccd7ab90318b
@@ -1,35 +1,35 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.0
2
+ TargetRubyVersion: 2.1
3
3
  Include:
4
4
  - '**/Rakefile'
5
5
  - '**/Gemfile'
6
6
 
7
- Style/Documentation:
8
- Enabled: false
9
-
10
- Style/AlignParameters:
7
+ Layout/AlignParameters:
11
8
  Enabled: true
12
9
  EnforcedStyle: with_fixed_indentation
13
10
 
14
- Style/MultilineOperationIndentation:
11
+ Layout/MultilineOperationIndentation:
15
12
  Enabled: true
16
13
  EnforcedStyle: indented
17
14
 
18
- Style/MultilineMethodCallIndentation:
15
+ Layout/MultilineMethodCallIndentation:
19
16
  Enabled: true
20
17
  EnforcedStyle: indented
21
18
 
22
- Style/CaseIndentation:
19
+ Layout/CaseIndentation:
23
20
  Enabled: true
24
21
  EnforcedStyle: end
25
22
 
26
- Lint/EndAlignment:
23
+ Layout/EndAlignment:
27
24
  Enabled: true
28
25
  EnforcedStyleAlignWith: variable
29
26
 
30
27
  Style/FrozenStringLiteralComment:
31
28
  Enabled: false
32
29
 
30
+ Style/Documentation:
31
+ Enabled: false
32
+
33
33
  Metrics/BlockLength:
34
- ExcludedMethods:
35
- - 'describe'
34
+ Exclude:
35
+ - 'spec/**/*_spec.rb'
@@ -1,25 +1,36 @@
1
1
  sudo: false
2
+ bundler_args: --without development
2
3
 
3
- before_install:
4
- - gem install bundler
4
+ cache:
5
+ bundler: true
5
6
 
6
- after_success:
7
- - bundle exec codeclimate-test-reporter
8
-
9
- bundler_args: --without development
7
+ env:
8
+ global:
9
+ - CC_TEST_REPORTER_ID=660deb8e8362570711ce3f81fd8995f6957641ac856d44b9347028facbe5ef24
10
10
 
11
11
  language: ruby
12
-
13
12
  rvm:
14
- - 2.0.0
15
13
  - 2.1.0
16
14
  - 2.2.0
17
15
  - 2.3.0
18
16
  - 2.4.0
17
+ - 2.5.0
19
18
  - ruby-head
20
- - jruby-head
19
+
20
+ before_install:
21
+ - gem update --system
22
+
23
+ before_script:
24
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
25
+ - chmod +x ./cc-test-reporter
26
+ - ./cc-test-reporter before-build
27
+
28
+ script:
29
+ - bundle exec rspec
30
+
31
+ after_script:
32
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
21
33
 
22
34
  matrix:
23
35
  allow_failures:
24
36
  - rvm: ruby-head
25
- - rvm: jruby-head
data/Gemfile CHANGED
@@ -1,13 +1,14 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
+ group :development do
4
+ gem 'rubocop', '~> 0.53'
5
+ end
6
+
3
7
  group :test do
4
- gem 'codeclimate-test-reporter', '~> 1.0', require: false
5
- gem 'coveralls', '~> 0.8', require: false
6
8
  gem 'rake' # We need a rake gem for Travis CI.
7
- gem 'rspec', '~> 3.6'
8
- gem 'rubocop', '~> 0.49'
9
+ gem 'rspec', '~> 3.7'
9
10
  gem 'simplecov', '~> 0.14', require: false
10
- gem 'webmock', '~> 3.0'
11
+ gem 'webmock', '~> 3.3'
11
12
  end
12
13
 
13
14
  gemspec
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2017 Justas Palumickas
3
+ Copyright (c) 2018 Justas Palumickas
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem which helps to communicate with Interneto vizija [https://www.iv.lt][iv.lt] ([https://wwww.dedikuoti.lt][dedikuoti.lt]) API.
4
4
 
5
- [![Gem Version](http://img.shields.io/gem/v/ivapi.svg?style=flat-square)][rubygems]
6
- [![Build Status](http://img.shields.io/travis/jpalumickas/ivapi.svg?style=flat-square)][travis]
7
- [![Dependency Status](http://img.shields.io/gemnasium/jpalumickas/ivapi.svg?style=flat-square)][gemnasium]
8
- [![Coverage Status](http://img.shields.io/coveralls/jpalumickas/ivapi/master.svg?style=flat-square)][coveralls]
9
- [![Code Climate](http://img.shields.io/codeclimate/github/jpalumickas/ivapi.svg?style=flat-square)][codeclimate]
5
+ [![Gem Version](https://img.shields.io/gem/v/ivapi.svg?style=flat-square)][rubygems]
6
+ [![Build Status](https://img.shields.io/travis/jpalumickas/ivapi.svg?style=flat-square)][travis]
7
+ [![Dependency Status](https://img.shields.io/gemnasium/jpalumickas/ivapi.svg?style=flat-square)][gemnasium]
8
+ [![Code Climate](https://img.shields.io/codeclimate/maintainability/jpalumickas/ivapi.svg?style=flat-square)][codeclimate]
9
+ [![Test Coverage](https://img.shields.io/codeclimate/c/jpalumickas/ivapi.svg?style=flat-square)][codeclimate_coverage]
10
10
 
11
11
  ## Installation
12
12
 
@@ -73,21 +73,21 @@ Ivapi.server.information
73
73
  This library aims to support and is [tested against][travis] the following Ruby
74
74
  versions:
75
75
 
76
- * Ruby 2.0.0
77
76
  * Ruby 2.1.0
78
77
  * Ruby 2.2.0
79
78
  * Ruby 2.3.0
80
79
  * Ruby 2.4.0
80
+ * Ruby 2.5.0
81
81
 
82
82
  ## Copyright
83
- Copyright (c) 2012-2017 Justas Palumickas.
83
+ Copyright (c) 2012-2018 Justas Palumickas.
84
84
  See [LICENSE][license] for details.
85
85
 
86
86
  [rubygems]: https://rubygems.org/gems/ivapi
87
- [travis]: http://travis-ci.org/jpalumickas/ivapi
87
+ [travis]: https://travis-ci.org/jpalumickas/ivapi
88
88
  [gemnasium]: https://gemnasium.com/jpalumickas/ivapi
89
- [coveralls]: https://coveralls.io/r/jpalumickas/ivapi
90
89
  [codeclimate]: https://codeclimate.com/github/jpalumickas/ivapi
90
+ [codeclimate_coverage]: https://codeclimate.com/github/jpalumickas/ivapi/test_coverage
91
91
 
92
92
  [iv.lt]: https://www.iv.lt
93
93
  [dedikuoti.lt]: https://www.dedikuoti.lt
@@ -1,6 +1,4 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
4
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
3
  require 'ivapi/version'
6
4
 
@@ -9,11 +7,12 @@ Gem::Specification.new do |gem|
9
7
  gem.author = 'Justas Palumickas'
10
8
  gem.email = 'jpalumickas@gmail.com'
11
9
  gem.description = 'Gem which helps to communicate with https://www.iv.lt API.'
12
- gem.summary = 'Ruby wrapper for working with Interneto Vizija API.'
10
+ gem.summary = 'Ruby wrapper for Interneto Vizija API.'
13
11
  gem.homepage = 'https://github.com/jpalumickas/ivapi/'
14
12
  gem.license = 'MIT'
15
- gem.required_ruby_version = '>= 2.0.0'
16
- gem.requirements << 'Interneto Vizija allow to use API only on them servers.'
13
+ gem.required_ruby_version = '>= 2.1.0'
14
+ gem.requirements << 'Interneto Vizija only allows to use API on their' \
15
+ 'servers.'
17
16
 
18
17
  gem.files = `git ls-files -z`.split("\x0")
19
18
  gem.executables = gem.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -21,7 +20,7 @@ Gem::Specification.new do |gem|
21
20
  gem.require_paths = ['lib']
22
21
 
23
22
  gem.add_dependency 'faraday', '~> 0.10'
24
- gem.add_dependency 'faraday_middleware', '~> 0.11'
23
+ gem.add_dependency 'faraday_middleware', '~> 0.10'
25
24
  gem.add_dependency 'hashie', '~> 3.5.5'
26
25
 
27
26
  gem.add_development_dependency 'bundler', '~> 1.6'
@@ -35,16 +35,16 @@ module Ivapi
35
35
 
36
36
  # Get server graphs.
37
37
  #
38
- # width - The Integer number of graphs width (max: 1000, optimal: 768).
39
- # ip - The String of ip, from which graphs can be viewed.
38
+ # width - The Integer of graphs width (max: 1000, optimal: 768).
39
+ # server_ip - The String of ip, from which graphs can be viewed.
40
40
  #
41
41
  # Returns the Hash of server graphs.
42
- def graphs(width, ip)
42
+ def graphs(width, server_ip)
43
43
  params = {
44
44
  command: 'server_graphs',
45
45
  id: server_id,
46
46
  width: width,
47
- ip: ip
47
+ ip: server_ip
48
48
  }
49
49
 
50
50
  get('/json.php', params)
@@ -68,15 +68,15 @@ module Ivapi
68
68
 
69
69
  # Send command to recreate the server.
70
70
  #
71
- # os - The String of os (operating system) id.
72
- # options - The Hash options (default: {}):
73
- # :new_password - The String of new server
74
- # password (min: 8, max: 64).
71
+ # server_os - The String of os (operating system) id.
72
+ # options - The Hash options (default: {}):
73
+ # :new_password - The String of new server
74
+ # password (min: 8, max: 64).
75
75
  #
76
76
  # Returns the Integer of task id.
77
- def recreate(os, options = {})
77
+ def recreate(server_os, options = {})
78
78
  params = options.merge(
79
- command: 'server_recreate', id: server_id, os: os
79
+ command: 'server_recreate', id: server_id, os: server_os
80
80
  )
81
81
 
82
82
  get('/json.php', params)
@@ -137,15 +137,15 @@ module Ivapi
137
137
 
138
138
  # Moves additional IP to another server.
139
139
  #
140
- # ip - The String of additional IP.
140
+ # server_ip - The String of additional IP.
141
141
  # target_id - The String of another server id.
142
142
  #
143
143
  # Returns the Hash with information.
144
- def move_ip(ip, target_id)
144
+ def move_ip(server_ip, target_id)
145
145
  params = {
146
146
  command: 'server_move_ip',
147
147
  id: server_id,
148
- ip: ip,
148
+ ip: server_ip,
149
149
  target_id: target_id
150
150
  }
151
151
 
@@ -1,3 +1,3 @@
1
1
  module Ivapi
2
- VERSION = '1.4.0'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
@@ -1,9 +1,7 @@
1
1
  require 'simplecov'
2
- require 'coveralls'
3
2
 
4
3
  SimpleCov.formatters = [
5
- SimpleCov::Formatter::HTMLFormatter,
6
- Coveralls::SimpleCov::Formatter
4
+ SimpleCov::Formatter::HTMLFormatter
7
5
  ]
8
6
 
9
7
  SimpleCov.start
@@ -12,7 +10,7 @@ require 'ivapi'
12
10
  require 'rspec'
13
11
  require 'webmock/rspec'
14
12
 
15
- WebMock.disable_net_connect!(allow: ['coveralls.io', 'codeclimate.com'])
13
+ WebMock.disable_net_connect!(allow: ['codeclimate.com'])
16
14
 
17
15
  RSpec.configure do |config|
18
16
  config.expect_with :rspec do |c|
@@ -33,7 +31,7 @@ def stub_command(command, options = {})
33
31
  end
34
32
 
35
33
  def fixture_path
36
- File.expand_path('../fixtures', __FILE__)
34
+ File.expand_path('fixtures', __dir__)
37
35
  end
38
36
 
39
37
  def fixture(file)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ivapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justas Palumickas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-07 00:00:00.000000000 Z
11
+ date: 2018-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0.11'
33
+ version: '0.10'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0.11'
40
+ version: '0.10'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: hashie
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -150,19 +150,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - ">="
152
152
  - !ruby/object:Gem::Version
153
- version: 2.0.0
153
+ version: 2.1.0
154
154
  required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - ">="
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements:
160
- - Interneto Vizija allow to use API only on them servers.
160
+ - Interneto Vizija only allows to use API on theirservers.
161
161
  rubyforge_project:
162
- rubygems_version: 2.6.12
162
+ rubygems_version: 2.7.6
163
163
  signing_key:
164
164
  specification_version: 4
165
- summary: Ruby wrapper for working with Interneto Vizija API.
165
+ summary: Ruby wrapper for Interneto Vizija API.
166
166
  test_files:
167
167
  - spec/fixtures/account_bonuses.json
168
168
  - spec/fixtures/account_credits.json