diff --git a/Gemfile.lock b/Gemfile.lock index f146557..83fc0c8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - oddb2xml (2.9.2) + oddb2xml (2.9.9) htmlentities httpi mechanize @@ -15,7 +15,7 @@ PATH rexml rubyXL (~> 3.4.0) rubyntlm (= 0.5.1) - rubyzip + rubyzip (~> 3.0.1) savon (~> 2.12.0) sax-machine spreadsheet @@ -32,7 +32,6 @@ GEM gyoku (>= 0.4.0) nokogiri ast (2.4.2) - base64 (0.1.1) builder (3.2.4) byebug (11.1.3) coderay (1.1.3) @@ -82,7 +81,7 @@ GEM nori (2.6.0) ntlm-http (0.1.1) optimist (3.1.0) - ox (2.14.17) + ox (2.14.14) parallel (1.23.0) parser (3.2.2.3) ast (~> 2.4.1) @@ -91,9 +90,9 @@ GEM pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-byebug (3.10.1) + pry-byebug (3.8.0) byebug (~> 11.0) - pry (>= 0.13, < 0.15) + pry (~> 0.10) pry-doc (1.4.0) pry (~> 0.11) yard (~> 0.9.11) @@ -119,21 +118,19 @@ GEM diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.12.0) rspec-support (3.12.1) - rubocop (1.56.4) - base64 (~> 0.1.1) + rubocop (1.50.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.2.2.3) + parser (>= 3.2.0.0) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.28.1, < 2.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.29.0) parser (>= 3.2.1.0) - rubocop-performance (1.19.1) + rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) ruby-ole (1.2.12.2) @@ -142,7 +139,7 @@ GEM nokogiri (>= 1.10.8) rubyzip (>= 1.3.0) rubyntlm (0.5.1) - rubyzip (2.3.2) + rubyzip (3.0.1) savon (2.12.1) akami (~> 1.2) builder (>= 2.1.2) @@ -155,18 +152,18 @@ GEM socksify (1.7.1) spreadsheet (1.3.0) ruby-ole - standard (1.31.1) + standard (1.28.5) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.0) - rubocop (~> 1.56.2) + rubocop (~> 1.50.2) standard-custom (~> 1.0.0) - standard-performance (~> 1.2) + standard-performance (~> 1.0.1) standard-custom (1.0.2) lint_roller (~> 1.0) rubocop (~> 1.50) - standard-performance (1.2.0) - lint_roller (~> 1.1) - rubocop-performance (~> 1.19.0) + standard-performance (1.0.1) + lint_roller (~> 1.0) + rubocop-performance (~> 1.16.0) standardrb (1.0.1) standard timecop (0.9.8) @@ -174,7 +171,7 @@ GEM unf_ext unf_ext (0.0.8.2) unicode-display_width (2.5.0) - vcr (6.2.0) + vcr (6.1.0) wasabi (3.7.0) addressable httpi (~> 2.0) @@ -209,4 +206,4 @@ DEPENDENCIES webmock BUNDLED WITH - 2.3.24 + 2.4.19 diff --git a/gemset.nix b/gemset.nix index 0a14e0b..c242dd1 100644 --- a/gemset.nix +++ b/gemset.nix @@ -5,10 +5,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ypdmpdn20hxp5vwxz3zc04r5xcwqc25qszdlg41h8ghdqbllwmw"; + sha256 = "05r1fwy487klqkya7vzia8hnklcxy4vr92m9dmni3prfwk6zpw33"; type = "gem"; }; - version = "2.8.1"; + version = "2.8.5"; }; akami = { dependencies = ["gyoku" "nokogiri"]; @@ -66,10 +66,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1nj4r58m5cpfdsijj6gjfs3yzcnxq2halagjk07wjcrgj6z8ayb7"; + sha256 = "1x32mcpm2cl5492kd6lbjbaf17qsssmpx9kdyr7z1wcif2cwyh0g"; type = "gem"; }; - version = "2.3.0"; + version = "2.4.1"; }; crack = { dependencies = ["rexml"]; @@ -108,10 +108,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "07l5hlz57fxaksr34q7n933sr2v6gfsplaiv1z4fi2ql731nvamm"; + sha256 = "07yabbg08chxv7simc9hvxjq6z16svx1gvd36jzb8k7yvn05560y"; type = "gem"; }; - version = "2.3.6"; + version = "2.3.8"; }; gyoku = { dependencies = ["builder" "rexml"]; @@ -181,10 +181,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "14r3zp2q75lrzpy2nz7hbhzqp8nsykd5ffy18d34xr32722i2ifr"; + sha256 = "0gvb1j8xsqxms9mww01rmdl78zkd72zgxaap56bhv8j45z05hp1x"; + type = "gem"; + }; + version = "3.17.0.3"; + }; + lint_roller = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "11yc0d84hsnlvx8cpk4cbj6a4dz9pk0r1k29p0n1fz9acddq831c"; type = "gem"; }; - version = "3.17.0.2"; + version = "1.1.0"; }; mechanize = { dependencies = ["domain_name" "http-cookie" "mime-types" "net-http-digest_auth" "net-http-persistent" "nokogiri" "ntlm-http" "webrick" "webrobots"]; @@ -213,30 +223,30 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0ipw892jbksbxxcrlx9g5ljq60qx47pm24ywgfbyjskbcl78pkvb"; + sha256 = "0q8d881k1b3rbsfcdi3fx0b5vpdr5wcrhn88r2d9j7zjdkxp5mw5"; type = "gem"; }; - version = "3.4.1"; + version = "3.5.1"; }; mime-types-data = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "003gd7mcay800k2q4pb2zn8lwwgci4bhi42v2jvlidm8ksx03i6q"; + sha256 = "17zdim7kzrh5j8c97vjqp4xp78wbyz7smdp4hi5iyzk0s9imdn5a"; type = "gem"; }; - version = "3.2022.0105"; + version = "3.2023.0808"; }; mini_portile2 = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1af4yarhbbx62f7qsmgg5fynrik0s36wjy3difkawy536xg343mp"; + sha256 = "02mj8mpd6ck5gpcnsimx5brzggw5h5mmmpq2djdypfq16wcw82qq"; type = "gem"; }; - version = "2.8.1"; + version = "2.8.4"; }; minitar = { groups = ["default"]; @@ -274,10 +284,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1yfypmfg1maf20yfd22zzng8k955iylz7iip0mgc9lazw36g8li7"; + sha256 = "0i1as2lgnw7b4jid0gw5glv5hnxz36nmfsbr9rmxbcap72ijgy03"; type = "gem"; }; - version = "4.0.1"; + version = "4.0.2"; }; nokogiri = { dependencies = ["mini_portile2" "racc"]; @@ -311,55 +321,55 @@ version = "0.1.1"; }; oddb2xml = { - dependencies = ["htmlentities" "httpi" "mechanize" "minitar" "multi_json" "nokogiri" "optimist" "ox" "parslet" "rexml" "rubyXL" "rubyntlm" "rubyzip" "savon" "sax-machine" "spreadsheet" "standardrb" "webrick" "xml-simple"]; + dependencies = ["htmlentities" "httpi" "mechanize" "minitar" "multi_json" "nokogiri" "optimist" "ox" "parslet" "rack" "rexml" "rubyXL" "rubyntlm" "rubyzip" "savon" "sax-machine" "spreadsheet" "standardrb" "webrick" "xml-simple"]; groups = ["default"]; platforms = []; source = { path = ./.; type = "path"; }; - version = "2.7.9"; + version = "2.9.9"; }; optimist = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1vg2chy1cfmdj6c1gryl8zvjhhmb3plwgyh1jfnpq4fnfqv7asrk"; + sha256 = "0q4jqq3v1bxlfr9jgqmahnygkvl81lr6s1rhm8qg66c9xr9nz241"; type = "gem"; }; - version = "3.0.1"; + version = "3.1.0"; }; ox = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0kzwl7m6cp2dyncpm7cc8wvk9zsj1hd1pmbgxhjy85xr4sq1qf8a"; + sha256 = "1g9ivy30jx7hjl8l3il47dmc9xgla8dj762v5cw0mgzpd9rq6vr4"; type = "gem"; }; - version = "2.14.12"; + version = "2.14.14"; }; parallel = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "07vnk6bb54k4yc06xnwck7php50l09vvlw1ga8wdz0pia461zpzb"; + sha256 = "0jcc512l38c0c163ni3jgskvq1vc3mr8ly5pvjijzwvfml9lf597"; type = "gem"; }; - version = "1.22.1"; + version = "1.23.0"; }; parser = { - dependencies = ["ast"]; + dependencies = ["ast" "racc"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0zk8mdyr0322r11d63rcp5jhz4lakxilhvyvdv0ql5dw4lb83623"; + sha256 = "1swigds85jddb5gshll1g8lkmbcgbcp9bi1d4nigwvxki8smys0h"; type = "gem"; }; - version = "3.2.0.0"; + version = "3.2.2.3"; }; parslet = { groups = ["default"]; @@ -388,10 +398,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1y41al94ks07166qbp2200yzyr5y60hm7xaiw4lxpgsm4b1pbyf8"; + sha256 = "07cv2hddswb334777pjgc9avxn0x9qhrdr191g7windvnjk3scvg"; type = "gem"; }; - version = "3.10.1"; + version = "3.8.0"; }; pry-doc = { dependencies = ["pry" "yard"]; @@ -419,30 +429,30 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0hz0bx2qs2pwb0bwazzsah03ilpf3aai8b7lk7s35jsfzwbkjq35"; + sha256 = "0n9j7mczl15r3kwqrah09cxj8hxdfawiqxa60kga2bmxl9flfz9k"; type = "gem"; }; - version = "5.0.1"; + version = "5.0.3"; }; racc = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "09jgz6r0f7v84a7jz9an85q8vvmp743dqcsdm3z9c8rqcqv6pljq"; + sha256 = "11v3l46mwnlzlc371wr3x6yylpgafgwdf0q7hc7c1lzx6r414r5g"; type = "gem"; }; - version = "1.6.2"; + version = "1.7.1"; }; rack = { groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "006km9h9kfdipwpqvjkfb0hfnd65w60cw0imx6qmx77b0h746frs"; + sha256 = "137r9zqwh0dan6s0fw91wk6iip9alh44bqgbhn80sxk0h5kp7150"; type = "gem"; }; - version = "3.0.3"; + version = "3.0.11"; }; rainbow = { groups = ["default"]; @@ -479,20 +489,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0rj7xcg7bkfw6y0h4wg8y3s4nmks9qrzdxag4zaw41xjqfanlysf"; + sha256 = "136br91alxdwh1s85z912dwz23qlhm212vy6i3wkinz3z8mkxxl3"; type = "gem"; }; - version = "2.6.1"; + version = "2.8.1"; }; rexml = { groups = ["default" "development"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "08ximcyfjy94pm1rhcx04ny1vx2sk0x4y185gzn86yfsbzwkng53"; + sha256 = "05i8518ay14kjbma550mv0jm8a6di8yp5phzrd8rj44z9qnrlrp0"; type = "gem"; }; - version = "3.2.5"; + version = "3.2.6"; }; rspec = { dependencies = ["rspec-core" "rspec-expectations" "rspec-mocks"]; @@ -511,10 +521,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ibb81slc35q5yp276sixp3yrvj9q92wlmi1glbnwlk6g49z8rn4"; + sha256 = "0l95bnjxdabrn79hwdhn2q1n7mn26pj7y1w5660v5qi81x458nqm"; type = "gem"; }; - version = "3.12.0"; + version = "3.12.2"; }; rspec-expectations = { dependencies = ["diff-lcs" "rspec-support"]; @@ -522,10 +532,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "03ba3lfdsj9zl00v1yvwgcx87lbadf87livlfa5kgqssn9qdnll6"; + sha256 = "05j44jfqlv7j2rpxb5vqzf9hfv7w8ba46wwgxwcwd8p0wzi1hg89"; type = "gem"; }; - version = "3.12.2"; + version = "3.12.3"; }; rspec-mocks = { dependencies = ["diff-lcs" "rspec-support"]; @@ -533,20 +543,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0k64i7ax6sqvh702s0xrll2g8isxx1x4zam95ck7122flsyh7van"; + sha256 = "1gq7gviwpck7fhp4y5ibljljvxgjklza18j62qf6zkm2icaa8lfy"; type = "gem"; }; - version = "3.12.2"; + version = "3.12.6"; }; rspec-support = { groups = ["default" "development"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "12y52zwwb3xr7h91dy9k3ndmyyhr3mjcayk0nnarnrzz8yr48kfx"; + sha256 = "1ky86j3ksi26ng9ybd7j0qsdf1lpr8mzrmn98yy9gzv801fvhsgr"; type = "gem"; }; - version = "3.12.0"; + version = "3.12.1"; }; rubocop = { dependencies = ["json" "parallel" "parser" "rainbow" "regexp_parser" "rexml" "rubocop-ast" "ruby-progressbar" "unicode-display_width"]; @@ -554,10 +564,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0shbma3bjm761waklzg10gy9jxl6m48l5035kli429sw7qna5sm8"; + sha256 = "0l46lw5gfj3mcm982wpmx7br4rs466gyislv0hfwcsk8dxhv1zkw"; type = "gem"; }; - version = "1.42.0"; + version = "1.50.2"; }; rubocop-ast = { dependencies = ["parser"]; @@ -565,10 +575,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1pdzabz95hv3z5sfbkfqa8bdybsfl13gv7rjb32v3ss8klq99lbd"; + sha256 = "188bs225kkhrb17dsf3likdahs2p1i1sqn0pr3pvlx50g6r2mnni"; type = "gem"; }; - version = "1.24.1"; + version = "1.29.0"; }; rubocop-performance = { dependencies = ["rubocop" "rubocop-ast"]; @@ -576,10 +586,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1iwv2zhcpaan038d6m7ybzb2dgpi2zhf9dgfs3bjvmrqirqi2720"; + sha256 = "1n7g0vg06ldjaq4f8c11c7yqy99zng1qdrkkk4kfziippy24yxnc"; type = "gem"; }; - version = "1.15.2"; + version = "1.16.0"; }; ruby-ole = { groups = ["default"]; @@ -596,10 +606,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "02nmaw7yx9kl7rbaan5pl8x5nn0y4j5954mzrkzi9i3dhsrps4nc"; + sha256 = "0cwvyb7j47m7wihpfaq7rc47zwwx9k4v7iqd9s1xch5nm53rrz40"; type = "gem"; }; - version = "1.11.0"; + version = "1.13.0"; }; rubyntlm = { groups = ["default"]; @@ -627,10 +637,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0grps9197qyxakbpw02pda59v45lfgbgiyw48i0mq9f2bn9y6mrz"; + sha256 = "19xqyp8ixshf9mv0vy3d5qsi6acffh7849i6rrba3f9xz4pz7fwb"; type = "gem"; }; - version = "2.3.2"; + version = "3.0.1"; }; savon = { dependencies = ["akami" "builder" "gyoku" "httpi" "nokogiri" "nori" "wasabi"]; @@ -675,15 +685,37 @@ version = "1.3.0"; }; standard = { - dependencies = ["language_server-protocol" "rubocop" "rubocop-performance"]; + dependencies = ["language_server-protocol" "lint_roller" "rubocop" "standard-custom" "standard-performance"]; groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1xwsmpkyxfz2bgcv1n8w3fdmxl19mwr5m512h723w30gcba5lpl8"; + sha256 = "1qbw7rp6mqs6bcxj4814qi6xqfqjmlrxdv6mbk33xrs4lvdaviba"; type = "gem"; }; - version = "1.21.1"; + version = "1.28.5"; + }; + standard-custom = { + dependencies = ["lint_roller" "rubocop"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0av55ai0nv23z5mhrwj1clmxpgyngk7vk6rh58d4y1ws2y2dqjj2"; + type = "gem"; + }; + version = "1.0.2"; + }; + standard-performance = { + dependencies = ["lint_roller" "rubocop-performance"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "13hfyfangb46lagf0a044jwbagb8iak12pdzjfbdrkc5lbcvzydj"; + type = "gem"; + }; + version = "1.0.1"; }; standardrb = { dependencies = ["standard"]; @@ -701,10 +733,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0dlx4gx0zh836i7nzna03xdl7fc233s5z6plnr6k3kw46ah8d1fc"; + sha256 = "0qzmk0gf4j21mgqzfhpyb5m1rjx132p9k41hgl05rcmg9sjnv6c9"; type = "gem"; }; - version = "0.9.6"; + version = "0.9.8"; }; unf = { dependencies = ["unf_ext"]; @@ -732,10 +764,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1gi82k102q7bkmfi7ggn9ciypn897ylln1jk9q67kjhr39fj043a"; + sha256 = "1d0azx233nags5jx3fqyr23qa2rhgzbhv8pxp46dgbg1mpf82xky"; type = "gem"; }; - version = "2.4.2"; + version = "2.5.0"; }; vcr = { groups = ["development"]; @@ -764,20 +796,20 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1myj44wvbbqvv18ragv3ihl0h61acgnfwrnj3lccdgp49bgmbjal"; + sha256 = "0vfispr7wd2p1fs9ckn1qnby1yyp4i1dl7qz8n482iw977iyxrza"; type = "gem"; }; - version = "3.18.1"; + version = "3.19.1"; }; webrick = { - groups = ["debugger" "default"]; + groups = ["default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7"; + sha256 = "13qm7s0gr2pmfcl7dxrmq38asaza4w0i2n9my4yzs499j731wh8r"; type = "gem"; }; - version = "1.7.0"; + version = "1.8.1"; }; webrobots = { groups = ["default"]; @@ -801,14 +833,13 @@ version = "1.1.9"; }; yard = { - dependencies = ["webrick"]; groups = ["debugger" "default"]; platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "0p1if8g9ww6hlpfkphqv3y1z0rbqnnrvb38c5qhnala0f8qpw6yk"; + sha256 = "1r0b8w58p7gy06wph1qdjv2p087hfnmhd9jk23vjdj803dn761am"; type = "gem"; }; - version = "0.9.28"; + version = "0.9.36"; }; } diff --git a/lib/oddb2xml/compressor.rb b/lib/oddb2xml/compressor.rb index bffdb95..7a5aead 100644 --- a/lib/oddb2xml/compressor.rb +++ b/lib/oddb2xml/compressor.rb @@ -27,7 +27,7 @@ def finalize! tgz = Zlib::GzipWriter.new(File.open(@compress_file, "wb")) Minitar.pack(@contents, tgz) when /\.zip$/ - Zip::File.open(@compress_file, Zip::File::CREATE) do |zip| + Zip::File.open(@compress_file, create: true) do |zip| @contents.each do |file| filename = File.basename(file) zip.add(filename, file) diff --git a/oddb2xml.gemspec b/oddb2xml.gemspec index eabaf55..6a0b40c 100644 --- a/oddb2xml.gemspec +++ b/oddb2xml.gemspec @@ -20,7 +20,7 @@ Gem::Specification.new do |spec| # We fix the version of the spec to newer versions only in the third position # hoping that these version fix only security/severe bugs # Consulted the Gemfile.lock to get - spec.add_dependency "rubyzip" # , '~> 1.1.3' + spec.add_dependency "rubyzip", '~> 3.0.1' spec.add_dependency "minitar" # , '~> 0.5.2' spec.add_dependency "mechanize" # , '~> 2.5.1' spec.add_dependency "nokogiri", ">= 1.8.2" diff --git a/spec/downloader_spec.rb b/spec/downloader_spec.rb index 7d7f11d..c4ce647 100644 --- a/spec/downloader_spec.rb +++ b/spec/downloader_spec.rb @@ -85,7 +85,7 @@ def common_after # Zips input_filenames (using the basename) def zip_files(zipfile_name, input_filenames) FileUtils.rm_f(zipfile_name) - Zip::File.open(zipfile_name, Zip::File::CREATE) do |zipfile| + Zip::File.open(zipfile_name, create: true) do |zipfile| input_filenames.each do |filename| puts "Add #{filename} #{File.size(filename)} bytes as #{File.basename(filename)} #{Dir.pwd}" if $VERBOSE zipfile.add(File.basename(filename), filename)