git_reflow 0.8.4 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +1 -1
  3. data/Gemfile.lock +17 -17
  4. data/git_reflow.gemspec +1 -1
  5. data/lib/git_reflow/config.rb +1 -1
  6. data/lib/git_reflow/git_helpers.rb +2 -2
  7. data/lib/git_reflow/git_server/bit_bucket/pull_request.rb +1 -1
  8. data/lib/git_reflow/git_server/git_hub/pull_request.rb +11 -10
  9. data/lib/git_reflow/git_server/pull_request.rb +18 -4
  10. data/lib/git_reflow/rspec/command_line_helpers.rb +9 -9
  11. data/lib/git_reflow/version.rb +1 -1
  12. data/lib/git_reflow/workflow.rb +6 -1
  13. data/lib/git_reflow/workflows/core.rb +1 -3
  14. data/lib/git_reflow/workflows/flat_merge.rb +10 -0
  15. data/lib/git_reflow.rb +9 -1
  16. metadata +7 -70
  17. data/spec/fixtures/git/git_config +0 -7
  18. data/spec/fixtures/issues/comment.json.erb +0 -27
  19. data/spec/fixtures/issues/comments.json +0 -29
  20. data/spec/fixtures/issues/comments.json.erb +0 -15
  21. data/spec/fixtures/pull_requests/comment.json.erb +0 -45
  22. data/spec/fixtures/pull_requests/comments.json +0 -47
  23. data/spec/fixtures/pull_requests/comments.json.erb +0 -15
  24. data/spec/fixtures/pull_requests/commits.json +0 -29
  25. data/spec/fixtures/pull_requests/external_pull_request.json +0 -145
  26. data/spec/fixtures/pull_requests/pull_request.json +0 -142
  27. data/spec/fixtures/pull_requests/pull_request.json.erb +0 -142
  28. data/spec/fixtures/pull_requests/pull_request_exists_error.json +0 -32
  29. data/spec/fixtures/pull_requests/pull_requests.json +0 -136
  30. data/spec/fixtures/repositories/commit.json +0 -53
  31. data/spec/fixtures/repositories/commit.json.erb +0 -53
  32. data/spec/fixtures/repositories/commits.json.erb +0 -13
  33. data/spec/fixtures/repositories/statuses.json +0 -31
  34. data/spec/lib/git_reflow/config_spec.rb +0 -74
  35. data/spec/lib/git_reflow/git_helpers_spec.rb +0 -182
  36. data/spec/lib/git_reflow/git_server_spec.rb +0 -101
  37. data/spec/lib/git_reflow/workflow_spec.rb +0 -56
  38. data/spec/lib/git_reflow/workflows/core_spec.rb +0 -665
  39. data/spec/lib/git_reflow_spec.rb +0 -39
  40. data/spec/lib/git_server/bit_bucket_spec.rb +0 -81
  41. data/spec/lib/git_server/git_hub/pull_request_spec.rb +0 -472
  42. data/spec/lib/git_server/git_hub_spec.rb +0 -221
  43. data/spec/lib/git_server/pull_request_spec.rb +0 -583
  44. data/spec/spec_helper.rb +0 -38
  45. data/spec/support/fake_github.rb +0 -128
  46. data/spec/support/fixtures.rb +0 -54
  47. data/spec/support/github_helpers.rb +0 -109
  48. data/spec/support/web_mocks.rb +0 -39
@@ -1,56 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe GitReflow::Workflow do
4
-
5
- class DummyWorkflow
6
- include GitReflow::Workflow
7
- end
8
-
9
- let(:workflow) { DummyWorkflow }
10
- let(:loader) { double() }
11
-
12
- describe ".current" do
13
- subject { GitReflow::Workflow.current }
14
-
15
- before do
16
- allow(GitReflow::Workflow).to receive(:load).and_return(loader)
17
- end
18
-
19
- context "when no workflow has been set" do
20
- before { allow(GitReflow::Config).to receive(:get).with("reflow.workflow").and_return('') }
21
- specify { expect( subject ).to eql(GitReflow::Workflows::Core) }
22
- end
23
- end
24
-
25
- describe ".command" do
26
- it "creates a class method for a bogus command" do
27
- class DummyWorkflow
28
- include GitReflow::Workflow
29
- end
30
- workflow.command :bogus do
31
- "Woohoo"
32
- end
33
-
34
- expect(DummyWorkflow.bogus).to eql("Woohoo")
35
- end
36
-
37
- it "creates a method for a bogus command with arguments" do
38
- workflow.command :bogus, arguments: [:feature_branch] do |**params|
39
- "Woohoo #{params[:feature_branch]}!"
40
- end
41
-
42
- expect(DummyWorkflow.bogus(feature_branch: "donuts")).to eql("Woohoo donuts!")
43
- end
44
-
45
- it "creates a class method for a bogus command with default options" do
46
- workflow.command :bogus, arguments: [:feature_branch], defaults: {decoration: 'sprinkles'} do |**params|
47
- donut_excitement = "Woohoo #{params[:feature_branch]}"
48
- donut_excitement += " with #{params[:decoration]}" if params[:decoration]
49
- "#{donut_excitement}!"
50
- end
51
-
52
- expect(DummyWorkflow.bogus(feature_branch: "donuts")).to eql("Woohoo donuts with sprinkles!")
53
- end
54
- end
55
-
56
- end