From edb47d1dbdacc439ddb1fae7ce7ffa1b4b5b7738 Mon Sep 17 00:00:00 2001 From: mms Date: Thu, 28 Nov 2024 12:41:29 +0100 Subject: fix: properly set the executable in gemspec bump required respec --- bin/chotto | 28 ---------------------------- chotto-0.1.1.gem | Bin 0 -> 6656 bytes chotto.gemspec | 7 ++++--- exe/chotto | 28 ++++++++++++++++++++++++++++ 4 files changed, 32 insertions(+), 31 deletions(-) delete mode 100755 bin/chotto create mode 100644 chotto-0.1.1.gem create mode 100755 exe/chotto diff --git a/bin/chotto b/bin/chotto deleted file mode 100755 index 0d6116f..0000000 --- a/bin/chotto +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -require 'optparse' -require_relative '../lib/chotto' - -CONFIG_FILEPATH = 'chotto/config.rb' -XDG_HOME = ENV.fetch('XDG_CONFIG_HOME', "#{Dir.home}/.config") -def start_chotto(options) - Chotto.configure do - config.only_new = options.fetch(:only_new, false) - end - - config_file = File.read("#{XDG_HOME}/#{CONFIG_FILEPATH}") - instance_eval(config_file) - eval_rules(options) -end - -options = {} -OptionParser.new do |opts| - opts.banner = 'Usage: chotto [options]' - - opts.on('-n', '--new', 'Run only for new mesages') do |v| - options[:only_new] = v - end -end.parse! - -start_chotto(options) diff --git a/chotto-0.1.1.gem b/chotto-0.1.1.gem new file mode 100644 index 0000000..e4ec398 Binary files /dev/null and b/chotto-0.1.1.gem differ diff --git a/chotto.gemspec b/chotto.gemspec index 10fbc9f..6bb0654 100644 --- a/chotto.gemspec +++ b/chotto.gemspec @@ -1,17 +1,18 @@ Gem::Specification.new do |s| s.name = 'chotto' - s.version = '0.1.0' + s.version = '0.1.1' s.licenses = ['BSD-3-Clause'] - s.summary = "chotto-0.0.1" + s.summary = "chotto-0.1.1" s.description = "Initial tagging script for Notmuch" s.authors = ["mms"] s.email = 'chotto@sapka.me' s.files = `git ls-files -- lib/*`.split("\n") s.homepage = 'https://crys.site/projects/chotto' + s.bindir = 'exe' s.executables << "chotto" s.metadata = { "source_code_uri" => "https://cgit.crys.site/chotto" } - s.add_development_dependency "rspec", ">= 2" + s.add_development_dependency "rspec", ">= 3" end diff --git a/exe/chotto b/exe/chotto new file mode 100755 index 0000000..0d6116f --- /dev/null +++ b/exe/chotto @@ -0,0 +1,28 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require 'optparse' +require_relative '../lib/chotto' + +CONFIG_FILEPATH = 'chotto/config.rb' +XDG_HOME = ENV.fetch('XDG_CONFIG_HOME', "#{Dir.home}/.config") +def start_chotto(options) + Chotto.configure do + config.only_new = options.fetch(:only_new, false) + end + + config_file = File.read("#{XDG_HOME}/#{CONFIG_FILEPATH}") + instance_eval(config_file) + eval_rules(options) +end + +options = {} +OptionParser.new do |opts| + opts.banner = 'Usage: chotto [options]' + + opts.on('-n', '--new', 'Run only for new mesages') do |v| + options[:only_new] = v + end +end.parse! + +start_chotto(options) -- cgit v1.2.3