danger 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f22b32cdbaacb907e107d068b7533f4721b0ea9a
4
- data.tar.gz: 8d7d99a8229047d542486c2e6a5208cee52d027b
3
+ metadata.gz: 5e22a3c405d78751b1e8ddc02872e1ee3d19de32
4
+ data.tar.gz: 24c42b47f0ec7965498a899bb48577c828c4cecb
5
5
  SHA512:
6
- metadata.gz: 917ba759a6a42184ce38f1dc72bb543981830896fb15757bb8a0619a71a411922583a4f8d2610f04d0a37bacd338192a9b8539bec922d873f5e88764ac3d455c
7
- data.tar.gz: fd38930629b2e39026f07b9371dc15ba81582223b141a05cc2c985f5085d719265d2e36984f56dad351a54999a98f2783ab5f5426f6827ed854a94d151b09df4
6
+ metadata.gz: d5b263ba25eac823b04822bc74a8b7b1f0e721fe41559fd2195883ff76aef813f4f9be0753de117003c1461550fa5e6c788b54e2f483944a61ee7ee56f33d7c1
7
+ data.tar.gz: 1591ad1a26e5f69bae95cdaa3cb288f5b82333c1f67cf1da2af4a104c6d798f1cbb8c6f5baf75a820ecf9700d62bed0c5a3d4de1b239f5d233c27f34f7d1569a
data/README.md CHANGED
@@ -30,7 +30,7 @@ You can use Danger to codify your teams norms. Leaving humans to think about har
30
30
  * Enforce using descriptive labels
31
31
  * Look out for common anti-patterns
32
32
  * Highlight interesting build artifacts
33
- * Give specific files have extra focus
33
+ * Give specific files extra focus
34
34
 
35
35
  Danger simply provides the glue to let _you_ build out the rules specific to your team's culture. Offering a lot of useful metadata, and a comprehensive plugin system to share common issues.
36
36
 
@@ -4,7 +4,7 @@
4
4
  module Danger
5
5
  # https://jenkins-ci.org
6
6
 
7
- ### CI Setup
7
+ # ### CI Setup
8
8
  #
9
9
  # Ah Jenkins, so many memories. So, if you're using Jenkins, you're hosting your own environment. You
10
10
  # will want to be using the [GitHub pull request builder plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin)
@@ -1,7 +1,7 @@
1
1
  # https://semaphoreci.com/docs/available-environment-variables.html
2
2
 
3
3
  module Danger
4
- ### CI Setup
4
+ # ### CI Setup
5
5
  #
6
6
  # For Semaphor you will want to go to the settings page of the project. Inside "Build Settings"
7
7
  # you should add `bundle exec danger` to the Setup thread.
@@ -1,7 +1,7 @@
1
- module Danger
2
- # https://www.jetbrains.com/teamcity/
1
+ # https://www.jetbrains.com/teamcity/
3
2
 
4
- ### CI Setup
3
+ module Danger
4
+ # ### CI Setup
5
5
  #
6
6
  # You need to go to your project settings. Then depending on the type of your build settings, you may need
7
7
  # to add a new build step for Danger. You want to be able to run the command `bundle exec danger`, so
@@ -2,7 +2,7 @@
2
2
  # http://docs.travis-ci.com/user/environment-variables/
3
3
 
4
4
  module Danger
5
- ### CI Setup
5
+ # ### CI Setup
6
6
  # You need to edit your `.travis.yml` to include `bundle exec danger`. If you already have
7
7
  # a `script:` section then we recommend adding this command at the end of the script step: `- bundle exec danger`.
8
8
  #
@@ -1,21 +1,21 @@
1
1
  # Following the advice from @czechboy0 https://github.com/danger/danger/issues/171
2
+ # https://github.com/czechboy0/Buildasaur
2
3
 
3
4
  module Danger
4
- # https://github.com/czechboy0/Buildasaur
5
+ # ### CI Setup
6
+ #
7
+ # If you're bold enough to use Xcode Bots. You will need to use [Buildasaur](https://github.com/czechboy0/Buildasaur)
8
+ # in order to work with Danger. This will set up your build environment for you, as the name of the bot contains all
9
+ # of the environment variables that Danger needs to work.
10
+ #
11
+ # With Buildasaur set up, you can edit your job to add `bundle exec danger` as a post-action build script.
12
+ #
13
+ # ### Token Setup
14
+ #
15
+ # As this is self-hosted, you will need to add the `DANGER_GITHUB_API_TOKEN` to your build user's ENV. The alternative
16
+ # is to pass in the token as a prefix to the command `DANGER_GITHUB_API_TOKEN="123" bundle exec danger`.`.
17
+ #
5
18
  class XcodeServer < CI
6
- ### CI Setup
7
- #
8
- # If you're bold enough to use Xcode Bots. You will need to use [Buildasaur](https://github.com/czechboy0/Buildasaur)
9
- # in order to work with Danger. This will set up your build environment for you, as the name of the bot contains all
10
- # of the environment variables that Danger needs to work.
11
- #
12
- # With Buildasaur set up, you can edit your job to add `bundle exec danger` as a post-actoin build script.
13
- #
14
- # ### Token Setup
15
- #
16
- # As this is self-hosted, you will need to add the `DANGER_GITHUB_API_TOKEN` to your build user's ENV. The alternative
17
- # is to pass in the token as a prefix to the command `DANGER_GITHUB_API_TOKEN="123" bundle exec danger`.`.
18
- #
19
19
  def self.validates_as_ci?(env)
