Skip to content

Commit

Permalink
Replaces TODO content with relevant information
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
mscottford committed Aug 19, 2023
1 parent e62e2bb commit 82137cb
Showing 1 changed file with 54 additions and 9 deletions.
63 changes: 54 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,75 @@
# Corgibytes::Freshli::Commons

TODO: Delete this and the text below, and describe your gem

Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/corgibytes/freshli/commons`. To experiment with that code, run `bin/console` for an interactive prompt.
Common testing and build tools code used by [Freshli](https://github.com/corgibytes/freshli) projects.

## Installation

TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.

Install the gem and add to the application's Gemfile by executing:

$ bundle add UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
$ bundle add freshli-commons

If bundler is not being used to manage dependencies, install the gem by executing:

$ gem install UPDATE_WITH_YOUR_GEM_NAME_PRIOR_TO_RELEASE_TO_RUBYGEMS_ORG
$ gem install freshli-commons

## Usage

TODO: Write usage instructions here
### Step Definitions

The following step definitions, and supporting classes, are defined in this repository:

Working with command output:

* `Then(/^it should (pass|fail) with exact output containing file paths:$/)`

Working with CycloneDX files:

* `Then('the CycloneDX file {string} should be valid')`
* `Then('the CycloneDX file {string} should contain {string}')`

Working with Git repositories:

* `Given('I clone the git repository {string} with the sha {string}')`
* `Then('running git status should not report any modifications for {string}')`

Working with Freshli Language Agent gRPC services:

* `Given('a test service is started on port {int}')`
* `Then('GetValidatingRepositories response should contain:')`
* `Then('RetrieveReleaseHistory response should be empty')`
* `Then('RetrieveReleaseHistory response should contain the following versions and release dates:')`
* `Then('the DetectManifests response contains the following file paths expanded beneath {string}:')`
* `Then('the freshli_agent.proto gRPC service is running on port {int}')`
* `Then('the GetValidatingPackages response should contain:')`
* `Then('the ProcessManifest response contains the following file paths expanded beneath {string}:')`
* `Then('there are no services running on port {int}')`
* `When('I call DetectManifests with the full path to {string} on port {int}')`
* `When('I call GetValidatingPackages on port {int}')`
* `When('I call GetValidatingRepositories on port {int}')`
* `When('I call ProcessManifest with the expanded path {string} and the moment {string} on port {int}')`
* `When('I call RetrieveReleaseHistory with {string} on port {int}')`
* `When('I wait for the freshli_agent.proto gRPC service to be running on port {int}')`
* `When('the gRPC service on port {int} is sent the shutdown command')`
* `When('the test service running on port {int} is stopped')`

### Execute

The `Corgibytes::Freshli::Commons::Execute` module contains methods for helping with executing shell commands in a shell/like Ruby script, such as `build.rb`, `test.rb`, `lint.rb`.

Files that use it should pull it in using:

require 'corgibytes/freshli/commons/execute'
# rubocop:disable Style/MixinUsage
include Corgibytes::Freshli::Commons::Execute
# rubocop:enable Style/MixinUsage

The `rubocop` disable/enable lines avoid a warning from Rubocop about including the modules contents into the global namespace.

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `.semver`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Expand Down

0 comments on commit 82137cb

Please sign in to comment.