diff --git a/shard.yml b/shard.yml index 226c9ead4..f47a60048 100644 --- a/shard.yml +++ b/shard.yml @@ -19,12 +19,12 @@ dependencies: version: ~> 0.0.3 cli: - github: amberframework/cli + github: mosop/cli version: ~> 0.7.0 compiled_license: github: elorest/compiled_license - version: ~> 0.1.1 + version: ~> 0.1.3 kilt: github: jeromegn/kilt @@ -32,7 +32,7 @@ dependencies: liquid: github: TechMagister/liquid.cr - version: ~> 0.2.4 + version: ~> 0.3.0 micrate: github: amberframework/micrate @@ -44,7 +44,7 @@ dependencies: pg: github: will/crystal-pg - version: ~> 0.14.1 + version: ~> 0.15.0 redis: github: stefanwille/crystal-redis @@ -52,7 +52,7 @@ dependencies: shell-table: github: jwaldrip/shell-table.cr - version: ~> 0.9.1 + version: ~> 0.9.2 slang: github: jeromegn/slang @@ -64,13 +64,13 @@ dependencies: inflector: github: phoffer/inflector.cr - version: "~> 0.1.8" + version: ~> 0.1.8 teeplate: - github: amberframework/teeplate - version: ~> 0.5.0 + github: mosop/teeplate + version: ~> 0.6.1 development_dependencies: ameba: github: veelenga/ameba - version: ~> 0.6.0 + version: ~> 0.7.0 diff --git a/spec/amber/cli/commands/database_spec.cr b/spec/amber/cli/commands/database_spec.cr index 30d5f7945..2a5d96355 100644 --- a/spec/amber/cli/commands/database_spec.cr +++ b/spec/amber/cli/commands/database_spec.cr @@ -32,7 +32,7 @@ module Amber::CLI MainCommand.run ["db", "migrate"] db_filename = env_yml["database_url"].to_s.gsub("sqlite3:", "") File.exists?(db_filename).should be_true - File.stat(db_filename).size.should_not eq 0 + File.info(db_filename).size.should_not eq 0 end it "deletes the database when db drop" do diff --git a/spec/amber/cli/commands/routes/routes_spec.cr b/spec/amber/cli/commands/routes/routes_spec.cr index 83e1305e4..a6767d82c 100644 --- a/spec/amber/cli/commands/routes/routes_spec.cr +++ b/spec/amber/cli/commands/routes/routes_spec.cr @@ -30,7 +30,7 @@ module Amber::CLI it "outputs the static file handler" do expected = "Amber::Controller::Static" output.should contain expected - line = output_lines.find("") { |line| line.includes? expected } + line = output_lines.find("") { |this_line| this_line.includes? expected } expectations = %w(get Amber::Controller::Static index static /*) expectations.each do |expectation| line.should contain expectation @@ -40,7 +40,7 @@ module Amber::CLI it "outputs the HomeController index action" do expected = "HomeController" output.should contain expected - line = output_lines.find("") { |line| line.includes? expected } + line = output_lines.find("") { |this_line| this_line.includes? expected } expectations = %w(get HomeController index web /) expectations.each do |expectation| line.should contain expectation @@ -56,7 +56,7 @@ module Amber::CLI it "outputs the web socket route" do expected = "websocket" output.should contain expected - line = output_lines.find("") { |line| line.includes? expected } + line = output_lines.find("") { |this_line| this_line.includes? expected } expectations = %w(websocket ElectricSocket web /electric) expectations.each do |expectation| line.should contain expectation diff --git a/src/amber/cli/helpers/process_runner.cr b/src/amber/cli/helpers/process_runner.cr index 14e2a7aa6..b90b95b1e 100644 --- a/src/amber/cli/helpers/process_runner.cr +++ b/src/amber/cli/helpers/process_runner.cr @@ -96,7 +96,7 @@ module Sentry end private def get_timestamp(file : String) - File.stat(file).mtime.to_s("%Y%m%d%H%M%S") + File.info(file).modification_time.to_s("%Y%m%d%H%M%S") end private def project_name diff --git a/src/amber/cli/recipes/file_entries.cr b/src/amber/cli/recipes/file_entries.cr index aab079178..bdec5da4a 100644 --- a/src/amber/cli/recipes/file_entries.cr +++ b/src/amber/cli/recipes/file_entries.cr @@ -23,7 +23,7 @@ module Amber::Recipes def pack_liquid(files, absolute_path, filename) template = Liquid::Template.parse File.new(absolute_path) io = template.render @ctx.as(Liquid::Context) - files << ::Teeplate::StringData.new(filename, io.to_s, File.stat(absolute_path).perm) + files << ::Teeplate::StringData.new(filename, io.to_s, File.info(absolute_path).permissions) rescue ex CLI.logger.error "failed to process #{absolute_path} - #{ex.message}" end @@ -32,7 +32,7 @@ module Amber::Recipes io = IO::Memory.new File.open(absolute_path) { |f| IO.copy(f, io) } - files << ::Teeplate::Base64Data.new(filename, io.size.to_u64, Base64.encode(io), File.stat(absolute_path).perm) + files << ::Teeplate::Base64Data.new(filename, io.size.to_u64, Base64.encode(io), File.info(absolute_path).permissions) end def collect_files(files) diff --git a/src/amber/cli/templates/app/shard.yml.ecr b/src/amber/cli/templates/app/shard.yml.ecr index d85961e28..b6f1e725d 100644 --- a/src/amber/cli/templates/app/shard.yml.ecr +++ b/src/amber/cli/templates/app/shard.yml.ecr @@ -28,11 +28,11 @@ dependencies: <% case @model when "crecto" -%> crecto: github: Crecto/crecto - version: ~> 0.8.1 + version: ~> 0.8.6 <% else -%> granite: github: amberframework/granite - version: ~> 0.11.0 + version: ~> 0.12.0 <% end -%> quartz_mailer: @@ -46,7 +46,7 @@ dependencies: <% case @database when "pg" -%> pg: github: will/crystal-pg - version: ~> 0.14.1 + version: ~> 0.15.0 <% when "mysql" -%> mysql: github: crystal-lang/crystal-mysql diff --git a/src/amber/environment/logger_builder.cr b/src/amber/environment/logger_builder.cr index 44d3c27cd..1bbffa2fb 100644 --- a/src/amber/environment/logger_builder.cr +++ b/src/amber/environment/logger_builder.cr @@ -6,9 +6,9 @@ module Amber::Environment new(io, logging).logger end - def initialize(io, logging) + def initialize(logger_io, logging) Colorize.enabled = logging.colorize - @logger = Logger.new(io) + @logger = Logger.new(logger_io) @logger.level = logging.severity @logger.progname = "Server" @logger.formatter = Logger::Formatter.new do |severity, datetime, progname, message, io| diff --git a/src/amber/router/flash.cr b/src/amber/router/flash.cr index fb61d05d5..c3b335bb4 100644 --- a/src/amber/router/flash.cr +++ b/src/amber/router/flash.cr @@ -13,7 +13,7 @@ module Amber def self.from_session(json) flash = new values = JSON.parse(json) - values.each { |k, v| flash[k.to_s] = v.to_s } + values.as_h.each { |k, v| flash[k.to_s] = v.to_s } flash rescue e : JSON::ParseException new diff --git a/src/amber/support/client_reload.cr b/src/amber/support/client_reload.cr index e153d95d4..cd258aa08 100644 --- a/src/amber/support/client_reload.cr +++ b/src/amber/support/client_reload.cr @@ -46,7 +46,7 @@ module Amber::Support end private def get_timestamp(file : String) - File.stat(file).mtime.to_s("%Y%m%d%H%M%S") + File.info(file).modification_time.to_s("%Y%m%d%H%M%S") end private def scan_files