One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
| if Rails.env.development? || Rails.env.test? | |
| require 'factory_bot' | |
| namespace :dev do | |
| desc 'This will add some development data ' | |
| task populate: 'db:migrate:reset' do | |
| include FactoryBot::Syntax::Methods | |
| 3.times { create(:user_with_posts, post_count: 3) } | |
| end | |
| end | |
| end |
| require 'faker' | |
| FactoryBot.define do | |
| factory :user, aliases: %i[author] do | |
| email { Faker::Internet.email } | |
| first_name { Faker::Name.first_name } | |
| last_name { Faker::Name.last_name } | |
| password { 'foobar' } | |
| password_confirmation { 'foobar' } |
| # Imagine I have the models User and Post where users have many posts | |
| if Rails.env.development? || Rails.env.test? | |
| namespace :dev do | |
| desc 'This will add some development data ' | |
| task populate: 'db:migrate:reset' do | |
| 3.times do |i| | |
| user = User.create(…) #imagine the user content instead of "…" | |
| user.posts.create(…) #imagine post content instead of "…" | |
| end | |
| end |
| if Rails.env.development? || Rails.env.test? | |
| require 'factory_bot' | |
| namespace :dev do | |
| desc 'This will add some development data ' | |
| task populate: 'db:migrate:reset' do | |
| include FactoryBot::Syntax::Methods | |
| 3.times { create(:user_with_posts, post_count: 3) } | |
| end | |
| end | |
| end |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).
| <script> | |
| function execPolyfill() { | |
| (function(){ | |
| // CustomElementsV1.min.js v1 polyfill from https://github.com/webcomponents/webcomponentsjs/tree/v1/src/CustomElements/v1. | |
| /* | |
| Copyright (c) 2016 The Polymer Project Authors. All rights reserved. | |
| This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | |
| The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt |
| .container { | |
| display: flex; | |
| } |