pronto 0.3.3 → 0.4.0

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: 0bc03d47044e614765fdb291066cf44aac7f6c76
4
- data.tar.gz: ae8b22913e762688ce93085b4a9b6544e98668e0
3
+ metadata.gz: 6b3458313f197182636f5f267fe7119b63c3b8cf
4
+ data.tar.gz: 37235aba300815df70ddf5e48f58cd680d896e9b
5
5
  SHA512:
6
- metadata.gz: a8b46b058f9f24e776ed49b042e1732cd3dafabd55a8c16580cdfa51ffbfe3e9f1c2b74a5075469acb43d70dd4be2b03a7a08ec704182df20e2c16e791ccccb6
7
- data.tar.gz: 427cddf924889b41d684c0ce2fb05056bb970c26dc0058ed296d22b2c025bfdfbe09bcf03318b537a6f6f6ba5c70f5c899863cf4524c3a59670f454d152e67fa
6
+ metadata.gz: c0f39899baeec5c9332d152980553ca0bae1cb97d00826fcc56c73189a43d0a8f8d95b38a51ef2478bdd0aeb807d493afa03a3dfc65a2802916ceb801b820d57
7
+ data.tar.gz: 024ae53ce123604e0b8b9f0e0744241ff35925a7047bc3cdfe90f6dda6bc240353888b8861c74d957f085dae9f105f3f325652c18b84bf0495ac36e33e97e230
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License
2
2
 
