This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 52f34f81e6c66e69eacbcd85979e6430dc903a3e Mon Sep 17 00:00:00 2001 | |
| From: Jeff Pollard <jeff.pollard@gmail.com> | |
| Date: Wed, 12 Oct 2011 16:13:59 -0700 | |
| Subject: [PATCH] Fix 1.9 incompatabiliy with the riak cookbook | |
| --- | |
| cookbooks/riak/libraries/riak_template_helper.rb | 7 +++---- | |
| 1 files changed, 3 insertions(+), 4 deletions(-) | |
| diff --git a/cookbooks/riak/libraries/riak_template_helper.rb b/cookbooks/riak/libraries/riak_template_helper.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 52f34f81e6c66e69eacbcd85979e6430dc903a3e Mon Sep 17 00:00:00 2001 | |
| From: Jeff Pollard <jeff.pollard@gmail.com> | |
| Date: Wed, 12 Oct 2011 16:13:59 -0700 | |
| Subject: [PATCH] Fix 1.9 incompatabiliy with the riak cookbook | |
| --- | |
| cookbooks/riak/libraries/riak_template_helper.rb | 7 +++---- | |
| 1 files changed, 3 insertions(+), 4 deletions(-) | |
| diff --git a/cookbooks/riak/libraries/riak_template_helper.rb b/cookbooks/riak/libraries/riak_template_helper.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "rspec" | |
| class Array | |
| def amap | |
| return to_enum(:amap) unless block_given? | |
| self.class.new.tap do |arr| | |
| each { |i| arr << yield(i) } | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ===== | |
| ===== LOGGING STARTED Tue Oct 18 15:10:25 PDT 2011 | |
| ===== | |
| Exec: /usr/lib/riak/erts-5.7.5/bin/erlexec -boot /usr/lib/riak/releases/0.14.2/riak -embedded -config /etc/riak/app.config -args_file /etc/riak/vm.args -- console | |
| Root: /usr/lib/riak | |
| Erlang R13B04 (erts-5.7.5) [source] [64-bit] [smp:16:16] [rq:16] [async-threads:64] [kernel-poll:true] | |
| ** Found 0 name clashes in code paths |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def traverse(node, &block) | |
| return unless node | |
| yield node | |
| traverse(node.left, &block) if node.left | |
| traverse(node.right, &block) if node.right | |
| end | |
| def identical?(tree_1, tree_2) | |
| num_nodes = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jeff ~/Workspace/test $ cat test.rb | |
| require 'delegate' | |
| require 'yaml' | |
| class A < DelegateClass(Array) | |
| def initialize(*args) | |
| super(Array.new(*args)) | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "rubygems" | |
| require "capybara" | |
| require 'capybara/poltergeist' | |
| session = Capybara::Session.new(:poltergeist) | |
| session.visit('http://www.disqus.com') | |
| session.driver.render('/tmp/disqus.png') | |
| `open /tmp/disqus.png` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "capybara" | |
| require 'capybara/poltergeist' | |
| session = Capybara::Session.new(:poltergeist) | |
| session.visit('http://www.disqus.com') | |
| session.driver.render('/tmp/disqus.png') | |
| `open /tmp/disqus.png` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| conditional_skip_selenium = conditional_skip(lambda: ping_selenium(settings.SELENIUM_HOST, | |
| settings.SELENIUM_PORT), | |
| reason='Selenium is not responding') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages | |
| try: | |
| __import__('pkg_resources').declare_namespace(__name__) | |
| except ImportError: | |
| from pkgutil import extend_path | |
| __path__ = extend_path(__path__, __name__) |