expectedbehavior / cheddargetter_client_ruby Goto Github PK
View Code? Open in Web Editor NEWCheddar Getter API Client for Ruby
Home Page: https://cheddargetter.com
License: MIT License
Cheddar Getter API Client for Ruby
Home Page: https://cheddargetter.com
License: MIT License
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:
Do you have any idea as to why this is happening?
Thanks!
Michael
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
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!
Hey,
I was having some issues recently with Crack not being loaded. http://support.cheddargetter.com/discussions/problems/683-rubygem-problems
I manually required it in my Rails app's gemfile and it is working now, but it'd be nice if it were added as a dependency.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.