Commit bf0d4c68 authored by Praveen Arimbrathodiyil's avatar Praveen Arimbrathodiyil

Update upstream source from tag 'upstream/0.1.4'

Update to upstream version '0.1.4'
with Debian dir 894ea72470d6d18d3d436526049364ba2b73e371
parents b04d71ad c9193f53
language: node_js
language: node_js
node_js:
- '0.8'
- '0.10'
- '0.12'
- 'iojs'
before_install:
- npm install -g npm@latest
Copyright (c) Isaac Z. Schlueter ("Author") The ISC License
All rights reserved.
The BSD License Copyright (c) Isaac Z. Schlueter and Contributors
Redistribution and use in source and binary forms, with or without Permission to use, copy, modify, and/or distribute this software for any
modification, are permitted provided that the following conditions purpose with or without fee is hereby granted, provided that the above
are met: copyright notice and this permission notice appear in all copies.
1. Redistributions of source code must retain the above copyright THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
notice, this list of conditions and the following disclaimer. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
2. Redistributions in binary form must reproduce the above copyright ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
notice, this list of conditions and the following disclaimer in the WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
documentation and/or other materials provided with the distribution. ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
var isWindows = process.platform === 'win32' var isWindows = process.platform === 'win32'
var path = require('path') var path = require('path')
var exec = require('child_process').exec var exec = require('child_process').exec
var os = require('os') var osTmpdir = require('os-tmpdir')
var osHomedir = require('os-homedir')
// looking up envs is a bit costly. // looking up envs is a bit costly.
// Also, sometimes we want to have a fallback // Also, sometimes we want to have a fallback
...@@ -46,13 +47,11 @@ memo('hostname', function () { ...@@ -46,13 +47,11 @@ memo('hostname', function () {
}, 'hostname') }, 'hostname')
memo('tmpdir', function () { memo('tmpdir', function () {
return os.tmpDir() return osTmpdir()
}) })
memo('home', function () { memo('home', function () {
return ( isWindows ? process.env.USERPROFILE return osHomedir()
: process.env.HOME
)
}) })
memo('path', function () { memo('path', function () {
......
{ {
"name": "osenv", "name": "osenv",
"version": "0.1.0", "version": "0.1.4",
"main": "osenv.js", "main": "osenv.js",
"directories": { "directories": {
"test": "test" "test": "test"
}, },
"dependencies": {}, "dependencies": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
},
"devDependencies": { "devDependencies": {
"tap": "~0.4.9" "tap": "^8.0.1"
}, },
"scripts": { "scripts": {
"test": "tap test/*.js" "test": "tap test/*.js"
}, },
"repository": { "repository": "https://github.com/npm/osenv",
"type": "git",
"url": "git://github.com/isaacs/osenv"
},
"keywords": [ "keywords": [
"environment", "environment",
"variable", "variable",
...@@ -26,6 +26,6 @@ ...@@ -26,6 +26,6 @@
"ps1" "ps1"
], ],
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)", "author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"license": "BSD", "license": "ISC",
"description": "Look up environment settings specific to different operating systems" "description": "Look up environment settings specific to different operating systems"
} }
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
// pretending to be another platform is too hacky, since it breaks // pretending to be another platform is too hacky, since it breaks
// how the underlying system looks up module paths and runs // how the underlying system looks up module paths and runs
// child processes, and all that stuff is cached. // child processes, and all that stuff is cached.
var tap = require('tap')
if (process.platform === 'win32') { if (process.platform === 'win32') {
console.log('TAP Version 13\n' + tap.plan(0, 'Skip unix tests, this is not unix')
'1..0\n' + process.exit(0)
'# Skip unix tests, this is not unix\n')
return
} }
var tap = require('tap')
// like unix, but funny // like unix, but funny
process.env.USER = 'sirUser' process.env.USER = 'sirUser'
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
// how the underlying system looks up module paths and runs // how the underlying system looks up module paths and runs
// child processes, and all that stuff is cached. // child processes, and all that stuff is cached.
if (process.platform !== 'win32') { if (process.platform !== 'win32') {
console.log('TAP Version 13\n' + console.log('TAP version 13\n' +
'1..0\n' + '1..0 # Skip windows tests, this is not windows\n')
'# Skip windows tests, this is not windows\n')
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment