diff --git a/CHANGELOG.md b/CHANGELOG.md index 2549defb..d6584d0e 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,11 +14,13 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Added - Finnish translation for "PRECIP", "UPDATE_INFO_MULTIPLE" and "UPDATE_INFO_SINGLE". +- Added the ability to hide the temp label and weather icon in the `currentweather` module to allow showing only information such as wind and sunset/rise. - Sun and Moon data to the `clock` module. ### Fixed - Force declaration of public ip adress in config file (ISSUE #1852) - Fixes `run-start.sh`: If running in docker-container, don't check the environment, just start electron (ISSUE #1859) +- Fix calendar time offset for recurring events crossing Daylight Savings Time (ISSUE #1798) ### Updated - Remove documentation from core repository and link to new dedicated docs site: [docs.magicmirror.builders](https://docs.magicmirror.builders). diff --git a/Gruntfile.js b/Gruntfile.js index ee4ab7b8..a825a766 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -77,7 +77,8 @@ module.exports = function(grunt) { "MD018": false, "MD012": false, "MD026": false, - "MD038": false + "MD038": false, + "MD047": false } }, src: [ diff --git a/config/config.js.sample b/config/config.js.sample index 3b3bb71e..1ab46833 100644 --- a/config/config.js.sample +++ b/config/config.js.sample @@ -25,11 +25,11 @@ var config = { timeFormat: 24, units: "metric", // serverOnly: true/false/"local" , - // local for armv6l processors, default + // local for armv6l processors, default // starts serveronly and then starts chrome browser // false, default for all NON-armv6l devices // true, force serveronly mode, because you want to.. no UI on this device - + modules: [ { module: "alert", diff --git a/modules/default/alert/README.md b/modules/default/alert/README.md index 3bd5d00d..4d3c6a65 100644 --- a/modules/default/alert/README.md +++ b/modules/default/alert/README.md @@ -1,4 +1,4 @@ # Module: Alert The alert module is one of the default modules of the MagicMirror. This module displays notifications from other modules. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/alert.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/alert.html). diff --git a/modules/default/calendar/README.md b/modules/default/calendar/README.md index fbb8bfd9..5c8f187b 100755 --- a/modules/default/calendar/README.md +++ b/modules/default/calendar/README.md @@ -2,4 +2,4 @@ The `calendar` module is one of the default modules of the MagicMirror. This module displays events from a public .ical calendar. It can combine multiple calendars. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/calendar.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/calendar.html). diff --git a/modules/default/calendar/calendarfetcher.js b/modules/default/calendar/calendarfetcher.js index d705905c..a9bf37ee 100644 --- a/modules/default/calendar/calendarfetcher.js +++ b/modules/default/calendar/calendarfetcher.js @@ -184,7 +184,14 @@ var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntri // For recurring events, get the set of start dates that fall within the range // of dates we"re looking for. - var dates = rule.between(past, future, true, limitFunction); + // kblankenship1989 - to fix issue #1798, converting all dates to locale time first, then converting back to UTC time + var pastLocal = moment(past).subtract(past.getTimezoneOffset(), "minutes").toDate(); + var futureLocal = moment(future).subtract(future.getTimezoneOffset(), "minutes").toDate(); + var datesLocal = rule.between(pastLocal, futureLocal, true, limitFunction); + var dates = datesLocal.map(function(dateLocal) { + var date = moment(dateLocal).add(dateLocal.getTimezoneOffset(), "minutes").toDate(); + return date; + }); // The "dates" array contains the set of dates within our desired date range range that are valid // for the recurrence rule. *However*, it"s possible for us to have a specific recurrence that diff --git a/modules/default/calendar/vendor/ical.js/node-ical.js b/modules/default/calendar/vendor/ical.js/node-ical.js index 14855d63..1da04375 100644 --- a/modules/default/calendar/vendor/ical.js/node-ical.js +++ b/modules/default/calendar/vendor/ical.js/node-ical.js @@ -26,6 +26,17 @@ exports.parseFile = function(filename){ var rrule = require('rrule').RRule +function getLocaleISOString(date) { + var year = date.getFullYear().toString(10).padStart(4,'0'); + var month = date.getMonth().toString(10).padStart(2,'0'); + var day = date.getDate().toString(10).padStart(2,'0'); + var hour = date.getHours().toString(10).padStart(2,'0'); + var minute = date.getMinutes().toString(10).padStart(2,'0'); + var second = date.getSeconds().toString(10).padStart(2,'0'); + + return `${year}${month}${day}T${hour}${minute}${second}Z`; +} + ical.objectHandlers['RRULE'] = function(val, params, curr, stack, line){ curr.rrule = line; return curr @@ -50,8 +61,8 @@ ical.objectHandlers['END'] = function (val, params, curr, stack) { if (typeof curr.start.toISOString === 'function') { try { - rule += ';DTSTART=' + curr.start.toISOString().replace(/[-:]/g, ''); - rule = rule.replace(/\.[0-9]{3}/, ''); + // kblankenship1989 - to fix issue #1798, converting all dates to locale time first, then converting back to UTC time + rule += ';DTSTART=' + getLocaleISOString(curr.start); } catch (error) { console.error("ERROR when trying to convert to ISOString", error); } diff --git a/modules/default/clock/README.md b/modules/default/clock/README.md index 1c0bdf8c..34a1448d 100644 --- a/modules/default/clock/README.md +++ b/modules/default/clock/README.md @@ -2,4 +2,4 @@ The `clock` module is one of the default modules of the MagicMirror. This module displays the current date and time. The information will be updated realtime. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/clock.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/clock.html). diff --git a/modules/default/compliments/README.md b/modules/default/compliments/README.md index 7825bb02..c746f318 100644 --- a/modules/default/compliments/README.md +++ b/modules/default/compliments/README.md @@ -2,4 +2,4 @@ The `compliments` module is one of the default modules of the MagicMirror. This module displays a random compliment. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/compliments.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/compliments.html). diff --git a/modules/default/compliments/compliments.js b/modules/default/compliments/compliments.js index 198664b7..606da1df 100644 --- a/modules/default/compliments/compliments.js +++ b/modules/default/compliments/compliments.js @@ -39,7 +39,7 @@ Module.register("compliments", { afternoonEndTime: 17, random: true }, - lastIndexUsed:-1, + lastIndexUsed:-1, // Set currentweather from module currentWeatherType: "", @@ -151,7 +151,7 @@ Module.register("compliments", { // get the current time of day compliments list var compliments = this.complimentArray(); // variable for index to next message to display - let index=0 + let index=0; // are we randomizing if(this.config.random){ // yes @@ -160,28 +160,28 @@ Module.register("compliments", { else{ // no, sequetial // if doing sequential, don't fall off the end - index = (this.lastIndexUsed >= (compliments.length-1))?0: ++this.lastIndexUsed + index = (this.lastIndexUsed >= (compliments.length-1))?0: ++this.lastIndexUsed; } return compliments[index]; }, -// Override dom generator. + // Override dom generator. getDom: function() { var wrapper = document.createElement("div"); wrapper.className = this.config.classes ? this.config.classes : "thin xlarge bright pre-line"; - // get the compliment text + // get the compliment text var complimentText = this.randomCompliment(); - // split it into parts on newline text - var parts= complimentText.split('\n') + // split it into parts on newline text + var parts= complimentText.split("\n"); // create a span to hold it all - var compliment=document.createElement('span') - // process all the parts of the compliment text + var compliment=document.createElement("span"); + // process all the parts of the compliment text for (part of parts){ // create a text element for each part - compliment.appendChild(document.createTextNode(part)) + compliment.appendChild(document.createTextNode(part)); // add a break ` - compliment.appendChild(document.createElement('BR')) + compliment.appendChild(document.createElement("BR")); } // remove the last break compliment.lastElementChild.remove(); diff --git a/modules/default/currentweather/README.md b/modules/default/currentweather/README.md index 3cbdcbea..27b047da 100644 --- a/modules/default/currentweather/README.md +++ b/modules/default/currentweather/README.md @@ -2,4 +2,4 @@ The `currentweather` module is one of the default modules of the MagicMirror. This module displays the current weather, including the windspeed, the sunset or sunrise time, the temperature and an icon to display the current conditions. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/currentweather.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/currentweather.html). diff --git a/modules/default/currentweather/currentweather.js b/modules/default/currentweather/currentweather.js index 7d917132..dcf771af 100644 --- a/modules/default/currentweather/currentweather.js +++ b/modules/default/currentweather/currentweather.js @@ -44,6 +44,7 @@ Module.register("currentweather",{ calendarClass: "calendar", onlyTemp: false, + hideTemp: false, roundTemp: false, iconTable: { @@ -194,36 +195,38 @@ Module.register("currentweather",{ var large = document.createElement("div"); large.className = "large light"; - var weatherIcon = document.createElement("span"); - weatherIcon.className = "wi weathericon " + this.weatherType; - large.appendChild(weatherIcon); + if (this.config.hideTemp === true) { + var weatherIcon = document.createElement("span"); + weatherIcon.className = "wi weathericon " + this.weatherType; + large.appendChild(weatherIcon); - var degreeLabel = ""; - if (this.config.units === "metric" || this.config.units === "imperial") { - degreeLabel += "°"; - } - if(this.config.degreeLabel) { - switch(this.config.units) { - case "metric": - degreeLabel += "C"; - break; - case "imperial": - degreeLabel += "F"; - break; - case "default": - degreeLabel += "K"; - break; + var degreeLabel = ""; + if (this.config.units === "metric" || this.config.units === "imperial") { + degreeLabel += "°"; + } + if(this.config.degreeLabel) { + switch(this.config.units) { + case "metric": + degreeLabel += "C"; + break; + case "imperial": + degreeLabel += "F"; + break; + case "default": + degreeLabel += "K"; + break; + } } - } - if (this.config.decimalSymbol === "") { - this.config.decimalSymbol = "."; - } + if (this.config.decimalSymbol === "") { + this.config.decimalSymbol = "."; + } - var temperature = document.createElement("span"); - temperature.className = "bright"; - temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel; - large.appendChild(temperature); + var temperature = document.createElement("span"); + temperature.className = "bright"; + temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + degreeLabel; + large.appendChild(temperature); + } if (this.config.showIndoorTemperature && this.indoorTemperature) { var indoorIcon = document.createElement("span"); diff --git a/modules/default/helloworld/README.md b/modules/default/helloworld/README.md index aa9f87f3..8ad06f77 100644 --- a/modules/default/helloworld/README.md +++ b/modules/default/helloworld/README.md @@ -1,4 +1,4 @@ # Module: Hello World The `helloworld` module is one of the default modules of the MagicMirror. It is a simple way to display a static text on the mirror. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/helloworld.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/helloworld.html). diff --git a/modules/default/newsfeed/README.md b/modules/default/newsfeed/README.md index 4dc4877b..33690aa6 100644 --- a/modules/default/newsfeed/README.md +++ b/modules/default/newsfeed/README.md @@ -2,4 +2,4 @@ The `newsfeed ` module is one of the default modules of the MagicMirror. This module displays news headlines based on an RSS feed. Scrolling through news headlines happens time-based (````updateInterval````), but can also be controlled by sending news feed specific notifications to the module. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/newsfeed.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/newsfeed.html). diff --git a/modules/default/updatenotification/README.md b/modules/default/updatenotification/README.md index 652f451f..af6305e6 100644 --- a/modules/default/updatenotification/README.md +++ b/modules/default/updatenotification/README.md @@ -2,4 +2,4 @@ The `updatenotification` module is one of the default modules of the MagicMirror. This will display a message whenever a new version of the MagicMirror application is available. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/updatenotification.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/updatenotification.html). diff --git a/modules/default/weather/README.md b/modules/default/weather/README.md index 5b03b141..ebc301f4 100755 --- a/modules/default/weather/README.md +++ b/modules/default/weather/README.md @@ -2,4 +2,4 @@ This module is aimed to be the replacement for the current `currentweather` and `weatherforcast` modules. The module will be configurable to be used as a current weather view, or to show the forecast. This way the module can be used twice to fullfil both purposes. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/weather.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/weather.html). diff --git a/modules/default/weatherforecast/README.md b/modules/default/weatherforecast/README.md index 95762daa..7dfbd16f 100644 --- a/modules/default/weatherforecast/README.md +++ b/modules/default/weatherforecast/README.md @@ -2,4 +2,4 @@ The `weatherforecast` module is one of the default modules of the MagicMirror. This module displays the weather forecast for the coming week, including an an icon to display the current conditions, the minimum temperature and the maximum temperature. -For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/weatherforecast.html). \ No newline at end of file +For configuration options, please check the [MagicMirror² documentation](https://docs.magicmirror.builders/modules/weatherforecast.html). diff --git a/tests/configs/modules/weather/forecastweather_default.js b/tests/configs/modules/weather/forecastweather_default.js index 697cbeb4..c87ca260 100644 --- a/tests/configs/modules/weather/forecastweather_default.js +++ b/tests/configs/modules/weather/forecastweather_default.js @@ -6,31 +6,31 @@ */ let config = { - port: 8080, - ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], + port: 8080, + ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], - language: "en", - timeFormat: 12, - units: "metric", - electronOptions: { - webPreferences: { - nodeIntegration: true, - }, - }, + language: "en", + timeFormat: 12, + units: "metric", + electronOptions: { + webPreferences: { + nodeIntegration: true, + }, + }, - modules: [ - { - module: "weather", - position: "bottom_bar", - config: { - type: "forecast", - location: "Munich", - apiKey: "fake key", - weatherEndpoint: "/forecast/daily", - initialLoadDelay: 3000 - } - } - ] + modules: [ + { + module: "weather", + position: "bottom_bar", + config: { + type: "forecast", + location: "Munich", + apiKey: "fake key", + weatherEndpoint: "/forecast/daily", + initialLoadDelay: 3000 + } + } + ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ diff --git a/tests/configs/modules/weather/forecastweather_options.js b/tests/configs/modules/weather/forecastweather_options.js index cc1b8773..82e3da08 100644 --- a/tests/configs/modules/weather/forecastweather_options.js +++ b/tests/configs/modules/weather/forecastweather_options.js @@ -6,34 +6,34 @@ */ let config = { - port: 8080, - ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], + port: 8080, + ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], - language: "en", - timeFormat: 12, - units: "metric", - electronOptions: { - webPreferences: { - nodeIntegration: true, - }, - }, + language: "en", + timeFormat: 12, + units: "metric", + electronOptions: { + webPreferences: { + nodeIntegration: true, + }, + }, - modules: [ - { - module: "weather", - position: "bottom_bar", - config: { - type: "forecast", - location: "Munich", - apiKey: "fake key", - weatherEndpoint: "/forecast/daily", - initialLoadDelay: 3000, - showPrecipitationAmount: true, - colored: true, - tableClass: "myTableClass" - } - } - ] + modules: [ + { + module: "weather", + position: "bottom_bar", + config: { + type: "forecast", + location: "Munich", + apiKey: "fake key", + weatherEndpoint: "/forecast/daily", + initialLoadDelay: 3000, + showPrecipitationAmount: true, + colored: true, + tableClass: "myTableClass" + } + } + ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ diff --git a/tests/e2e/modules/mocks/weather_current.js b/tests/e2e/modules/mocks/weather_current.js index cd87aa11..807ee559 100644 --- a/tests/e2e/modules/mocks/weather_current.js +++ b/tests/e2e/modules/mocks/weather_current.js @@ -1,54 +1,54 @@ -const _ = require('lodash'); +const _ = require("lodash"); function generateWeather(extendedData = {}) { - return JSON.stringify(_.merge({}, { - coord:{ - lon: 11.58, - lat: 48.14 - }, - weather:[ - { - id: 615, - main: "Snow", - description: "light rain and snow", - icon: "13d" - }, - { - id: 500, - main: "Rain", - description: "light rain", - icon: "10d" - } - ], - base: "stations", - main:{ - temp: 1.49, - pressure: 1005, - humidity: 93.7, - temp_min: 1, - temp_max: 2 - }, - visibility: 7000, - wind:{ - speed: 11.8, - deg: 250 - }, - clouds:{ - all: 75 - }, - dt: 1547387400, - sys:{ - type: 1, - id: 1267, - message: 0.0031, - country: "DE", - sunrise: 1547362817, - sunset: 1547394301 - }, - id: 2867714, - name: "Munich", - cod: 200 - }, extendedData)); + return JSON.stringify(_.merge({}, { + coord:{ + lon: 11.58, + lat: 48.14 + }, + weather:[ + { + id: 615, + main: "Snow", + description: "light rain and snow", + icon: "13d" + }, + { + id: 500, + main: "Rain", + description: "light rain", + icon: "10d" + } + ], + base: "stations", + main:{ + temp: 1.49, + pressure: 1005, + humidity: 93.7, + temp_min: 1, + temp_max: 2 + }, + visibility: 7000, + wind:{ + speed: 11.8, + deg: 250 + }, + clouds:{ + all: 75 + }, + dt: 1547387400, + sys:{ + type: 1, + id: 1267, + message: 0.0031, + country: "DE", + sunrise: 1547362817, + sunset: 1547394301 + }, + id: 2867714, + name: "Munich", + cod: 200 + }, extendedData)); } module.exports = generateWeather; diff --git a/tests/e2e/modules/mocks/weather_forecast.js b/tests/e2e/modules/mocks/weather_forecast.js index 420367a0..9e74262f 100644 --- a/tests/e2e/modules/mocks/weather_forecast.js +++ b/tests/e2e/modules/mocks/weather_forecast.js @@ -1,97 +1,97 @@ -const _ = require('lodash'); +const _ = require("lodash"); function generateWeatherForecast(extendedData = {}) { - return JSON.stringify(_.merge({}, { - "city": { - "id": 2867714, - "name": "Munich", - "coord": {"lon": 11.5754, "lat": 48.1371}, - "country": "DE", - "population": 1260391, - "timezone": 7200 - }, - "cod": "200", - "message": 0.9653487, - "cnt": 7, - "list": [{ - "dt": 1568372400, - "sunrise": 1568350044, - "sunset": 1568395948, - "temp": {"day": 24.44, "min": 15.35, "max": 24.44, "night": 15.35, "eve": 18, "morn": 23.03}, - "pressure": 1031.65, - "humidity": 70, - "weather": [{"id": 801, "main": "Clouds", "description": "few clouds", "icon": "02d"}], - "speed": 3.35, - "deg": 314, - "clouds": 21 - }, { - "dt": 1568458800, - "sunrise": 1568436525, - "sunset": 1568482223, - "temp": {"day": 20.81, "min": 13.56, "max": 21.02, "night": 13.56, "eve": 16.6, "morn": 15.88}, - "pressure": 1028.81, - "humidity": 72, - "weather": [{"id": 500, "main": "Rain", "description": "light rain", "icon": "10d"}], - "speed": 2.21, - "deg": 81, - "clouds": 100 - }, { - "dt": 1568545200, - "sunrise": 1568523007, - "sunset": 1568568497, - "temp": {"day": 22.65, "min": 13.76, "max": 22.88, "night": 15.27, "eve": 17.45, "morn": 13.76}, - "pressure": 1023.75, - "humidity": 64, - "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], - "speed": 1.15, - "deg": 7, - "clouds": 0 - }, { - "dt": 1568631600, - "sunrise": 1568609489, - "sunset": 1568654771, - "temp": {"day": 23.45, "min": 13.95, "max": 23.45, "night": 13.95, "eve": 17.75, "morn": 15.21}, - "pressure": 1020.41, - "humidity": 64, - "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], - "speed": 3.07, - "deg": 298, - "clouds": 7 - }, { - "dt": 1568718000, - "sunrise": 1568695970, - "sunset": 1568741045, - "temp": {"day": 20.55, "min": 10.95, "max": 20.55, "night": 10.95, "eve": 14.82, "morn": 13.24}, - "pressure": 1019.4, - "humidity": 66, - "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], - "speed": 2.8, - "deg": 333, - "clouds": 2 - }, { - "dt": 1568804400, - "sunrise": 1568782452, - "sunset": 1568827319, - "temp": {"day": 18.15, "min": 7.75, "max": 18.15, "night": 7.75, "eve": 12.45, "morn": 9.41}, - "pressure": 1017.56, - "humidity": 52, - "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], - "speed": 2.92, - "deg": 34, - "clouds": 0 - }, { - "dt": 1568890800, - "sunrise": 1568868934, - "sunset": 1568913593, - "temp": {"day": 14.85, "min": 5.56, "max": 15.05, "night": 5.56, "eve": 9.56, "morn": 6.25}, - "pressure": 1022.7, - "humidity": 59, - "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], - "speed": 2.89, - "deg": 51, - "clouds": 1 - }] - }, extendedData)); + return JSON.stringify(_.merge({}, { + "city": { + "id": 2867714, + "name": "Munich", + "coord": {"lon": 11.5754, "lat": 48.1371}, + "country": "DE", + "population": 1260391, + "timezone": 7200 + }, + "cod": "200", + "message": 0.9653487, + "cnt": 7, + "list": [{ + "dt": 1568372400, + "sunrise": 1568350044, + "sunset": 1568395948, + "temp": {"day": 24.44, "min": 15.35, "max": 24.44, "night": 15.35, "eve": 18, "morn": 23.03}, + "pressure": 1031.65, + "humidity": 70, + "weather": [{"id": 801, "main": "Clouds", "description": "few clouds", "icon": "02d"}], + "speed": 3.35, + "deg": 314, + "clouds": 21 + }, { + "dt": 1568458800, + "sunrise": 1568436525, + "sunset": 1568482223, + "temp": {"day": 20.81, "min": 13.56, "max": 21.02, "night": 13.56, "eve": 16.6, "morn": 15.88}, + "pressure": 1028.81, + "humidity": 72, + "weather": [{"id": 500, "main": "Rain", "description": "light rain", "icon": "10d"}], + "speed": 2.21, + "deg": 81, + "clouds": 100 + }, { + "dt": 1568545200, + "sunrise": 1568523007, + "sunset": 1568568497, + "temp": {"day": 22.65, "min": 13.76, "max": 22.88, "night": 15.27, "eve": 17.45, "morn": 13.76}, + "pressure": 1023.75, + "humidity": 64, + "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], + "speed": 1.15, + "deg": 7, + "clouds": 0 + }, { + "dt": 1568631600, + "sunrise": 1568609489, + "sunset": 1568654771, + "temp": {"day": 23.45, "min": 13.95, "max": 23.45, "night": 13.95, "eve": 17.75, "morn": 15.21}, + "pressure": 1020.41, + "humidity": 64, + "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], + "speed": 3.07, + "deg": 298, + "clouds": 7 + }, { + "dt": 1568718000, + "sunrise": 1568695970, + "sunset": 1568741045, + "temp": {"day": 20.55, "min": 10.95, "max": 20.55, "night": 10.95, "eve": 14.82, "morn": 13.24}, + "pressure": 1019.4, + "humidity": 66, + "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], + "speed": 2.8, + "deg": 333, + "clouds": 2 + }, { + "dt": 1568804400, + "sunrise": 1568782452, + "sunset": 1568827319, + "temp": {"day": 18.15, "min": 7.75, "max": 18.15, "night": 7.75, "eve": 12.45, "morn": 9.41}, + "pressure": 1017.56, + "humidity": 52, + "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], + "speed": 2.92, + "deg": 34, + "clouds": 0 + }, { + "dt": 1568890800, + "sunrise": 1568868934, + "sunset": 1568913593, + "temp": {"day": 14.85, "min": 5.56, "max": 15.05, "night": 5.56, "eve": 9.56, "morn": 6.25}, + "pressure": 1022.7, + "humidity": 59, + "weather": [{"id": 800, "main": "Clear", "description": "sky is clear", "icon": "01d"}], + "speed": 2.89, + "deg": 51, + "clouds": 1 + }] + }, extendedData)); } module.exports = generateWeatherForecast; diff --git a/tests/e2e/vendor_spec.js b/tests/e2e/vendor_spec.js index 7e53ec5b..834c90d6 100644 --- a/tests/e2e/vendor_spec.js +++ b/tests/e2e/vendor_spec.js @@ -36,9 +36,9 @@ describe("Vendors", function () { urlVendor = "http://localhost:8080/vendor/" + vendors[vendor]; request.get(urlVendor, function (err, res, body) { if (!err) - expect(res.statusCode).to.equal(200); + {expect(res.statusCode).to.equal(200);} else - mlog.pending(`There error vendor 200 test ${err}`); + {mlog.pending(`There error vendor 200 test ${err}`);} }); }); }); @@ -48,9 +48,9 @@ describe("Vendors", function () { urlVendor = "http://localhost:8080/" + vendors[vendor]; request.get(urlVendor, function (err, res, body) { if (!err) - expect(res.statusCode).to.equal(404); + {expect(res.statusCode).to.equal(404);} else - mlog.pending(`There error vendor 404 test ${err}`); + {mlog.pending(`There error vendor 404 test ${err}`);} }); }); }); diff --git a/vendor/package-lock.json b/vendor/package-lock.json index 3253cc4e..61c1d19e 100644 --- a/vendor/package-lock.json +++ b/vendor/package-lock.json @@ -703,7 +703,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "optional": true, "requires": { "is-glob": "^2.0.0" } @@ -717,8 +716,7 @@ "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "optional": true + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "invert-kv": { "version": "1.0.0", @@ -737,8 +735,7 @@ "is-buffer": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", - "optional": true + "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" }, "is-dotfile": { "version": "1.0.3", @@ -764,8 +761,7 @@ "is-extglob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "optional": true + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" }, "is-fullwidth-code-point": { "version": "1.0.0", @@ -779,7 +775,6 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -808,8 +803,7 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "optional": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isobject": { "version": "2.1.0", @@ -824,7 +818,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -890,7 +883,6 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "optional": true, "requires": { "remove-trailing-separator": "^1.0.1" } @@ -1039,14 +1031,12 @@ "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", - "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", - "optional": true + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "repeat-element": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "optional": true + "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" }, "repeat-string": { "version": "1.6.1", @@ -1057,8 +1047,7 @@ "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", - "optional": true + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "set-immediate-shim": { "version": "1.0.1",