Module: McptaskRailsRunner

Defined in:
lib/mcptask_rails_runner.rb,
lib/mcptask_rails_runner/binary.rb,
lib/mcptask_rails_runner/railtie.rb,
lib/mcptask_rails_runner/version.rb

Defined Under Namespace

Modules: Binary Classes: Error, Railtie

Constant Summary collapse

VERSION =

The gem version names the mcptask_runner binary release it carries (tag v#VERSION in jchsoft/mcptask-releases). Bump both together.

What it does not name is the binary the host runs at 08:00. That one is installed outside every gem directory, by install and update, and a machine has one of it however many projects and gem versions it carries — see Binary::INSTALL_DIR. So the pin is per project and per foreground rake invocation; the installed copy is per machine, and the newest binary any of those projects offers is the one that stays.

"0.3.1"

Class Method Summary collapse

Class Method Details

.piece_id!(value, name, example) ⇒ Object

Validates a rake bracket argument such as manual:story.

Raises:

  • (ArgumentError)


9
10
11
12
13
14
# File 'lib/mcptask_rails_runner.rb', line 9

def self.piece_id!(value, name, example)
  id = Integer(value, exception: false)
  raise ArgumentError, "#{name} is required and must be a positive integer (usage: rake '#{example}')" if id.nil? || id < 1

  id.to_s
end