You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by hstaudacher <gi...@git.apache.org> on 2015/07/17 09:35:57 UTC

[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

GitHub user hstaudacher opened a pull request:

    https://github.com/apache/cordova-lib/pull/262

    restore-util.js can't handle git urls

    When adding a plugin to the config.xml using a git url e.g. <plugin name="https://..." /> a spec is not needed because the plugin needs to be checked out by git. The restore-util.js has a bug that uses the spec of a plugin when the spec is not valid. This does not make sense because a) a spec without a name is not a valid plugin and b) a git url doe snot has a spec. This commit changes the resture-util to use the pluginEntry.name instead of the spec if the spec is not valid.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/hstaudacher/cordova-lib master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-lib/pull/262.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #262
    
----
commit 4b509f534da898145162a2b6a4fa0f591af5a8ce
Author: hstaudacher <hs...@eclipsesource.com>
Date:   2015-07-17T07:32:18Z

    restore-util.js can't handle git urls
    
    When adding a plugin to the config.xml using a git url e.g. <plugin name="https://..." /> a spec is not needed because the plugin needs to be checked out by git. The restore-util.js has a bug that uses the spec of a plugin when the spec is not valid. This does not make sense because a) a spec without a name is not a valid plugin and b) a git url doe snot has a spec. This commit changes the resture-util to use the pluginEntry.name instead of the spec if the spec is not valid.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/262#issuecomment-122218149
  
    Also keep in mind that instead of modifying the config.xml manually, you can do : `cordova plugin add https://github.com/apache/cordova-plugin-file.git --save` and it will do the appropriate modifications of config.xml for you.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by hstaudacher <gi...@git.apache.org>.
Github user hstaudacher commented on the pull request:

    https://github.com/apache/cordova-lib/pull/262#issuecomment-122212722
  
    sorry don't see your examples


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by TimBarham <gi...@git.apache.org>.
Github user TimBarham commented on the pull request:

    https://github.com/apache/cordova-lib/pull/262#issuecomment-122245665
  
    To clarify - the `name` is always the plugin name/id. The `spec` is either a version, a version range, or a "location" (locar folder, tarball, git repo) to get the plugin from. If `spec` is a version or range, then the name is necessary and we fully identify the plugin as `<name>@<version>`. If `spec` is a location, then the name is not necessary (since we will install whatever we find at the specified location, regardless of the name), and we can fully identify the plugin with just the location. So the existing code logic is correct.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/262#issuecomment-122217955
  
    Ooops, updated my comments, now you should see the examples.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by hstaudacher <gi...@git.apache.org>.
Github user hstaudacher commented on the pull request:

    https://github.com/apache/cordova-lib/pull/262#issuecomment-122248878
  
    Alright, thanks guys, I couldn't find any documentation for this. Will close the request now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by omefire <gi...@git.apache.org>.
Github user omefire commented on the pull request:

    https://github.com/apache/cordova-lib/pull/262#issuecomment-122212324
  
    Hey @hstaudacher, I think you're using the plugin syntax within config.xml in a wrong way.
    
    It's not supposed to be : <plugin name="https://..." />
    It SHOULD be : <plugin name="name" spec="https://..." />
    
    For example: <plugin name="cordova-plugin-file" spec="https://github.com/apache/cordova-plugin-file.git" />
    
    I think we should file a documentation bug if it isn't clear enough.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-lib pull request: restore-util.js can't handle git urls

Posted by hstaudacher <gi...@git.apache.org>.
Github user hstaudacher closed the pull request at:

    https://github.com/apache/cordova-lib/pull/262


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org