Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new plugin testing #39

Merged
merged 4 commits into from
Mar 23, 2014
Merged

new plugin testing #39

merged 4 commits into from
Mar 23, 2014

Conversation

jairot
Copy link
Contributor

@jairot jairot commented Mar 23, 2014

Testing for the new plugin and template from json on first load.

@jairot
Copy link
Contributor Author

jairot commented Mar 23, 2014

In he last commit, the command updates the json from the registry repo.

def on_load(ctx, path):
with open(ctx.path_to_plugin_file("new", "templates.json")) as fp:
ctx.TEMPLATES = load(fp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a place to store stuff per plugin

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ctx.plugin_store["new"]["TEMPLATES"] ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one extra parameter called state could be used that is a mix between an object and a dict to have a nicer syntax or maybe ctx.state.new where the state is initialized for each plugin that is registered?

marianoguerra added a commit that referenced this pull request Mar 23, 2014
@marianoguerra marianoguerra merged commit 652babd into pebete:master Mar 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants