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 'minitest/autorun' | |
require 'json' | |
require 'httparty' | |
class Movie | |
CHILDRENS = "0" | |
REGULAR = "1" | |
NEW_RELEASE = "2" | |
attr_accessor :price_code, :title |
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
class FeedConfig | |
def initialize(name=nil, url=nil) | |
end | |
end | |
class StateMachine | |
attr_accessor :feeds, :webhooks, :states | |
def initialize(name=nil, feeds=nil, webhooks=nil, states=nil) | |
@feeds = feeds | |
@webhooks = webhooks |
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
# 1. Initialize with a root URL `crawler = Crawler.new(root: '')` | |
# 2. Calls fetch on that URL | |
# 3. Boots HTTParty and stores the response in class | |
# 4. Returns `#.body` of the HTTParty response | |
# 5. Maybe helps store the response body in an optional | |
# 6. `crawler.next` called to crawl through pages, finding more pages to crawl | |
# 7. If there are no more pages to crawl, we know we're on a leaf | |
# 8. If we have a file on this leaf, upload to our DataStore | |
# | |
require 'httparty' |
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 'minitest/autorun' | |
require 'digest' | |
require 'pki' | |
class Block | |
NUM_ZEROES = 4 | |
attr_reader :own_hash, :prev, :transaction | |
def self.create_genesis_block(pub, priv) |