lib/cogy.rb in cogy-0.1.0 vs lib/cogy.rb in cogy-0.1.1
- old
+ new
@@ -72,11 +72,11 @@
# @option opts [Array] :rules (["allow"])
#
# @example
# Cogy.on "calc",
# args: [:a, :b],
- # opts: { op: { description: "The operation to perform", type: "string" } },
+ # opts: { op: { description: "The operation to perform", type: "string", required: true } },
# desc: "Perform an arithmetic operation between two numbers",
# long_desc: "Operations supported are provided with their respective symbols
# passed as the --op option.",
# examples: "Addition: !calc --op + 1 2\n" \
# "Subtraction: !calc --op - 5 3\n" \
@@ -100,19 +100,19 @@
# Generates the bundle config
#
# @return [Hash]
def self.bundle_config
version = if bundle_version.respond_to?(:call)
- bundle_version.call
- else
- bundle_version
- end
+ bundle_version.call
+ else
+ bundle_version
+ end
config = {
"cog_bundle_version" => COG_BUNDLE_VERSION,
"name" => bundle_name,
"description" => bundle_description,
- "version" => version,
+ "version" => version
}
config["commands"] = {} if commands.present?
commands.each do |name, cmd|