git_reflow 0.8.10 → 0.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/multi-ruby-tests.yml +33 -0
  3. data/.rubocop.yml +2 -0
  4. data/.ruby-version +1 -1
  5. data/Appraisals +1 -6
  6. data/CHANGELOG.md +466 -348
  7. data/Gemfile.lock +100 -70
  8. data/LICENSE +20 -20
  9. data/README.md +36 -12
  10. data/Rakefile +15 -8
  11. data/Workflow +3 -0
  12. data/bin/console +7 -7
  13. data/bin/setup +6 -6
  14. data/exe/git-reflow +14 -30
  15. data/git_reflow.gemspec +25 -24
  16. data/lib/git_reflow.rb +3 -14
  17. data/lib/git_reflow/config.rb +52 -17
  18. data/lib/git_reflow/git_helpers.rb +69 -22
  19. data/lib/git_reflow/git_server/base.rb +68 -68
  20. data/lib/git_reflow/git_server/git_hub.rb +53 -40
  21. data/lib/git_reflow/git_server/git_hub/pull_request.rb +25 -17
  22. data/lib/git_reflow/git_server/pull_request.rb +19 -3
  23. data/lib/git_reflow/merge_error.rb +9 -9
  24. data/lib/git_reflow/rspec.rb +1 -0
  25. data/lib/git_reflow/rspec/command_line_helpers.rb +23 -6
  26. data/lib/git_reflow/rspec/stub_helpers.rb +13 -13
  27. data/lib/git_reflow/rspec/workflow_helpers.rb +18 -0
  28. data/lib/git_reflow/sandbox.rb +16 -6
  29. data/lib/git_reflow/version.rb +1 -1
  30. data/lib/git_reflow/workflow.rb +305 -10
  31. data/lib/git_reflow/workflows/FlatMergeWorkflow +38 -0
  32. data/lib/git_reflow/workflows/core.rb +208 -79
  33. data/spec/fixtures/authentication_failure.json +3 -0
  34. data/spec/fixtures/awesome_workflow.rb +2 -6
  35. data/spec/fixtures/git/git_config +7 -7
  36. data/spec/fixtures/issues/comment.json.erb +27 -27
  37. data/spec/fixtures/issues/comments.json +29 -29
  38. data/spec/fixtures/issues/comments.json.erb +15 -15
  39. data/spec/fixtures/pull_requests/comment.json.erb +45 -45
  40. data/spec/fixtures/pull_requests/comments.json +47 -47
  41. data/spec/fixtures/pull_requests/comments.json.erb +15 -15
  42. data/spec/fixtures/pull_requests/commits.json +29 -29
  43. data/spec/fixtures/pull_requests/external_pull_request.json +145 -145
  44. data/spec/fixtures/pull_requests/pull_request.json +142 -142
  45. data/spec/fixtures/pull_requests/pull_request.json.erb +142 -142
  46. data/spec/fixtures/pull_requests/pull_request_branch_nonexistent_error.json +32 -0
  47. data/spec/fixtures/pull_requests/pull_request_exists_error.json +32 -32
  48. data/spec/fixtures/pull_requests/pull_requests.json +136 -136
  49. data/spec/fixtures/repositories/commit.json +53 -53
  50. data/spec/fixtures/repositories/commit.json.erb +53 -53
  51. data/spec/fixtures/repositories/commits.json.erb +13 -13
  52. data/spec/fixtures/repositories/statuses.json +31 -31
  53. data/spec/fixtures/users/user.json +32 -0
  54. data/spec/lib/git_reflow/git_helpers_spec.rb +115 -12
  55. data/spec/lib/git_reflow/git_server/git_hub/pull_request_spec.rb +6 -6
  56. data/spec/lib/git_reflow/git_server/git_hub_spec.rb +77 -3
  57. data/spec/lib/git_reflow/git_server/pull_request_spec.rb +41 -7
  58. data/spec/lib/git_reflow/workflow_spec.rb +259 -14
  59. data/spec/lib/git_reflow/workflows/core_spec.rb +224 -65
  60. data/spec/lib/git_reflow/workflows/flat_merge_spec.rb +17 -6
  61. data/spec/lib/git_reflow_spec.rb +2 -25
  62. data/spec/spec_helper.rb +3 -0
  63. data/spec/support/github_helpers.rb +1 -1
  64. data/spec/support/mock_pull_request.rb +17 -17
  65. data/spec/support/web_mocks.rb +39 -39
  66. metadata +52 -53
  67. data/circle.yml +0 -26
  68. data/lib/git_reflow/commands/deliver.rb +0 -10
  69. data/lib/git_reflow/commands/refresh.rb +0 -20
  70. data/lib/git_reflow/commands/review.rb +0 -13
  71. data/lib/git_reflow/commands/setup.rb +0 -11
  72. data/lib/git_reflow/commands/stage.rb +0 -9
  73. data/lib/git_reflow/commands/start.rb +0 -18
  74. data/lib/git_reflow/commands/status.rb +0 -7
  75. data/lib/git_reflow/workflows/flat_merge.rb +0 -10
  76. data/spec/fixtures/workflow_with_super.rb +0 -8
