Skip to content

Commit

Permalink
Update Danger to 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
orta authored and segiddins committed Dec 1, 2016
1 parent d53804c commit b8c654b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 21 deletions.
12 changes: 6 additions & 6 deletions Dangerfile
@@ -1,8 +1,8 @@
# Warn when there is a big PR
warn("Big PR") if lines_of_code > 500
warn("Big PR") if git.lines_of_code > 500

# Don't let testing shortcuts get into master by accident
(modified_files + added_files - %w(Dangerfile)).each do |file|
(git.modified_files + git.added_files - %w(Dangerfile)).each do |file|
next unless File.file?(file)
contents = File.read(file)
if file.start_with?('spec')
Expand All @@ -13,16 +13,16 @@ end

# Sometimes its a README fix, or something like that - which isn't relevant for
# including in a CHANGELOG for example
has_app_changes = !modified_files.grep(/lib/).empty?
has_test_changes = !modified_files.grep(/spec/).empty?
has_app_changes = !git.modified_files.grep(/lib/).empty?
has_test_changes = !git.modified_files.grep(/spec/).empty?

# Add a CHANGELOG entry for app changes
if !modified_files.include?("CHANGELOG.md") && has_app_changes
if !git.modified_files.include?("CHANGELOG.md") && has_app_changes
fail("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/realm/jazzy/blob/master/CHANGELOG.md).")
message "Note, we hard-wrap at 80 chars and use 2 spaces after the last line."
end

# Non-trivial amounts of app changes without tests
if lines_of_code > 50 && has_app_changes && !has_test_changes
if git.lines_of_code > 50 && has_app_changes && !has_test_changes
warn "This PR may need tests."
end
44 changes: 29 additions & 15 deletions Gemfile.lock
Expand Up @@ -20,10 +20,15 @@ GEM
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.4.0)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
ast (2.2.0)
bacon (1.2.0)
claide (1.0.0)
claide (1.0.1)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
clintegracon (0.7.0)
colored (~> 1.2)
diffy
Expand Down Expand Up @@ -59,26 +64,34 @@ GEM
netrc (= 0.7.8)
cocoapods-try (1.0.0)
colored (1.2)
cork (0.2.0)
colored (~> 1.2)
crack (0.4.3)
safe_yaml (~> 1.0.0)
danger (0.8.1)
claide
danger (4.0.1)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored (~> 1.2)
faraday
git
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
octokit (~> 4.2)
redcarpet (~> 3.3)
terminal-table (~> 1)
diffy (3.1.0)
escape (0.0.4)
faraday (0.9.2)
faraday (0.10.0)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
fourflusher (0.3.1)
fuzzy_match (2.0.4)
git (1.3.0)
hashdiff (0.3.0)
i18n (0.7.0)
json (1.8.3)
kramdown (1.13.1)
liferaft (0.0.6)
metaclass (0.0.4)
minitest (5.9.0)
Expand All @@ -91,14 +104,15 @@ GEM
mustache (0.99.8)
nap (1.1.0)
netrc (0.7.8)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
octokit (4.6.2)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
parser (2.3.0.7)
ast (~> 2.2)
powerpack (0.1.1)
prettybacon (0.0.2)
bacon (~> 1.2)
public_suffix (2.0.4)
rainbow (2.1.0)
rake (10.5.0)
redcarpet (3.3.4)
Expand All @@ -112,11 +126,11 @@ GEM
ruby-progressbar (1.7.5)
safe_yaml (1.0.4)
sass (3.4.22)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
sqlite3 (1.3.11)
terminal-table (1.5.2)
terminal-table (1.6.0)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
Expand Down Expand Up @@ -150,4 +164,4 @@ DEPENDENCIES
webmock

BUNDLED WITH
1.13.5
1.13.6

0 comments on commit b8c654b

Please sign in to comment.