danger 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84a565416c6815824b56c4c7c5789914ec155d59
4
- data.tar.gz: 310ff65b95e4bd48fdd5dc2b2a03b22ed348d38a
3
+ metadata.gz: bdced6826bdfbe8f06cdc77e9f6b58336140e17c
4
+ data.tar.gz: 669ebaaf2d49f985c70a485018ff4bf6e8f4360f
5
5
  SHA512:
6
- metadata.gz: 3da0350523617d271807e45c9e30c96ab8e672e16ae3faabd71207bb5253cbbe94f8ecd7ce0adaa5e67c8bd6273271ca4d382f52f7c4ae33d16db1176167cde6
7
- data.tar.gz: 2948a1f532246eb26a2e4f6a17f006665945bf901426f8a62f5394c776d9e9aaa757fcc32e0d851884869bd044e692dfeb047c783d099769feca44c37fd6f60b
6
+ metadata.gz: adbef18ddcb2de50eb915991a82334bf8e559c1b6af8cc00230d8038a1440e09d268f1380aff7936411b9dd6c5d26bef8ae17f10f1a09f9b5a02c42d6b096b7e
7
+ data.tar.gz: c91f0a03be03e79d026b6b64c2da6bcc486eeb87883c00fe13d3869b64477bef72c121dd3b8f53c7e724fd341bd2285b884a1b2a16334148b1b960104a21e552
@@ -0,0 +1,21 @@
1
+ # Following the advice from @czechboy0 https://github.com/danger/danger/issues/171
2
+
3
+ module Danger
4
+ module CISource
5
+ class XcodeServer < CI
6
+ def self.validates?(env)
7
+ return !env["XCS_BOT_NAME"].nil?
8
+ end
9
+
10
+ def initialize(env)
11
+ bot_name = env["XCS_BOT_NAME"]
12
+ return if bot_name.nil?
13
+
14
+ repo_matches = bot_name.match(/\[(.+)\]/)
15
+ self.repo_slug = repo_matches[1] unless repo_matches.nil?
16
+ pull_request_id_matches = bot_name.match(/#(\d+)/)
17
+ self.pull_request_id = pull_request_id_matches[1] unless pull_request_id_matches.nil?
18
+ end
19
+ end
20
+ end
21
+ end
@@ -24,7 +24,7 @@ module Danger
24
24
  content.gsub!("[[CLASS_NAME]]", name.danger_class)
25
25
 
26
26
  plugins_path = "danger_plugins"
27
- FileUtils.mkdir_p("plugins_path") unless File.directory?(plugins_path)
27
+ FileUtils.mkdir_p(plugins_path) unless File.directory?(plugins_path)
28
28
 
29
29
  output_path = File.join(plugins_path, "#{name}.rb")
30
30
  raise "File '#{output_path}' already exists!" if File.exist?(output_path)
@@ -40,7 +40,14 @@ module Danger
40
40
 
41
41
  require 'tmpdir'
42
42
  require 'faraday'
43
- content = Faraday.get(url)
43
+ require 'faraday_middleware'
44
+
45
+ @http_client ||= Faraday.new do |b|
46
+ b.use FaradayMiddleware::FollowRedirects
47
+ b.adapter :net_http
48
+ end
49
+ content = @http_client.get(url)
50
+
44
51
  Dir.mktmpdir do |dir|
45
52
  path = File.join(dir, "temporary_remote_action.rb")
46
53
  File.write(path, content.body)
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "0.7.1".freeze
2
+ VERSION = "0.7.2".freeze
3
3
  DESCRIPTION = "Automate your PR etiquette.".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-07 00:00:00.000000000 Z
12
+ date: 2016-04-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide
@@ -216,6 +216,7 @@ files:
216
216
  - lib/danger/ci_source/jenkins.rb
217
217
  - lib/danger/ci_source/local_git_repo.rb
218
218
  - lib/danger/ci_source/travis.rb
219
+ - lib/danger/ci_source/xcode_server.rb
219
220
  - lib/danger/circle_api.rb
220
221
  - lib/danger/commands/init.rb
221
222
  - lib/danger/commands/init_helpers/interviewer.rb
@@ -255,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
256
  version: '0'
256
257
  requirements: []
257
258
  rubyforge_project:
258
- rubygems_version: 2.4.8
259
+ rubygems_version: 2.6.2
259
260
  signing_key:
260
261
  specification_version: 4
261
262
  summary: Automate your PR etiquette.