-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from NoRedInk/extract-dependencies
Release 0.8.0
- Loading branch information
Showing
17 changed files
with
170 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,25 @@ | ||
# This configuration was generated by | ||
# `rubocop --auto-gen-config` | ||
# on 2019-01-22 16:22:58 -0600 using RuboCop version 0.60.0. | ||
# on 2019-02-07 14:17:24 -0600 using RuboCop version 0.60.0. | ||
# The point is for the user to remove these configuration records | ||
# one by one as the offenses are removed from the code base. | ||
# Note that changes in the inspected code, or installation of new | ||
# versions of RuboCop, may require this file to be generated again. | ||
|
||
# Offense count: 3 | ||
# Offense count: 4 | ||
Metrics/AbcSize: | ||
Max: 52 | ||
Max: 51 | ||
|
||
# Offense count: 2 | ||
# Configuration parameters: CountComments. | ||
Metrics/ClassLength: | ||
Max: 124 | ||
Max: 125 | ||
|
||
# Offense count: 6 | ||
# Configuration parameters: CountComments, ExcludedMethods. | ||
Metrics/MethodLength: | ||
Max: 41 | ||
Max: 40 | ||
|
||
# Offense count: 1 | ||
Metrics/PerceivedComplexity: | ||
Max: 9 | ||
|
||
# Offense count: 12 | ||
# Configuration parameters: EnforcedStyle. | ||
# SupportedStyles: annotated, template, unannotated | ||
Style/FormatStringToken: | ||
Exclude: | ||
- 'exe/deploy-complexity.rb' | ||
- 'lib/deploy_complexity/deploy.rb' | ||
- 'lib/deploy_complexity/output_formatter.rb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'values' | ||
|
||
module DeployComplexity | ||
# Represents a potential change in a package version for a dependency file | ||
class Dependency < Value.new(:package, :current, :previous, :file) | ||
def change | ||
if current.nil? | ||
:removed | ||
elsif previous.nil? | ||
:added | ||
elsif current != previous | ||
:updated | ||
else | ||
:unchanged | ||
end | ||
end | ||
|
||
def unchanged? | ||
change == :unchanged | ||
end | ||
|
||
def to_s | ||
case change | ||
when :removed | ||
"Removed %s (%s)" % [package, file] | ||
when :added | ||
"Added %s: %s (%s)" % [package, current, file] | ||
when :updated | ||
"Updated %s: %s -> %s (%s)" % [package, previous, current, file] | ||
else | ||
"Unchanged %s (%s)" % [package, file] | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module DeployComplexity | ||
# Generate Github urls for revisions, comparisons, etc | ||
class Github | ||
def initialize(gh_url) | ||
@project_url = gh_url | ||
end | ||
|
||
def blob(version, path = nil) | ||
base = "%s/blob/%s/" % [@project_url, version] | ||
path ? base + path : base | ||
end | ||
|
||
def compare(base, to) | ||
"%s/compare/%s...%s" % [@project_url, base, to] | ||
end | ||
|
||
def pull_request(number) | ||
"%s/pull/%d" % [@project_url, number] | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
module DeployComplexity | ||
VERSION = "0.7.0" | ||
VERSION = "0.8.0" | ||
end |
Oops, something went wrong.