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
import { Machine, assign } from "xstate"; | |
const initialState = { | |
alert: {}, | |
}; | |
export default Machine( | |
{ | |
id: "alert", |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
const { SiteClient, Loader } = require("datocms-client"); | |
const { camelize } = require("humps"); | |
const withNoEmptyValues = object => { | |
if (Object.prototype.toString.call(object) === "[object Object]") { | |
const result = {}; | |
for (const [key, value] of Object.entries(object)) { | |
const valueWithNoEmptyValues = withNoEmptyValues(value); | |
if (valueWithNoEmptyValues) { |
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
== CreateProducts: migrating ================================================= | |
-- create_table(:products) | |
-> 0.0067s | |
== CreateProducts: migrated (0.0068s) ======================================== | |
== DeviseCreateAdminUsers: migrating ========================================= | |
-- create_table(:admin_users) | |
-> 0.0123s | |
-- add_index(:admin_users, :email, {:unique=>true}) | |
-> 0.0066s |
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
foreman run rake db:refresh | |
rake aborted! | |
You are using the old router DSL which has been removed in Rails 3.1. Please check how to update your routes file at: http://www.engineyard.com/blog/2010/the-lowdown-on-routes-in-rails-3/ | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.1/lib/action_dispatch/routing/route_set.rb:334:in `eval_block' | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/actionpack-4.0.1/lib/action_dispatch/routing/route_set.rb:319:in `draw' | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/gitstats-0.0.2/config/routes.rb:1:in `<top (required)>' | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `load' | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:223:in `block in load' | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.1/lib/active_support/dependencies.rb:214:in `load_dependency' | |
/Users/gilesbutler/.rvm/gems/ruby-2.0.0-p247/gems/activesuppo |