Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ 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
version: ~> 0.4.0

liquid:
github: TechMagister/liquid.cr
version: ~> 0.2.4
version: ~> 0.3.0

micrate:
github: amberframework/micrate
Expand All @@ -44,15 +44,15 @@ dependencies:

pg:
github: will/crystal-pg
version: ~> 0.14.1
version: ~> 0.15.0

redis:
github: stefanwille/crystal-redis
version: ~> 1.11.0

shell-table:
github: jwaldrip/shell-table.cr
version: ~> 0.9.1
version: ~> 0.9.2

slang:
github: jeromegn/slang
Expand All @@ -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
2 changes: 1 addition & 1 deletion spec/amber/cli/commands/database_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions spec/amber/cli/commands/routes/routes_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/amber/cli/helpers/process_runner.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/amber/cli/recipes/file_entries.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions src/amber/cli/templates/app/shard.yml.ecr
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/amber/environment/logger_builder.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
2 changes: 1 addition & 1 deletion src/amber/router/flash.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/amber/support/client_reload.cr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down