Code Monkey home page Code Monkey logo

Comments (6)

seuros avatar seuros commented on July 28, 2024

I will try to do this one too.

from activejob.

cristianbica avatar cristianbica commented on July 28, 2024

@seuros any updates on this?
I was thinking about this and I saw 3 possible solutions:

  1. At the beginning of the test/helper.rb have a system "AJADAPTER=#{ENV['AJADAPTER']} bundle update resque" and in the Gemfile load resque gem depending on the AJADAPTER. (We will probably have to remove the Gemfile.lock from the repo also)
  2. Create a separate Gemfile.resque2. At the begining of test/helper.rbset BUNDLE_GEMFILE to Gemfile or Gemfile.resque2 based on AJADAPTER value
  3. Use appraisal

from activejob.

seuros avatar seuros commented on July 28, 2024

I added appraisal for now and changed the rake script, i can commit this change if you want.

The problem is that if you switch just the gem, the test will pass. That mean that the tests are not well writing, i'm going to make them fail first by using a real database instead of the fake ORM.

from activejob.

cristianbica avatar cristianbica commented on July 28, 2024

Well the problem I saw with appraisal was that when running the whole test suite (aka rake test) they all should pass and I don't see that possible with appraisal. So ideally:

  • if I run rake test it should run all tests (the resque2 test should run with resque 2.x gem) and pass
  • if I run an individual test it should run that test (with the correct gem version for resque)

I would go with Gemfile.resque2...

from activejob.

cristianbica avatar cristianbica commented on July 28, 2024

Here's what I had in mind: https://github.com/cristianbica/activejob/compare/resque2
Main issue with the implementation is that when updating developement gems you need to run bundle && BUNDLE_GEMFILE="Gemfile.resque1" bundle and BUNDLE_GEMFILE="Gemfile.resque2" bundle
Also the resque2 is in heavy development and stuff aren't working (Resque.inline, resque-scheduler). I suggest we wait for them to have a more stable version ready and then work on an adapter.

from activejob.

dhh avatar dhh commented on July 28, 2024

👍 to waiting until a stable version is out.

from activejob.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.