papa 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/CHANGELOG.md +5 -0
  4. data/README.md +22 -2
  5. data/exe/papa +1 -1
  6. data/lib/papa/cli/hotfix.rb +27 -28
  7. data/lib/papa/cli/integration.rb +10 -9
  8. data/lib/papa/cli/main.rb +34 -0
  9. data/lib/papa/cli/release.rb +25 -38
  10. data/lib/papa/cli/sandbox.rb +14 -12
  11. data/lib/papa/command/base.rb +48 -0
  12. data/lib/papa/command/git/branch.rb +15 -0
  13. data/lib/papa/command/git/branch_delete.rb +14 -0
  14. data/lib/papa/command/git/checkout.rb +22 -0
  15. data/lib/papa/command/git/fetch.rb +22 -0
  16. data/lib/papa/command/git/merge.rb +33 -0
  17. data/lib/papa/command/git/merge_abort.rb +14 -0
  18. data/lib/papa/command/git/pull.rb +14 -0
  19. data/lib/papa/command/git/push.rb +14 -0
  20. data/lib/papa/command/git/push_force.rb +14 -0
  21. data/lib/papa/command/git/rebase.rb +39 -0
  22. data/lib/papa/command/git/rebase_abort.rb +14 -0
  23. data/lib/papa/command/git/reset_hard.rb +14 -0
  24. data/lib/papa/command/git/tag.rb +14 -0
  25. data/lib/papa/command/git/tag_push.rb +14 -0
  26. data/lib/papa/command/larga/deploy.rb +63 -0
  27. data/lib/papa/command/larga/type.rb +19 -0
  28. data/lib/papa/helper/output.rb +45 -0
  29. data/lib/papa/helper/path.rb +29 -0
  30. data/lib/papa/helper/vi.rb +63 -0
  31. data/lib/papa/{command_queue.rb → runner.rb} +3 -7
  32. data/lib/papa/task/common/add.rb +117 -0
  33. data/lib/papa/task/common/finish.rb +72 -0
  34. data/lib/papa/task/common/start.rb +44 -0
  35. data/lib/papa/task/deploy.rb +38 -0
  36. data/lib/papa/task/hotfix/add.rb +15 -0
  37. data/lib/papa/task/hotfix/finish.rb +17 -0
  38. data/lib/papa/task/hotfix/start.rb +15 -0
  39. data/lib/papa/task/integration/start.rb +22 -0
  40. data/lib/papa/task/release/add.rb +15 -0
  41. data/lib/papa/task/release/finish.rb +16 -0
  42. data/lib/papa/task/release/start.rb +15 -0
  43. data/lib/papa/{sandbox → task/sandbox}/branches/bugfix/4-fix-charmeleon-spelling/Gemfile +0 -0
  44. data/lib/papa/{sandbox → task/sandbox}/branches/bugfix/5-fix-gem-source/Gemfile +0 -0
  45. data/lib/papa/{sandbox → task/sandbox}/branches/feature/1-add-butterfree-gem/Gemfile +0 -0
  46. data/lib/papa/{sandbox → task/sandbox}/branches/feature/2-add-beedrill-gem/Gemfile +0 -0
  47. data/lib/papa/{sandbox → task/sandbox}/branches/feature/6-add-pidgeotto-gem/Gemfile +0 -0
  48. data/lib/papa/{sandbox → task/sandbox}/branches/feature/7-add-pidgeot-gem/Gemfile +0 -0
  49. data/lib/papa/{sandbox → task/sandbox}/branches/master/Gemfile +0 -0
  50. data/lib/papa/{sandbox → task/sandbox}/branches/patch/17.8.0/3-add-pidgey-gem/Gemfile +0 -0
  51. data/lib/papa/task/sandbox/clean.rb +23 -0
  52. data/lib/papa/task/sandbox/generate.rb +182 -0
  53. data/lib/papa/version.rb +1 -1
  54. data/lib/papa.rb +1 -9
  55. metadata +45 -40
  56. data/lib/papa/cli.rb +0 -34
  57. data/lib/papa/command.rb +0 -45
  58. data/lib/papa/common/add.rb +0 -101
  59. data/lib/papa/common/finish.rb +0 -56
  60. data/lib/papa/common/start.rb +0 -31
  61. data/lib/papa/common.rb +0 -4
  62. data/lib/papa/deploy.rb +0 -48
  63. data/lib/papa/git/checkout.rb +0 -16
  64. data/lib/papa/git/fetch.rb +0 -16
  65. data/lib/papa/git/merge.rb +0 -29
  66. data/lib/papa/git/rebase.rb +0 -29
  67. data/lib/papa/git.rb +0 -71
  68. data/lib/papa/helpers/path.rb +0 -27
  69. data/lib/papa/helpers/vi.rb +0 -60
  70. data/lib/papa/helpers.rb +0 -4
  71. data/lib/papa/hotfix/add.rb +0 -9
  72. data/lib/papa/hotfix/finish.rb +0 -11
  73. data/lib/papa/hotfix/start.rb +0 -9
  74. data/lib/papa/integration/start.rb +0 -17
  75. data/lib/papa/larga/deploy.rb +0 -36
  76. data/lib/papa/larga/type.rb +0 -12
  77. data/lib/papa/larga.rb +0 -18
  78. data/lib/papa/output.rb +0 -43
  79. data/lib/papa/release/add.rb +0 -9
  80. data/lib/papa/release/finish.rb +0 -10
  81. data/lib/papa/release/patch.rb +0 -30
  82. data/lib/papa/release/start.rb +0 -9
  83. data/lib/papa/sandbox/clean.rb +0 -17
  84. data/lib/papa/sandbox/generate.rb +0 -176
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e79d7aa5abd7759a7acee2ac1538c6f4b3bc69e
4
- data.tar.gz: 7eb13ccb695d9c423d1b3f60dd552184ef86c705
3
+ metadata.gz: e87718a595e00d18101632e567e76800eb8a4c18
4
+ data.tar.gz: 710dd0ab237970178c13f774b14d049d20475fb3
5
5
  SHA512:
