8000 sonar cloud · GitHubToolbox/github-ripper@3ade18f · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ade18f

Browse files
committed
sonar cloud
1 parent b528584 commit 3ade18f

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

CHANGELOG.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ All notable changes to this project will be documented in this file.
55

66
This changelog was automatically generated using [Caretaker](https://github.com/DevelopersToolbox/caretaker) by [Wolf Software](https://github.com/WolfSoftware)
77

8-
### [v0.1.3](https://github.com/DevelopersToolbox/github-ripper/compare/v0.1.2...v0.1.3)
8+
### [Unreleased](https://github.com/DevelopersToolbox/github-ripper/compare/v0.1.3...HEAD)
9+
10+
- sonar cloud [`[head]`](https://github.com/DevelopersToolbox/github-ripper/commit/)
11+
12+
### [v0.1.2](https://github.com/DevelopersToolbox/github-ripper/compare/v0.1.1...v0.1.2)
913

1014
> Released on May, 20th 2022
1115
12-
- removed verbose/debugging code [`[head]`](https://github.com/DevelopersToolbox/github-ripper/commit/)
16+
- removed verbose/debugging code [`[b528584]`](https://github.com/DevelopersToolbox/github-ripper/commit/b528584305575a1567adaaeb8c29be47bc25404d)
1317

14-
### [v0.1.2](https://github.com/DevelopersToolbox/github-ripper/compare/v0.1.1...v0.1.2)
18+
### [v0.1.1](https://github.com/DevelopersToolbox/github-ripper/compare/v0.1.0...v0.1.1)
1519

1620
> Released on May, 20th 2022
1721
@@ -21,7 +25,7 @@ This changelog was automatically generated using [Caretaker](https://github.com/
2125

2226
- Update travis slack integration due to new slack organisation [`[751d7e3]`](https://github.com/DevelopersToolbox/github-ripper/commit/751d7e3994ba8ab24052568d521dd406b773a47f)
2327

24-
### [v0.1.1](https://github.com/DevelopersToolbox/github-ripper/compare/v0.1.0...v0.1.1)
28+
### [v0.1.0](https://github.com/DevelopersToolbox/github-ripper/releases/v0.1.0)
2529

2630
> Released on June, 12th 2021
2731
@@ -31,9 +35,5 @@ This changelog was automatically generated using [Caretaker](https://github.com/
3135

3236
- Fix travis rvm versions and slack integration [`[13e051b]`](https://github.com/DevelopersToolbox/github-ripper/commit/13e051b88cf6081e2e47665332f035b77c8c4aea)
3337

34-
### [v0.1.0](https://github.com/DevelopersToolbox/github-ripper/releases/v0.1.0)
35-
36-
> Released on March, 12th 2021
37-
3838
- The initial commit [`[d6e8c31]`](https://github.com/DevelopersToolbox/github-ripper/commit/d6e8c3134a2a0f19446da799615aeda8998bc8b4)
3939

lib/github-ripper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
require 'rainbow'
66
require 'terminal-table'
77

8+
require_relative 'github-ripper/constants'
89
require_relative 'github-ripper/function-maps'
910
require_relative 'github-ripper/git'
1011
require_relative 'github-ripper/report'

lib/github-ripper/constants.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Class docs to go here
3+
#
4+
5+
class GithubRipper
6+
GIT_CLONE = 'git clone'.freeze
7+
GIT_PULL = 'git pull'.freeze
8+
end

lib/github-ripper/git.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ def execute_command(command)
4242
end
4343

4444
def clone_repo(options, repo, repo_path)
45-
return { :repo => repo, :path => repo_path, :status => 'Dry Run', :when => 'git clone', :info => '' } if flag_set?(options, :dry_run)
45+
return { :repo => repo, :path => repo_path, :status => 'Dry Run', :when => GithubRipper::GIT_CLONE, :info => '' } if flag_set?(options, :dry_run)
4646

4747
FileUtils.mkdir_p repo_path
4848

4949
clone_type = get_clone_type(options)
5050
command = "#{clone_type}#{repo} #{repo_path}"
5151
return_code, output = execute_command(command)
5252

53-
return { :repo => repo, :path => repo_path, :status => 'Failed', :when => 'git clone', :info => output } if return_code.positive?
53+
return { :repo => repo, :path => repo_path, :status => 'Failed', :when => GithubRipper::GIT_CLONE, :info => output } if return_code.positive?
5454

55-
{ :repo => repo, :path => repo_path, :status => 'Success', :when => 'git clone', :info => 'Clone Succeeded' }
55+
{ :repo => repo, :path => repo_path, :status => 'Success', :when => GithubRipper::GIT_CLONE, :info => 'Clone Succeeded' }
5656
end
5757

5858
def update_repo(options, repo, repo_path)
59-
return { :repo => repo, :path => repo_path, :status => 'Dry Run', :when => 'git clone', :info => '' } if flag_set?(options, :dry_run)
59+
return { :repo => repo, :path => repo_path, :status => 'Dry Run', :when => GithubRipper::GIT_CLONE, :info => '' } if flag_set?(options, :dry_run)
6060

6161
olddir = Dir.pwd
6262
Dir.chdir repo_path
@@ -65,9 +65,9 @@ def update_repo(options, repo, repo_path)
6565
return_code, output = execute_command(command)
6666
Dir.chdir olddir
6767

68-
return { :repo => repo, :path => repo_path, :status => 'Failed', :when => 'git pull', :info => output } if return_code.positive?
68+
return { :repo => repo, :path => repo_path, :status => 'Failed', :when => GithubRipper::GIT_PULL, :info => output } if return_code.positive?
6969

70-
{ :repo => repo, :path => repo_path, :status => 'Success', :when => 'git pull', :info => 'Pull Succeeded' }
70+
{ :repo => repo, :path => repo_path, :status => 'Success', :when => GithubRipper::GIT_PULL, :info => 'Pull Succeeded' }
7171
end
7272

7373
def clone_repo_wrapper(options, repo)

0 commit comments

Comments
 (0)
0