# Jumpup

![RubyGems]][ruby_gems

## What

Jumpup is a [Ruby on Rails] gem that provides a set of tasks to automate all steps of a [synchronous continuous integration] process, that is, [continuous integration] without a server such as [Travis]. Why? Because that’s the way we like it!

## Installing

Add it to your Gemfile:

group :development do
  gem 'jumpup'
end

After installing the gem is ready to be used and you will need to execute only one task in order to integrate your code safely:

rake integrate

## Dependencies

## [ProTip] Using Simplecov

Using simplecov on your test suite will make your tests to run slower. You can fix it using an environment variable called “coverage” on test_helper.rb/spec_helper.rb to turn on/off the simplecov. See below:

spec_helper.rb or test_helper.rb

if ENV['coverage'] == 'on'
  require 'simplecov'
  SimpleCov.start 'rails'
end

The “coverage” variable is set to “on” by the integration process. When running tests/specs while you’re developing, simplecov doesn’t run, unless you set “coverage” environment variable by hand.

## Integration Steps

The integration process is composed of several steps that are explained ahead. It’s possible to skip one or more steps and add other steps of your own. This will be demonstrated shortly. The complete set of steps are:

  1. task git:status_check

Check if all local files are under control of your scm.
  • task log:clear

    Remove log files.

  • task tmp:clear

    Remove temporary files.

  • task git:pull

    Update local files from your remote scm repository.

  • task db:migrate

    Execute any new database migration created by other team members since the last integration.

  • Your test/spec suite

    Set the rake task your test/spec suite needs to run. Use a command that generate the coverage files.

  • git:push

    Push your changes. If any of the previous tasks break, because one test failed, for instance, the script won’t push. Actually this task runs only if every checking done before work well.

Using this almost paranoid sequence of steps it will be hard to check in bad code in your repository, which is good, very good. The idea is that you should treat your repository as a sacred place, where only good code should ever enter.

### More examples

  • Reckless programmer

    So you don’t have tests, nor specs but you still want to use the jumpup. You might get away with this customized lib/tasks/integration.rake:

    INTEGRATION_TASKS = %w(
      jumpup:start
      db:migrate
      jumpup:finish
    )
    

    The fact that you can get away with this doesn’t mean you should. Don’t you think it’s already time to grow up and become more professional about software development? I know you believe you have a great excuse to avoid writing those tests or specs. Still it’s just an excuse. Write tests or write specs and make a better world!

  • Test conscious programmer

    You haven't jumped on the [BDD][BDD] bandwagon yet. Instead, you write tests, which is good, but they don't cover all of your code yet, which is bad. We believe you will improve it and make sure your tests cover 100% of your code. In the meantime you might need to skip coverage checkings. Oh, you also don't use [Selenium][sor]. Shame on you! Try this:
    
         INTEGRATION_TASKS = %w(
           jumpup:start
           db:migrate
           test
           jumpup:finish
         )
    
  • Spec infected programmer

    So you used to [TDD] all around but then someone told you that this is for gramma. The new wave has a name on it: [BDD]. So, of course, you now have specs covering 100% of your code and doesn’t have any more tests. Great! Just change your test_helper.rb/spec_helper.rb with:

    “‘ruby require ’simplecov’ SimpleCov.start ‘rails’ do

    minimum_coverage 100
    

    end “‘

## Versioning

Jumpup follows the [Semantic Versioning](semver.org/).

## Issues

If you have problems, please create a [Github Issue](github.com/Helabs/jumpup/issues).

## Contributing

Please see [CONTRIBUTING.md](github.com/Helabs/jumpup/blob/master/CONTRIBUTING.md) for details.

## Release

Follow this steps to release a new version of the gem.

  1. Test if everything is running ok;

  2. Change version of the gem on ‘VERSION` constant;

  3. Add the release date on the ‘CHANGELOG`;

  4. Do a commit “Bump version x.x.x”, follow the semantic version;

  5. Run ‘$ rake release`, this will send the gem to the rubygems;

  6. Check if the gem is on the rubygems and the tags are correct on the github;

## License

This code is free to be used under the terms of the [MIT license].

## Contact

Comments are welcome.

## Maintainers

## Authors

Jumpup came from the idea of [integration](github.com/tapajos/integration). Thanks to [Improve It] and the original authors:

  • Marcos Tapajós][mt
  • Sylvestre Mergulhão][sm
  • Vinícius Teles][vt

## Made with love by HE:labs

![HE:labs]()

This gem was created and is maintained by [HE:labs](github.com/Helabs).

[gem_version_badge]: [ruby_gems]: rubygems.org/gems/jumpup [piston]: piston.rubyforge.org/ [mt]: github.com/tapajos [sm]: github.com/mergulhao [vt]: www.improveit.com.br/vinicius [f]: rubyforge.org/forum/?group_id=4662 [s]: subversion.tigris.org [git]: git.or.cz/ [rc]: eigenclass.org/hiki.rb?rcov [sc]: github.com/colszowka/simplecov [sor]: selenium-on-rails.openqa.org [rs]: rspec.info [rz]: rubyzip.sourceforge.net/ [ror]: www.rubyonrails.org [sci]: jamesshore.com/Blog/Why%20I%20Dont%20Like%20CruiseControl.html [co]: www.improveit.com.br/en/contact [mit]: www.opensource.org/licenses/mit-license.php [ci]: martinfowler.com/articles/continuousIntegration.html [travis]: travis-ci.org [tar]: en.wikipedia.org/wiki/Tar_%28file_format%29 [BDD]: en.wikipedia.org/wiki/Behavior_driven_development [TDD]: en.wikipedia.org/wiki/Test-driven_development [ii]: www.improveit.com.br