3
- Copyright (c) 2014 Mindaugas Mozūras
3
+ Copyright (c) 2015 Mindaugas Mozūras
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  [![Inline docs](http://inch-ci.org/github/mmozuras/pronto.png)](http://inch-ci.org/github/mmozuras/pronto)
8
8
 
9
9
  Pronto runs analysis quickly by checking only the relevant changes. Created to
10
- be used on pull requests, but suited for other scenarios as well. Perfect if you
10
+ be used on pull requests, but also suited for other scenarios. Perfect if you
11
11
  want to find out quickly if branch introduces changes that conform to your
12
12
  [styleguide](https://github.com/mmozuras/pronto-rubocop), [are DRY](https://github.com/mmozuras/pronto-flay), [don't introduce security holes](https://github.com/mmozuras/pronto-brakeman) and [more](#runners).
13
13
 
@@ -20,49 +20,59 @@ Pronto runs the checks on a diff between the current HEAD and the provided commi
20
20
  ### GitHub Integration
21
21
 
22
22
  You can run Pronto as a step of your CI builds and get the results as comments
23
- on GitHub commits using `GithubFormatter`.
23
+ on GitHub commits using `GithubFormatter` or `GithubPullRequestFormatter`.
24
24
 
25
25
  Add Pronto runners you want to use to your Gemfile:
26
26
  ```ruby
27
- gem 'pronto-rubocop'
27
+ gem 'pronto'
28
+ gem 'pronto-rubocop', require: false
29
+ gem 'pronto-scss', require: false
28
30
  ```
29
31
  or gemspec file:
30
32
  ```ruby
31
- s.add_development_dependency 'pronto-rubocop'
33
+ s.add_development_dependency 'pronto'
34
+ s.add_development_dependency 'pronto-rubocop'
35
+ s.add_development_dependency 'pronto-scss'
32
36
  ```
33
- Set the GITHUB_ACCESS_TOKEN environment variable to [OAuth token](https://help.github.com/articles/creating-an-access-token-for-command-line-use)
34
- that has access to the repository. Then set up a rake task:
35
- ```ruby
36
- Pronto.gem_names.each { |gem_name| require "pronto/#{gem_name}" }
37
+ Set the GITHUB_ACCESS_TOKEN environment variable to [OAuth token](https://help.github.com/articles/creating-an-access-token-for-command-line-use)
38
+ that has access to the repository.
37
39
 
38
- formatter = Pronto::Formatter::GithubFormatter.new
39
- Pronto.run('origin/master', '.', formatter)
40
+ Then just run it:
41
+ ```bash
42
+ GITHUB_ACCESS_TOKEN=token pronto run -f github -c origin/master
40
43
  ```
41
- or run it via command line:
44
+ or, if you want comments to appear on pull request diff, instead of commit:
45
+ ```bash
46
+ GITHUB_ACCESS_TOKEN=token PULL_REQUEST_ID=id pronto run -f github_pr -c origin/master
42
47
  ```
43
- GITHUB_ACCESS_TOKEN=<token> bundle exec pronto run -f github -c origin/master
48
+
49
+ As an alternative, you can also set up a rake task:
50
+ ```ruby
51
+ Pronto.gem_names.each { |gem_name| require "pronto/#{gem_name}" }
52
+
53
+ formatter = Pronto::Formatter::GithubFormatter.new # or GithubPullRequestFormatter
54
+ Pronto.run('origin/master', '.', formatter)
44
55
  ```
45
56
 
46
57
  ### Local Changes
47
58
 
48
59
  You can run Pronto locally. First, install Pronto and the runners you want to use:
49
60
  ```bash
50
- gem install pronto
51
- gem install pronto-rubocop
61
+ gem install pronto
62
+ gem install pronto-rubocop
52
63
  ```
53
64
  Then navigate to the repository you want to run Pronto on, and:
54
65
  ```bash
55
- git checkout feature/branch
56
- pronto run # Pronto runs against master by default
66
+ git checkout feature/branch
67
+ pronto run # Pronto runs against master by default
57
68
  ```
58
69
 
59
- Run `pronto` in your terminal without any arguments to see what more Pronto is
60
- capable off.
70
+ Just run `pronto` without any arguments to see what Pronto is capable off.
61
71
 
62
72
  ## Runners
63
73
 
64
74
  Pronto can run various tools and libraries, as long as there's a runner for it.
65
- Currently available runners:
75
+ Currently available:
66
76
 
67
77
  * [pronto-rubocop](https://github.com/mmozuras/pronto-rubocop)
68
78
  * [pronto-flay](https://github.com/mmozuras/pronto-flay)
@@ -74,3 +84,5 @@ Currently available runners:
74
84
  * [pronto-jshint](https://github.com/mmozuras/pronto-jshint)
75
85
  * [pronto-spell](https://github.com/mmozuras/pronto-spell)
76
86
  * [pronto-haml](https://github.com/mmozuras/pronto-haml)
87
+ * [pronto-scss](https://github.com/mmozuras/pronto-scss)
88
+ * [pronto-coffeelint](https://github.com/siebertm/pronto-coffeelint)
@@ -1,35 +1,38 @@
1
1
  require 'rugged'
2
2
  require 'octokit'
3
+ require 'gitlab'
3
4
  require 'forwardable'
4
5
 
5
6
  require 'pronto/git/repository'
6
7
  require 'pronto/git/patches'
7
8
  require 'pronto/git/patch'
8
9
  require 'pronto/git/line'
9
- require 'pronto/git/remote'
10
10
 
11
11
  require 'pronto/plugin'
12
12
  require 'pronto/message'
13
13
  require 'pronto/runner'
14
14
  require 'pronto/github'
15
+ require 'pronto/gitlab'
15
16
 
16
17
  require 'pronto/formatter/text_formatter'
17
18
  require 'pronto/formatter/json_formatter'
18
19
  require 'pronto/formatter/github_formatter'
19
20
  require 'pronto/formatter/github_pull_request_formatter'
21
+ require 'pronto/formatter/gitlab_formatter'
20
22
  require 'pronto/formatter/checkstyle_formatter'
21
23
  require 'pronto/formatter/formatter'
22
24
 
23
25
  module Pronto
24
- def self.run(commit = 'master', repo_path = '.', formatter = nil)
26
+ def self.run(commit = 'master', repo_path = '.',
27
+ formatter = Formatter::TextFormatter.new, file = nil)
25
28
  commit ||= 'master'
26
29
 
27
30
  repo = Git::Repository.new(repo_path)
28
- patches = repo.diff(commit)
31
+ options = { paths: [file] } if file
32
+ patches = repo.diff(commit, options)
29
33
 
30
34
  result = run_all_runners(patches)
31
35
 
32
- formatter ||= default_formatter
33
36
  puts formatter.format(result, repo)
34
37
 
35
38
  result
@@ -57,8 +60,4 @@ module Pronto
57
60
  runner.new.run(patches, patches.commit)
58
61
  end.flatten.compact
59
62
  end
60
-
61
- def default_formatter
62
- Formatter::TextFormatter.new
63
- end
64
63
  end
@@ -24,6 +24,11 @@ module Pronto
24
24
  aliases: '-c',
25
25
  banner: 'Commit for the diff'
26
26
 
27
+ method_option :index,
28
+ type: :boolean,
29
+ aliases: '-i',
30
+ banner: 'Analyze changes in git index (staging area)'
31
+
27
32
  method_option :runner,
28
33
  type: :array,
29
34
  default: [],
@@ -36,14 +41,15 @@ module Pronto
36
41
  aliases: '-f',
37
42
  banner: "Pick output formatter. Available: #{::Pronto::Formatter.names.join(', ')}"
38
43
 
39
- def run
44
+ def run(path = nil)
40
45
  gem_names = options[:runner].any? ? options[:runner] : ::Pronto.gem_names
41
46
  gem_names.each do |gem_name|
42
47
  require "pronto/#{gem_name}"
43
48
  end
44
49
 
45
50
  formatter = ::Pronto::Formatter.get(options[:formatter])
46
- messages = ::Pronto.run(options[:commit], '.', formatter)
51
+ commit = options[:index] ? :index : options[:commit]
52
+ messages = ::Pronto.run(commit, '.', formatter, path)
47
53
  exit(messages.count) if options[:'exit-code']
48
54
  rescue Rugged::RepositoryError
49
55
  puts '"pronto" should be run from a git repository'
@@ -25,7 +25,7 @@ module Pronto
25
25
  end
26
26
 
27
27
  def process_messages(messages)
28
- group_messages(messages).map do |path, path_messages|
28
+ messages.group_by(&:path).map do |path, path_messages|
29
29
  REXML::Element.new('file', @checkstyle).tap do |file|
30
30
  file.attributes['name'] = path
31
31
  add_file_messages(path_messages, file)
@@ -33,10 +33,6 @@ module Pronto
33
33
  end
34
34
  end
35
35
 
36
- def group_messages(messages)
37
- messages.group_by { |message| message.path }
38
- end
39
-
40
36
  def add_file_messages(path_messages, file)
41
37
  path_messages.each do |message|
42
38
  REXML::Element.new('error', file).tap do |e|
@@ -12,6 +12,7 @@ module Pronto
12
12
  FORMATTERS = {
13
13
  'github' => GithubFormatter,
14
14
  'github_pr' => GithubPullRequestFormatter,
15
+ 'gitlab' => GitlabFormatter,
15
16
  'json' => JsonFormatter,
16
17
  'checkstyle' => CheckstyleFormatter,
17
18
  'text' => TextFormatter
@@ -2,15 +2,16 @@ module Pronto
2
2
  module Formatter
3
3
  class GithubFormatter
4
4
  def format(messages, repo)
5
+ messages = messages.uniq { |message| [message.msg, message.line.new_lineno] }
6
+ client = Github.new(repo)
7
+
5
8
  commit_messages = messages.map do |message|
6
- github_slug = repo.github_slug
7
9
  sha = message.commit_sha
8
10
  body = message.msg
9
11
  path = message.path
10
12
  position = message.line.commit_line.position if message.line
11
13
 
12
- comment = Github::Comment.new(github_slug, sha, body, path, position)
13
- create_comment(github_slug, sha, comment)
14
+ create_comment(client, sha, body, path, position)
14
15
  end
15
16
 
16
17
  "#{commit_messages.compact.count} Pronto messages posted to GitHub"
@@ -18,14 +19,11 @@ module Pronto
18
19
 
19
20
  private
20
21
 
21
- def create_comment(repo, sha, comment)
22
- comments = client.commit_comments(repo, sha)
22
+ def create_comment(client, sha, body, path, position)
23
+ comment = Github::Comment.new(sha, body, path, position)
24
+ comments = client.commit_comments(sha)
23
25
  existing = comments.any? { |c| comment == c }
24
- client.create_commit_comment(repo, sha, comment) unless existing
25
- end
26
-
27
- def client
28
- @client ||= Github.new
26
+ client.create_commit_comment(comment) unless existing
29
27
  end
30
28
  end
31
29
  end
@@ -2,8 +2,10 @@ module Pronto
2
2
  module Formatter
3
3
  class GithubPullRequestFormatter
4
4
  def format(messages, repo)
5
+ messages = messages.uniq { |message| [message.msg, message.line.new_lineno] }
6
+ client = Github.new(repo)
7
+
5
8
  commit_messages = messages.map do |message|
6
- github_slug = repo.github_slug
7
9
  body = message.msg
8
10
  path = message.path
9
11
 
@@ -16,8 +18,7 @@ module Pronto
16
18
  line
17
19
  end
18
20
 
19
- comment = Github::Comment.new(github_slug, sha, body, path, line.position)
20
- create_comment(github_slug, sha, comment)
21
+ create_comment(client, sha, body, path, line.position)
21
22
  end
22
23
 
23
24
  "#{commit_messages.compact.count} Pronto messages posted to GitHub"
@@ -25,14 +26,11 @@ module Pronto
25
26
 
26
27
  private
27
28
 
28
- def create_comment(repo, sha, comment)
29
- comments = client.pull_comments(repo, sha)
29
+ def create_comment(client, sha, body, path, position)
30
+ comment = Github::Comment.new(sha, body, path, position)
31
+ comments = client.pull_comments(sha)
30
32
  existing = comments.any? { |c| comment == c }
31
- client.create_pull_comment(repo, sha, comment) unless existing
32
- end
33
-
34
- def client
35
- @client ||= Github.new
33
+ client.create_pull_comment(comment) unless existing
36
34
  end
37
35
  end
38
36
  end
@@ -0,0 +1,29 @@
1
+ module Pronto
2
+ module Formatter
3
+ class GitlabFormatter
4
+ def format(messages, repo)
5
+ messages = messages.uniq { |message| [message.msg, message.line.new_lineno] }
6
+ client = Gitlab.new repo
7
+
8
+ commit_messages = messages.map do |message|
9
+ create_comment(client,
10
+ message.commit_sha,
11
+ message.msg,
12
+ message.path,
13
+ message.line.commit_line.new_lineno)
14
+ end
15
+
16
+ "#{commit_messages.compact.count} Pronto messages posted to GitLab"
17
+ end
18
+
19
+ private
20
+
21
+ def create_comment(client, sha, note, path, line)
22
+ comment = Gitlab::Comment.new(sha, note, path, line)
23
+ comments = client.commit_comments(sha)
24
+ existing = comments.any? { |c| comment == c }
25
+ client.create_commit_comment(comment) unless existing
26
+ end
27
+ end
28
+ end
29
+ end
@@ -7,14 +7,15 @@ module Pronto
7
7
  @repo = Rugged::Repository.new(path)
8
8
  end
9
9
 
10
- def github_slug
11
- remotes.map(&:github_slug).compact.first
12
- end
13
-
14
- def diff(commit)
15
- merge_base = merge_base(commit)
16
- patches = @repo.diff(merge_base, head)
17
- Patches.new(self, merge_base, patches)
10
+ def diff(commit, options = nil)
11
+ if commit == :index
12
+ patches = @repo.index.diff(options)
13
+ Patches.new(self, head, patches)
14
+ else
15
+ merge_base = merge_base(commit)
16
+ patches = @repo.diff(merge_base, head, options)
17
+ Patches.new(self, merge_base, patches)
18
+ end
18
19
  end
19
20
 
20
21
  def show_commit(sha)
@@ -50,6 +51,14 @@ module Pronto
50
51
  track_copies_any_commit_copies: true)[0]
51
52
  end
52
53
 
54
+ def branch
55
+ @repo.head.name.sub('refs/heads/', '') if @repo.head.branch?
56
+ end
57
+
58
+ def remote_urls
59
+ @repo.remotes.map(&:url)
60
+ end
61
+
53
62
  private
54
63
 
55
64
  def empty_patches(sha)
@@ -63,10 +72,6 @@ module Pronto
63
72
  def head
64
73
  @repo.head.target
65
74
  end
66
-
67
- def remotes
68
- @remotes ||= @repo.remotes.map { |remote| Remote.new(remote) }
69
- end
70
75
  end
71
76
  end
72
77
  end
@@ -1,50 +1,73 @@
1
1
  module Pronto
2
2
  class Github
3
- def initialize
3
+ def initialize(repo)
4
+ @repo = repo
4
5
  @comment_cache = {}
6
+ @pull_id_cache = {}
5
7
  end
6
8
 
7
- def pull_comments(repo, sha)
8
- @comment_cache["#{repo}/#{pull_id}/#{sha}"] ||= begin
9
- client.pull_comments(repo, pull_id).map do |comment|
10
- Comment.new(repo, sha, comment.body, comment.path, comment.position)
9
+ def pull_comments(sha)
10
+ @comment_cache["#{pull_id}/#{sha}"] ||= begin
11
+ client.pull_comments(slug, pull_id).map do |comment|
12
+ Comment.new(sha, comment.body, comment.path, comment.position)
11
13
  end
12
14
  end
13
15
  end
14
16
 
15
- def commit_comments(repo, sha)
16
- @comment_cache["#{repo}/#{sha}"] ||= begin
17
- client.commit_comments(repo, sha).map do |comment|
18
- Comment.new(repo, sha, comment.body, comment.path, comment.position)
17
+ def commit_comments(sha)
18
+ @comment_cache["#{sha}"] ||= begin
19
+ client.commit_comments(slug, sha).map do |comment|
20
+ Comment.new(sha, comment.body, comment.path, comment.position)
19
21
  end
20
22
  end
21
23
  end
22
24
 
23
- def create_commit_comment(repo, sha, comment)
24
- client.create_commit_comment(repo, sha, comment.body, comment.path,
25
- nil, comment.position)
25
+ def create_commit_comment(comment)
26
+ client.create_commit_comment(slug, comment.sha, comment.body,
27
+ comment.path, nil, comment.position)
26
28
  end
27
29
 
28
- def create_pull_comment(repo, sha, comment)
29
- client.create_pull_comment(repo, pull_id, comment.body, sha, comment.path,
30
- comment.position)
30
+ def create_pull_comment(comment)
31
+ client.create_pull_comment(slug, pull_id, comment.body,
32
+ comment.sha, comment.path, comment.position)
31
33
  end
32
34
 
33
35
  private
34
36
 
37
+ def slug
38
+ @slug ||= begin
39
+ @repo.remote_urls.map do |url|
40
+ match = /.*github.com(:|\/)(?<slug>.*).git/.match(url)
41
+ match[:slug] if match
42
+ end.compact.first
43
+ end
44
+ end
45
+
35
46
  def client
36
47
  @client ||= Octokit::Client.new(access_token: access_token)
37
48
  end
38
49
 
50
+ def pull_requests
51
+ @pull_requests ||= client.pull_requests(slug)
52
+ end
53
+
39
54
  def pull_id
40
- ENV['PULL_REQUEST_ID'].to_i
55
+ @pull_id ||= begin
56
+ pull_id = ENV['PULL_REQUEST_ID']
57
+ if pull_id
58
+ pull_id.to_i
59
+ elsif @repo.branch
60
+ pull = pull_requests.find { |pr| pr[:head][:ref] == @repo.branch }
61
+ pull[:number].to_i if pull
62
+ end
63
+ end
41
64
  end
42
65
 
43
66
  def access_token
44
67
  ENV['GITHUB_ACCESS_TOKEN']
45
68
  end
46
69
 
47
- class Comment < Struct.new(:repo, :sha, :body, :path, :position)
70
+ class Comment < Struct.new(:sha, :body, :path, :position)
48
71
  def ==(other)
49
72
  position == other.position &&
50
73
  path == other.path &&
@@ -0,0 +1,55 @@
1
+ module Pronto
2
+ class Gitlab
3
+ def initialize(repo)
4
+ @repo = repo
5
+ @comment_cache = {}
6
+ end
7
+
8
+ def commit_comments(sha)
9
+ @comment_cache["#{sha}"] ||= begin
10
+ client.commit_comments(slug, sha).map do |comment|
11
+ Comment.new(sha, comment.note, comment.path, comment.line)
12
+ end
13
+ end
14
+ end
15
+
16
+ def create_commit_comment(comment)
17
+ client.create_commit_comment(slug, comment.sha, comment.note,
18
+ path: comment.path, line: comment.line,
19
+ line_type: 'new')
20
+ end
21
+
22
+ private
23
+
24
+ def slug
25
+ @slug ||= begin
26
+ host = URI.split(endpoint)[2, 2].compact.join(':')
27
+ slug = @repo.remote_urls.map do |url|
28
+ match = /.*#{host}(:|\/)(?<slug>.*).git/.match(url)
29
+ match[:slug] if match
30
+ end.compact.first
31
+ URI.escape(slug, '/') if slug
32
+ end
33
+ end
34
+
35
+ def client
36
+ @client ||= ::Gitlab.client(endpoint: endpoint, private_token: private_token)
37
+ end
38
+
39
+ def private_token
40
+ ENV['GITLAB_API_PRIVATE_TOKEN']
41
+ end
42
+
43
+ def endpoint
44
+ ENV['GITLAB_API_ENDPOINT']
45
+ end
46
+
47
+ class Comment < Struct.new(:sha, :note, :path, :line)
48
+ def ==(other)
49
+ line == other.line &&
50
+ path == other.path &&
51
+ note == other.note
52
+ end
53
+ end
54
+ end
55
+ end
@@ -1,3 +1,3 @@
1
1
  module Pronto
2
- VERSION = '0.3.3'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-28 00:00:00.000000000 Z
11
+ date: 2015-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '3.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: gitlab
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.3'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.3'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rake
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +128,15 @@ files:
114
128
  - lib/pronto/formatter/formatter.rb
115
129
  - lib/pronto/formatter/github_formatter.rb
116
130
  - lib/pronto/formatter/github_pull_request_formatter.rb
131
+ - lib/pronto/formatter/gitlab_formatter.rb
117
132
  - lib/pronto/formatter/json_formatter.rb
118
133
  - lib/pronto/formatter/text_formatter.rb
119
134
  - lib/pronto/git/line.rb
120
135
  - lib/pronto/git/patch.rb
121
136
  - lib/pronto/git/patches.rb
122
- - lib/pronto/git/remote.rb
123
137
  - lib/pronto/git/repository.rb
124
138
  - lib/pronto/github.rb
139
+ - lib/pronto/gitlab.rb
125
140
  - lib/pronto/message.rb
126
141
  - lib/pronto/plugin.rb
127
142
  - lib/pronto/rake_task/travis_pull_request.rb
@@ -147,8 +162,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
162
  version: 1.3.6
148
163
  requirements: []
149
164
  rubyforge_project:
150
- rubygems_version: 2.3.0
165
+ rubygems_version: 2.2.2
151
166
  signing_key:
152
167
  specification_version: 4
153
168
  summary: Pronto runs analysis by checking only the introduced changes
154
169
  test_files: []
170
+ has_rdoc:
@@ -1,10 +0,0 @@
1
- module Pronto
2
- module Git
3
- class Remote < Struct.new(:remote)
4
- def github_slug
5
- match = /.*github.com(:|\/)(?<slug>.*).git/.match(remote.url)
6
- match[:slug] if match
7
- end
8
- end
9
- end
10
- end