{"push_id":632400506,"size":2,"distinct_size":2,"ref":"refs/heads/master","head":"4a7806f313251e037ece6a3f00be384c23ad28cf","before":"57ab44cd2d9820153ed4522777e6997760033e63","commits":[{"sha":"a008e2164bc4c836c075e0f7eb29d6301a686bb4","author":{"email":"6c95c31f054d6e8040810ccf93d10286868ecb08@gmail.com","name":"Thomas R. Koll"},"message":"Fix pass_values_onto_requestable to use method rather than the instance variable\n\nPossible that I should have used something else in weary but in the end I did monkey patch `pass_values_onto_requestable`. What I wanted was the same headers over a small number of clients. So in my BaseClient I did add a method headers, hoping this to be passed on to all requests. I have to run some authentication first and the header is thus dynamic.\r\n\r\n```ruby\r\nBaseClient < Weary::Client\r\n  cattr_accessor :headers\r\n  def headers\r\n    return @@headers ||= {}\r\n  end\r\nend\r\n```\r\nIt didn't pass the values because in `pass_values_onto_requestable` it is first looking at the instance variable `@headers` and only after that it calls the headers method. Despite the shared name they can be very different things\r\n\r\n```ruby\r\n  def pass_values_onto_requestable(requestable)\r\n      requestable.headers self.headers unless @headers.nil?\r\n      requestable.adapter self.adapter unless @connection.nil?\r\n  end\r\n```\r\n\r\nA simplified example to prove my point further:\r\n```ruby\r\nclass A\r\n  attr_accessor :b\r\n  def initialize\r\n    @b = \"instance variable\"\r\n  end\r\n  def b\r\n    return \"method\"\r\n  end\r\nend\r\n\r\nputs A.new.b # => method\r\nputs A.new.instance_variable_get('@b') # => \"instance variable\"\r\n```","distinct":true,"url":"https://api.github.com/repos/mwunsch/weary/commits/a008e2164bc4c836c075e0f7eb29d6301a686bb4"},{"sha":"4a7806f313251e037ece6a3f00be384c23ad28cf","author":{"email":"f1b5a91d4d6ad523f2610114591c007e75d15084@markwunsch.com","name":"Mark Wunsch"},"message":"Merge pull request #48 from TomK32/patch-1\n\nFix pass_values_onto_requestable to use method rather than the instance variable","distinct":true,"url":"https://api.github.com/repos/mwunsch/weary/commits/4a7806f313251e037ece6a3f00be384c23ad28cf"}]}