ierail 0.4.1 → 0.5.0
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 +5 -5
- data/.coveralls.yml +1 -1
- data/.github/workflows/ruby.yml +34 -0
- data/Gemfile +1 -1
- data/LICENSE.txt +3 -6
- data/README.md +4 -13
- data/fixtures/vcr_cassettes/southbound.yml +220 -219
- data/fixtures/vcr_cassettes/southbound_from.yml +220 -219
- data/ierail.gemspec +12 -9
- data/lib/core_ext.rb +4 -2
- data/lib/ierail.rb +37 -30
- data/lib/station.rb +2 -0
- data/lib/station_data.rb +2 -0
- data/lib/train.rb +2 -0
- data/lib/train_movement.rb +7 -5
- data/test/unit/helper.rb +12 -8
- data/test/unit/ierail.rb +18 -25
- data/test/unit/station.rb +1 -1
- data/test/unit/station_data.rb +1 -5
- data/test/unit/train.rb +1 -1
- data/test/unit/train_movement.rb +1 -1
- metadata +56 -39
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 2375f7109a0421ae2e8225da848476434ab4152f3b747186feb00609b36fdb04
|
|
4
|
+
data.tar.gz: 4974d100fc1b33d93de733ee16df0786ae1e43d4d2a8c510b6ae30fb8962975d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e7d78fe55a7de764aa1cf675aeabb05c27b872406f34aeda37d020da35bf33c365c8fa5298900474f53aebf52c60605734ab76a9528101993d85688acf33b0f0
|
|
7
|
+
data.tar.gz: d21ca5632ce3cd4c1b15df9e166e6475975f0e14d4ec7caec04a7fb60aae6d629a42e49411c1219cbe78bdaa294f72737010334ebfeb76be141300c665bdfe65
|
data/.coveralls.yml
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
service_name: travis_ci
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: ["main"]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: ["main"]
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
test:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
strategy:
|
|
23
|
+
matrix:
|
|
24
|
+
ruby-version: ["3.4.1", "4.0.2"]
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v6
|
|
28
|
+
- name: Set up Ruby
|
|
29
|
+
uses: ruby/setup-ruby@v1
|
|
30
|
+
with:
|
|
31
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
32
|
+
bundler-cache: true
|
|
33
|
+
- name: Run tests
|
|
34
|
+
run: bundle exec rake
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Here is the license template:
|
|
4
|
-
|
|
5
|
-
Copyright (c) 2012-2015, Oisin Hurley
|
|
1
|
+
Copyright (c) 2012-2026, Oisin Hurley
|
|
6
2
|
All rights reserved.
|
|
7
3
|
|
|
8
4
|
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
9
5
|
|
|
10
6
|
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
11
7
|
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
12
|
-
|
|
8
|
+
|
|
9
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
[](https://travis-ci.org/oisin/ierail)
|
|
2
|
-
[](https://coveralls.io/r/oisin/ierail)
|
|
3
|
-
[](http://badge.fury.io/rb/ierail)
|
|
4
|
-
[](https://gemnasium.com/oisin/ierail)
|
|
5
|
-
[](https://codeclimate.com/github/oisin/ierail)
|
|
6
1
|
|
|
7
2
|
## Irish Rail API Ruby Wrapper
|
|
8
3
|
|
|
9
|
-
I wrote most of this on the train, as is appropriate.
|
|
4
|
+
I wrote most of this on the train, as is appropriate.
|
|
10
5
|
|
|
11
|
-
It's a trivial wrapper for the Irish Rail real time (whut?) train times system, in Ruby. It uses the HTTP GET API that was thankfully supplied along with the more *interesting* SOAP API, so a
|
|
6
|
+
It's a trivial wrapper for the Irish Rail real time (whut?) train times system, in Ruby. It uses the HTTP GET API that was thankfully supplied along with the more *interesting* SOAP API, so a straightforward set up with [RestClient](https://github.com/archiloque/rest-client) and [Nokogiri](http://nokogiri.org/) to pull and process the XML data into Hashes.
|
|
12
7
|
|
|
13
8
|
## Usage
|
|
14
9
|
|
|
@@ -103,7 +98,7 @@ Check the [main.rb](main.rb) for additional usage.
|
|
|
103
98
|
|
|
104
99
|
### Testing
|
|
105
100
|
|
|
106
|
-
Rather than having the test suite hit the API, this project is using [VCR](https://github.com/vcr/vcr) alongside [Timecop](https://github.com/travisjeffery/timecop) to use stubbed responses.
|
|
101
|
+
Rather than having the test suite hit the API, this project is using [VCR](https://github.com/vcr/vcr) alongside [Timecop](https://github.com/travisjeffery/timecop) to use stubbed responses.
|
|
107
102
|
These responses are stored in the `fixtures/vcr_cassettes` directory and can be updated by running
|
|
108
103
|
|
|
109
104
|
1. `rm -r fixtures`
|
|
@@ -113,8 +108,4 @@ As the API functionality is highly time dependent, Timecop is used to set/freeze
|
|
|
113
108
|
|
|
114
109
|
---
|
|
115
110
|
|
|
116
|
-
Pull requests welcome
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
[](https://bitdeli.com/free "Bitdeli Badge")
|
|
120
|
-
|
|
111
|
+
Pull requests welcome. Please accompany the pull request with an appropriate test, and if you can, an example here in the README.
|