20
20
  env.key? "XCS_BOT_NAME"
21
21
  end
@@ -36,7 +36,7 @@ module Danger
36
36
  parser = PluginParser.new(paths)
37
37
  parser.parse
38
38
 
39
- self.markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, no_intra_emphasis: true)
39
+ self.markdown = Kramdown::Document.new(text, input: "GFM").to_html
40
40
  self.json = JSON.parse(parser.to_json_string)
41
41
 
42
42
  template = File.join(Danger.gem_path, "lib/danger/plugin_support/templates/readme_table.html.erb")
@@ -29,7 +29,12 @@ module Danger
29
29
  # These are the classes that are allowed to also use method_missing
30
30
  # in order to provide broader plugin support
31
31
  def self.core_plugin_classes
32
- [Danger::DangerfileMessagingPlugin]
32
+ [DangerfileMessagingPlugin]
33
+ end
34
+
35
+ # The ones that everything would break without
36
+ def self.essential_plugin_classes
37
+ [DangerfileMessagingPlugin, DangerfileGitPlugin, DangerfileImportPlugin, DangerfileGitHubPlugin]
33
38
  end
34
39
 
35
40
  # Both of these methods exist on all objects
@@ -46,7 +46,7 @@ module Danger
46
46
 
47
47
  def initialize(dangerfile)
48
48
  super(dangerfile)
49
- raise unless dangerfile.env.scm.class == Danger::GitRepo
49
+ raise unless dangerfile.env.scm.class == Danger::GitRepo
50
50
 
51
51
  @git = dangerfile.env.scm
52
52
  end
@@ -1,10 +1,10 @@
1
- require "redcarpet"
1
+ require "kramdown"
2
2
 
3
3
  module Danger
4
4
  module Helpers
5
5
  module CommentsHelper
6
- def markdown_parser
7
- @markdown_parser ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(hard_wrap: true), no_intra_emphasis: true)
6
+ def markdown_parser(text)
7
+ Kramdown::Document.new(text, input: "GFM")
8
8
  end
9
9
 
10
10
  def parse_tables_from_comment(comment)
@@ -17,9 +17,10 @@ module Danger
17
17
  end
18
18
 
19
19
  def process_markdown(violation)
20
- html = markdown_parser.render(violation.message)
20
+ html = markdown_parser(violation.message).to_html
21
21
  # Remove the outer `<p>`, the -5 represents a newline + `</p>`
22
22
  html = html[3...-5] if html.start_with? "<p>"
23
+
23
24
  Violation.new(html, violation.sticky)
24
25
  end
25
26
 
@@ -28,7 +28,7 @@ module Danger
28
28
  end
29
29
 
30
30
  def self.clear_external_plugins
31
- @all_plugins = @all_plugins.select { |plugin| Dangerfile.core_plugin_classes.include? plugin }
31
+ @all_plugins = @all_plugins.select { |plugin| Dangerfile.essential_plugin_classes.include? plugin }
32
32
  end
33
33
 
34
34
  def self.inherited(plugin)
@@ -184,7 +184,7 @@ module Danger
184
184
  # @return [Bool] is this repo the danger repo of the org?
185
185
  def danger_repo?(organisation: nil, repository: nil)
186
186
  repo = fetch_repository(organisation: organisation, repository: repository)
187
- repo[:name].casecmp(DANGER_REPO_NAME).zero?
187
+ repo[:name].casecmp(DANGER_REPO_NAME).zero? || repo[:parent] && repo[:parent][:full_name] == "danger/danger"
188
188
  rescue
189
189
  false
190
190
  end
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "2.1.0".freeze
2
+ VERSION = "2.1.1".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: 2.1.0
4
+ version: 2.1.1
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-07-30 00:00:00.000000000 Z
12
+ date: 2016-07-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide
@@ -110,19 +110,19 @@ dependencies:
110
110
  - !ruby/object:Gem::Version
111
111
  version: '4.2'
112
112
  - !ruby/object:Gem::Dependency
113
- name: redcarpet
113
+ name: kramdown
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '3.3'
118
+ version: '1.5'
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
123
  - - "~>"
124
124
  - !ruby/object:Gem::Version
125
- version: '3.3'
125
+ version: '1.5'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: terminal-table
128
128
  requirement: !ruby/object:Gem::Requirement
@@ -193,6 +193,20 @@ dependencies:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
195
  version: '3.4'
196
+ - !ruby/object:Gem::Dependency
197
+ name: rspec_junit_formatter
198
+ requirement: !ruby/object:Gem::Requirement
199
+ requirements:
200
+ - - "~>"
201
+ - !ruby/object:Gem::Version
202
+ version: '0.2'
203
+ type: :development
204
+ prerelease: false
205
+ version_requirements: !ruby/object:Gem::Requirement
206
+ requirements:
207
+ - - "~>"
208
+ - !ruby/object:Gem::Version
209
+ version: '0.2'
196
210
  - !ruby/object:Gem::Dependency
197
211
  name: webmock
198
212
  requirement: !ruby/object:Gem::Requirement
@@ -384,9 +398,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
384
398
  version: '0'
385
399
  requirements: []
386
400
  rubyforge_project:
387
- rubygems_version: 2.4.8
401
+ rubygems_version: 2.2.2
388
402
  signing_key:
389
403
  specification_version: 4
390
404
  summary: Automate your PR etiquette.
391
405
  test_files: []
392
- has_rdoc: