Skip to content

Commit

Permalink
initial
Browse files Browse the repository at this point in the history
  • Loading branch information
b08x committed Jul 2, 2024
1 parent 6c2f525 commit 94377d1
Show file tree
Hide file tree
Showing 20 changed files with 76 additions and 345 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Release notes for this project are kept here: https://github.com/mattbrictson/gem/releases
Release notes for this project are kept here: https://github.com/b08x/flowbots/releases
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ This Code of Conduct applies within all community spaces, and also applies when

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at owner@example.com. All complaints will be reviewed and investigated promptly and fairly.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at rwpannick@gmail.com. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

Expand Down
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
source "https://rubygems.org"
gemspec


gem "minitest", "~> 5.11"
gem "minitest-rg", "~> 5.3"
gem "pry", "~> 0.14.2"
gem "pry-doc", "~> 1.5"
gem "rake", "~> 13.0"
gem "rb-readline", "~> 0.5.5"
gem "rubocop", "1.64.1"
gem "rubocop-minitest", "0.35.0"
gem "rubocop-packaging", "0.5.2"
gem "rubocop-performance", "1.21.1"
gem "rubocop-rake", "0.6.0"
gem "ruby-lsp", "~> 0.17.4"
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2024 Example Owner
Copyright (c) 2024 Robert Pannick

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
40 changes: 8 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,9 @@
# gem template
# flowbots

