Coder Social home page Coder Social logo

Comments (4)

adamthedeveloper avatar adamthedeveloper commented on June 29, 2024

I think I am figuring out what is happening with your gem and SAMPLE being shown in the barcode if you pass in :test => false in the options. In a few places in your code you are doing

(options[:test] || true)

if I pass in :test => false, the above code will always evaluate to true. You can prove this if you open a console and do

false || true

So one of either two things is happening here, 1) you expect me to pass in something other than false or nil or 2) this is a bug and you need to check to see if options[:test].nil?

I think the later is what you want - since your default value is a boolean.

I'll fix this in my fork - let me know if you want a pull request - this is a pretty big issue for your gem.

from omniship.

Digi-Cazter avatar Digi-Cazter commented on June 29, 2024

My apologies for the bug, I went ahead and fixed it, now if you want to run in test mode you can pass :test => true, else if you don't pass :test or it's set to false it will be in production. Thank you for the input.

from omniship.

adamthedeveloper avatar adamthedeveloper commented on June 29, 2024

Great! Thanks and nice gem. It's doing exactly what we need.

from omniship.

Digi-Cazter avatar Digi-Cazter commented on June 29, 2024

Awesome, thanks! If you find anything that could be done better, or something you would like implemented, post it. Also if you come up with some better documentation you would like added, feel free to do a pull request with your changes.

from omniship.

Related Issues (2)

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.