mvg-live 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +13 -0
- data/Gemfile.lock +22 -21
- data/README.md +13 -2
- data/lib/mvg/live/parser.rb +5 -5
- data/lib/mvg/live/version.rb +1 -1
- data/mvg-live.gemspec +3 -3
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e4222555070fcead2af8588e50084b092c3f74c
|
4
|
+
data.tar.gz: 650901a3113cf6a99866dec667a994ba3a967211
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5c391a00ca12b82a902caf94d54542112185c3a8bece7db8da08b38956dda03d32e0aae97952b5c414121a25f28d7b349f9f196b4dfd50e85473d734a1548f7
|
7
|
+
data.tar.gz: 45f4191c56946bc2901a5c5e5b0e9d056781188b319164631dd07b34d2498c277c408229c38438ea38fdd627d5ea19f17277b719f2497cee868ca380a6a732ab
|
data/Dockerfile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
FROM ruby:2.3-alpine
|
2
|
+
|
3
|
+
RUN apk --update add --virtual build_deps \
|
4
|
+
build-base ruby-dev libc-dev linux-headers \
|
5
|
+
openssl-dev postgresql-dev libxml2-dev libxslt-dev && \
|
6
|
+
bundle config build.nokogiri --use-system-libraries && \
|
7
|
+
gem install mvg-live && \
|
8
|
+
apk del build_deps
|
9
|
+
|
10
|
+
RUN adduser -Ss /bin/sh mvg
|
11
|
+
USER mvg
|
12
|
+
|
13
|
+
ENTRYPOINT ["mvg"]
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
mvg-live (2.
|
5
|
-
activemodel (~>
|
6
|
-
activesupport (~>
|
4
|
+
mvg-live (2.2.0)
|
5
|
+
activemodel (~> 5.0)
|
6
|
+
activesupport (~> 5.0)
|
7
7
|
faraday (~> 0.9)
|
8
8
|
multi_json
|
9
9
|
nokogiri (~> 1.6)
|
@@ -11,32 +11,31 @@ PATH
|
|
11
11
|
GEM
|
12
12
|
remote: http://rubygems.org/
|
13
13
|
specs:
|
14
|
-
activemodel (
|
15
|
-
activesupport (=
|
16
|
-
|
17
|
-
|
14
|
+
activemodel (5.0.0)
|
15
|
+
activesupport (= 5.0.0)
|
16
|
+
activesupport (5.0.0)
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
18
|
i18n (~> 0.7)
|
19
|
-
json (~> 1.7, >= 1.7.7)
|
20
19
|
minitest (~> 5.1)
|
21
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
22
20
|
tzinfo (~> 1.1)
|
23
21
|
ansi (1.5.0)
|
24
22
|
builder (3.2.2)
|
25
23
|
coderay (1.1.1)
|
24
|
+
concurrent-ruby (1.0.2)
|
26
25
|
docile (1.1.5)
|
27
26
|
factory_girl (4.1.0)
|
28
27
|
activesupport (>= 3.0.0)
|
29
28
|
faraday (0.9.2)
|
30
29
|
multipart-post (>= 1.2, < 3)
|
31
30
|
i18n (0.7.0)
|
32
|
-
json (
|
31
|
+
json (2.0.1)
|
33
32
|
metaclass (0.0.4)
|
34
33
|
method_source (0.8.2)
|
35
|
-
mini_portile2 (2.
|
34
|
+
mini_portile2 (2.1.0)
|
36
35
|
minispec-metadata (2.0.0)
|
37
36
|
minitest
|
38
|
-
minitest (5.
|
39
|
-
minitest-reporters (1.1.
|
37
|
+
minitest (5.9.0)
|
38
|
+
minitest-reporters (1.1.9)
|
40
39
|
ansi
|
41
40
|
builder
|
42
41
|
minitest (>= 5.0)
|
@@ -47,26 +46,28 @@ GEM
|
|
47
46
|
vcr (>= 2.9)
|
48
47
|
mocha (1.1.0)
|
49
48
|
metaclass (~> 0.0.1)
|
50
|
-
multi_json (1.
|
49
|
+
multi_json (1.12.1)
|
51
50
|
multipart-post (2.0.0)
|
52
|
-
nokogiri (1.6.
|
53
|
-
mini_portile2 (~> 2.
|
51
|
+
nokogiri (1.6.8)
|
52
|
+
mini_portile2 (~> 2.1.0)
|
53
|
+
pkg-config (~> 1.1.7)
|
54
|
+
pkg-config (1.1.7)
|
54
55
|
pry (0.10.3)
|
55
56
|
coderay (~> 1.1.0)
|
56
57
|
method_source (~> 0.8.1)
|
57
58
|
slop (~> 3.4)
|
58
|
-
rake (11.
|
59
|
-
ruby-progressbar (1.
|
60
|
-
simplecov (0.
|
59
|
+
rake (11.2.2)
|
60
|
+
ruby-progressbar (1.8.1)
|
61
|
+
simplecov (0.12.0)
|
61
62
|
docile (~> 1.1.0)
|
62
|
-
json (
|
63
|
+
json (>= 1.8, < 3)
|
63
64
|
simplecov-html (~> 0.10.0)
|
64
65
|
simplecov-html (0.10.0)
|
65
66
|
slop (3.6.0)
|
66
67
|
thread_safe (0.3.5)
|
67
68
|
tzinfo (1.2.2)
|
68
69
|
thread_safe (~> 0.1)
|
69
|
-
vcr (3.0.
|
70
|
+
vcr (3.0.3)
|
70
71
|
|
71
72
|
PLATFORMS
|
72
73
|
ruby
|
data/README.md
CHANGED
@@ -14,9 +14,20 @@ A ruby client and CLI for mvg-live.de the real-time interface for Munich's publi
|
|
14
14
|
[![Flattr](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=flattr&url=https://github.com/rmoriz/mvg-live&title=mvg-live%20rubygem&description=mvg-live%20rubygem&language=de_DE&tags=fahrplan,mvg,swm,ruby,code,u-bahn,s-bahn,tram,muenchen&category=software)
|
15
15
|
|
16
16
|
|
17
|
-
## Installation
|
17
|
+
## Installation
|
18
18
|
|
19
|
-
|
19
|
+
|
20
|
+
### Docker
|
21
|
+
|
22
|
+
```shell
|
23
|
+
docker pull rmoriz/mvg-live:latest
|
24
|
+
docker run -it --rm rmoriz/mvg-live Marienplatz
|
25
|
+
```
|
26
|
+
### Rubygem
|
27
|
+
|
28
|
+
```shell
|
29
|
+
gem install mvg-live
|
30
|
+
```
|
20
31
|
|
21
32
|
Please use Ruby 2.2.x or greater.
|
22
33
|
|
data/lib/mvg/live/parser.rb
CHANGED
@@ -44,17 +44,17 @@ module MVG
|
|
44
44
|
results << result
|
45
45
|
end
|
46
46
|
|
47
|
-
|
48
|
-
@result_display = results
|
49
|
-
@result_sorted = results.sort_by.with_index { |i,| [i[:minutes], i[:line], i[:destination]] }
|
50
|
-
@result_sorted
|
51
|
-
else
|
47
|
+
if results.empty?
|
52
48
|
@station_unknown = true
|
53
49
|
@station_alternates = []
|
54
50
|
|
55
51
|
@doc.xpath('//table[@class="departureTable header"]//li/a/text()').each do |alt|
|
56
52
|
@station_alternates << to_utf8(alt.to_s.strip)
|
57
53
|
end
|
54
|
+
else
|
55
|
+
@result_display = results
|
56
|
+
@result_sorted = results.sort_by.with_index { |i,| [i[:minutes], i[:line], i[:destination]] }
|
57
|
+
@result_sorted
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
data/lib/mvg/live/version.rb
CHANGED
data/mvg-live.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
19
19
|
s.require_paths = ['lib']
|
20
20
|
|
21
|
-
s.required_ruby_version = '>=
|
21
|
+
s.required_ruby_version = '>= 2.2.0'
|
22
22
|
|
23
23
|
s.add_runtime_dependency 'jruby-openssl' if RUBY_PLATFORM == 'java'
|
24
24
|
|
@@ -31,8 +31,8 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_development_dependency 'mocha', '~> 1.1'
|
32
32
|
s.add_development_dependency 'simplecov'
|
33
33
|
|
34
|
-
s.add_runtime_dependency 'activesupport', '~>
|
35
|
-
s.add_runtime_dependency 'activemodel', '~>
|
34
|
+
s.add_runtime_dependency 'activesupport', '~> 5.0'
|
35
|
+
s.add_runtime_dependency 'activemodel', '~> 5.0'
|
36
36
|
s.add_runtime_dependency 'faraday', '~> 0.9'
|
37
37
|
s.add_runtime_dependency 'nokogiri', '~> 1.6'
|
38
38
|
s.add_runtime_dependency 'multi_json'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvg-live
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roland Moriz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -128,28 +128,28 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '5.0'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '5.0'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: activemodel
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '5.0'
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '5.0'
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: faraday
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -204,6 +204,7 @@ extra_rdoc_files: []
|
|
204
204
|
files:
|
205
205
|
- ".gitignore"
|
206
206
|
- ".travis.yml"
|
207
|
+
- Dockerfile
|
207
208
|
- Gemfile
|
208
209
|
- Gemfile.lock
|
209
210
|
- LICENSE
|
@@ -253,7 +254,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
253
254
|
requirements:
|
254
255
|
- - ">="
|
255
256
|
- !ruby/object:Gem::Version
|
256
|
-
version:
|
257
|
+
version: 2.2.0
|
257
258
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
258
259
|
requirements:
|
259
260
|
- - ">="
|