Skip to content

Commit

Permalink
comments & formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Ifiht committed Feb 11, 2024
1 parent 7245d3b commit 828646e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/shiki_gram.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require "yaml"
require 'base64'
require "base64"

class ShikiGram
def wrap_msg(msg)
Expand Down
13 changes: 8 additions & 5 deletions src/manual.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@
require_relative "lib/shiki_gram"
require_relative "lib/app_settings"

# Get user settings
# Variable setup
args = ARGV
tube = ARGV[0]
alltubes = []
skgram = ShikiGram.new
core_config = AppSettings.new
beanstalk_host = core_config.get("beanstalk_host")
beanstalk_port = core_config.get("beanstalk_port")

# Connect to beanstalkd
beanstalk = Beaneater.new("#{beanstalk_host}\:#{beanstalk_port}")
args = ARGV
tube = ARGV[0]
alltubes = []
beanstalk.tubes.all.each do |t|
alltubes << t.name
end
puts alltubes.inspect

# Check user input
if args.length != 2
puts "this script requires two arguments."
elsif not alltubes.include? tube
Expand All @@ -37,4 +38,6 @@
msg = skgram.wrap_msg(arg)
bean.put msg
end

# Close the connection to beanstalkd
beanstalk.close

0 comments on commit 828646e

Please sign in to comment.