local-ch / lhc

🚀 Advanced HTTP Client for Ruby. Fueled with interceptors.
GNU General Public License v3.0
43 stars 1 forks source link

Rename Injections -> Placeholder #7

Closed 10xSebastian closed 10 years ago

10xSebastian commented 10 years ago

How could yo call it to inject placeholders??? set_placeholders? fill_placeholders?

10xSebastian commented 10 years ago

:+1: for placeholders :+1: for set_placeholders

acoiro commented 10 years ago

add_placeholder

jwagner commented 10 years ago

placeholders and just for the record:

PS: Using singletons and immutable datastructures is painting yourself in a corner. You might want to reconsider this.

10xSebastian commented 10 years ago

I added 2 new issues for Jonas: https://github.com/local-ch/LHC/issues/12 https://github.com/local-ch/LHC/issues/13

skaestle commented 10 years ago

:+1: placeholders. I think its the right name for this

if you have add or set you need a good reason why not to provide the opposite (remove / unset). if only one action should be available I suppose we shouldn't use a verb that implies that there is an opposite action.

configure_placeholders maybe? this is a tough one

10xSebastian commented 10 years ago

Renaming done: https://github.com/local-ch/LHC/commit/5bef6e8e41f2a5ecc7ddabed46807fbd5e72629b

Actually the interface to config global placeholders stays:

LHC.config.placeholder(:datastore, 'http://datastore.lb-service')

I just wanted to find the verb for the action taken place when you have the pattern ":datastore/feedbacks" and you replace :datastore with the value.

I use compile for the complete url and interpolate for a single placeholder for now.