Skip to content

Use root .bowerrc as starting point, rather than creating one from scratch - #40

Merged
SergeyKishenin merged 1 commit into
rharriso:masterfrom
vattay:merge-dot-bowerrc
Nov 12, 2013
Merged

Use root .bowerrc as starting point, rather than creating one from scratch#40
SergeyKishenin merged 1 commit into
rharriso:masterfrom
vattay:merge-dot-bowerrc

Conversation

@vattay

@vattay vattay commented Nov 9, 2013

Copy link
Copy Markdown

In the case where a custom .bowerrc is needed, for example, with custom registries, it seemed that bower-rails was ignoring .bowerrc in the rails root directory, and generating a new .bowerrc per group. This loses any required settings. I didn't see any other way to set registries in bower-rails.

This PR reads the root .bowerrc, and merges in the "bower_components" directory to create the new generated .bowerrc files.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 9bca02b on 3martini:merge-dot-bowerrc into b1cc827 on 42dev:master.

@SergeyKishenin

Copy link
Copy Markdown
Collaborator

Seems like we should create .bowerrc at the project's root manually to make this feature work, right? It's not the preferred way, I think. Have you tried to run tasks if there is no .bowerrc there?

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling fa2c7c1 on 3martini:merge-dot-bowerrc into b1cc827 on 42dev:master.

@vattay

vattay commented Nov 9, 2013

Copy link
Copy Markdown
Author

You were right, I forgot that a .bowerrc is optional. Added a check if the file exists.

Solution is a bit ugly since I have copied the read_bowerrc function in both the dsl.rb and bower.rake, do you think a static utility class is called for?

@rharriso

Copy link
Copy Markdown
Owner

looks like pull request #41 created some conflicts. Please resubmit pull.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling 556bd8a on 3martini:merge-dot-bowerrc into 67f9f1f on 42dev:master.

@vattay

vattay commented Nov 12, 2013

Copy link
Copy Markdown
Author

@rharriso I merged the changes and rebased, should be good for a clean pull.

@SergeyKishenin

Copy link
Copy Markdown
Collaborator

Conflicts @ Changelog.md now. Rebase again, please.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage remained the same when pulling bcb0416 on 3martini:merge-dot-bowerrc into 8e410af on 42dev:master.

SergeyKishenin added a commit that referenced this pull request Nov 12, 2013
Use root .bowerrc as starting point, rather than creating one from scratch
@SergeyKishenin
SergeyKishenin merged commit 5f11961 into rharriso:master Nov 12, 2013
@SergeyKishenin

Copy link
Copy Markdown
Collaborator

Thanks, merged!

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.

4 participants