Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make update URL configurable. #776

Merged
merged 2 commits into from Mar 21, 2018
Merged

Conversation

mrstegeman
Copy link
Contributor

This is the first step required for #697.

@ghost ghost assigned mrstegeman Mar 21, 2018
@ghost ghost added the review label Mar 21, 2018
@mrstegeman
Copy link
Contributor Author

I suggest turning whitespace off in the diff: https://github.com/mozilla-iot/gateway/pull/776/files?w=1

This is the first step required for WebThingsIO#697.
@codecov-io
Copy link

codecov-io commented Mar 21, 2018

Codecov Report

Merging #776 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #776      +/-   ##
==========================================
+ Coverage   78.85%   78.86%   +0.01%     
==========================================
  Files          85       85              
  Lines        3457     3459       +2     
  Branches      452      452              
==========================================
+ Hits         2726     2728       +2     
  Misses        672      672              
  Partials       59       59
Impacted Files Coverage Δ
config/default.js 100% <ø> (ø) ⬆️
src/controllers/updates_controller.js 80.26% <100%> (+0.53%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7887055...12ff968. Read the comment docs.

Copy link
Contributor

@hobinjk hobinjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one minor change inline

}
fetch(config.get('updateUrl'),
{headers: {'User-Agent': `mozilla-iot-gateway/${pkg.version}`}})
.then(res => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should be consistent with line 13 (which means it wouldn't have the extra indentation either)

@@ -1,61 +1,63 @@
const config = require('config');
const exec = require('child_process').exec;
const fetch = require('node-fetch');
const fs = require('fs');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import causing tests to fail

@mrstegeman mrstegeman merged commit 466ca7c into WebThingsIO:master Mar 21, 2018
@ghost ghost removed the review label Mar 21, 2018
@mrstegeman mrstegeman deleted the update-url branch March 21, 2018 15:49
@mrstegeman mrstegeman added this to Done in WebThings Gateway Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants