Usage: easy_fabricator [options] FABRICATOR
-n, --num NUM ( default 1 )
-y, --output-yaml
-c, --output-csv ( default )
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
# Rake task to automatically run something (i.e. specs) when code files are changed | |
# By Peter Çoopér | |
# | |
# Motivation: I couldn't get autotest to run on my Sinatra project for some reason but realized | |
# it didn't require overengineering. Just detect when a file is changed and then re-run the specs! | |
# | |
# Examples: | |
# # rake on_update "rake" | |
# # rake on_update "spec spec/user_spec.rb" | |
# |
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
# https://github.com/sporkmonger/addressable/ | |
require 'addressable/template' | |
# http://dev.twitter.com/doc/get/statuses/followers | |
template = Addressable::Template.new 'http://{host=twitter.com}' + | |
'/statuses/followers{-prefix|/|id}.{format=json}' + | |
'?{-join|&|user_id,screen_name,cursor}' | |
template.expand(:id => 'mislav') | |
# => http://twitter.com/statuses/followers/mislav.json? |
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
# Main sinatra app | |
require 'sinatra' | |
require 'activerecord' | |
require 'activesupport' | |
include ActionView::Helpers::DateHelper # add the required helpers here. | |
require 'controllers.rb' | |
# controllers.rb |
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
# ... | |
gem 'padrino-warden', :git => "git://github.com/zmack/padrino-warden.git" | |
gem 'authtools' |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Site</title> | |
</head> | |
<body class="app"> | |
<%= render :partial => 'layouts/flashes' %> | |
<%= yield %> | |
</body> | |
</html> |
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
# add RailsAdmin to the Gemfile | |
# do NOT add devise | |
gem "rails_admin", :git => "git://github.com/sferik/rails_admin.git" | |
# run Bundler | |
bundle | |
# run the generator for RailsAdmin | |
# looks like it's broken, but it just does not install devise | |
# you may also remove the app/config/locales/devise.en.yml |
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
get %r{(.+)/$} do |r| redirect r; end; |
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
# hack to auto compile sass when Jammit runs in Dev/Test mode | |
require 'haml/util' | |
require 'sass/engine' | |
module Jammit | |
module Helper | |
SASS_TIMESTAMPS = {} | |
def include_stylesheets_with_sass(*packages) |
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
# data | |
gem 'carrierwave' | |
gem 'fog' | |
gem 'mini_magick' | |
gem 'resque' | |
gem 'mysql', group: :development | |
gem 'pg', group: :production | |
# controllers and views | |
gem 'haml-rails' |
OlderNewer