Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6602415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:52:27+00:00 2026-05-25T18:52:27+00:00

I work with less technical stakeholders and testers on producing a Rails 3.1 app

  • 0

I work with less technical stakeholders and testers on producing a Rails 3.1 app who benefit greatly from seeing the HTML output rendered by my Cucumber and RSpec tests.

I would like a way to bundle this output with the app when I deploy, but am struggling to find the cleanest way to do this. The repo is on Github and we deploy with Capistrano. I would strongly prefer keep this out of version control.

Is anyone else doing this? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:52:28+00:00Added an answer on May 25, 2026 at 6:52 pm

    I don’t know why the obvious solution didn’t occur to me earlier: gitignore the doc files and add a deployment task to scp the files directly into the app’s public directory.

    .gitignore

    public/doc
    

    lib/tasks/doc.rake

    namespace :doc do
    
      desc "run features and specs then generate pages accessible in public/doc"
      task :html do
        # Delete old files
        puts "Clearing out old html files..."
        system("rm -rf public/doc/")
        system("mkdir public/doc/")
    
        # Generate the feature html files
        puts "Generating Cucumber html files..."
        system("mkdir public/doc/features")
        Dir.glob("features/**/*.feature").each do |story|
          system("bundle exec cucumber #{story} --drb --format=html -o public/doc/#{story.gsub(/(\w*).feature/, '\1.html')}")
          puts "public/doc/#{story}"
        end
    
        # Generate RSpec html files
        puts "Generating RSpec html files..."
        system("mkdir public/doc/spec/")
        Dir.glob("spec/**/*_spec.rb").each do |spec|
          system("bundle exec rspec #{spec} --drb --format html -o public/doc/#{spec.gsub(/(\w*).rb/, '\1.html')}")
        end
    
        # Generate the index file
        puts "Writing index file..."
        system("echo \"<html><head><title>Doc</title></head><body>\" > public/doc/index.html")
    
        # Write test report navigation
        Dir.glob("public/doc/**/*.html").each do |file|
          unless file == 'public/doc/index.html'
            file.gsub!(/\public\/doc\//, '')
            system("echo \"<p><a href='#{file}'>#{file.gsub('.html', '')}</a></p>\" >> public/doc/index.html")
          end
        end
    
        # Close index.html file
        system("echo \"</body></html>\" >> public/doc/index.html")
        puts "Done!"
      end
    end
    

    config/deploy.rb

    desc "Generate Cucumber & RSpec HTML docs"
    task :generate_docs, :roles => :app do
      system("bundle exec rake doc:html")
    end
    
    desc "Copy Cucumber & RSpec HTML docs outside of version control with scp"
    task :copy_docs, :roles => :app do
      system("tar -zcvf tmp/doc.tar.gz public/doc && rm -rf public/doc")
      system("scp -r -i ~/myKey.pem tmp/doc.tar.gz #{user}@#{hostname}:#{deploy_to}/current/public/doc.tar.gz && rm tmp/doc.tar.gz")
      run "cd #{release_path}; tar -zxvf public/doc.tar.gz && rm public/doc.tar.gz"
    end
    
    after 'deploy', 'docs:generate_docs', 'docs:copy_docs'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to build a mobile app, brewed from nothing more but html/css
I need to execute the less command, with paging, from my Java console application.
I am currently looking at changing from using css to LESS in my current
work on asp.net vs 05 C#.Master page header contain the bellow code <script type=text/javascript
work on SQL Server 2000. want to Automated Email Notifications using SQL Server Job
Work on asp.net vs05. I have three type of value Like:IsDesign,IsPrinting,IsInstall they are bit
Work on a support helpdesk. New tickets come in and records are created in
Work on this small test application to learn threading/locking. I have the following code,
At work we are currently still using JUnit 3 to run our tests. We
At work we are being asked to create XML files to pass data to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.