papa 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +5 -0
- data/README.md +22 -2
- data/exe/papa +1 -1
- data/lib/papa/cli/hotfix.rb +27 -28
- data/lib/papa/cli/integration.rb +10 -9
- data/lib/papa/cli/main.rb +34 -0
- data/lib/papa/cli/release.rb +25 -38
- data/lib/papa/cli/sandbox.rb +14 -12
- data/lib/papa/command/base.rb +48 -0
- data/lib/papa/command/git/branch.rb +15 -0
- data/lib/papa/command/git/branch_delete.rb +14 -0
- data/lib/papa/command/git/checkout.rb +22 -0
- data/lib/papa/command/git/fetch.rb +22 -0
- data/lib/papa/command/git/merge.rb +33 -0
- data/lib/papa/command/git/merge_abort.rb +14 -0
- data/lib/papa/command/git/pull.rb +14 -0
- data/lib/papa/command/git/push.rb +14 -0
- data/lib/papa/command/git/push_force.rb +14 -0
- data/lib/papa/command/git/rebase.rb +39 -0
- data/lib/papa/command/git/rebase_abort.rb +14 -0
- data/lib/papa/command/git/reset_hard.rb +14 -0
- data/lib/papa/command/git/tag.rb +14 -0
- data/lib/papa/command/git/tag_push.rb +14 -0
- data/lib/papa/command/larga/deploy.rb +63 -0
- data/lib/papa/command/larga/type.rb +19 -0
- data/lib/papa/helper/output.rb +45 -0
- data/lib/papa/helper/path.rb +29 -0
- data/lib/papa/helper/vi.rb +63 -0
- data/lib/papa/{command_queue.rb → runner.rb} +3 -7
- data/lib/papa/task/common/add.rb +117 -0
- data/lib/papa/task/common/finish.rb +72 -0
- data/lib/papa/task/common/start.rb +44 -0
- data/lib/papa/task/deploy.rb +38 -0
- data/lib/papa/task/hotfix/add.rb +15 -0
- data/lib/papa/task/hotfix/finish.rb +17 -0
- data/lib/papa/task/hotfix/start.rb +15 -0
- data/lib/papa/task/integration/start.rb +22 -0
- data/lib/papa/task/release/add.rb +15 -0
- data/lib/papa/task/release/finish.rb +16 -0
- data/lib/papa/task/release/start.rb +15 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/bugfix/4-fix-charmeleon-spelling/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/bugfix/5-fix-gem-source/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/feature/1-add-butterfree-gem/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/feature/2-add-beedrill-gem/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/feature/6-add-pidgeotto-gem/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/feature/7-add-pidgeot-gem/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/master/Gemfile +0 -0
- data/lib/papa/{sandbox → task/sandbox}/branches/patch/17.8.0/3-add-pidgey-gem/Gemfile +0 -0
- data/lib/papa/task/sandbox/clean.rb +23 -0
- data/lib/papa/task/sandbox/generate.rb +182 -0
- data/lib/papa/version.rb +1 -1
- data/lib/papa.rb +1 -9
- metadata +45 -40
- data/lib/papa/cli.rb +0 -34
- data/lib/papa/command.rb +0 -45
- data/lib/papa/common/add.rb +0 -101
- data/lib/papa/common/finish.rb +0 -56
- data/lib/papa/common/start.rb +0 -31
- data/lib/papa/common.rb +0 -4
- data/lib/papa/deploy.rb +0 -48
- data/lib/papa/git/checkout.rb +0 -16
- data/lib/papa/git/fetch.rb +0 -16
- data/lib/papa/git/merge.rb +0 -29
- data/lib/papa/git/rebase.rb +0 -29
- data/lib/papa/git.rb +0 -71
- data/lib/papa/helpers/path.rb +0 -27
- data/lib/papa/helpers/vi.rb +0 -60
- data/lib/papa/helpers.rb +0 -4
- data/lib/papa/hotfix/add.rb +0 -9
- data/lib/papa/hotfix/finish.rb +0 -11
- data/lib/papa/hotfix/start.rb +0 -9
- data/lib/papa/integration/start.rb +0 -17
- data/lib/papa/larga/deploy.rb +0 -36
- data/lib/papa/larga/type.rb +0 -12
- data/lib/papa/larga.rb +0 -18
- data/lib/papa/output.rb +0 -43
- data/lib/papa/release/add.rb +0 -9
- data/lib/papa/release/finish.rb +0 -10
- data/lib/papa/release/patch.rb +0 -30
- data/lib/papa/release/start.rb +0 -9
- data/lib/papa/sandbox/clean.rb +0 -17
- data/lib/papa/sandbox/generate.rb +0 -176
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e87718a595e00d18101632e567e76800eb8a4c18
|
4
|
+
data.tar.gz: 710dd0ab237970178c13f774b14d049d20475fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0d6d937ed501f316b1203527f8ae2a6d6a104a88041fd37336978bd3b61b147b709faa9e3bec5e039d93060eaa78037151887c4750aa77503cc8a66a6dc04f77
|
7
|
+
data.tar.gz: 7c47861b1d7a9cafd95efcb488a43b6beb1dc3affe89850f0011d4bf9078f612300d2621c045b97640a1c97df21368ed96d21a6b5df6f9316286243807dcd52a
|
data/.gitignore
CHANGED
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)
|
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
data/lib/papa/cli/hotfix.rb
CHANGED
@@ -1,37 +1,36 @@
|
|
1
1
|
module Papa
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
9
|
+
require 'papa/task/hotfix/start'
|
10
|
+
Task::Hotfix::Start.new(version: version).run
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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
|
-
|
33
|
-
|
34
|
-
|
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
|
data/lib/papa/cli/integration.rb
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
module Papa
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
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
|
data/lib/papa/cli/release.rb
CHANGED
@@ -1,47 +1,34 @@
|
|
1
1
|
module Papa
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
end
|
9
|
+
require 'papa/task/release/start'
|
10
|
+
Task::Release::Start.new(version: version).run
|
11
|
+
end
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
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
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
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
|
data/lib/papa/cli/sandbox.rb
CHANGED
@@ -1,17 +1,19 @@
|
|
1
1
|
module Papa
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
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,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 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 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
|