evestatic 0.0.43 → 0.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/evestatic/stations.rb +5 -3
- data/lib/evestatic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b34513d5f6c5ee93eb6b1fd609add55eaea3049
|
4
|
+
data.tar.gz: 969ea70bc1a0263e7e05f1f37fd041549911ed5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0d8a57818aa7b8490115f13b27aaa342590f3b042e5240d1054e162fb559cf17e70336a1f50b3fc51b9ea1019f52db9f9037e925b7bd6405960983de4f7698e
|
7
|
+
data.tar.gz: b7a1236122a4422822323e6ffb29239d359d708a9f3e07d2ee14cbd520c4e3ca32ae13229d770c99d3e94971c95f1ca64dc42a4c4f58204cde19314457b34a5c
|
data/lib/evestatic/stations.rb
CHANGED
@@ -3,7 +3,7 @@ require 'csv'
|
|
3
3
|
module Evestatic
|
4
4
|
class Station
|
5
5
|
|
6
|
-
attr_accessor :station_id, :station_name
|
6
|
+
attr_accessor :station_id, :station_name, :solarsystem_id, :region_id
|
7
7
|
|
8
8
|
@@stations = {}
|
9
9
|
|
@@ -14,7 +14,7 @@ module Evestatic
|
|
14
14
|
def self.load_from_file(path)
|
15
15
|
begin
|
16
16
|
CSV.foreach(path, {col_sep: ";", headers: true}) do |row|
|
17
|
-
@@stations[row[0].to_i] = self.new(row[0].to_i, row[11])
|
17
|
+
@@stations[row[0].to_i] = self.new(row[0].to_i, row[11], row[9].to_i, row[10].to_i)
|
18
18
|
end
|
19
19
|
rescue CSV::MalformedCSVError
|
20
20
|
#trololol do nothing, we have all data, dont care if the newlines are windows mess or whatever
|
@@ -42,9 +42,11 @@ module Evestatic
|
|
42
42
|
@@stations.values.collect { |v| v if v.station_name.include? name }.compact
|
43
43
|
end
|
44
44
|
|
45
|
-
def initialize(station_id, station_name)
|
45
|
+
def initialize(station_id, station_name,solarsystem_id,region_id)
|
46
46
|
self.station_id = station_id
|
47
47
|
self.station_name = station_name
|
48
|
+
self.solarsystem_id = solarsystem_id
|
49
|
+
self.region_id = region_id
|
48
50
|
end
|
49
51
|
|
50
52
|
load!
|
data/lib/evestatic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: evestatic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.44
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marv Cool
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-09-
|
11
|
+
date: 2013-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|