diff --git a/shard.yml b/shard.yml index ab25306..226456c 100644 --- a/shard.yml +++ b/shard.yml @@ -1,10 +1,10 @@ name: carbon -version: 0.4.1 +version: 0.4.2 authors: - Paul Smith -crystal: ">= 1.4.0" +crystal: ~> 1.4 license: MIT @@ -15,16 +15,16 @@ targets: dependencies: habitat: github: luckyframework/habitat - version: ~> 0.4.8 + version: ">= 0.4.7, < 0.5" lucky_task: github: luckyframework/lucky_task - version: ~> 0.3.0 + version: ">= 0.1.1, < 0.4" lucky_template: github: luckyframework/lucky_template - version: ~> 0.2.0 + version: ">= 0.2.0, < 0.3" wordsmith: github: luckyframework/wordsmith - version: ~> 0.4.0 + version: ">= 0.4.0, < 0.5" development_dependencies: lucky_env: diff --git a/src/carbon/tasks/gen/email.cr b/src/carbon/tasks/gen/email.cr index d18d20f..4ab0ded 100644 --- a/src/carbon/tasks/gen/email.cr +++ b/src/carbon/tasks/gen/email.cr @@ -32,15 +32,22 @@ end class Gen::Email < LuckyTask::Task include LuckyTask::TextHelpers + summary "Generate a new Email" - help_message <<-TEXT - Generate a new email with html and text formats. - The email name must be CamelCase. No other options are available. - Examples: - lucky gen.email WelcomeUser - lucky gen.email SubscriptionRenewed - lucky gen.email ResetPassword - TEXT + + {% begin %} + {% lt_0_3_0 = compare_versions(LuckyTask::VERSION, "0.3.0") < 0 %} + {% if lt_0_3_0 %}def help_message{% else %}help_message({% end %} + <<-TEXT + Generate a new email with html and text formats. + The email name must be CamelCase. No other options are available. + Examples: + lucky gen.email WelcomeUser + lucky gen.email SubscriptionRenewed + lucky gen.email ResetPassword + TEXT + {% if lt_0_3_0 %}end{% else %}){% end %} + {% end %} positional_arg :email_name, "The name of the email", format: /^[A-Z]/