Skip to content

Commit 1304ed5

Browse files
committed
bump ruby and bundler gemlock version; lint; add -2 translation tests and fixtures;
1 parent dffa052 commit 1304ed5

15 files changed

+1763
-58
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.2.2
1+
3.3.4

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:3.2.2
1+
FROM ruby:3.3.4
22

33
RUN apt-get update -q
44

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
source 'https://rubygems.org'
44
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
55

6-
ruby '3.2.2'
6+
ruby '3.3.4'
77

88
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails', branch: 'main'
99
gem 'rails', '~> 6.0.6', '>= 6.0.6.1'
@@ -23,7 +23,7 @@ gem 'psych', '< 4.0.0'
2323

2424
gem 'adiwg-mdtranslator',
2525
git: 'https://github.com/GSA/mdTranslator.git',
26-
branch: 'datagov'
26+
branch: 'master'
2727

2828
# Use Active Storage variant
2929
# gem 'image_processing', '~> 1.2'

Gemfile.lock

Lines changed: 83 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GIT
22
remote: https://github.com/GSA/mdTranslator.git
3-
revision: fe10f1d66171757f87be54e3053e0c09821500b4
4-
branch: datagov
3+
revision: 95b5c77ed64700e21c2cf0fc48158c9259eba8cf
4+
branch: master
55
specs:
66
adiwg-mdtranslator (2.20.0.pre.beta.5)
77
adiwg-mdcodes (= 2.10.0)
@@ -74,76 +74,93 @@ GEM
7474
minitest (~> 5.1)
7575
tzinfo (~> 1.1)
7676
zeitwerk (~> 2.2, >= 2.2.2)
77-
addressable (2.8.6)
78-
public_suffix (>= 2.0.2, < 6.0)
77+
addressable (2.8.7)
78+
public_suffix (>= 2.0.2, < 7.0)
7979
adiwg-mdcodes (2.10.0)
8080
json (~> 2.0)
8181
adiwg-mdjson_schemas (2.9.5)
8282
ast (2.4.2)
83-
bootsnap (1.17.0)
83+
bootsnap (1.18.4)
8484
msgpack (~> 1.2)
85-
builder (3.2.4)
85+
builder (3.3.0)
8686
byebug (11.1.3)
8787
coderay (1.1.3)
88-
concurrent-ruby (1.2.2)
88+
concurrent-ruby (1.3.4)
8989
crass (1.0.6)
90-
date (3.3.4)
91-
erubi (1.12.0)
92-
ffi (1.16.3)
90+
date (3.4.0)
91+
erubi (1.13.0)
92+
ffi (1.17.0-aarch64-linux-gnu)
93+
ffi (1.17.0-aarch64-linux-musl)
94+
ffi (1.17.0-arm-linux-gnu)
95+
ffi (1.17.0-arm-linux-musl)
96+
ffi (1.17.0-arm64-darwin)
97+
ffi (1.17.0-x86-linux-gnu)
98+
ffi (1.17.0-x86-linux-musl)
99+
ffi (1.17.0-x86_64-darwin)
100+
ffi (1.17.0-x86_64-linux-gnu)
101+
ffi (1.17.0-x86_64-linux-musl)
93102
globalid (1.1.0)
94103
activesupport (>= 5.0)
95-
i18n (1.14.1)
104+
i18n (1.14.6)
96105
concurrent-ruby (~> 1.0)
97-
jbuilder (2.12.0)
106+
jbuilder (2.13.0)
98107
actionview (>= 5.0.0)
99108
activesupport (>= 5.0.0)
100-
json (2.7.1)
109+
json (2.8.2)
101110
json-schema (2.8.1)
102111
addressable (>= 2.4)
103112
kramdown (2.4.0)
104113
rexml
105114
language_server-protocol (3.17.0.3)
106-
listen (3.8.0)
115+
listen (3.9.0)
107116
rb-fsevent (~> 0.10, >= 0.10.3)
108117
rb-inotify (~> 0.9, >= 0.9.10)
109-
loofah (2.22.0)
118+
loofah (2.23.1)
110119
crass (~> 1.0.2)
111120
nokogiri (>= 1.12.0)
112121
mail (2.8.1)
113122
mini_mime (>= 0.1.1)
114123
net-imap
115124
net-pop
116125
net-smtp
117-
marcel (1.0.2)
118-
method_source (1.0.0)
126+
marcel (1.0.4)
127+
method_source (1.1.0)
119128
mini_mime (1.1.5)
120-
minitest (5.20.0)
121-
msgpack (1.7.2)
122-
net-imap (0.4.8)
129+
minitest (5.25.1)
130+
msgpack (1.7.5)
131+
net-imap (0.5.1)
123132
date
124133
net-protocol
125134
net-pop (0.1.2)
126135
net-protocol
127136
net-protocol (0.2.2)
128137
timeout
129-
net-smtp (0.4.0)
138+
net-smtp (0.5.0)
130139
net-protocol
131-
nio4r (2.7.0)
132-
nokogiri (1.15.5-arm64-darwin)
140+
nio4r (2.7.4)
141+
nokogiri (1.16.7-aarch64-linux)
133142
racc (~> 1.4)
134-
nokogiri (1.15.5-x86_64-linux)
143+
nokogiri (1.16.7-arm-linux)
135144
racc (~> 1.4)
136-
parallel (1.24.0)
137-
parser (3.2.2.4)
145+
nokogiri (1.16.7-arm64-darwin)
146+
racc (~> 1.4)
147+
nokogiri (1.16.7-x86-linux)
148+
racc (~> 1.4)
149+
nokogiri (1.16.7-x86_64-darwin)
150+
racc (~> 1.4)
151+
nokogiri (1.16.7-x86_64-linux)
152+
racc (~> 1.4)
153+
parallel (1.26.3)
154+
parser (3.3.6.0)
138155
ast (~> 2.4.1)
139156
racc
140157
prettier_print (1.2.1)
141158
psych (3.3.4)
142-
public_suffix (5.0.5)
159+
public_suffix (6.0.1)
143160
puma (4.3.12)
144161
nio4r (~> 2.0)
145-
racc (1.7.3)
146-
rack (2.2.8)
162+
racc (1.8.1)
163+
rack (2.2.10)
147164
rack-test (2.1.0)
148165
rack (>= 1.3)
149166
rails (6.0.6.1)
@@ -175,30 +192,29 @@ GEM
175192
rake (>= 0.8.7)
176193
thor (>= 0.20.3, < 2.0)
177194
rainbow (3.1.1)
178-
rake (13.1.0)
195+
rake (13.2.1)
179196
rb-fsevent (0.11.2)
180-
rb-inotify (0.10.1)
197+
rb-inotify (0.11.1)
181198
ffi (~> 1.0)
182-
regexp_parser (2.8.3)
183-
rexml (3.2.6)
184-
rubocop (1.59.0)
199+
regexp_parser (2.9.2)
200+
rexml (3.3.9)
201+
rubocop (1.68.0)
185202
json (~> 2.3)
186203
language_server-protocol (>= 3.17.0)
187204
parallel (~> 1.10)
188-
parser (>= 3.2.2.4)
205+
parser (>= 3.3.0.2)
189206
rainbow (>= 2.2.2, < 4.0)
190-
regexp_parser (>= 1.8, < 3.0)
191-
rexml (>= 3.2.5, < 4.0)
192-
rubocop-ast (>= 1.30.0, < 2.0)
207+
regexp_parser (>= 2.4, < 3.0)
208+
rubocop-ast (>= 1.32.2, < 2.0)
193209
ruby-progressbar (~> 1.7)
194210
unicode-display_width (>= 2.4.0, < 3.0)
195-
rubocop-ast (1.30.0)
196-
parser (>= 3.2.1.0)
197-
rubocop-rails (2.23.1)
211+
rubocop-ast (1.36.1)
212+
parser (>= 3.3.1.0)
213+
rubocop-rails (2.27.0)
198214
activesupport (>= 4.2.0)
199215
rack (>= 1.1)
200-
rubocop (>= 1.33.0, < 2.0)
201-
rubocop-ast (>= 1.30.0, < 2.0)
216+
rubocop (>= 1.52.0, < 2.0)
217+
rubocop-ast (>= 1.31.1, < 2.0)
202218
ruby-progressbar (1.13.0)
203219
spring (2.1.1)
204220
spring-watcher-listen (2.0.1)
@@ -211,25 +227,41 @@ GEM
211227
actionpack (>= 5.2)
212228
activesupport (>= 5.2)
213229
sprockets (>= 3.0.0)
214-
sqlite3 (1.6.9-arm64-darwin)
215-
sqlite3 (1.6.9-x86_64-linux)
230+
sqlite3 (1.7.3-aarch64-linux)
231+
sqlite3 (1.7.3-arm-linux)
232+
sqlite3 (1.7.3-arm64-darwin)
233+
sqlite3 (1.7.3-x86-linux)
234+
sqlite3 (1.7.3-x86_64-darwin)
235+
sqlite3 (1.7.3-x86_64-linux)
216236
syntax_tree (6.2.0)
217237
prettier_print (>= 1.2.0)
218238
thor (0.20.3)
219239
thread_safe (0.3.6)
220-
timeout (0.4.1)
240+
timeout (0.4.2)
221241
tzinfo (1.2.11)
222242
thread_safe (~> 0.1)
223-
unicode-display_width (2.5.0)
243+
unicode-display_width (2.6.0)
224244
uuidtools (2.2.0)
225245
websocket-driver (0.7.6)
226246
websocket-extensions (>= 0.1.0)
227247
websocket-extensions (0.1.5)
228-
zeitwerk (2.6.12)
248+
zeitwerk (2.7.1)
229249

