Merge pull request #74 from PieterVanPoyer/master
CB-12035 (android) Fix bug [cordova-plugin-network-information] connection info is not reliable on Android 6
diff --git a/.appveyor.yml b/.appveyor.yml
index a7b2426..1fc0937 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -12,12 +12,19 @@
- Visual Studio 2017
environment:
- nodejs_version: "4"
+ PLATFORM: windows-10-store
+ JUST_BUILD: --justBuild
matrix:
- - PLATFORM: windows-10-store
- JUST_BUILD: --justBuild
+ - nodejs_version: "6"
+ - nodejs_version: "8"
+ - nodejs_version: "10"
+
+platform:
+ - x86
+ - x64
+
install:
- - npm cache clean -f
+ - ps: Install-Product node $env:nodejs_version
- node --version
- npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git
- npm install -g cordova
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 0000000..3220c25
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,42 @@
+<!--
+Please have a look at the issue templates you get when you click "New issue" in the GitHub UI.
+We very much prefer issues created by using one of these templates.
+-->
+
+### Issue Type
+<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
+
+- [ ] Bug Report
+- [ ] Feature Request
+- [ ] Support Question
+
+## Description
+
+## Information
+<!-- Include all relevant information that might help understand and reproduce the problem -->
+
+### Command or Code
+<!-- What command or code is needed to reproduce the problem? -->
+
+### Environment, Platform, Device
+<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
+
+
+
+### Version information
+<!--
+What are relevant versions you are using?
+For example:
+Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
+Other Frameworks: Ionic Framework and CLI version
+Operating System, Android Studio, Xcode etc.
+-->
+
+
+
+## Checklist
+<!-- Please check the boxes by putting an `x` in the `[ ]` like so: `[x]` -->
+
+- [ ] I searched for already existing GitHub issues about this
+- [ ] I updated all Cordova tooling to their most recent version
+- [ ] I included all the necessary information above
diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md
new file mode 100644
index 0000000..bd8a3ac
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md
@@ -0,0 +1,50 @@
+---
+name: 🐛 Bug Report
+about: If something isn't working as expected.
+
+---
+
+# Bug Report
+
+## Problem
+
+### What is expected to happen?
+
+
+
+### What does actually happen?
+
+
+
+## Information
+<!-- Include all relevant information that might help understand and reproduce the problem -->
+
+
+
+### Command or Code
+<!-- What command or code is needed to reproduce the problem? -->
+
+
+
+### Environment, Platform, Device
+<!-- In what environment, on what platform or on which device are you experiencing the issue? -->
+
+
+
+### Version information
+<!--
+What are relevant versions you are using?
+For example:
+Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins
+Other Frameworks: Ionic Framework and CLI version
+Operating System, Android Studio, Xcode etc.
+-->
+
+
+
+## Checklist
+<!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
+
+- [ ] I searched for existing GitHub issues
+- [ ] I updated all Cordova tooling to most recent version
+- [ ] I included all the necessary information above
diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
new file mode 100644
index 0000000..381fc8a
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md
@@ -0,0 +1,29 @@
+---
+name: 🚀 Feature Request
+about: A suggestion for a new functionality
+
+---
+
+# Feature Request
+
+## Motivation Behind Feature
+<!-- Why should this feature be implemented? What problem does it solve? -->
+
+
+
+## Feature Description
+<!--
+Describe your feature request in detail
+Please provide any code examples or screenshots of what this feature would look like
+Are there any drawbacks? Will this break anything for existing users?
+-->
+
+
+
+## Alternatives or Workarounds
+<!--
+Describe alternatives or workarounds you are currently using
+Are there ways to do this with existing functionality?
+-->
+
+
diff --git a/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
new file mode 100644
index 0000000..516c6e6
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/SUPPORT_QUESTION.md
@@ -0,0 +1,27 @@
+---
+name: 💬 Support Question
+about: If you have a question, please check out our Slack or StackOverflow!
+
+---
+
+<!------------^ Click "Preview" for a nicer view! -->
+
+Apache Cordova uses GitHub Issues as a feature request and bug tracker _only_.
+For usage and support questions, please check out the resources below. Thanks!
+
+---
+
+You can get answers to your usage and support questions about **Apache Cordova** on:
+
+* Slack Community Chat: https://cordova.slack.com (you can sign-up at http://slack.cordova.io/)
+* StackOverflow: https://stackoverflow.com/questions/tagged/cordova using the tag `cordova`
+
+---
+
+If you are using a tool that uses Cordova internally, like e.g. Ionic, check their support channels:
+
+* **Ionic Framework**
+ * [Ionic Community Forum](https://forum.ionicframework.com/)
+ * [Ionic Worldwide Slack](https://ionicworldwide.herokuapp.com/)
+* **PhoneGap**
+ * [PhoneGap Developer Community](https://forums.adobe.com/community/phonegap)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 91582f4..712b2ff 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,6 +1,5 @@
<!--
-Please make sure the checklist boxes are all checked before submitting the PR. The checklist
-is intended as a quick reference, for complete details please see our Contributor Guidelines:
+Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
@@ -10,13 +9,27 @@
### Platforms affected
-### What does this PR do?
+
+### Motivation and Context
+<!-- Why is this change required? What problem does it solve? -->
+<!-- If it fixes an open issue, please link to the issue here. -->
-### What testing has been done on this change?
+
+### Description
+<!-- Describe your changes in detail -->
+
+
+
+### Testing
+<!-- Please describe in detail how you tested your changes. -->
+
### Checklist
-- [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) in the JIRA database
-- [ ] 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.
+
+- [ ] I've run the tests to see all new and existing tests pass
+- [ ] I added automated test coverage as appropriate for this change
+- [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
+- [ ] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
+- [ ] I've updated the documentation if necessary
diff --git a/.travis.yml b/.travis.yml
index 56f856f..d2c855f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,86 +1,73 @@
sudo: false
+
addons:
jwt:
secure: iFkpgKg4VvsMDC/5MSUGZAOM+vVMWqLPK6qgwdMFvCym+eySk0LKRUi9BmgFMyy9qDGVlg8Sqkgg8ElbdjJbai5m2N/0e1MW2YqSGAvJx1FkWp8uaVDmkBCXO+VKOCQmujyxi6RbUPvMhUI5kzjMuKu0pi8QYg/bqLbdBR2TRis=
env:
global:
- - SAUCE_USERNAME=snay
- - TRAVIS_NODE_VERSION="4.2"
+ - SAUCE_USERNAME=snay
+ - TRAVIS_NODE_VERSION=6
+
+language: node_js
+node_js: 6
+
matrix:
include:
- - env: PLATFORM=browser-chrome
- os: linux
- language: node_js
- node_js: '4.2'
- - env: PLATFORM=browser-firefox
- os: linux
- language: node_js
- node_js: '4.2'
- - env: PLATFORM=browser-safari
- os: linux
- language: node_js
- node_js: '4.2'
- - env: PLATFORM=browser-edge
- os: linux
- language: node_js
- node_js: '4.2'
- - env: PLATFORM=ios-9.3
- os: osx
- osx_image: xcode7.3
- language: node_js
- node_js: '4.2'
- - env: PLATFORM=ios-10.0
- os: osx
- osx_image: xcode7.3
- language: node_js
- node_js: '4.2'
- - env: PLATFORM=android-4.4
- os: linux
- language: android
- jdk: oraclejdk8
- android:
- components:
- - tools
- - build-tools-26.0.2
- - env: PLATFORM=android-5.1
- os: linux
- language: android
- jdk: oraclejdk8
- android:
- components:
- - tools
- - build-tools-26.0.2
- - env: PLATFORM=android-6.0
- os: linux
- language: android
- jdk: oraclejdk8
- android:
- components:
- - tools
- - build-tools-26.0.2
- - env: PLATFORM=android-7.0
- os: linux
- language: android
- jdk: oraclejdk8
- android:
- components:
- - tools
- - build-tools-26.0.2
+ - env: PLATFORM=browser-chrome
+ - env: PLATFORM=browser-firefox
+ - env: PLATFORM=browser-safari
+ - env: PLATFORM=browser-edge
+ - env: PLATFORM=ios-9.3
+ os: osx
+ osx_image: xcode7.3
+ - env: PLATFORM=ios-10.0
+ os: osx
+ osx_image: xcode7.3
+ - env: PLATFORM=android-4.4
+ os: linux
+ language: android
+ jdk: oraclejdk8
+ android:
+ components:
+ - tools
+ - build-tools-26.0.2
+ - env: PLATFORM=android-5.1
+ os: linux
+ language: android
+ jdk: oraclejdk8
+ android:
+ components:
+ - tools
+ - build-tools-26.0.2
+ - env: PLATFORM=android-6.0
+ os: linux
+ language: android
+ jdk: oraclejdk8
+ android:
+ components:
+ - tools
+ - build-tools-26.0.2
+ - env: PLATFORM=android-7.0
+ os: linux
+ language: android
+ jdk: oraclejdk8
+ android:
+ components:
+ - tools
+ - build-tools-26.0.2
before_install:
-- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm
- && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm
- install $TRAVIS_NODE_VERSION
-- node --version
-- if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
-- if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
-- if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26;
- fi
-- git clone https://github.com/apache/cordova-paramedic /tmp/paramedic && pushd /tmp/paramedic
- && npm install && popd
-- npm install -g cordova
+ # `language: android` has no Node.js installed, therefore we need to install it manually
+ - if [[ "$PLATFORM" =~ android ]]; then nvm install $TRAVIS_NODE_VERSION; fi
+ - node --version
+ - if [[ "$PLATFORM" =~ android ]]; then gradle --version; fi
+ - if [[ "$PLATFORM" =~ ios ]]; then npm install -g ios-deploy; fi
+ - if [[ "$PLATFORM" =~ android ]]; then echo y | android update sdk -u --filter android-22,android-23,android-24,android-25,android-26,android-27; fi
+ - npm install -g cordova-paramedic@https://github.com/apache/cordova-paramedic.git
+ - npm install -g cordova
+
install:
-- npm install
+ - npm install
+
script:
-- npm test
-- node /tmp/paramedic/main.js --config pr/$PLATFORM --plugin $(pwd) --shouldUseSauce
- --buildName travis-plugin-network-information-$TRAVIS_JOB_NUMBER
+ - npm test
+ - cordova-paramedic --config pr/$PLATFORM --plugin $TRAVIS_BUILD_DIR --shouldUseSauce --buildName travis-$TRAVIS_REPO_SLUG-$TRAVIS_JOB_NUMBER
diff --git a/README.md b/README.md
index 1bcb8f3..2eb6b52 100644
--- a/README.md
+++ b/README.md
@@ -35,10 +35,6 @@
> To get a few ideas how to use the plugin, check out the [sample](#sample) at the bottom of this page or go straight to the [reference](#reference) content.
-Report issues with this plugin on the [Apache Cordova issue tracker][Apache Cordova issue tracker].
-
-##<a name="reference"></a>Reference
-
## Installation
cordova plugin add cordova-plugin-network-information