Skip to content

Commit

Permalink
Merge pull request #3 from bencgreenberg/fix-cli
Browse files Browse the repository at this point in the history
Fix the CLI
  • Loading branch information
hummusonrails committed Mar 9, 2021
2 parents 73e9434 + e62c4de commit 42f1d00
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 11 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@

## [0.0.2] - 2021-03-09

- Add a CLI to the gem to run the gem's operations
- Add a CLI to the gem to run the gem's operations

## [0.0.3] - 2021-03-09

- Bug fix for the CLI functionality, now operational
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
PATH
remote: .
specs:
dev_orbit (0.0.1)
dev_orbit (0.0.2)
activesupport (~> 6.1)
http (~> 4.4)
json (~> 2.5)
thor (~> 1.1)
zeitwerk (~> 2.4)

GEM
Expand Down Expand Up @@ -78,6 +79,7 @@ GEM
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
ruby-progressbar (1.11.0)
thor (1.1.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unf (0.1.4)
Expand Down
3 changes: 2 additions & 1 deletion bin/dev_orbit
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ require_relative '../scripts/check_comments'

if check_comments
puts "Checking for new DEV comments within the past day and posting them to your Orbit workspace..."
%x[ ruby scripts/check_comments.rb ]
ARGV[0] = 'render'
DevOrbit::Scripts::CheckComments.start(ARGV)
end
5 changes: 3 additions & 2 deletions dev_orbit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
spec.files = Dir.chdir(File.expand_path(__dir__)) do
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
end
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.bindir = "bin"
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

# Uncomment to register a new dependency of your gem
Expand All @@ -33,6 +33,7 @@ Gem::Specification.new do |spec|
spec.add_dependency "http", "~> 4.4"
spec.add_dependency "json", "~> 2.5"
spec.add_dependency "zeitwerk", "~> 2.4"
spec.add_dependency "thor", "~> 1.1"
spec.add_development_dependency "rspec", "~> 3.4"
spec.add_development_dependency "webmock", "~> 3.12"

Expand Down
2 changes: 1 addition & 1 deletion lib/dev_orbit/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module DevOrbit
VERSION = "0.0.2"
VERSION = "0.0.3"
end
18 changes: 13 additions & 5 deletions scripts/check_comments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
# frozen_string_literal: true

require "dev_orbit"
require "thor"

client = DevOrbit::Client.new

response = client.comments

puts response
module DevOrbit
module Scripts
class CheckComments < Thor
desc "render", "check for new DEV comments and push them to Orbit"
def render
client = DevOrbit::Client.new
response = client.comments
puts response
end
end
end
end

0 comments on commit 42f1d00

Please sign in to comment.