[ 
https://issues.apache.org/jira/browse/CB-12186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15696366#comment-15696366
 ] 

ASF GitHub Bot commented on CB-12186:
-------------------------------------

GitHub user filmaj opened a pull request:

    https://github.com/apache/cordova-mobile-spec/pull/142

    [CB-12186] [create script] Support passing in of `--variable` flags to 
plugins

    ### Platforms affected
    
    All.
    
    ### What does this PR do?
    
    Using mobile-spec's `createmobilespec` helper script to create a mobile app 
wrapping mobile-spec, you can now pass `--variable` flags down to the plugins 
composing the app shell.
    
    Singular use case this satisfies at the moment: [passing in a server 
endpoint for pointing the file-transfer plugin's tests 
to](https://github.com/apache/cordova-plugin-file-transfer/blob/master/tests/plugin.xml#L33).
 
    
    ### What testing has been done on this change?
    
    After running:
    
    ```
       ➔ ./cordova-mobile-spec/createmobilespec/createmobilespec.js --debug 
--android --variable 
"FILETRANSFER_SERVER_ADDRESS=\"http://evening-reaches-13417.herokuapp.com:5000\"";
 mobspec-android
    ```
    
    .. I was able to successfully create an Android app that pointed to the 
specified server target URL:
    
    ```
    ~/src/mobspec-android via ⬢ v6.9.1
    ➔ ack heroku platforms/android
    platforms/android/android.json
    274:            "FILETRANSFER_SERVER_ADDRESS": 
"http://evening-reaches-13417.herokuapp.com:5000";,
    
    platforms/android/assets/www/fileTransferOpts.json
    1:{"serverAddress":"http://evening-reaches-13417.herokuapp.com:5000"}
    ```
    
    ### Checklist
    - [x] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database: [CB-12186](https://issues.apache.org/jira/browse/CB-12186)
    - [x] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform 
affected.
    - [ ] Added automated test coverage as appropriate for this change. Womp 
womp, no test coverage in place for this script anyways.

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

    $ git pull https://github.com/filmaj/cordova-mobile-spec 
create-plugin-var-support

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

    https://github.com/apache/cordova-mobile-spec/pull/142.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 #142
    
----
commit 859f1ebabdba1e10c520bd1dcc9502c2b813b4a3
Author: filmaj <[email protected]>
Date:   2016-11-25T17:23:54Z

    [CB-12186] [create script] Support passing in of `--variable` flags to 
plugins. Need to be more defensive about empty searchpath use, otherwise it 
fails.

----


> Cannot pass `--variable` flags to plugins via createmobilescript helper
> -----------------------------------------------------------------------
>
>                 Key: CB-12186
>                 URL: https://issues.apache.org/jira/browse/CB-12186
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: mobile-spec
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to