eveapi 0.0.3.pre → 0.0.4.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.gitmodules +3 -0
- data/Gemfile +7 -0
- data/README.md +38 -5
- data/Rakefile +43 -0
- data/gemspec.yml +5 -1
- data/lib/eveapi.rb +3 -0
- data/lib/eveapi/client.rb +36 -1
- data/lib/eveapi/console.rb +5 -0
- data/lib/eveapi/request.rb +22 -12
- data/lib/eveapi/util.rb +35 -0
- data/lib/eveapi/version.rb +1 -1
- data/spec/cassettes/EVEApi/calling_a_method_not_present_in_the_EVEApi_should_fail.yml +106 -0
- data/spec/cassettes/EVEApi/calling_a_method_present_in_the_EVEApi_should_success.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_account_account_status.yml +33 -0
- data/spec/cassettes/EVEApi/calling_api_method_account_api_key_info.yml +35 -0
- data/spec/cassettes/EVEApi/calling_api_method_account_characters.yml +34 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_account_balance.yml +32 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_asset_list.yml +79 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_character_sheet.yml +79 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_contact_list.yml +47 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_contact_notifications.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_contracts.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_industry_jobs.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_mail_messages.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_mailing_lists.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_market_orders.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_medals.yml +32 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_notifications.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_research.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_skill_in_training.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_skill_queue.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_standings.yml +45 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_upcoming_calendar_events.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_wallet_journal.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_char_wallet_transactions.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_method_server_server_status.yml +31 -0
- data/spec/cassettes/EVEApi/calling_api_methods_should_return_an_Array_of_method_symobls.yml +160 -0
- data/spec/eveapi_spec.rb +41 -29
- data/spec/spec_helper.rb +8 -0
- metadata +88 -3
data/spec/eveapi_spec.rb
CHANGED
@@ -1,46 +1,58 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'eveapi'
|
3
3
|
|
4
|
-
describe EVEApi do
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
describe EVEApi, :vcr do
|
5
|
+
before :each do
|
6
|
+
@client = Client.new
|
7
|
+
end
|
8
|
+
it "there should be a connection class" do
|
9
|
+
expect { @client }.not_to raise_error
|
10
|
+
end
|
9
11
|
|
10
|
-
|
11
|
-
|
12
|
-
|
12
|
+
it "connection instance variable should be of class Excon::Connection" do
|
13
|
+
expect(@client.connection).to be_a(Excon::Connection)
|
14
|
+
end
|
13
15
|
|
14
|
-
|
15
|
-
|
16
|
-
|
16
|
+
it "check_path method should return an empty string when name contains of 1 part" do
|
17
|
+
expect(@client.check_path('name')).to eq('')
|
18
|
+
end
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
it "check_path method should return a path string when name contains of 2 or more parts" do
|
21
|
+
expect(@client.check_path('name_name')).to be_a(String)
|
22
|
+
expect(@client.check_path('name_name')).not_to be_empty
|
23
|
+
end
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
it "params should return an empty hash when no param variables present" do
|
26
|
+
expect(Client.new.params).to be_a(Hash)
|
27
|
+
expect(Client.new.params).to be_empty
|
28
|
+
end
|
27
29
|
|
28
|
-
|
29
|
-
|
30
|
-
|
30
|
+
it "calling a method present in the EVEApi should success" do
|
31
|
+
expect { @client.server_server_status }.not_to raise_error
|
32
|
+
end
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
-
|
34
|
+
it "calling a method not present in the EVEApi should fail" do
|
35
|
+
expect { @client.some_bs_method }.to raise_error(RuntimeError)
|
36
|
+
end
|
37
|
+
|
38
|
+
it "calling api_methods should return an Array of method symobls" do
|
39
|
+
expect(@client.api_methods).to be_an(Array)
|
40
|
+
end
|
35
41
|
|
36
|
-
|
37
|
-
|
42
|
+
Client.new.working_methods.each do |m|
|
43
|
+
before :each do
|
44
|
+
@client.key_id = "4278167"
|
45
|
+
@client.vcode = "supersecretstuff"
|
46
|
+
@client.character_id = '95512059'
|
47
|
+
end
|
48
|
+
it "calling api method #{m}" do
|
49
|
+
expect { @client.send(m) }.not_to raise_error
|
38
50
|
end
|
39
51
|
end
|
40
52
|
end
|
41
53
|
|
42
|
-
describe EVEApi::Request do
|
54
|
+
describe EVEApi::Request, :vcr do
|
43
55
|
it 'there should be a EVEApi::Response class' do
|
44
|
-
expect {
|
56
|
+
expect { Request }.not_to raise_error
|
45
57
|
end
|
46
58
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,5 +6,13 @@ require "codeclimate-test-reporter"
|
|
6
6
|
CodeClimate::TestReporter.start
|
7
7
|
require 'rspec'
|
8
8
|
require 'eveapi/version'
|
9
|
+
require 'vcr'
|
9
10
|
|
10
11
|
include EVEApi
|
12
|
+
|
13
|
+
VCR.configure do |c|
|
14
|
+
c.cassette_library_dir = 'spec/cassettes'
|
15
|
+
c.hook_into :webmock
|
16
|
+
c.configure_rspec_metadata!
|
17
|
+
c.ignore_hosts 'codeclimate.com'
|
18
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eveapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Ladachowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -108,6 +108,62 @@ dependencies:
|
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: vcr
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ~>
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '2.9'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ~>
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '2.9'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ~>
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '1'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ~>
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pry
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.10'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.10'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: awesome_print
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ~>
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '1.6'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ~>
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '1.6'
|
111
167
|
description: ruby API Client for the space based MMO EVEOnline
|
112
168
|
email: adam@saiden.pl
|
113
169
|
executables: []
|
@@ -119,6 +175,7 @@ extra_rdoc_files:
|
|
119
175
|
files:
|
120
176
|
- .document
|
121
177
|
- .gitignore
|
178
|
+
- .gitmodules
|
122
179
|
- .rdoc_options
|
123
180
|
- .rspec
|
124
181
|
- .travis.yml
|
@@ -132,11 +189,39 @@ files:
|
|
132
189
|
- gemspec.yml
|
133
190
|
- lib/eveapi.rb
|
134
191
|
- lib/eveapi/client.rb
|
192
|
+
- lib/eveapi/console.rb
|
135
193
|
- lib/eveapi/request.rb
|
194
|
+
- lib/eveapi/util.rb
|
136
195
|
- lib/eveapi/version.rb
|
196
|
+
- spec/cassettes/EVEApi/calling_a_method_not_present_in_the_EVEApi_should_fail.yml
|
197
|
+
- spec/cassettes/EVEApi/calling_a_method_present_in_the_EVEApi_should_success.yml
|
198
|
+
- spec/cassettes/EVEApi/calling_api_method_account_account_status.yml
|
199
|
+
- spec/cassettes/EVEApi/calling_api_method_account_api_key_info.yml
|
200
|
+
- spec/cassettes/EVEApi/calling_api_method_account_characters.yml
|
201
|
+
- spec/cassettes/EVEApi/calling_api_method_char_account_balance.yml
|
202
|
+
- spec/cassettes/EVEApi/calling_api_method_char_asset_list.yml
|
203
|
+
- spec/cassettes/EVEApi/calling_api_method_char_character_sheet.yml
|
204
|
+
- spec/cassettes/EVEApi/calling_api_method_char_contact_list.yml
|
205
|
+
- spec/cassettes/EVEApi/calling_api_method_char_contact_notifications.yml
|
206
|
+
- spec/cassettes/EVEApi/calling_api_method_char_contracts.yml
|
207
|
+
- spec/cassettes/EVEApi/calling_api_method_char_industry_jobs.yml
|
208
|
+
- spec/cassettes/EVEApi/calling_api_method_char_mail_messages.yml
|
209
|
+
- spec/cassettes/EVEApi/calling_api_method_char_mailing_lists.yml
|
210
|
+
- spec/cassettes/EVEApi/calling_api_method_char_market_orders.yml
|
211
|
+
- spec/cassettes/EVEApi/calling_api_method_char_medals.yml
|
212
|
+
- spec/cassettes/EVEApi/calling_api_method_char_notifications.yml
|
213
|
+
- spec/cassettes/EVEApi/calling_api_method_char_research.yml
|
214
|
+
- spec/cassettes/EVEApi/calling_api_method_char_skill_in_training.yml
|
215
|
+
- spec/cassettes/EVEApi/calling_api_method_char_skill_queue.yml
|
216
|
+
- spec/cassettes/EVEApi/calling_api_method_char_standings.yml
|
217
|
+
- spec/cassettes/EVEApi/calling_api_method_char_upcoming_calendar_events.yml
|
218
|
+
- spec/cassettes/EVEApi/calling_api_method_char_wallet_journal.yml
|
219
|
+
- spec/cassettes/EVEApi/calling_api_method_char_wallet_transactions.yml
|
220
|
+
- spec/cassettes/EVEApi/calling_api_method_server_server_status.yml
|
221
|
+
- spec/cassettes/EVEApi/calling_api_methods_should_return_an_Array_of_method_symobls.yml
|
137
222
|
- spec/eveapi_spec.rb
|
138
223
|
- spec/spec_helper.rb
|
139
|
-
homepage: https://
|
224
|
+
homepage: https://github.com/aladac/eveapi
|
140
225
|
licenses:
|
141
226
|
- MIT
|
142
227
|
metadata: {}
|