README.md in sunscraper-1.0.0 vs README.md in sunscraper-1.1.0.beta1

- old
+ new

@@ -4,28 +4,30 @@ Sunscraper is a gem for prerendering pages with hashbang URLs like `http://whatever.com/#!/page`. It works by loading content in the embedded web browser and waiting for a JavaScript method to be called. - HTML = %{ - <html> - <head> - <script type="text/javascript"> - document.addEventListener("DOMContentLoaded", function() { - document.getElementById('fuga').textContent = - ("!skrow tI").split("").reverse().join(""); - Sunscraper.finish(); - }, true); - </script> - </head> - <body> - <div id='fuga'></div> - </body> - </html> - } +``` ruby +HTML = %{ +<html> +<head> + <script type="text/javascript"> + document.addEventListener("DOMContentLoaded", function() { + document.getElementById('fuga').textContent = + ("!skrow tI").split("").reverse().join(""); + Sunscraper.finish(); + }, true); + </script> +</head> +<body> + <div id='fuga'></div> +</body> +</html> +} - Sunscraper.scrape_html(HTML).include?('It works!') # => true +Sunscraper.scrape_html(HTML).include?('It works!') # => true +``` See also [documentation][]. [documentation]: http://rdoc.info/gems/sunscraper/Sunscraper @@ -40,18 +42,20 @@ gem install sunscraper Runtime requirements -------------------- -On Linux with Qt versions <= 4.8, Sunscraper requires a running X server and a valid `DISPLAY` environment +On Linux, Sunscraper requires a running X server and a valid `DISPLAY` environment variable. Consider using [Xvfb][] on a GUI-less production server. [Xvfb]: http://www.x.org/releases/X11R7.6/doc/man/man1/Xvfb.1.xhtml Compatibility ------------- +![Travis CI](https://secure.travis-ci.org/roundlake/sunscraper.png) + Sunscraper should be compatible across all major implementations on all major operating systems, including Ruby MRI 1.9, JRuby, Rubinius and MacRuby running on GNU/Linux, OS X and Windows. JRuby versions up to 1.6.5 are known not to work due to a bug in its FFI library. @@ -63,6 +67,24 @@ Sunscraper is thread-safe. License ------- -Sunscraper is distributed under the terms of a MIT license; see LICENSE in the source distribution. \ No newline at end of file + Copyright (C) 2011 by Peter Zotov <p.zotov@roundlake.ru>. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE.