Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
04416167
...
04416167d3400446670f327c6eee4b57d16adb31
authored
2011-12-21 13:36:57 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixes #31 - replaced bash executable script by a Python one
1 parent
87e67426
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
9 deletions
CHANGELOG
bin/casperjs
casper.js
CHANGELOG
View file @
0441616
2011-12-20, v0.4.0 - first numbered version
CasperJS Changelog
==================
2011-12-21, v0.4.1
------------------
- fixed #31 - replaced bash executable script by a Python one
---
2011-12-20, v0.4.0
------------------
- first numbered version
...
...
bin/casperjs
View file @
0441616
#!/usr/bin/env
bash
#!/usr/bin/env
python
CASPER_EXECUTABLE
=
${
BASH_SOURCE
[0]
}
import
os
import
subprocess
import
sys
while
[
-h
"
$CASPER_EXECUTABLE
"
]
;
do
CASPER_EXECUTABLE
=
"
$(
readlink
$CASPER_EXECUTABLE
)
"
done
CASPERJS_HOME
=
"
$(
cd
-PL
"
$(
dirname
"
$CASPER_EXECUTABLE
"
)
"
&&
cd
..
&&
pwd
)
"
phantomjs
$CASPERJS_HOME
/casper.js --casper-path
=
$CASPERJS_HOME
--cli
$*
def
resolve
(
path
):
while
os
.
path
.
islink
(
path
):
return
resolve
(
os
.
readlink
(
path
))
return
path
CASPER_PATH
=
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
resolve
(
__file__
)),
'..'
))
CASPER_ARGS
=
[
'phantomjs'
,
os
.
path
.
join
(
CASPER_PATH
,
'casper.js'
),
'--casper-path=
%
s'
%
CASPER_PATH
,
'--cli'
]
CASPER_ARGS
.
extend
(
sys
.
argv
[
1
:])
subprocess
.
call
(
CASPER_ARGS
)
...
...
casper.js
View file @
0441616
...
...
@@ -33,7 +33,7 @@
phantom
.
casperVersion
=
{
major
:
0
,
minor
:
4
,
revision
:
0
,
revision
:
1
,
toString
:
function
()
{
return
[
this
.
major
,
this
.
minor
,
this
.
revision
].
join
(
'.'
);
}
...
...
Please
register
or
sign in
to post a comment