6
- metadata.gz: 807475a93bd68e8e520a7f069d38e1dee3c8e6491f81c21835140fa50af63e7f174994b69b5b2b2e82d6aeb7a5aa226063508ebbfe3f09fcc2911c0868879520
7
- data.tar.gz: fd5289d8f9149e28666954a68def6ac64c9f1af26f5dfcdb3d1719a81244be2c2007e6720a5e046f18d3437e867ead2c6be84cea66d4079f570b1da898d474fc
6
+ metadata.gz: 0d6d937ed501f316b1203527f8ae2a6d6a104a88041fd37336978bd3b61b147b709faa9e3bec5e039d93060eaa78037151887c4750aa77503cc8a66a6dc04f77
7
+ data.tar.gz: 7c47861b1d7a9cafd95efcb488a43b6beb1dc3affe89850f0011d4bf9078f612300d2621c045b97640a1c97df21368ed96d21a6b5df6f9316286243807dcd52a
data/.gitignore CHANGED
@@ -10,3 +10,4 @@
10
10
 
11
11
  # rspec failure tracking
12
12
  .rspec_status
13
+ *.gem
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.0
4
+ * Classes have been housed into their own modules
5
+ * Minor change to how commands are run, but shouldn't affect functionality
6
+ * Code cleanup
7
+
3
8
  ## 0.3.0
4
9
  * Used open3 for easier output and exit status handling
