Sha256: b7b04d775764ff023f5ff392df72e593fc72e3ae17c3ee6b0c36d91401162ec7
Contents?: true
Size: 987 Bytes
Versions: 3
Compression:
Stored size: 987 Bytes
Contents
# static pages generate "controller", "static_pages", "home", "status" inject_into_file "app/controllers/static_pages_controller.rb", after: "class StaticPagesController < ApplicationController\n" do <<-EOF skip_before_action :authenticate_user!, only: [:home, :status] skip_before_action :authenticate_normal!, only: [:home, :status] EOF end inject_into_file "app/controllers/static_pages_controller.rb", after: "def status\n" do <<-EOF render json: { status: "ok", hostname: Socket.gethostname, service: "#{app_path}", commit: @@comment ||= `git log -1 --oneline` } EOF end gsub_file "config/routes.rb", "get 'static_pages/home'", "root to: 'static_pages#home'" gsub_file "config/routes.rb", "get 'static_pages/status'", "get '/status' => 'static_pages#status'" inject_into_file "spec/controllers/static_pages_controller_spec.rb", after: "RSpec.describe StaticPagesController, :type => :controller do\n" do <<-EOF before { sign_in_user } EOF end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
crosstie-0.0.4 | lib/crosstie/templates/static_pages.rb |
crosstie-0.0.3 | lib/crosstie/templates/static_pages.rb |
crosstie-0.0.2 | lib/crosstie/templates/static_pages.rb |