gtfs 0.4.1 → 0.4.2
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/.github/workflows/gem-push.yml +57 -0
- data/Gemfile.lock +3 -3
- data/Rakefile +19 -0
- data/gtfs.gemspec +1 -1
- data/lib/gtfs/version.rb +1 -1
- metadata +10 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94717ed4b4e1815033fdbca08e4a6db14dc4ae91ed511ee058a9c73cfdf15334
|
4
|
+
data.tar.gz: 2d7abf7dbeab020f9fcaf858b496086667cebfd35269048a7d8b1bd75af66e63
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 208ef2f0bbce52c54336ad2a6978168d3523f0bacebcf0ffa5742e614a1ae7f7ef55f571f3a690863a86c5af61c6d71a2897dc14966191532090bd937116efe4
|
7
|
+
data.tar.gz: 855905b764cef6204448acf20da94c23687d5b451b1e2a1b453c00a629c010cfb7740c578a3686bbe259788e7f30de9f1f5b49c87f9da32189b68a7cc03ce648
|
@@ -0,0 +1,57 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ "master" ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ "master" ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
build:
|
11
|
+
name: Build + Publish
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
permissions:
|
14
|
+
contents: read
|
15
|
+
packages: write
|
16
|
+
|
17
|
+
steps:
|
18
|
+
- uses: actions/checkout@v3
|
19
|
+
- name: Set up Ruby 2.6
|
20
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
21
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
22
|
+
# uses: ruby/setup-ruby@v1
|
23
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
24
|
+
with:
|
25
|
+
ruby-version: 2.6
|
26
|
+
|
27
|
+
- name: Check if version exists
|
28
|
+
id: checkversionexists
|
29
|
+
continue-on-error: true
|
30
|
+
run: |
|
31
|
+
bundle install
|
32
|
+
echo "version_status=$(rake check_version)" >> $GITHUB_OUTPUT
|
33
|
+
|
34
|
+
- name: Publish to GPR
|
35
|
+
if: ${{ steps.checkversionexists.outputs.version_status == 'new' }}
|
36
|
+
run: |
|
37
|
+
mkdir -p $HOME/.gem
|
38
|
+
touch $HOME/.gem/credentials
|
39
|
+
chmod 0600 $HOME/.gem/credentials
|
40
|
+
printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
41
|
+
gem build *.gemspec
|
42
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
43
|
+
env:
|
44
|
+
GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
|
45
|
+
OWNER: ${{ github.repository_owner }}
|
46
|
+
|
47
|
+
- name: Publish to RubyGems
|
48
|
+
if: ${{ steps.checkversionexists.outputs.version_status == 'new' }}
|
49
|
+
run: |
|
50
|
+
mkdir -p $HOME/.gem
|
51
|
+
touch $HOME/.gem/credentials
|
52
|
+
chmod 0600 $HOME/.gem/credentials
|
53
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
54
|
+
gem build *.gemspec
|
55
|
+
gem push *.gem
|
56
|
+
env:
|
57
|
+
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
data/Gemfile.lock
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
gtfs (0.4.
|
4
|
+
gtfs (0.4.2)
|
5
5
|
multi_json
|
6
6
|
rake
|
7
|
-
rubyzip (~>
|
7
|
+
rubyzip (~> 2.3)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
@@ -38,7 +38,7 @@ GEM
|
|
38
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
39
|
rspec-support (~> 3.11.0)
|
40
40
|
rspec-support (3.11.0)
|
41
|
-
rubyzip (
|
41
|
+
rubyzip (2.3.2)
|
42
42
|
simplecov (0.21.2)
|
43
43
|
docile (~> 1.1)
|
44
44
|
simplecov-html (~> 0.11)
|
data/Rakefile
CHANGED
@@ -1,8 +1,27 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rspec/core/rake_task'
|
3
|
+
require 'net/http'
|
4
|
+
require 'uri'
|
5
|
+
|
6
|
+
require './lib/gtfs/version'
|
3
7
|
|
4
8
|
RSpec::Core::RakeTask.new do |t|
|
5
9
|
t.pattern = './spec/**/*_spec.rb'
|
6
10
|
end
|
7
11
|
|
8
12
|
task :default => [:spec]
|
13
|
+
|
14
|
+
# Task to check if versin exists on rubygems
|
15
|
+
task :check_version do
|
16
|
+
version = GTFS::VERSION
|
17
|
+
# query api
|
18
|
+
url = "https://rubygems.org/api/v2/rubygems/gtfs/versions/#{version}"
|
19
|
+
|
20
|
+
response = Net::HTTP.get_response(URI.parse(url))
|
21
|
+
|
22
|
+
if response.code == '200'
|
23
|
+
puts 'exists'
|
24
|
+
else
|
25
|
+
puts 'new'
|
26
|
+
end
|
27
|
+
end
|
data/gtfs.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.add_dependency 'rake'
|
22
22
|
gem.add_dependency 'multi_json'
|
23
|
-
gem.add_dependency 'rubyzip', ['~>
|
23
|
+
gem.add_dependency 'rubyzip', ['~> 2.3']
|
24
24
|
|
25
25
|
gem.add_development_dependency 'rspec', ['>= 2.0.0']
|
26
26
|
gem.add_development_dependency 'simplecov'
|
data/lib/gtfs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gtfs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nerdEd
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '2.3'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '2.3'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,6 +131,7 @@ extensions: []
|
|
131
131
|
extra_rdoc_files: []
|
132
132
|
files:
|
133
133
|
- ".github/workflows/ci.yml"
|
134
|
+
- ".github/workflows/gem-push.yml"
|
134
135
|
- ".gitignore"
|
135
136
|
- Gemfile
|
136
137
|
- Gemfile.lock
|
@@ -192,7 +193,7 @@ homepage: https://github.com/nerdEd/gtfs
|
|
192
193
|
licenses:
|
193
194
|
- MIT
|
194
195
|
metadata: {}
|
195
|
-
post_install_message:
|
196
|
+
post_install_message:
|
196
197
|
rdoc_options: []
|
197
198
|
require_paths:
|
198
199
|
- lib
|
@@ -207,34 +208,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
208
|
- !ruby/object:Gem::Version
|
208
209
|
version: '0'
|
209
210
|
requirements: []
|
210
|
-
rubygems_version: 3.
|
211
|
-
signing_key:
|
211
|
+
rubygems_version: 3.0.3.1
|
212
|
+
signing_key:
|
212
213
|
specification_version: 4
|
213
214
|
summary: Load and read GTFS data from zip bundles
|
214
|
-
test_files:
|
215
|
-
- spec/fixtures/cassettes/invalid_gtfs_uri.yml
|
216
|
-
- spec/fixtures/cassettes/valid_gtfs_uri.yml
|
217
|
-
- spec/fixtures/missing_files.zip
|
218
|
-
- spec/fixtures/valid_gtfs.zip
|
219
|
-
- spec/gtfs/agency_spec.rb
|
220
|
-
- spec/gtfs/attribution_spec.rb
|
221
|
-
- spec/gtfs/calendar_date_spec.rb
|
222
|
-
- spec/gtfs/calendar_spec.rb
|
223
|
-
- spec/gtfs/fare_attribute_spec.rb
|
224
|
-
- spec/gtfs/fare_rule_spec.rb
|
225
|
-
- spec/gtfs/feed_info_spec.rb
|
226
|
-
- spec/gtfs/frequency_spec.rb
|
227
|
-
- spec/gtfs/level_spec.rb
|
228
|
-
- spec/gtfs/local_source_spec.rb
|
229
|
-
- spec/gtfs/pathway_spec.rb
|
230
|
-
- spec/gtfs/route_spec.rb
|
231
|
-
- spec/gtfs/shape_spec.rb
|
232
|
-
- spec/gtfs/source_spec.rb
|
233
|
-
- spec/gtfs/stop_spec.rb
|
234
|
-
- spec/gtfs/stop_time_spec.rb
|
235
|
-
- spec/gtfs/transfer_spec.rb
|
236
|
-
- spec/gtfs/translation_spec.rb
|
237
|
-
- spec/gtfs/trip_spec.rb
|
238
|
-
- spec/gtfs/url_source_spec.rb
|
239
|
-
- spec/spec_helper.rb
|
240
|
-
- spec/support/model_shared_examples.rb
|
215
|
+
test_files: []
|