saddler-reporter-github 0.1.6 → 0.2.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: 879b2b1b02b0f258dc52c8d8707b0ea05f12f69e
4
- data.tar.gz: 4061ab75257db71d06d0d6ca4b866d7bb04a03cc
3
+ metadata.gz: ed53c2465b30855564e9f9dfa3938ac8294b8f74
4
+ data.tar.gz: e675834f83967673596154e3ac70ec1ea8c3ef73
5
5
  SHA512:
6
- metadata.gz: e63cd96035d3cb1796e15a1afb769bc870c3762a74dcc8377b5ac1d41cda24465912835b46b074083e5d881aa7d212cc4aae343f2b7db52e51b17ff04e641a68
7
- data.tar.gz: 014f24df85b94364edf83afdc9b8c45ffc90306496f950cb76cfec5194b3b7c6a26f765aa8cb27a0855ae87e86ca5f6fea8dff91b7f3f49f5ddf7afc354e5dec
6
+ metadata.gz: 182b5dd22e03e7c71e376604380d04426ec53848906b83f827607e9a59a5267121ed193fb1ce0ca77e8f434083fa9ad1075876cc8f94ee499478b1a663c2a52b
7
+ data.tar.gz: c72a03e71e015ea649d02ada6f04d855d1a5da3f916f3af226a0bedf05f1e678128712e9c2cd43adc91b6d57ddd0c650a4ffbc35aaefa033fb5a7bb733d76479
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ <a name="0.2.0"></a>
2
+ # [0.2.0](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.1.6...v0.2.0) (2015-10-02)
3
+
4
+
5
+ ### Features
6
+
7
+ * **patch:** use inherited patch, patches ([05e2306](https://github.com/packsaddle/ruby-saddler-reporter-github/commit/05e2306))
8
+ * **repository:** use inherited repository ([3834b1f](https://github.com/packsaddle/ruby-saddler-reporter-github/commit/3834b1f))
9
+
10
+
11
+
1
12
  <a name="0.1.6"></a>
2
13
  ## [0.1.6](https://github.com/packsaddle/ruby-saddler-reporter-github/compare/v0.1.5...v0.1.6) (2015-10-02)
3
14
 
@@ -3,7 +3,7 @@ module Saddler
3
3
  module Github
4
4
  # GitHub client wrapper
5
5
  class Client
6
- # @param repo [::Saddler::Reporter::Support::Git::Repository] git repository
6
+ # @param repo [Repository] git repository
7
7
  def initialize(repo)
8
8
  @repo = repo
9
9
  end
@@ -29,11 +29,11 @@ module Saddler
29
29
 
30
30
  # @param sha [String] target commit sha
31
31
  #
32
- # @return [::GitDiffParser::Patches<::GitDiffParser::Patch>] patches
32
+ # @return [Patches<Patch>] patches
33
33
  def commit_patches(sha)
34
- patches = ::GitDiffParser::Patches[]
34
+ patches = Patches.new
35
35
  client.commit(slug, sha).files.each do |file|
36
- patches << ::GitDiffParser::Patch.new(file.patch, file: file.filename, secure_hash: sha)
36
+ patches << Patch.new(file.patch, file: file.filename, secure_hash: sha)
37
37
  end
38
38
  patches
39
39
  end
@@ -62,11 +62,11 @@ module Saddler
62
62
  end
63
63
  end
64
64
 
65
- # @return [::GitDiffParser::Patches<::GitDiffParser::Patch>] patches
65
+ # @return [Patches<Patch>] patches
66
66
  def pull_request_patches
67
- patches = ::GitDiffParser::Patches[]
67
+ patches = Patches.new
68
68
  client.pull_request_files(slug, pull_id).each do |file|
69
- patches << ::GitDiffParser::Patch.new(file.patch, file: file.filename, secure_hash: @repo.merging_sha)
69
+ patches << Patch.new(file.patch, file: file.filename, secure_hash: @repo.merging_sha)
70
70
  end
71
71
  patches
72
72
  end
@@ -14,7 +14,7 @@ module Saddler
14
14
  # @see https://developer.github.com/v3/repos/comments/#create-a-commit-comment
15
15
  def report(messages, options)
16
16
  repo_path = '.'
17
- repo = ::Saddler::Reporter::Support::Git::Repository.new(repo_path)
17
+ repo = Repository.new(repo_path)
18
18
 
19
19
  sha = options['sha'] || repo.head.sha
20
20
  data = parse(messages)
@@ -16,7 +16,7 @@ module Saddler
16
16
  # @see https://developer.github.com/v3/repos/comments/#create-a-commit-comment
17
17
  def report(messages, options)
18
18
  repo_path = '.'
19
- repo = ::Saddler::Reporter::Support::Git::Repository.new(repo_path)
19
+ repo = Repository.new(repo_path)
20
20
 
21
21
  sha = options['sha'] || repo.head.sha
22
22
  data = parse(messages)
@@ -0,0 +1,11 @@
1
+ module Saddler
2
+ module Reporter
3
+ module Github
4
+ # Patch
5
+ #
6
+ # @see https://github.com/packsaddle/ruby-git_diff_parser
7
+ class Patch < GitDiffParser::Patch
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Saddler
2
+ module Reporter
3
+ module Github
4
+ # Patches<Patch>
5
+ #
6
+ # @see https://github.com/packsaddle/ruby-git_diff_parser
7
+ class Patches < GitDiffParser::Patches
8
+ end
9
+ end
10
+ end
11
+ end
@@ -13,7 +13,7 @@ module Saddler
13
13
  # @see https://developer.github.com/v3/issues/comments/#create-a-comment
14
14
  def report(messages, _options)
15
15
  repo_path = '.'
16
- repo = ::Saddler::Reporter::Support::Git::Repository.new(repo_path)
16
+ repo = Repository.new(repo_path)
17
17
 
18
18
  data = parse(messages)
19
19
 
@@ -13,7 +13,7 @@ module Saddler
13
13
  # @see https://developer.github.com/v3/pulls/comments/#create-a-comment
14
14
  def report(messages, _options)
15
15
  repo_path = '.'
16
- repo = ::Saddler::Reporter::Support::Git::Repository.new(repo_path)
16
+ repo = Repository.new(repo_path)
17
17
 
18
18
  data = parse(messages)
19
19
  client = Client.new(repo)
@@ -0,0 +1,11 @@
1
+ module Saddler
2
+ module Reporter
3
+ module Github
4
+ # Repository
5
+ #
6
+ # @see https://github.com/packsaddle/ruby-saddler-reporter-support-git
7
+ class Repository < Saddler::Reporter::Support::Git::Repository
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1,7 +1,7 @@
1
1
  module Saddler
2
2
  module Reporter
3
3
  module Github
4
- VERSION = '0.1.6'
4
+ VERSION = '0.2.0'
5
5
  end
6
6
  end
7
7
  end
@@ -8,8 +8,11 @@ require 'saddler/reporter/github/client'
8
8
  require 'saddler/reporter/github/comment'
9
9
  require 'saddler/reporter/github/commit_comment'
10
10
  require 'saddler/reporter/github/commit_review_comment'
11
+ require 'saddler/reporter/github/patch'
12
+ require 'saddler/reporter/github/patches'
11
13
  require 'saddler/reporter/github/pull_request_comment'
12
14
  require 'saddler/reporter/github/pull_request_review_comment'
15
+ require 'saddler/reporter/github/repository'
13
16
 
14
17
  module Saddler
15
18
  module Reporter
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saddler-reporter-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat
@@ -132,8 +132,11 @@ files:
132
132
  - lib/saddler/reporter/github/commit_comment.rb
133
133
  - lib/saddler/reporter/github/commit_review_comment.rb
134
134
  - lib/saddler/reporter/github/helper.rb
135
+ - lib/saddler/reporter/github/patch.rb
136
+ - lib/saddler/reporter/github/patches.rb
135
137
  - lib/saddler/reporter/github/pull_request_comment.rb
136
138
  - lib/saddler/reporter/github/pull_request_review_comment.rb
139
+ - lib/saddler/reporter/github/repository.rb
137
140
  - lib/saddler/reporter/github/version.rb
138
141
  - saddler-reporter-github.gemspec
139
142
  homepage: https://github.com/packsaddle/ruby-saddler-reporter-github