This is a GitHub template for creating Ruby gems. Press [**Use this template**](https://github.com/mattbrictson/gem/generate) to generate a project from this template. In the generated project, run this script to rename the gem to meet your needs:

```
ruby rename_template.rb
```

Note that to get the full benefits of the script, you will need the [gh](https://github.com/cli/cli) command installed.

This template is based on `bundle gem` with some notable improvements:

- GitHub Actions configuration
- Minitest, with minitest-rg for nicely formatted test output
- Rubocop with a good set of configuration
- CLI scaffolding, built on top of Thor (optional; for more background, read [Fixing Thor’s CLI Quirks](https://mattbrictson.com/blog/fixing-thor-cli-behavior))
- [release-drafter](https://github.com/apps/release-drafter) GitHub Action for automating release notes
- A `rake bump` task to keep your Ruby and Bundler dependencies up to date
- A nice README with badges ready to go (see below)

---

<!-- END FRONT MATTER -->

# example

[![Gem Version](https://img.shields.io/gem/v/replace_with_gem_name)](https://rubygems.org/gems/replace_with_gem_name)
[![Gem Downloads](https://img.shields.io/gem/dt/replace_with_gem_name)](https://www.ruby-toolbox.com/projects/replace_with_gem_name)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/mattbrictson/gem/ci.yml)](https://github.com/mattbrictson/gem/actions/workflows/ci.yml)
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/mattbrictson/gem)](https://codeclimate.com/github/mattbrictson/gem)
[![Gem Version](https://img.shields.io/gem/v/flowbots)](https://rubygems.org/gems/flowbots)
[![Gem Downloads](https://img.shields.io/gem/dt/flowbots)](https://www.ruby-toolbox.com/projects/flowbots)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/b08x/flowbots/ci.yml)](https://github.com/b08x/flowbots/actions/workflows/ci.yml)
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/b08x/flowbots)](https://codeclimate.com/github/b08x/flowbots)

TODO: Description of this gem goes here.

Expand All @@ -42,16 +18,16 @@ TODO: Description of this gem goes here.
## Quick start

```
gem install example
gem install flowbots
```

```ruby
require "example"
require "flowbots"
```

## Support

If you want to report a bug, or have ideas, feedback or questions about the gem, [let me know via GitHub issues](https://github.com/mattbrictson/gem/issues/new) and I will do my best to provide a helpful answer. Happy hacking!
If you want to report a bug, or have ideas, feedback or questions about the gem, [let me know via GitHub issues](https://github.com/b08x/flowbots/issues/new) and I will do my best to provide a helpful answer. Happy hacking!

## License

Expand Down
8 changes: 4 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ task default: %i[test rubocop]

Rake::Task["release"].enhance do
puts "Don't forget to publish the release on GitHub!"
system "open https://github.com/mattbrictson/gem/releases"
system "open https://github.com/b08x/flowbots/releases"
end

task :disable_overcommit do
Expand All @@ -27,13 +27,13 @@ Rake::Task[:build].enhance [:disable_overcommit]

task :verify_gemspec_files do
git_files = `git ls-files -z`.split("\x0")
gemspec_files = Gem::Specification.load("example.gemspec").files.sort
gemspec_files = Gem::Specification.load("flowbots.gemspec").files.sort
ignored_by_git = gemspec_files - git_files
next if ignored_by_git.empty?

raise <<~ERROR
The `spec.files` specified in example.gemspec include the following files
The `spec.files` specified in flowbots.gemspec include the following files
that are being ignored by git. Did you forget to add them to the repo? If
not, you may need to delete these files or modify the gemspec to ensure
that they are not included in the gem by mistake:
Expand All @@ -55,7 +55,7 @@ namespace :bump do
end

task :ruby do
replace_in_file "example.gemspec", /ruby_version = .*">= (.*)"/ => RubyVersions.lowest
replace_in_file "flowbots.gemspec", /ruby_version = .*">= (.*)"/ => RubyVersions.lowest
replace_in_file ".rubocop.yml", /TargetRubyVersion: (.*)/ => RubyVersions.lowest
replace_in_file ".github/workflows/ci.yml", /ruby: (\[.+\])/ => RubyVersions.all.inspect
end
Expand Down
11 changes: 5 additions & 6 deletions bin/console
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
#!/usr/bin/env ruby

require "bundler/setup"
require "example"
require "flowbots"

# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.

# (If you use this, don't forget to add pry to your Gemfile!)
# require "pry"
# Pry.start

require "irb"
IRB.start(__FILE__)
require "pry"
Pry.start


30 changes: 0 additions & 30 deletions example.gemspec

This file was deleted.

4 changes: 0 additions & 4 deletions exe/example

This file was deleted.

8 changes: 8 additions & 0 deletions exe/flowbots
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

lib_dir = File.expand_path(File.join(__dir__, '..', 'lib'))
$LOAD_PATH.unshift lib_dir unless $LOAD_PATH.include?(lib_dir)

require "flowbots"
Flowbots::CLI.start(ARGV)
30 changes: 30 additions & 0 deletions flowbots.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require_relative "lib/flowbots/version"

Gem::Specification.new do |spec|
spec.name = "flowbots"
spec.version = Flowbots::VERSION
spec.authors = ["Robert Pannick"]
spec.email = ["[email protected]"]

spec.summary = "It's basically a workflow orchestration system. \"Workflow orchestration system\" - sounds impressive, right? In reality, it's like trying to herd cats, except the cats are AI agents with a penchant for existential dread and the occasional haiku. We use Jongleur and NanoBot libraries."
spec.homepage = "https://github.com/b08x/flowbots"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.1"

spec.metadata = {
"bug_tracker_uri" => "https://github.com/b08x/flowbots/issues",
"changelog_uri" => "https://github.com/b08x/flowbots/releases",
"source_code_uri" => "https://github.com/b08x/flowbots",
"homepage_uri" => spec.homepage,
"rubygems_mfa_required" => "true"
}

# Specify which files should be added to the gem when it is released.
spec.files = Dir.glob(%w[LICENSE.txt README.md {exe,lib}/**/*]).reject { |f| File.directory?(f) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

# Runtime dependencies
spec.add_dependency "thor", "~> 1.2"
end
5 changes: 0 additions & 5 deletions lib/example.rb

This file was deleted.

5 changes: 5 additions & 0 deletions lib/flowbots.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module Flowbots
autoload :CLI, "flowbots/cli"
autoload :VERSION, "flowbots/version"
autoload :ThorExt, "flowbots/thor_ext"
end
6 changes: 3 additions & 3 deletions lib/example/cli.rb → lib/flowbots/cli.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
require "thor"

module Example
module Flowbots
class CLI < Thor
extend ThorExt::Start

map %w[-v --version] => "version"

desc "version", "Display example version", hide: true
desc "version", "Display flowbots version", hide: true
def version
say "example/#{VERSION} #{RUBY_DESCRIPTION}"
say "flowbots/#{VERSION} #{RUBY_DESCRIPTION}"
end
end
end
2 changes: 1 addition & 1 deletion lib/example/thor_ext.rb → lib/flowbots/thor_ext.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Example
module Flowbots
module ThorExt
# Configures Thor to behave more like a typical CLI, with better help and error handling.
#
Expand Down
2 changes: 1 addition & 1 deletion lib/example/version.rb → lib/flowbots/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Example
module Flowbots
VERSION = "0.1.0".freeze
end
Loading

0 comments on commit 94377d1

Please sign in to comment.