activewarehouse / activewarehouse-etl

Extract-Transform-Load library from ActiveWarehouse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test::Unit missing with Ruby 2.2.0

jlecour opened this issue · comments

Hi,

I was trying to update a Rails app (4.1.6) to Ruby 2.2.0 but Test::Unit is missing, so I get this :

LoadError: cannot load such file -- test/unit/assertions
/Users/jlecour/.gem/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/Users/jlecour/.gem/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
/Users/jlecour/.gem/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
/Users/jlecour/.gem/ruby/2.2.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
/Users/jlecour/.gem/ruby/2.2.0/bundler/gems/activewarehouse-etl-98a9d7a87ccb/lib/etl/control/control.rb:5:in `<class:Context>'

I don't really understand how Test::Unit is used here and how it coud be replaced by Minitest (present in Ruby 2.2.0).

In fact, in Ruby 2.2.0, both Test::Unit and Minitest have been removed from the standard library (cf. https://www.ruby-lang.org/en/news/2014/12/25/ruby-2-2-0-released/).

Adding gem 'test-unit' in the application's Gemfile is enough to make it work again.

I guess adding a proper dependency in the gem spec would be better.

@jlecour good catch! I've not tested aw-etl on "modern" configurations recently. I added you to the member teams so you can push the change directly if you will. Thanks!

We've been using a fork of AW/ETL for some time, but without formal tests. I'm not yet confident to push our changes back in the main repository.

Here is the diff from where we are to the master we're based on : Autrement/activewarehouse-etl@master...rails4

If you want to take a look, we could try to properly validate and merge this in.

Thanks

Well at that point I'm not maintaining aw-etl anymore, just casually responding to requests. I don't have the bandwidth to review / validate / merge (but honestly I'd definitely trust you to do a good job here if you want to go ahead).

test-unit-minitest gem includes the removed libraries