add mountPath option to prepend a custom path #23

Closed
wants to merge 10 commits into
from

Conversation

Projects
None yet
3 participants
@younes200

sorry for the last PR.

younes200 added some commits Apr 19, 2017

add mountPath option to add router prefix
option to add a router prefix exemple : /api/messenger/webhook
@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Apr 19, 2017

Coverage Status

Coverage decreased (-17.07%) to 82.933% when pulling 3ce7e7f on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented Apr 19, 2017

Coverage Status

Coverage decreased (-17.07%) to 82.933% when pulling 3ce7e7f on InteractiveObject:master into 38f54a7 on botmasterai:master.

@jdwuarin

This comment has been minimized.

Show comment
Hide comment
@jdwuarin

jdwuarin Apr 19, 2017

Member

Hi Younes,

Thanks for your interest in Botmaster.
I get what you trying to do here. I guess the best way to do that would be to add a default setting called mountpath to settings and set it to '/' by default. Then in addBot and removeBot, replace the slash with ${settings.mountpath} (this avoids having to have an "if" block in both those functions). You would then ideally update and add a couple of tests in https://github.com/botmasterai/botmaster/blob/master/tests/botmaster/add_bot.js and https://github.com/botmasterai/botmaster/blob/master/tests/botmaster/constructor.js to reflect that.
And potentially also update the two last tests in https://github.com/botmasterai/botmaster/blob/master/tests/botmaster/remove_bot.js

Member

jdwuarin commented Apr 19, 2017

Hi Younes,

Thanks for your interest in Botmaster.
I get what you trying to do here. I guess the best way to do that would be to add a default setting called mountpath to settings and set it to '/' by default. Then in addBot and removeBot, replace the slash with ${settings.mountpath} (this avoids having to have an "if" block in both those functions). You would then ideally update and add a couple of tests in https://github.com/botmasterai/botmaster/blob/master/tests/botmaster/add_bot.js and https://github.com/botmasterai/botmaster/blob/master/tests/botmaster/constructor.js to reflect that.
And potentially also update the two last tests in https://github.com/botmasterai/botmaster/blob/master/tests/botmaster/remove_bot.js

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Apr 20, 2017

Coverage Status

Coverage decreased (-38.0%) to 62.032% when pulling 28e73d6 on InteractiveObject:master into 38f54a7 on botmasterai:master.

Coverage Status

Coverage decreased (-38.0%) to 62.032% when pulling 28e73d6 on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Apr 20, 2017

Coverage Status

Coverage decreased (-38.0%) to 62.032% when pulling 28e73d6 on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented Apr 20, 2017

Coverage Status

Coverage decreased (-38.0%) to 62.032% when pulling 28e73d6 on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-38.7%) to 61.29% when pulling 555bead on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented May 26, 2017

Coverage Status

Coverage decreased (-38.7%) to 61.29% when pulling 555bead on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-38.8%) to 61.186% when pulling 3e5d50b on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented May 26, 2017

Coverage Status

Coverage decreased (-38.8%) to 61.186% when pulling 3e5d50b on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling 87f6eef on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented May 26, 2017

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling 87f6eef on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling ad5b7c4 on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented May 26, 2017

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling ad5b7c4 on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling ad5b7c4 on InteractiveObject:master into 38f54a7 on botmasterai:master.

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling ad5b7c4 on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling ad5b7c4 on InteractiveObject:master into 38f54a7 on botmasterai:master.

Coverage Status

Coverage decreased (-17.5%) to 82.48% when pulling ad5b7c4 on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage decreased (-17.3%) to 82.749% when pulling 871c35f on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented May 26, 2017

Coverage Status

Coverage decreased (-17.3%) to 82.749% when pulling 871c35f on InteractiveObject:master into 38f54a7 on botmasterai:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls May 26, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 54017f8 on InteractiveObject:master into 38f54a7 on botmasterai:master.

coveralls commented May 26, 2017

Coverage Status

Coverage remained the same at 100.0% when pulling 54017f8 on InteractiveObject:master into 38f54a7 on botmasterai:master.

jdwuarin added a commit that referenced this pull request May 27, 2017

Add useDefaultMountPathPrepend option to help people set their comple…
…te webhooks with no prepends. This covers GH-23
@jdwuarin

This comment has been minimized.

Show comment
Hide comment
@jdwuarin

jdwuarin May 27, 2017

Member

Support for something along those lines added in 3.1.0

Member

jdwuarin commented May 27, 2017

Support for something along those lines added in 3.1.0

@jdwuarin jdwuarin closed this May 27, 2017

@younes200

This comment has been minimized.

Show comment
Hide comment
@younes200

younes200 Jul 21, 2017

Thanks @jdwuarin and sorry for the delay ;)

Thanks @jdwuarin and sorry for the delay ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment