diff --git a/shard.yml b/shard.yml index 4a29565..2f4da8b 100644 --- a/shard.yml +++ b/shard.yml @@ -18,10 +18,10 @@ scripts: dependencies: lucky: github: luckyframework/lucky - version: ">= 0.30.1" + version: ">= 1.0.0-rc1" avram: github: luckyframework/avram - version: ">= 0.23.0" + version: ">= 1.0.0-rc1" pulsar: github: luckyframework/pulsar version: ">= 0.2.3" @@ -32,7 +32,7 @@ dependencies: development_dependencies: ameba: github: crystal-ameba/ameba - version: "~> 1.0.0" + version: "~> 1.1.0" lucky_cli: github: luckyframework/lucky_cli - version: ">= 0.30.0" + version: ">= 1.0.0-rc1" diff --git a/spec/integration_spec.cr b/spec/integration_spec.cr index f711e6f..3c9909d 100644 --- a/spec/integration_spec.cr +++ b/spec/integration_spec.cr @@ -23,6 +23,8 @@ private def setup_and_compile_project_with_breeze path: #{ENV["BREEZE_TEST_LOCATION"]} TEXT + should_run_successfully "script/setup" + insert_text in: "src/shards.cr", content: <<-TEXT require "breeze" TEXT @@ -35,8 +37,9 @@ private def setup_and_compile_project_with_breeze require "breeze/spec_helpers" TEXT - should_run_successfully "script/setup" should_run_successfully "lucky breeze.install" + should_run_successfully "lucky db.migrate" + File.read("config/breeze.cr").should contain("Breeze.configure") end end diff --git a/src/breeze.cr b/src/breeze.cr index c211d62..81b37f8 100644 --- a/src/breeze.cr +++ b/src/breeze.cr @@ -1,6 +1,7 @@ require "pulsar" -require "avram" require "lucky" +require "avram" +require "avram/lucky" require "./charms/*" require "./breeze/extension" require "./breeze/models/*" diff --git a/tasks/breeze/data/reset.cr b/tasks/breeze/data/reset.cr index 00a1101..00a553e 100644 --- a/tasks/breeze/data/reset.cr +++ b/tasks/breeze/data/reset.cr @@ -17,6 +17,6 @@ class Breeze::Data::Reset < LuckyTask::Task output.puts "Truncating tables #{table_names.colorize(:green)}" Breeze.settings.database.exec statement - puts "done." + output.puts "done." end end diff --git a/tasks/breeze/generators/templates/breeze_config.ecr b/tasks/breeze/generators/templates/breeze_config.ecr index 71d5171..b68027a 100644 --- a/tasks/breeze/generators/templates/breeze_config.ecr +++ b/tasks/breeze/generators/templates/breeze_config.ecr @@ -6,7 +6,7 @@ Breeze.configure do |settings| settings.database = AppDatabase # Enable Breeze only for this environment - settings.enabled = LuckyEnv.development? + settings.enabled = !LuckyEnv.task? && LuckyEnv.development? end # To add BreezeCarbon, be sure to require "breeze/extensions/breeze_carbon"