230250
PLATFORMS
231-
arm64-darwin-23
251+
aarch64-linux
252+
aarch64-linux-gnu
253+
aarch64-linux-musl
254+
arm-linux
255+
arm-linux-gnu
256+
arm-linux-musl
257+
arm64-darwin
258+
x86-linux
259+
x86-linux-gnu
260+
x86-linux-musl
261+
x86_64-darwin
232262
x86_64-linux
263+
x86_64-linux-gnu
264+
x86_64-linux-musl
233265

234266
DEPENDENCIES
235267
adiwg-mdtranslator!
@@ -247,7 +279,7 @@ DEPENDENCIES
247279
tzinfo-data
248280

249281
RUBY VERSION
250-
ruby 3.2.2p53
282+
ruby 3.3.4p94
251283

252284
BUNDLED WITH
253-
2.4.21
285+
2.5.18

config/initializers/application_controller_renderer.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# Be sure to restart your server when you modify this file.
34

45
# ActiveSupport::Reloader.to_prepare do

config/initializers/backtrace_silencers.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# Be sure to restart your server when you modify this file.
34

45
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.

config/initializers/cors.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# Be sure to restart your server when you modify this file.
34

45
# Avoid CORS issues when API is called from the frontend app.

config/initializers/inflections.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# Be sure to restart your server when you modify this file.
34

