api_taster icon indicating copy to clipboard operation
api_taster copied to clipboard

Added configurable options to the gem

Open ivobenedito opened this issue 12 years ago • 6 comments

Hi,

I've added configurable options to the gem so that you can customize some parameters.

Example:

ApiTaster.configure do |config|
  config.title = 'MyTitle'
  config.call_to_action = 'My call to action text!'
  config.app_title = 'MyAppTitle'
  config.app_url = 'http://www.myapp.com'
  config.include_missing_definitions = false
  config.include_obsolete_definitions = false
end

By default, the gem is using these values:

config.title = 'API Taster'
config.call_to_action = 'Select an API endpoint on the left to get started. :)'
config.app_title = 'Application'
config.app_url = '/'
config.include_missing_definitions = true
config.include_obsolete_definitions = true

Feel free to merge it if you want.

ivobenedito avatar Jan 28 '13 17:01 ivobenedito

Very nice, thanks for this! :) Before I merge this in though would you add some tests please?

fredwu avatar Jan 28 '13 22:01 fredwu

I need to use api_tester in multi applications, this merge will be very helpful to me.

jimhj avatar Jan 31 '13 03:01 jimhj

Very nice, thanks for this! :) Before I merge this in though would you add some tests please?

Sure, I will. Just don't have much free time at the moment, but as soon as I can I'll add them.

ivobenedito avatar Jan 31 '13 11:01 ivobenedito

Any update on this pull request? I'm running into a problem that this would solve and I'd rather use the official source than patching my own version if possible.

jsallis avatar Feb 20 '13 00:02 jsallis

As soon as tests are added I'll merge this in. :) cc @ivobenedito

fredwu avatar Feb 20 '13 00:02 fredwu

Hi @ivobenedito do you reckon you'd have time to write some tests for this? :)

fredwu avatar Jul 19 '13 00:07 fredwu