Coder Social home page Coder Social logo

cheddargetter_client_ruby's People

Contributors

brentw avatar marcguyer avatar nicholaides avatar whitecl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

cheddargetter_client_ruby's Issues

Rails Models break after client.get_customer(:code => id)

Hi,

I have an extremely weird issue with the ChedderGetter gem. I have literally tried for hours and can absolutely not figure out what's causing this issue.

Normally my application works fine. But once I do a cheddar_getter.get_customer(:code => current_user.id), all of a sudden all my models aren't able to accept attributes anymore. Every time I submit a form the validates_presence_of validation errors occur on all fields, even though they are filled in.

When I restart my app server (Tried it in both Thin and Unicorn) all forms submit perfectly fine. But then I do just a single cheddar_getter.get_customer(:code => current_user.id) again and none of the models work properly anymore and I have to restart my app server again.

Apparently data is being sent through the params with each POST/PUT request, that isn't the issue. When I literally do this:

def update
  current_user.first_name # => nil
  current_user.update_attributes(:first_name => "Michael")
  current_user.first_name # => nil
  User.find(current_user.id).first_name # => nil
  current_user.first_name = "Michael"
  current_user.save
  current_user.first_name # => nil
end

I pretty much tried everything I could think of and still it won't set the attributes.

When I only do CheddarGetter::Client.new(...) everything still works, it's really when I try to fetch a customer from CheddarGetter that the whole process starts breaking until you restart it. This happens both in development as well as in production mode. I am not running in "thread-safe" mode either and I moved the client instantiation code in to the model, controller and also tried an initializer file, but nothing works.

I tried it in:

  • Ruby 1.9.2p180
  • Ruby 1.9.3.preview.1
  • Ruby on Rails 3.1.pre.5
  • Unicorn
  • Thin

Do you have any idea as to why this is happening?

Thanks!
Michael

Gemspec issue when installing with Bundler 1.10.6

I get the following error when installing cheddargetter_client_ruby via bundler 1.10.6 after running bundle install and then 'bundle show cheddargetter_client_ruby'

The error does not occur when using bundler 1.9.5

The gemspec at /Users/chris/.rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/cheddargetter_client_ruby-77e3187e27e7/cheddargetter_client_ruby.gemspec is not valid. The validation error was 'duplicate dependency on httparty (>= 0.4.3), (>= 0.4.3) use:
    add_runtime_dependency 'httparty', '>= 0.4.3', '>= 0.4.3'
'
Could not find cheddargetter_client_ruby-0.3.2 in any of the sources

Tracked Item Quantity: How do I change the value?

Hey there, quick question regarding Cheddar Getter's tracked items. I am trying to adjust the quantity of one of my tracked items, but for some reason the quantity does not properly update. Mind telling me what the proper syntax is? This is what I've tried:

client.edit_customer({:code => 'MY_CUSTOMER'}, {
  :items => [{
      :itemCode => "MY_ADD_ON",
      :quantity => 5
    }]
})

When I check my customer status on CheddarGetter's web user interface, the quantity does not update.

Any help much appreciated!

Thanks!

Use canonical attribute names?

Have you thought about using canonical attribute names, with underscores instead of camel-back case with no underscores? I realize that the CG API uses camel-back case attribute names, but this is at odds with canonical ruby style.

I would be nice if the gem encapsulated the logic required to create the correct attribute name case for CG, so that the gem consumer can use parameter with underscores as usual.

I could contribute a patch if you're interested.

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.