@@ -0,0 +1,3 @@
1
+ {
2
+ "error" : "GET https://api.github.com/authorizations: 401 Bad credentials"
3
+ }
@@ -1,7 +1,3 @@
1
- class AwesomeWorkflow < GitReflow::Workflows::Core
2
- def self.start(**args)
3
- GitReflow.say "Awesome."
4
- end
1
+ command :start do
2
+ say "Awesome."
5
3
  end
6
-
7
- AwesomeWorkflow
@@ -1,7 +1,7 @@
1
- [user]
2
- name = Reenhanced
3
- email = dev@reenhanced.com
4
- [github]
5
- user = reenhanced
6
- token = 123456
7
- oauth-token = 123456
1
+ [user]
2
+ name = Reenhanced
3
+ email = dev@reenhanced.com
4
+ [github]
5
+ user = reenhanced
6
+ token = 123456
7
+ oauth-token = 123456
@@ -1,27 +1,27 @@
1
- {
2
- "id": <%= id || 1 %>,
3
- "url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/issues/comments/<%= pull_request_number %>",
4
- "html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/issues/<%= pull_request_number %>#issuecomment-1",
5
- "body": "<%= body || "Hmmm..." %>",
6
- "user": {
7
- "login": "<%= author %>",
8
- "id": 1,
9
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
10
- "gravatar_id": "somehexcode",
11
- "url": "https://api.github.com/users/<%= author %>",
12
- "html_url": "https://github.com/<%= author %>",
13
- "followers_url": "https://api.github.com/users/<%= author %>/followers",
14
- "following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
15
- "gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
16
- "starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
17
- "subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
18
- "organizations_url": "https://api.github.com/users/<%= author %>/orgs",
19
- "repos_url": "https://api.github.com/users/<%= author %>/repos",
20
- "events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
21
- "received_events_url": "https://api.github.com/users/<%= author %>/received_events",
22
- "type": "User",
23
- "site_admin": false
24
- },
25
- "created_at": "<%= created_at %>",
26
- "updated_at": "2011-04-14T16:00:49Z"
27
- }
1
+ {
2
+ "id": <%= id || 1 %>,
3
+ "url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/issues/comments/<%= pull_request_number %>",
4
+ "html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/issues/<%= pull_request_number %>#issuecomment-1",
5
+ "body": "<%= body || "Hmmm..." %>",
6
+ "user": {
7
+ "login": "<%= author %>",
8
+ "id": 1,
9
+ "avatar_url": "https://github.com/images/error/octocat_happy.gif",
10
+ "gravatar_id": "somehexcode",
11
+ "url": "https://api.github.com/users/<%= author %>",
12
+ "html_url": "https://github.com/<%= author %>",
13
+ "followers_url": "https://api.github.com/users/<%= author %>/followers",
14
+ "following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
15
+ "gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
16
+ "starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
17
+ "subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
18
+ "organizations_url": "https://api.github.com/users/<%= author %>/orgs",
19
+ "repos_url": "https://api.github.com/users/<%= author %>/repos",
20
+ "events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
21
+ "received_events_url": "https://api.github.com/users/<%= author %>/received_events",
22
+ "type": "User",
23
+ "site_admin": false
24
+ },
25
+ "created_at": "<%= created_at %>",
26
+ "updated_at": "2011-04-14T16:00:49Z"
27
+ }
@@ -1,29 +1,29 @@
1
- [
2
- {
3
- "id": 1,
4
- "url": "https://api.github.com/repos/reenhanced/repo/issues/comments/1",
5
- "html_url": "https://github.com/reenhanced/repo/issues/1#issuecomment-1",
6
- "body": "Me too",
7
- "user": {
8
- "login": "reenhanced",
9
- "id": 1,
10
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
11
- "gravatar_id": "somehexcode",
12
- "url": "https://api.github.com/users/reenhanced",
13
- "html_url": "https://github.com/reenhanced",
14
- "followers_url": "https://api.github.com/users/reenhanced/followers",
15
- "following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
16
- "gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
17
- "starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
18
- "subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
19
- "organizations_url": "https://api.github.com/users/reenhanced/orgs",
20
- "repos_url": "https://api.github.com/users/reenhanced/repos",
21
- "events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
22
- "received_events_url": "https://api.github.com/users/reenhanced/received_events",
23
- "type": "User",
24
- "site_admin": false
25
- },
26
- "created_at": "2011-04-14T16:00:49Z",
27
- "updated_at": "2011-04-14T16:00:49Z"
28
- }
29
- ]
1
+ [
2
+ {
3
+ "id": 1,
4
+ "url": "https://api.github.com/repos/reenhanced/repo/issues/comments/1",
5
+ "html_url": "https://github.com/reenhanced/repo/issues/1#issuecomment-1",
6
+ "body": "Me too",
7
+ "user": {
8
+ "login": "reenhanced",
9
+ "id": 1,
10
+ "avatar_url": "https://github.com/images/error/octocat_happy.gif",
11
+ "gravatar_id": "somehexcode",
12
+ "url": "https://api.github.com/users/reenhanced",
13
+ "html_url": "https://github.com/reenhanced",
14
+ "followers_url": "https://api.github.com/users/reenhanced/followers",
15
+ "following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
16
+ "gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
17
+ "starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
18
+ "subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
19
+ "organizations_url": "https://api.github.com/users/reenhanced/orgs",
20
+ "repos_url": "https://api.github.com/users/reenhanced/repos",
21
+ "events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
22
+ "received_events_url": "https://api.github.com/users/reenhanced/received_events",
23
+ "type": "User",
24
+ "site_admin": false
25
+ },
26
+ "created_at": "2011-04-14T16:00:49Z",
27
+ "updated_at": "2011-04-14T16:00:49Z"
28
+ }
29
+ ]
@@ -1,15 +1,15 @@
1
- [
2
- <% comment_json = [] %>
3
- <% comments.each_with_index do |comment, index| %>
4
- <% comment_json << Fixture.new('issues/comment.json.erb',
5
- id: comment[:id] || index + 1,
6
- author: comment[:author],
7
- pull_request_number: pull_request_number,
8
- repo_owner: repo_owner,
9
- repo_name: repo_name,
10
- body: comment[:body] || 'Hmmm...',
11
- created_at: comment[:created_at] || '2011-04-14T16:00:49Z'
12
- ).to_s %>
13
- <% end %>
14
- <%= comment_json.join(", ") %>
15
- ]
1
+ [
2
+ <% comment_json = [] %>
3
+ <% comments.each_with_index do |comment, index| %>
4
+ <% comment_json << Fixture.new('issues/comment.json.erb',
5
+ id: comment[:id] || index + 1,
6
+ author: comment[:author],
7
+ pull_request_number: pull_request_number,
8
+ repo_owner: repo_owner,
9
+ repo_name: repo_name,
10
+ body: comment[:body] || 'Hmmm...',
11
+ created_at: comment[:created_at] || '2011-04-14T16:00:49Z'
12
+ ).to_s %>
13
+ <% end %>
14
+ <%= comment_json.join(", ") %>
15
+ ]
@@ -1,45 +1,45 @@
1
- {
2
- "url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= id || 1 %>",
3
- "id": <%= id || 1 %>,
4
- "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
5
- "path": "file1.txt",
6
- "position": 1,
7
- "original_position": 4,
8
- "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
9
- "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
10
- "user": {
11
- "login": "<%= author %>",
12
- "id": 1,
13
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
14
- "gravatar_id": "somehexcode",
15
- "url": "https://api.github.com/users/<%= author %>",
16
- "html_url": "https://github.com/<%= author %>",
17
- "followers_url": "https://api.github.com/users/<%= author %>/followers",
18
- "following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
19
- "gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
20
- "starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
21
- "subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
22
- "organizations_url": "https://api.github.com/users/<%= author %>/orgs",
23
- "repos_url": "https://api.github.com/users/<%= author %>/repos",
24
- "events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
25
- "received_events_url": "https://api.github.com/users/<%= author %>/received_events",
26
- "type": "User",
27
- "site_admin": false
28
- },
29
- "body": "<%= body || "Great stuff" %>",
30
- "created_at": "<%= created_at || "2011-04-14T16:00:49Z" %>",
31
- "updated_at": "<%= updated_at || created_at || "2011-04-14T16:00:49Z" %>",
32
- "html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>",
33
- "pull_request_url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>",
34
- "_links": {
35
- "self": {
36
- "href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= pull_request_number %>"
37
- },
38
- "html": {
39
- "href": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>"
40
- },
41
- "pull_request": {
42
- "href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>"
43
- }
44
- }
45
- }
1
+ {
2
+ "url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= id || 1 %>",
3
+ "id": <%= id || 1 %>,
4
+ "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
5
+ "path": "file1.txt",
6
+ "position": 1,
7
+ "original_position": 4,
8
+ "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
9
+ "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
10
+ "user": {
11
+ "login": "<%= author %>",
12
+ "id": 1,
13
+ "avatar_url": "https://github.com/images/error/octocat_happy.gif",
14
+ "gravatar_id": "somehexcode",
15
+ "url": "https://api.github.com/users/<%= author %>",
16
+ "html_url": "https://github.com/<%= author %>",
17
+ "followers_url": "https://api.github.com/users/<%= author %>/followers",
18
+ "following_url": "https://api.github.com/users/<%= author %>/following{/other_user}",
19
+ "gists_url": "https://api.github.com/users/<%= author %>/gists{/gist_id}",
20
+ "starred_url": "https://api.github.com/users/<%= author %>/starred{/owner}{/repo}",
21
+ "subscriptions_url": "https://api.github.com/users/<%= author %>/subscriptions",
22
+ "organizations_url": "https://api.github.com/users/<%= author %>/orgs",
23
+ "repos_url": "https://api.github.com/users/<%= author %>/repos",
24
+ "events_url": "https://api.github.com/users/<%= author %>/events{/privacy}",
25
+ "received_events_url": "https://api.github.com/users/<%= author %>/received_events",
26
+ "type": "User",
27
+ "site_admin": false
28
+ },
29
+ "body": "<%= body || "Great stuff" %>",
30
+ "created_at": "<%= created_at || "2011-04-14T16:00:49Z" %>",
31
+ "updated_at": "<%= updated_at || created_at || "2011-04-14T16:00:49Z" %>",
32
+ "html_url": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>",
33
+ "pull_request_url": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>",
34
+ "_links": {
35
+ "self": {
36
+ "href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/comments/<%= pull_request_number %>"
37
+ },
38
+ "html": {
39
+ "href": "https://github.com/<%= repo_owner %>/<%= repo_name %>/pull/<%= pull_request_number %>#discussion-diff-<%= id || 1 %>"
40
+ },
41
+ "pull_request": {
42
+ "href": "https://api.github.com/repos/<%= repo_owner %>/<%= repo_name %>/pulls/<%= pull_request_number %>"
43
+ }
44
+ }
45
+ }
@@ -1,47 +1,47 @@
1
- [
2
- {
3
- "url": "https://api.github.com/repos/reenhanced/repo/pulls/comments/1",
4
- "id": 1,
5
- "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
6
- "path": "file1.txt",
7
- "position": 1,
8
- "original_position": 4,
9
- "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
10
- "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
11
- "user": {
12
- "login": "reenhanced",
13
- "id": 1,
14
- "avatar_url": "https://github.com/images/error/octocat_happy.gif",
15
- "gravatar_id": "somehexcode",
16
- "url": "https://api.github.com/users/reenhanced",
17
- "html_url": "https://github.com/reenhanced",
18
- "followers_url": "https://api.github.com/users/reenhanced/followers",
19
- "following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
20
- "gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
21
- "starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
22
- "subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
23
- "organizations_url": "https://api.github.com/users/reenhanced/orgs",
24
- "repos_url": "https://api.github.com/users/reenhanced/repos",
25
- "events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
26
- "received_events_url": "https://api.github.com/users/reenhanced/received_events",
27
- "type": "User",
28
- "site_admin": false
29
- },
30
- "body": "Great stuff",
31
- "created_at": "2011-04-14T16:00:49Z",
32
- "updated_at": "2011-04-14T16:00:49Z",
33
- "html_url": "https://github.com/reenhanced/repo/pull/1#discussion-diff-1",
34
- "pull_request_url": "https://api.github.com/repos/reenhanced/repo/pulls/1",
35
- "_links": {
36
- "self": {
37
- "href": "https://api.github.com/repos/reenhanced/repo/pulls/comments/1"
38
- },
39
- "html": {
40
- "href": "https://github.com/reenhanced/repo/pull/1#discussion-diff-1"
41
- },
42
- "pull_request": {
43
- "href": "https://api.github.com/repos/reenhanced/repo/pulls/1"
44
- }
45
- }
46
- }
47
- ]
1
+ [
2
+ {
3
+ "url": "https://api.github.com/repos/reenhanced/repo/pulls/comments/1",
4
+ "id": 1,
5
+ "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
6
+ "path": "file1.txt",
7
+ "position": 1,
8
+ "original_position": 4,
9
+ "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
10
+ "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
11
+ "user": {
12
+ "login": "reenhanced",
13
+ "id": 1,
14
+ "avatar_url": "https://github.com/images/error/octocat_happy.gif",
15
+ "gravatar_id": "somehexcode",
16
+ "url": "https://api.github.com/users/reenhanced",
17
+ "html_url": "https://github.com/reenhanced",
18
+ "followers_url": "https://api.github.com/users/reenhanced/followers",
19
+ "following_url": "https://api.github.com/users/reenhanced/following{/other_user}",
20
+ "gists_url": "https://api.github.com/users/reenhanced/gists{/gist_id}",
21
+ "starred_url": "https://api.github.com/users/reenhanced/starred{/owner}{/repo}",
22
+ "subscriptions_url": "https://api.github.com/users/reenhanced/subscriptions",
23
+ "organizations_url": "https://api.github.com/users/reenhanced/orgs",
24
+ "repos_url": "https://api.github.com/users/reenhanced/repos",
25
+ "events_url": "https://api.github.com/users/reenhanced/events{/privacy}",
26
+ "received_events_url": "https://api.github.com/users/reenhanced/received_events",
27
+ "type": "User",
28
+ "site_admin": false
29
+ },
30
+ "body": "Great stuff",
31
+ "created_at": "2011-04-14T16:00:49Z",
32
+ "updated_at": "2011-04-14T16:00:49Z",
33
+ "html_url": "https://github.com/reenhanced/repo/pull/1#discussion-diff-1",
34
+ "pull_request_url": "https://api.github.com/repos/reenhanced/repo/pulls/1",
35
+ "_links": {
36
+ "self": {
37
+ "href": "https://api.github.com/repos/reenhanced/repo/pulls/comments/1"
38
+ },
39
+ "html": {
40
+ "href": "https://github.com/reenhanced/repo/pull/1#discussion-diff-1"
41
+ },
42
+ "pull_request": {
43
+ "href": "https://api.github.com/repos/reenhanced/repo/pulls/1"
44
+ }
45
+ }
46
+ }
47
+ ]
@@ -1,15 +1,15 @@
1
- [
2
- <% comments_json = [] %>
3
- <% comments.each_with_index do |comment, index| %>
4
- <% comments_json << Fixture.new('pull_requests/comment.json.erb',
5
- id: index,
6
- author: comment[:author],
7
- pull_request_number: pull_request_number,
8
- repo_owner: repo_owner,
9
- repo_name: repo_name,
10
- body: comment[:body] || 'Hammer time',
11
- created_at: comment[:created_at] || Chronic.parse('October 21, 2015 07:28:00')
12
- ).to_s %>
13
- <% end %>
14
- <%= comments_json.join(", ") %>
15
- ]
1
+ [
2
+ <% comments_json = [] %>
3
+ <% comments.each_with_index do |comment, index| %>
4
+ <% comments_json << Fixture.new('pull_requests/comment.json.erb',
5
+ id: index,
6
+ author: comment[:author],
7
+ pull_request_number: pull_request_number,
8
+ repo_owner: repo_owner,
9
+ repo_name: repo_name,
10
+ body: comment[:body] || 'Hammer time',
11
+ created_at: comment[:created_at] || Chronic.parse('October 21, 2015 07:28:00')
12
+ ).to_s %>
13
+ <% end %>
14
+ <%= comments_json.join(", ") %>
15
+ ]
@@ -1,29 +1,29 @@
1
- [
2
- {
3
- "commit": {
4
- "sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
5
- "url": "https://api.github.com/repos/reenhanced/repo/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
6
- "author": {
7
- "date": "2010-04-10T14:10:01-07:00",
8
- "name": "Draco Powers",
9
- "email": "draco@reenhanced.com"
10
- },
11
- "committer": {
12
- "date": "2010-04-10T14:10:01-07:00",
13
- "name": "Draco Powers",
14
- "email": "draco@reenhanced.com"
15
- },
16
- "message": "added readme, because im a good github citizen\n",
17
- "tree": {
18
- "url": "https://api.github.com/repos/reenhanced/repo/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
19
- "sha": "691272480426f78a0138979dd3ce63b77f706feb"
20
- },
21
- "parents": [
22
- {
23
- "url": "https://api.github.com/repos/reenhanced/repo/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
24
- "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
25
- }
26
- ]
27
- }
28
- }
29
- ]
1
+ [
2
+ {
3
+ "commit": {
4
+ "sha": "7638417db6d59f3c431d3e1f261cc637155684cd",
5
+ "url": "https://api.github.com/repos/reenhanced/repo/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
6
+ "author": {
7
+ "date": "2010-04-10T14:10:01-07:00",
8
+ "name": "Draco Powers",
9
+ "email": "draco@reenhanced.com"
10
+ },
11
+ "committer": {
12
+ "date": "2010-04-10T14:10:01-07:00",
13
+ "name": "Draco Powers",
14
+ "email": "draco@reenhanced.com"
15
+ },
16
+ "message": "added readme, because im a good github citizen\n",
17
+ "tree": {
18
+ "url": "https://api.github.com/repos/reenhanced/repo/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
19
+ "sha": "691272480426f78a0138979dd3ce63b77f706feb"
20
+ },
21
+ "parents": [
22
+ {
23
+ "url": "https://api.github.com/repos/reenhanced/repo/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
24
+ "sha": "1acc419d4d6a9ce985db7be48c6349a0475975b5"
25
+ }
26
+ ]
27
+ }
28
+ }
29
+ ]