Skip to content

Enabled multiple space configuration#24

Merged
jvandemo merged 5 commits intojvandemo:masterfrom
vuk:master
May 19, 2017
Merged

Enabled multiple space configuration#24
jvandemo merged 5 commits intojvandemo:masterfrom
vuk:master

Conversation

@vuk
Copy link
Contributor

@vuk vuk commented Apr 28, 2017

Idea behind this is to enable multiple space initialization.
Basically instead of doing

    contentfulProvider.setOptions({
        space: 'yourSpace',
        accessToken: 'yourAccessToken'
    });

You can do

    contentfulProvider.setOptions(
        'default': {
          space: 'first_space',
          accessToken: 'first_token',
        },
        'another': {
          space: 'second_space',
          accessToken: 'second_token',
        });

Although the first one will still work as it will default to default and if you use package as it was originally it would still work as expected

@jvandemo
Copy link
Owner

jvandemo commented May 2, 2017

@vuk — Thank you, this looks very promising!

Can you please add a section to the README.md to explain how it works including example code as you have listed above?

Thanks in advance for your great effort!

@vuk
Copy link
Contributor Author

vuk commented May 2, 2017

I've updated Readme file. Please check if it fits, although I don't think I missed anything major.

@jvandemo
Copy link
Owner

jvandemo commented May 2, 2017

@vuk — Thank you for your quick follow-up.

Defaults to default key, or if only one space settings are passed it will use that one.

Can you please add an example of how to pass in a key and how to pass in space settings?

Then I can review everything and merge if all works as expected.

Thanks again! 👍

@vuk
Copy link
Contributor Author

vuk commented May 2, 2017

It's updated now. I gave a short sample how methods can be called with option keys with note that parameter can be omitted. I gave a sample initialization of provider with alternative call to setOptions in Usage section as well.

@jvandemo
Copy link
Owner

jvandemo commented May 9, 2017

@vuk — Thank you, I should be able to merge your PR later this week 👍

@vuk
Copy link
Contributor Author

vuk commented May 9, 2017

Great, thanks. If it's not too big of a hassle, can you let me know when you merge if it will be in release 2.1.1 or 2.2.0?

@jvandemo
Copy link
Owner

jvandemo commented May 9, 2017

If everything is backwards compatible, the new version will be 2.2.0.

Is something may break existing code, the new version will be 3.0.0.

From what I can see now, it will thus be 2.2.0. Hope that helps!

@vuk
Copy link
Contributor Author

vuk commented May 9, 2017

Yes. I aimed to keep backwards compatibility completely

@vuk
Copy link
Contributor Author

vuk commented May 18, 2017

Just to check up if there is a time frame for next release, as I'm using it in a project :)

@jvandemo jvandemo merged commit 34a6031 into jvandemo:master May 19, 2017
@jvandemo
Copy link
Owner

@vuk — Your changes have been merged and released as v2.2.0.

Thank you for your contribution! 👍

PS: would you be interested in adding support for multiple spaces to the directives as well? Thanks again!

@vuk
Copy link
Contributor Author

vuk commented May 19, 2017

I'll work on adding another parameter to directives in next few days

@jvandemo
Copy link
Owner

Brilliant! Thank you, Vuk, much appreciated! 👍 🥇

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