Skip to content

Commit

Permalink
compiling
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriomazzeo committed Aug 1, 2016
1 parent 416a9a5 commit aaddd5d
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 10 deletions.
113 changes: 113 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
PATH
remote: .
specs:
danger-xcodebuild (0.0.1)
danger (~> 2.0)

GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
claide (1.0.0)
claide-plugins (0.9.1)
cork
nap
open4 (~> 1.3)
coderay (1.1.1)
colored (1.2)
cork (0.1.0)
colored (~> 1.2)
danger (2.1.1)
claide (~> 1.0)
claide-plugins (> 0.9.0)
colored (~> 1.2)
cork (~> 0.1)
faraday (~> 0)
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
octokit (~> 4.2)
terminal-table (~> 1)
diff-lcs (1.2.5)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.0)
faraday (~> 0.8)
ffi (1.9.14)
formatador (0.2.5)
git (1.3.0)
guard (2.14.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
kramdown (1.11.1)
listen (3.0.7)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
lumberjack (1.0.10)
method_source (0.8.2)
multipart-post (2.0.0)
nap (1.1.0)
nenv (0.3.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
open4 (1.3.4)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rake (10.5.0)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.2)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
shellany (0.0.1)
slop (3.6.0)
terminal-table (1.6.0)
thor (0.19.1)
yard (0.9.5)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1.3)
danger-xcodebuild!
guard (~> 2.14)
guard-rspec (~> 4.7)
listen (= 3.0.7)
pry
rake (~> 10.0)
rspec (~> 3.4)
yard (~> 0.8)

BUNDLED WITH
1.12.5
12 changes: 6 additions & 6 deletions lib/xcodebuild/plugin.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ class DangerXcodebuild < Plugin
# Allows you to specify an xcodebuild JSON file location to parse.
attr_accessor :xcodebuild_json

def initialize
@warning_count = 0
@error_count = 0
@test_failures_count = 0
def initialize(arg)
super
@warning_count = 0
@error_count = 0
@test_failures_count = 0
end

# Parses and exposes eventual warnings.
Expand Down Expand Up @@ -48,10 +49,9 @@ def parse_tests
# @return [is_perfect_build]
#
def perfect_build
is_perfect_build = @warning_count == 0 && @errors.count == 0 && @test_failures.count == 0
is_perfect_build = @warning_count == 0 && @error_count == 0 && @test_failures_count == 0
message("Perfect build 👍🏻") if is_perfect_build
return is_perfect_build
end
end

def self.instance_name
Expand Down
5 changes: 1 addition & 4 deletions spec/xcodebuild_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@ module Danger
end

it "is a perfect build" do
monday_date = Date.parse("2016-07-11")
allow(Date).to receive(:today).and_return monday_date

expect(@xcodebuild.perfect_build).to be_true
expect(@xcodebuild.perfect_build).to be true
expect(@dangerfile.status_report[:messages]).to eq(["Perfect build 👍🏻"])
end

Expand Down

0 comments on commit aaddd5d

Please sign in to comment.