Sha256: 141d8874ad9cd7ccca619fbf6eaf5d000572086d418b4df6a91dd9d3e2b2942c

Contents?: true

Size: 749 Bytes

Versions: 4

Compression:

Stored size: 749 Bytes

Contents

say "Building admin"
generate(:controller, "admin/dashboard index")
route("match 'admin' => 'admin/dashboard#index'")

# Do layout and SASS stuff
apply File.expand_path("../admin/layout.rb", __FILE__)

create_file 'app/controllers/admin/base_controller.rb' do
<<-RUBY
class Admin::BaseController < ApplicationController
  layout "admin"
  before_filter :authenticate_user!
end
RUBY
end

gsub_file "app/controllers/admin/dashboard_controller.rb", /ApplicationController/, "Admin::BaseController"

# make a user admin
apply File.expand_path("../admin/users.rb", __FILE__)
apply File.expand_path("../admin/dashboard_spec.rb", __FILE__)
apply File.expand_path("../admin/users_spec.rb", __FILE__)
apply File.expand_path("../admin/cucumber.rb", __FILE__)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bear-0.0.4 templates/admin.rb
bear-0.0.3 templates/admin.rb
bear-0.0.2 templates/admin.rb
bear-0.0.1 templates/admin.rb