fixes #232 - symlink resolution in ruby version
Showing
2 changed files
with
8 additions
and
2 deletions
... | @@ -12,6 +12,7 @@ XXXX-XX-XX, v1.0.0 | ... | @@ -12,6 +12,7 @@ XXXX-XX-XX, v1.0.0 |
12 | - fixed [#236](https://github.com/n1k0/casperjs/issues/236) - Casper.exit return `this` after calling `phantom.exit()` that may caused PhantomJS to hang | 12 | - fixed [#236](https://github.com/n1k0/casperjs/issues/236) - Casper.exit return `this` after calling `phantom.exit()` that may caused PhantomJS to hang |
13 | - fixed [#231](https://github.com/n1k0/casperjs/pull/231) - added `--pre` and `--post` options to the `casperjs test` command to load test files before and after the execution of testsuite | 13 | - fixed [#231](https://github.com/n1k0/casperjs/pull/231) - added `--pre` and `--post` options to the `casperjs test` command to load test files before and after the execution of testsuite |
14 | - fixed [#222](https://github.com/n1k0/casperjs/pull/222) & [#211](https://github.com/n1k0/casperjs/issues/211) - Change mouse event to include an X + Y value for click position | 14 | - fixed [#222](https://github.com/n1k0/casperjs/pull/222) & [#211](https://github.com/n1k0/casperjs/issues/211) - Change mouse event to include an X + Y value for click position |
15 | - fixed [#232](https://github.com/n1k0/casperjs/issues/232) - symlink resolution in the ruby version of the `casperjs` executable | ||
15 | - added [`ClientUtils.getDocumentHeight()`](http://casperjs.org/api.html#clientutils.getDocumentHeight) | 16 | - added [`ClientUtils.getDocumentHeight()`](http://casperjs.org/api.html#clientutils.getDocumentHeight) |
16 | - added a `--no-colors` option to the `casper test` command to skip output coloration | 17 | - added a `--no-colors` option to the `casper test` command to skip output coloration |
17 | 18 | ... | ... |
... | @@ -2,8 +2,14 @@ | ... | @@ -2,8 +2,14 @@ |
2 | # Ruby Wrapper for CasperJs | 2 | # Ruby Wrapper for CasperJs |
3 | # by hannyu | 3 | # by hannyu |
4 | 4 | ||
5 | def resolve(file_path) | ||
6 | while File.symlink?(file_path) do | ||
7 | file_path = File.dirname(file_path) + '/' + File.readlink(file_path) | ||
8 | end | ||
9 | file_path | ||
10 | end | ||
5 | 11 | ||
6 | CASPER_PATH = File.dirname(File.dirname(File.expand_path(__FILE__))) | 12 | CASPER_PATH = File.dirname(File.dirname(File.expand_path(resolve(__FILE__)))) |
7 | 13 | ||
8 | PHANTOMJS_NATIVE_ARGS = [ | 14 | PHANTOMJS_NATIVE_ARGS = [ |
9 | '--cookies-file', | 15 | '--cookies-file', |
... | @@ -54,4 +60,3 @@ if system(CASPER_COMMAND.join(" ")).nil? | ... | @@ -54,4 +60,3 @@ if system(CASPER_COMMAND.join(" ")).nil? |
54 | end | 60 | end |
55 | 61 | ||
56 | exit $?.exitstatus | 62 | exit $?.exitstatus |
57 | ... | ... |
-
Please register or sign in to post a comment