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
| module Ripple | |
| module Document | |
| def self.included(mod) | |
| all << mod | |
| end | |
| def self.all | |
| @document_models ||= [] | |
| 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
| In your editor of choice, | |
| Convert the following line: | |
| context "when the transaction is successful", :focused => true do | |
| To: | |
| context "when the transaction is successful" do |
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
| # An account has payment methods. I'd like to know the payment methods for an account | |
| # which meet some criteria. | |
| # The 2 models | |
| class Account | |
| include Ripple::Document | |
| many :payment_methods | |
| 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
| # Using Sean's work on some built-ins: https://gist.github.com/63d3b5edd2ec011532ea | |
| class Account | |
| include Ripple::Document | |
| property :charged_for_storage_at, Time | |
| end | |
| mr = Riak::MapReduce.new(Ripple.client). | |
| add("accounts"). |
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
| class It | |
| include Ripple::Document | |
| property :email, String | |
| 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
| # config/ripple.yml | |
| development: | |
| port: 8091 | |
| host: localhost | |
| test: | |
| port: 8098 | |
| host: localhost |
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
| Rspec.configure do |config| | |
| config.mock_with :mocha | |
| config.filter_run :focused => true | |
| config.alias_example_to :fit, :focused => true | |
| config.after(:each) do | |
| $test_server.recycle if $test_server | |
| 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
| development: | |
| port: 8091 | |
| host: localhost | |
| test: | |
| port: 8098 | |
| host: localhost | |
| bin_dir: /Users/duff/code/riak/rel/riak/bin | |
| js_source_dir: <%= Rails.root + "lib/riak_js" %> | |
| production: | |
| port: 8091 |
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
| %% When the port is set to 9000: | |
| [ | |
| {riak_kv, [ | |
| {js_max_vm_mem, 8}, | |
| {storage_backend, riak_kv_test_backend}, | |
| {js_thread_stack, 16}, | |
| {riak_kv_stat, true}, | |
| {pb_ip, "127.0.0.1"}, |
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
| window.addEvent 'domready', -> | |
| $$('[toggle_id]').each(hookupIDToggler) | |
| hookupIDToggler = (element) -> | |
| respondToClickOrChange element | |
| initialToggleIfChecked element | |
| respondToClickOrChange = (element) -> |