web47command

Command jobs are types of jobs that use the command line for execution. This library contains a common set of actions that are performed by these types of jobs

We don't need no sticking badges

  • Develop:
  • Master:

Requirements

  • Ruby 2.4.1

Working with Bundler and RVM

This project manages Ruby versions via RVM and manages dependencies via Bundler.

You must first install RVM. Then install Ruby 2.4.1 (version 2.4.1-p111) via RVM. ``` shell script rvm install 2.4.1

You'll now notice that this project (as well as other App47 ones) contains a .rvmc file, which is executed upon opening the project's root directory in a terminal (and IDE's like RubyMine). The .rvmc file simply states `rvm ruby-2.4.1` which tells RVM to ensure the Ruby version to use for this project is 2.4.1. 

Please note, your Ruby `2.4.1` version might need bundler installed:
``` shell script
gem install bundler -v 1.17.3

To set up this project's dependencies, which are defined in the file, Gemfile, you should first run ``` shell script bundle install --path vendor

The `--path vendor` simply puts all gem files in a `vendor` directory. 

## Development

Your `RubyMine` environment should be setup now, however to verify all is well, please run the test suite
``` shell script
bundle exec rake test

Deployment

The web47command project is a gem that will be deployed via Ruby Gems. When an update is ready, the following steps should be followed

  1. Build the gem gem build web47command.gemspec
  2. Push the new gem to Ruby Gems gem push web47command-version.gem
  3. There may be a delay when using the gem file

Usage

Importing the gem

To use the app47command gem in a project, first add the gem to your Gemfile in one of two ways

Using the gem from Ruby Gems

gem 'web47command'

If you need the gem immediately or need to pull from development branch, you can use the git repo

gem 'web47command', git: '[email protected]:App47/web47command.git', branch: :master

or from the develop branch

gem 'web47command', git: '[email protected]:App47/web47command.git', branch: :develop

Please do not ship to production code using the git repo, as the production servers will not have keys to pull from the web47command repo

Remove the following files

  1. Job
  2. JobLog
  3. CommandLogLog
  4. TrimJobs ### Remove the following files
  5. Change status on a job to current_status