Giter Site home page Giter Site logo

Comments (8)

zeisler avatar zeisler commented on July 2, 2024

Are you asking to be able to generate mocks from a custom path? That can be set by ActiveMocker::Config.model_dir="app/models/some/path/to/**/*.rb"

OR

From rake:
MODEL_DIR="app/models/some/path/to/my_model.rb" rake active_mocker:build

from active_mocker.

markburns avatar markburns commented on July 2, 2024

I'm picking this up from @tonyxyz in a different time zone. From reading his email it sounds like it's not about loading in a custom folder but rather picking up correctly all files defined in any sub directory of app/models.

To paraphrase:

We have Foo. This inherits from Bar, which includes Bar::Baz amongst other things.

We think this is failing because Bar::Baz is never loaded.

The log reports that it cannot load Baz - actually it finds the file okay but does not complete the class loading process.


I will be having a look in detail today, but maybe that helps realise and or fix the problem sooner

from active_mocker.

zeisler avatar zeisler commented on July 2, 2024

@markburns and @tonyxyz what version of active_mocker are you using?

from active_mocker.

markburns avatar markburns commented on July 2, 2024

Good shout. I would guess this issue is based on version 1.7.x due to our app dependencies.
Which looking at it now looks like it is because of active_mocker's dependency on rake ~> 10.0 and we have a dependency on ~> 11.0 elsewhere.

Will try a looser dependency in a fork of this gem to see if it allows an upgrade and fixes the issue, then a PR if so.

BTW does this sound like something you fixed since 1.7?

from active_mocker.

markburns avatar markburns commented on July 2, 2024

#43 fixes rake issue. But I believe this issue still remains. Will update with more info if/when I find out.

from active_mocker.

zeisler avatar zeisler commented on July 2, 2024

active_mocker v1.7.3 came out Dec 1, 2014. Migrating your project to v2.1.x should fix your issue since the generation engine has been completely rewritten. I will accept the change to reduce the rake dependancy and that will most likely be v2.1.4

from active_mocker.

markburns avatar markburns commented on July 2, 2024

@tonyxyz - when you come online I'd suggest we close this particular issue and determine more relevant PRs/issues as appropriate.

from active_mocker.

tonyxyz avatar tonyxyz commented on July 2, 2024

Many thanks markburns, zeisler. This is working fine on the leading edge.

from active_mocker.

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.