Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
H
heroku-buildpack-nodejs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
heroku-buildpack-nodejs
Commits
ac90f3ea
Commit
ac90f3ea
authored
Apr 23, 2015
by
Hunter Loftis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test and implementation for cacheDirectories (camelCase)
parent
84921057
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
0 deletions
+45
-0
build.sh
lib/build.sh
+5
-0
README.md
test/fixtures/cache-directories-camel/README.md
+1
-0
bower.json
test/fixtures/cache-directories-camel/bower.json
+6
-0
package.json
test/fixtures/cache-directories-camel/package.json
+19
-0
run
test/run
+14
-0
No files found.
lib/build.sh
View file @
ac90f3ea
...
@@ -299,6 +299,11 @@ cache_directories() {
...
@@ -299,6 +299,11 @@ cache_directories() {
if
[
"
$check
"
!=
-1
]
;
then
if
[
"
$check
"
!=
-1
]
;
then
result
=
$(
read_json
"
$package_json
"
"
$key
[]"
)
result
=
$(
read_json
"
$package_json
"
"
$key
[]"
)
fi
fi
local
key
=
".cacheDirectories"
local
check
=
$(
key_exist
$package_json
$key
)
if
[
"
$check
"
!=
-1
]
;
then
result
=
$(
read_json
"
$package_json
"
"
$key
[]"
)
fi
echo
$result
echo
$result
}
}
...
...
test/fixtures/cache-directories-camel/README.md
0 → 100644
View file @
ac90f3ea
A fake README, to keep npm from polluting stderr.
\ No newline at end of file
test/fixtures/cache-directories-camel/bower.json
0 → 100644
View file @
ac90f3ea
{
"name"
:
"node-buildpack-test-app"
,
"dependencies"
:
{
"jquery"
:
"^1.11.1"
}
}
test/fixtures/cache-directories-camel/package.json
0 → 100644
View file @
ac90f3ea
{
"name"
:
"node-buildpack-test-app"
,
"version"
:
"0.0.1"
,
"description"
:
"node buildpack integration test app"
,
"repository"
:
{
"type"
:
"git"
,
"url"
:
"http://github.com/example/example.git"
},
"engines"
:
{
"node"
:
"0.10.18"
},
"dependencies"
:
{
"bower"
:
"1.3.12"
},
"scripts"
:
{
"postinstall"
:
"bower install --allow-root"
},
"cacheDirectories"
:
[
"bower_components"
,
"node_modules"
]
}
test/run
View file @
ac90f3ea
...
@@ -186,6 +186,20 @@ testBuildWithUserCacheDirectories() {
...
@@ -186,6 +186,20 @@ testBuildWithUserCacheDirectories() {
assertCapturedSuccess
assertCapturedSuccess
}
}
testBuildWithUserCacheDirectoriesCamel
()
{
cache
=
$(
mktmpdir
)
compile
"cache-directories-camel"
$cache
assertCapturedSuccess
assertEquals
"1"
"
$(
ls
-1
$cache
/node |
grep
bower_components |
wc
-l
)
"
assertEquals
"1"
"
$(
ls
-1
$cache
/node |
grep
node_modules |
wc
-l
)
"
compile
"cache-directories"
$cache
assertCaptured
"Restoring 2 directories from cache:"
assertCaptured
"- bower_components"
assertCaptured
"Restoring node modules from cache"
assertCapturedSuccess
}
testModulesCheckedIn
()
{
testModulesCheckedIn
()
{
compile
"modules-checked-in"
compile
"modules-checked-in"
assertCaptured
"node_modules source: prebuilt"
assertCaptured
"node_modules source: prebuilt"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment