Skip to content
Merged
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
2 changes: 1 addition & 1 deletion shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ shards:

git-repository:
git: https://github.com/place-labs/git-repository.git
version: 1.7.0
version: 1.7.1

google:
git: https://github.com/placeos/google.git
Expand Down
4 changes: 2 additions & 2 deletions src/placeos-frontend-loader/loader.cr
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
Log = ::Log.for(self)

Habitat.create do
setting content_directory : String = WWW

Check warning on line 17 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/UselessAssign

Useless assignment to variable `content_directory`
Raw output
> setting content_directory : String = WWW
          ^
setting update_crontab : String = CRON

Check warning on line 18 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/UselessAssign

Useless assignment to variable `update_crontab`
Raw output
> setting update_crontab : String = CRON
          ^
setting max_retry_attempts : Int32 = MAX_RETRY_ATTEMPTS

Check warning on line 19 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/UselessAssign

Useless assignment to variable `max_retry_attempts`
Raw output
> setting max_retry_attempts : Int32 = MAX_RETRY_ATTEMPTS
          ^
setting max_backoff_seconds : Int32 = MAX_BACKOFF_SECONDS

Check warning on line 20 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Lint/UselessAssign

Useless assignment to variable `max_backoff_seconds`
Raw output
> setting max_backoff_seconds : Int32 = MAX_BACKOFF_SECONDS
          ^
end

class_getter instance : Loader do
Expand Down Expand Up @@ -135,7 +135,7 @@
end
end

def process_resource(action : Resource::Action, resource : Model::Repository) : Resource::Result

Check warning on line 138 in src/placeos-frontend-loader/loader.cr

View workflow job for this annotation

GitHub Actions / Ameba

Metrics/CyclomaticComplexity

Cyclomatic complexity too high [15/10]
Raw output
> def process_resource(action : Resource::Action, resource : Model::Repository) : Resource::Result
      ^
repository = resource

# Only consider Interface Repositories
Expand Down Expand Up @@ -306,8 +306,8 @@
Log.trace { "#{repository.folder_name}: downloading new content" }
commit_ref = repository.commit_hash == "HEAD" ? repository.branch : repository.commit_hash
commit = if (root = repository.root_path) && !root.blank?
Log.trace { "Fetching folder as root_path property is set: '#{root}', size: #{root.size}" }
cache.fetch_folder(commit_ref, root, repository_directory)
Log.trace { "Fetching folder contents as root_path property is set: '#{root}', size: #{root.size}" }
cache.fetch_folder_contents(commit_ref, root, repository_directory)
else
Log.trace { {message: "Fetching commit", commit_ref: commit_ref, repo_dir: repository_directory} }
cache.fetch_commit(commit_ref, repository_directory)
Expand Down
Loading