5
10
  * Added more descriptive output messages
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Papa [![Gem Version](https://badge.fury.io/rb/papa.svg)](https://badge.fury.io/rb/papa) [![Build Status](https://travis-ci.org/b-ggs/papa.svg?branch=master)](https://travis-ci.org/b-ggs/papa) [![Maintainability](https://api.codeclimate.com/v1/badges/cec506e3421dc3e08eeb/maintainability)](https://codeclimate.com/github/b-ggs/papa/maintainability)
1
+ # Papa [![Gem Version](https://badge.fury.io/rb/papa.svg)](https://badge.fury.io/rb/papa) [![Build Status](https://travis-ci.org/b-ggs/papa.svg?branch=master)](https://travis-ci.org/b-ggs/papa)
2
2
 
3
3
  Helper tool for inDinero's git workflow. Ako ang papa mo.
4
4
 
@@ -150,6 +150,26 @@ $ papa integration start -b develop
150
150
 
151
151
  ### `papa deploy`
152
152
 
153
+ #### Deploying a new environment
154
+
155
+ This will create a new environment using `larga`.
156
+
157
+ ```
158
+ $ papa deploy -b, --branch=BRANCH [-h, --hostname=HOSTNAME]
159
+ ```
160
+
161
+ ##### Sample Usage:
162
+
163
+ ```
164
+ $ papa deploy -b feature/dunder-mifflin-this-is-pam
165
+ ```
166
+
167
+ If you want to specify a hostname for this environment:
168
+
169
+ ```
170
+ $ papa deploy -b feature/we-were-on-a-break -h ross-and-rachel
171
+ ```
172
+
153
173
  ### `papa sandbox`
154
174
 
155
175
  #### Generating a new sandbox
@@ -158,4 +178,4 @@ This will generate a git repository that you can use to test out `papa`.
158
178
 
159
179
  ```
160
180
  $ papa sandbox generate
161
- ```
181
+ ```
data/exe/papa CHANGED
@@ -3,4 +3,4 @@
3
3
 
4
4
  require 'papa'
5
5
 
6
- Papa::CLI.start ARGV
6
+ Papa::CLI::Main.start ARGV
@@ -1,37 +1,36 @@
1
1
  module Papa
2
- class Hotfix < Thor
3
- desc 'start', 'Start a new hotfix branch'
4
- option :version, aliases: '-v', required: true
5
- def start
6
- version = options[:version]
2
+ module CLI
3
+ class Hotfix < Thor
4
+ desc 'start', 'Start a new hotfix branch'
5
+ option :version, aliases: '-v', required: true
6
+ def start
7
+ version = options[:version]
7
8
 
8
- require 'papa/common/start'
9
- require 'papa/hotfix/start'
10
- Hotfix::Start.new(version: version).run
11
- end
9
+ require 'papa/task/hotfix/start'
10
+ Task::Hotfix::Start.new(version: version).run
11
+ end
12
12
 
13
- desc 'add', 'Add bugfix branches to a hotfix branch'
14
- option :version, aliases: '-v', required: true
15
- option :bugfix_branches, aliases: '-b', type: :array
16
- def add
17
- version = options[:version]
18
- bugfix_branches = options[:bugfix_branches] || []
13
+ desc 'add', 'Add bugfix branches to a hotfix branch'
14
+ option :version, aliases: '-v', required: true
15
+ option :bugfix_branches, aliases: '-b', type: :array
16
+ def add
17
+ version = options[:version]
18
+ bugfix_branches = options[:bugfix_branches] || []
19
19
 
20
- require 'papa/common/add'
21
- require 'papa/hotfix/add'
22
- Hotfix::Add.new(version: version, bugfix_branches: bugfix_branches).run
23
- end
20
+ require 'papa/task/hotfix/add'
21
+ Task::Hotfix::Add.new(version: version, bugfix_branches: bugfix_branches).run
22
+ end
24
23
 
25
- desc 'finish', 'Merge the hotfix branch to the base branches'
26
- option :version, aliases: '-v', required: true
27
- option :additional_branches, aliases: '-b', type: :array
28
- def finish
29
- version = options[:version]
30
- additional_branches = options[:additional_branches]
24
+ desc 'finish', 'Merge the hotfix branch to the base branches'
25
+ option :version, aliases: '-v', required: true
26
+ option :additional_branches, aliases: '-b', type: :array
27
+ def finish
28
+ version = options[:version]
29
+ additional_branches = options[:additional_branches]
31
30
 
32
- require 'papa/common/finish'
33
- require 'papa/hotfix/finish'
34
- Hotfix::Finish.new(version: version, additional_branches: additional_branches).run
31
+ require 'papa/task/hotfix/finish'
32
+ Task::Hotfix::Finish.new(version: version, additional_branches: additional_branches).run
33
+ end
35
34
  end
36
35
  end
37
36
  end
@@ -1,13 +1,14 @@
1
1
  module Papa
2
- class Integration < Thor
3
- desc 'start', 'Start an integration branch'
4
- option :base_branch, aliases: '-b', required: true
5
- def start
6
- base_branch = options[:base_branch]
7
-
8
- require 'papa/common/start'
9
- require 'papa/integration/start'
10
- Integration::Start.new(base_branch: base_branch).run
2
+ module CLI
3
+ class Integration < Thor
4
+ desc 'start', 'Start an integration branch'
5
+ option :base_branch, aliases: '-b', required: true
6
+ def start
7
+ base_branch = options[:base_branch]
8
+
9
+ require 'papa/task/integration/start'
10
+ Task::Integration::Start.new(base_branch: base_branch).run
11
+ end
11
12
  end
12
13
  end
13
14
  end
@@ -0,0 +1,34 @@
1
+ require 'papa/cli/release'
2
+ require 'papa/cli/hotfix'
3
+ require 'papa/cli/integration'
4
+ require 'papa/cli/sandbox'
5
+
6
+ module Papa
7
+ module CLI
8
+ class Main < Thor
9
+ desc 'release [COMMAND]', 'Perform actions on release branches'
10
+ subcommand 'release', CLI::Release
11
+
12
+ desc 'hotfix [COMMAND]', 'Perform actions on hotfix branches'
13
+ subcommand 'hotfix', CLI::Hotfix
14
+
15
+ desc 'integration [COMMAND]', 'Perform actions on integration branches'
16
+ subcommand 'integration', CLI::Integration
17
+
18
+ desc 'deploy', 'Deploy a branch with larga'
19
+ option :branch, aliases: '-b', required: true
20
+ option :hostname, aliases: '-h'
21
+ def deploy
22
+ require 'papa/task/deploy'
23
+
24
+ branch = options[:branch]
25
+ hostname = options[:hostname]
26
+
27
+ Task::Deploy.new(branch: branch, hostname: hostname).run
28
+ end
29
+
30
+ desc 'sandbox [COMMAND]', 'Test out papa in a sandboxed git environment'
31
+ subcommand 'sandbox', CLI::Sandbox
32
+ end
33
+ end
34
+ end
@@ -1,47 +1,34 @@
1
1
  module Papa
2
- class Release < Thor
3
- desc 'start', 'Start a new release branch'
4
- option :version, aliases: '-v', required: true
5
- def start
6
- version = options[:version]
2
+ module CLI
3
+ class Release < Thor
4
+ desc 'start', 'Start a new release branch'
5
+ option :version, aliases: '-v', required: true
6
+ def start
7
+ version = options[:version]
7
8
 
8
- require 'papa/common/start'
9
- require 'papa/release/start'
10
- Release::Start.new(version: version).run
11
- end
9
+ require 'papa/task/release/start'
10
+ Task::Release::Start.new(version: version).run
11
+ end
12
12
 
13
- desc 'add', 'Add feature branches to a release branch'
14
- option :version, aliases: '-v', required: true
15
- option :feature_branches, aliases: '-b', type: :array
16
- def add
17
- version = options[:version]
18
- feature_branches = options[:feature_branches] || []
13
+ desc 'add', 'Add feature branches to a release branch'
14
+ option :version, aliases: '-v', required: true
15
+ option :feature_branches, aliases: '-b', type: :array
16
+ def add
17
+ version = options[:version]
18
+ feature_branches = options[:feature_branches] || []
19
19
 
20
- require 'papa/common/add'
21
- require 'papa/release/add'
22
- Release::Add.new(version: version, feature_branches: feature_branches).run
23
- end
20
+ require 'papa/task/release/add'
21
+ Task::Release::Add.new(version: version, feature_branches: feature_branches).run
22
+ end
24
23
 
25
- desc 'finish', 'Merge the release branch to master and develop'
26
- option :version, aliases: '-v', required: true
27
- def finish
28
- version = options[:version]
24
+ desc 'finish', 'Merge the release branch to master and develop'
25
+ option :version, aliases: '-v', required: true
26
+ def finish
27
+ version = options[:version]
29
28
 
30
- require 'papa/common/finish'
31
- require 'papa/release/finish'
32
- Release::Finish.new(version: version).run
29
+ require 'papa/task/release/finish'
30
+ Task::Release::Finish.new(version: version).run
31
+ end
33
32
  end
34
-
35
- # desc 'patch', 'Add a patch to release branch'
36
- # option :version, aliases: '-v', required: true
37
- # option :patch_branch, aliases: '-b', required: true
38
- # def patch
39
- # version = options[:version]
40
- # patch_branch = options[:patch_branch]
41
- #
42
- # require 'papa/common/add'
43
- # require 'papa/release/patch'
44
- # Release::Patch.new(version: version, patch_branch: patch_branch).run
45
- # end
46
33
  end
47
34
  end
@@ -1,17 +1,19 @@
1
1
  module Papa
2
- class Sandbox < Thor
3
- desc 'generate', 'Generate a sandbox environment'
4
- option :override_origin, aliases: '-o'
5
- option :override_path_prefix, aliases: '-p'
6
- def generate
7
- require 'papa/sandbox/generate'
8
- Sandbox::Generate.new(options).run
9
- end
2
+ module CLI
3
+ class Sandbox < Thor
4
+ desc 'generate', 'Generate a sandbox environment'
5
+ option :override_origin, aliases: '-o'
6
+ option :override_path_prefix, aliases: '-p'
7
+ def generate
8
+ require 'papa/task/sandbox/generate'
9
+ Task::Sandbox::Generate.new(options).run
10
+ end
10
11
 
11
- desc 'clean', 'Clean up sandbox directories in /tmp'
12
- def clean
13
- require 'papa/sandbox/clean'
14
- Sandbox::Clean.new.run
12
+ desc 'clean', 'Clean up sandbox directories in /tmp'
13
+ def clean
14
+ require 'papa/task/sandbox/clean'
15
+ Task::Sandbox::Clean.new.run
16
+ end
15
17
  end
16
18
  end
17
19
  end
@@ -0,0 +1,48 @@
1
+ require 'open3'
2
+ require 'papa/helper/output'
3
+
4
+ module Papa
5
+ module Command
6
+ class Base
7
+ attr_accessor :command, :stdout, :stderr, :exit_status, :silent
8
+
9
+ def initialize(command, options = {})
10
+ @command = command
11
+ @silent = options.has_key?(:silent) ? options[:silent] : false
12
+ end
13
+
14
+ def run
15
+ return if command.nil?
16
+ Helper::Output.stdout "Running #{command.bold}..." unless silent
17
+ @stdout, @stderr, status = Open3.capture3(command)
18
+ @exit_status = status.exitstatus
19
+ self
20
+ end
21
+
22
+ def failure_message
23
+ message = "Error while running #{command.bold}"
24
+ Helper::Output.error message
25
+ Helper::Output.error stderr
26
+ message
27
+ end
28
+
29
+ def cleanup
30
+ # Override me
31
+ end
32
+
33
+ def success?
34
+ !failed?
35
+ end
36
+
37
+ def failed?
38
+ exit_status != 0
39
+ end
40
+
41
+ private
42
+
43
+ def current_branch
44
+ @current_branch ||= `git symbolic-ref --short HEAD`.chomp
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,15 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Branch < Command::Base
7
+ def initialize(branch_name)
8
+ @branch_name = branch_name
9
+ command = "git branch #{branch_name}"
10
+ super(command)
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class BranchDelete < Command::Base
7
+ def initialize(branch_name)
8
+ command = "git branch -D #{branch_name}"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,22 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Checkout < Command::Base
7
+ def initialize(branch_name)
8
+ @branch_name = branch_name
9
+ command = "git checkout #{@branch_name}"
10
+ super(command)
11
+ end
12
+
13
+ def failure_message
14
+ super
15
+ message = "Failed to checkout #{@branch_name.bold}. Check whether this branch exists."
16
+ Helper::Output.error message
17
+ message
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,22 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Fetch < Command::Base
7
+ def initialize(remote)
8
+ @remote = remote
9
+ command = "git fetch #{remote}"
10
+ super(command)
11
+ end
12
+
13
+ def failure_message
14
+ super
15
+ message = "Failed to fetch from #{@remote}. Please check your internet connection and try again."
16
+ Helper::Output.stderr message
17
+ message
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,33 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Merge < Command::Base
7
+ def initialize(branch_name)
8
+ @branch_name = branch_name
9
+ command = "git merge #{@branch_name} --no-ff"
10
+ super(command)
11
+ end
12
+
13
+ def run
14
+ current_branch # Store current branch before executing command
15
+ super
16
+ end
17
+
18
+ def cleanup
19
+ super
20
+ Command::Git::MergeAbort.new.run
21
+ Command::Git::Checkout.new(current_branch).run
22
+ end
23
+
24
+ def failure_message
25
+ super
26
+ message = "Failed to merge #{@branch_name} into #{current_branch}. Merge conflict?"
27
+ Helper::Output.error message
28
+ message
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class MergeAbort < Command::Base
7
+ def initialize
8
+ command = 'git merge --abort'
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Pull < Command::Base
7
+ def initialize(remote, branch_name)
8
+ command = "git pull #{remote} #{branch_name}"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Push < Command::Base
7
+ def initialize(remote, branch_name)
8
+ command = "git push #{remote} #{branch_name}"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class PushForce < Command::Base
7
+ def initialize(remote, branch_name)
8
+ command = "git push #{remote} #{branch_name} --force-with-lease"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,39 @@
1
+ require 'papa/command/base'
2
+ require 'papa/command/git/rebase_abort'
3
+ require 'papa/command/git/checkout'
4
+
5
+ module Papa
6
+ module Command
7
+ module Git
8
+ class Rebase < Command::Base
9
+ def initialize(base_branch_name)
10
+ @base_branch_name = base_branch_name
11
+ command = "git rebase #{@base_branch_name}"
12
+ super(command)
13
+ end
14
+
15
+ def run
16
+ current_branch # Store current branch before executing command
17
+ super
18
+ end
19
+
20
+ def cleanup
21
+ super
22
+ queue = [
23
+ Git::RebaseAbort.new,
24
+ Git::Checkout.new(current_branch)
25
+ ]
26
+ runner = Runner.new(queue)
27
+ runner.run
28
+ end
29
+
30
+ def failure_message
31
+ super
32
+ message = "Failed to rebase #{current_branch} from #{@base_branch_name}. Merge conflict?"
33
+ Helper::Output.error message
34
+ message
35
+ end
36
+ end
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class RebaseAbort < Command::Base
7
+ def initialize
8
+ command = 'git rebase --abort'
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class ResetHard < Command::Base
7
+ def initialize(remote, branch_name)
8
+ command = "git reset --hard #{remote}/#{branch_name}"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class Tag < Command::Base
7
+ def initialize(tag_name)
8
+ command = "git tag #{tag_name}"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ require 'papa/command/base'
2
+
3
+ module Papa
4
+ module Command
5
+ module Git
6
+ class TagPush < Command::Base
7
+ def initialize(remote, tag_name)
8
+ command = "git push #{remote} #{tag_name}"
9
+ super(command)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end