This file contains 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 'ripple' | |
riak = Riak::Client.new( :http_backend => :Excon ) | |
bucket_names = ["foobar"] | |
bucket_names.each do |bucket_name| | |
bucket = riak.bucket(bucket_name) | |
10.times do | |
new_one = Riak::RObject.new(bucket, "#{rand}") | |
new_one.content_type = "application/javascript" # You must set the content type. |
This file contains 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 ROM | |
class Finalize | |
class FinalizeRelations | |
include Dry::Core::Memoizable | |
# @return [Hash] | |
# | |
# @api private | |
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize | |
def run! | |
relation_registry = RelationRegistry.new do |registry, relations| |
This file contains 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 ROM | |
class Finalize | |
class FinalizeRelations | |
attr_reader :notifications | |
module BuildRelationReaders | |
def self.build(relations) | |
Module.new do | |
relations.each do |name| | |
define_method(name) do |