activewarehouse / activewarehouse-etl

Extract-Transform-Load library from ActiveWarehouse
MIT License
240 stars 102 forks source link

Test::Unit missing with Ruby 2.2.0 #144

Open jlecour opened 9 years ago

jlecour commented 9 years ago

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).

jlecour commented 9 years ago

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.

thbar commented 9 years ago

@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!

jlecour commented 9 years ago

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 : https://github.com/Autrement/activewarehouse-etl/compare/master...rails4

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

Thanks

thbar commented 9 years ago

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).

grosser commented 9 years ago

test-unit-minitest gem includes the removed libraries