From dbe260e4fe83f9862aca4035e8a631aa4dc88ea5 Mon Sep 17 00:00:00 2001 From: JuliusR <> Date: Sat, 18 Dec 2021 11:55:20 +0100 Subject: [PATCH 1/2] add roo and roo-xls --- Gemfile | 2 ++ Gemfile.lock | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Gemfile b/Gemfile index 25cdd77..2e061eb 100644 --- a/Gemfile +++ b/Gemfile @@ -57,3 +57,5 @@ gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] gem "haml-rails", "~> 2.0" gem "bcrypt" +gem 'roo' +gem 'roo-xls' diff --git a/Gemfile.lock b/Gemfile.lock index 058a4d5..9d19ab9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -165,6 +165,14 @@ GEM ffi (~> 1.0) regexp_parser (2.2.0) rexml (3.2.5) + roo (2.8.3) + nokogiri (~> 1) + rubyzip (>= 1.3.0, < 3.0.0) + roo-xls (1.2.0) + nokogiri + roo (>= 2.0.0, < 3) + spreadsheet (> 0.9.0) + ruby-ole (1.2.12.2) ruby_parser (3.18.1) sexp_processor (~> 4.16) rubyzip (2.3.2) @@ -184,6 +192,8 @@ GEM rubyzip (>= 1.2.2) semantic_range (3.0.0) sexp_processor (4.16.0) + spreadsheet (1.3.0) + ruby-ole spring (4.0.0) sprockets (4.0.2) concurrent-ruby (~> 1.0) @@ -236,6 +246,8 @@ DEPENDENCIES puma (~> 5.0) rack-mini-profiler (~> 2.0) rails (~> 6.1.4, >= 6.1.4.4) + roo + roo-xls sass-rails (>= 6) selenium-webdriver spring From 90be4c513df1df33ae8e7081323880ad51b0fa08 Mon Sep 17 00:00:00 2001 From: JuliusR <> Date: Sat, 18 Dec 2021 11:58:07 +0100 Subject: [PATCH 2/2] fix app/lib path for loading yml introduced by d595ae81171ab0e1d5d0c8f0c5abe3f7634607ea --- app/lib/article_import/dnb_xml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/article_import/dnb_xml.rb b/app/lib/article_import/dnb_xml.rb index d264fd0..b066be6 100644 --- a/app/lib/article_import/dnb_xml.rb +++ b/app/lib/article_import/dnb_xml.rb @@ -60,7 +60,7 @@ module ArticleImport::DnbXml @@codes = Hash.new def self.load_codes - dir = Rails.root.join("lib", "article_import") + dir = Rails.root.join("app", "lib", "article_import") begin @@codes = YAML::load(File.open(dir.join("dnb_codes.yml"))).symbolize_keys rescue => e