45
# Add new inflection rules using the following format. Inflections

config/initializers/mime_types.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# Be sure to restart your server when you modify this file.
34

45
# Add new mime types for use in respond_to blocks:

db/seeds.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# frozen_string_literal: true
2+
23
# This file should contain all the record creation needed to seed the database with its default values.
34
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
45
#

test/controllers/translates_controller_test.rb

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class TranslatesControllerTest < ActionDispatch::IntegrationTest
1616
writer: @translate.writer
1717
},
1818
as: :json
19-
assert_response 200
19+
assert_response :ok
2020
end
2121

2222
test 'post invalid transformation of fgdc to iso19115_3' do
@@ -32,6 +32,38 @@ class TranslatesControllerTest < ActionDispatch::IntegrationTest
3232
writer: @translate.writer
3333
},
3434
as: :json
35-
assert_response 422
35+
assert_response :unprocessable_entity
36+
end
37+
38+
test 'post valid transformation of iso19115_2_datagov to dcat_us' do
39+
@translate = translates(:valid_iso19115_2_datagov_to_dcatus)
40+
@file =
41+
File.read(
42+
File.join(File.dirname(__FILE__), "../fixtures/#{@translate.file}")
43+
)
44+
post '/translates',
45+
params: {
46+
file: @file,
47+
reader: @translate.reader,
48+
writer: @translate.writer
49+
},
50+
as: :json
51+
assert_response :ok
52+
end
53+
54+
test 'post invalid transformation of iso19115_2_datagov to dcat_us' do
55+
@translate = translates(:invalid_iso19115_2_datagov_to_dcatus)
56+
@file =
57+
File.read(
58+
File.join(File.dirname(__FILE__), "../fixtures/#{@translate.file}")
59+
)
60+
post '/translates',
61+
params: {
62+
file: @file,
63+
reader: @translate.reader,
64+
writer: @translate.writer
65+
},
66+
as: :json
67+
assert_response :unprocessable_entity
3668
end
3769
end

0 commit comments

Comments
 (0)