Skip to content

Instantly share code, notes, and snippets.

@dinatih
Created May 2, 2012 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dinatih/2576827 to your computer and use it in GitHub Desktop.
Save dinatih/2576827 to your computer and use it in GitHub Desktop.
Dinatih Rails App Template
run "rm public/index.html"
gem 'haml'
gem 'haml-rails'
gem 'coffee-filter'
gem 'coffee-rails', '~> 3.2.1'
gem 'bootstrap-sass', :git => "git://github.com/thomas-mcdonald/bootstrap-sass.git"
gem 'carrierwave'
gem 'therubyracer', :platform => :ruby
#form
gem 'simple_form'
gem 'awesome_nested_fields'
gem 'client_side_validations'
#db
gem 'sqlite3'
gem 'mysql2'
gem_group :development, :test do
gem 'database_cleaner'
gem 'capybara'
gem "rspec-rails"
gem 'factory_girl_rails'
gem "guard-spork"
gem "guard-rspec"
gem 'guard-shell'
gem 'launchy'
gem "spork", "~> 0.9.0.rc"
gem 'capistrano'
end
file 'app/views/application.html.haml', <<-CODE
!!!
%html
%head
%title
%meta{:charset => "utf-8"}
%meta{"http-equiv" => "X-UA-Compatible", :content => "IE=edge,chrome=1"}
%meta{:name => "viewport", :content => "width=device-width, initial-scale=1.0, maximum-scale=1"}
%link(rel="shortcut icon" href="/assets/favicon.ico" type="image/x-icon")
= stylesheet_link_tag :application, :media => "all"
= javascript_include_tag :application
= csrf_meta_tags
%body
%header
.navbar
.navbar-inner.navbar-fixed-top
.container
%a.brand{:href => "#"}
.nav-collapse
%ul.nav.pull-right
%li.divider-vertical
%li.dropdown
%a.dropdown-toggle{"data-toggle" => "dropdown", :href => "#"}
%i.icon-info-sign
//.icon-white
Informations
%b.caret
%ul.dropdown-menu
%li
%a{:href => "#"} Contact
%li.divider
%li
%a{:href => "#"} Mentions légales
%li
%a{:href => "#"} Conditions générales de service
- flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)
.container{:role => "main"}
= yield
%footer
CODE
file 'GuardFile', <<-CODE
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
watch('config/application.rb')
watch('config/environment.rb')
watch(%r{^config/environments/.+\.rb$})
watch(%r{^config/initializers/.+\.rb$})
watch('spec/spec_helper.rb')
end
guard 'rspec', :version => 2, :cli => '--drb -f documentation' do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
# Rails example
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
watch('config/routes.rb') { "spec/routing" }
watch('app/controllers/application_controller.rb') { "spec/controllers" }
# Capybara request specs
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
end
guard :shell do
end
CODE
git :init
git :add => "."
git :commit => "-a -m 'Initial commit'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment