extract-repo 0.0.9 → 0.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/boot/start.rb +1 -1
- data/lib/extract_repo.rb +10 -8
- metadata +11 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d523a30befab4dd6c2cb12f6f74e07a713c9d938e5f024ae72960f952aac9c
|
4
|
+
data.tar.gz: c5f8d5c6a74c4c9c5557f6cc26c9d9a86bab6e5fe94a04fe0d06de2701febd51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a2bc121c8991f74795309e8e99c73b160a006fdf04c292683800a853ab2e59c84f398dfb27af7b93407020f6748a92632d53ab44211ae36cecea74298c323c8
|
7
|
+
data.tar.gz: 64938b3349b3ce15791248d8a0d30deccf1deaea8e20f5ad7026687198547b9138169ce35f4a4e61c312dbf48ce3848a7ec81b7bcb8f91ab49a1bbf882192a72
|
data/CHANGELOG.md
CHANGED
data/boot/start.rb
CHANGED
data/lib/extract_repo.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
require "pry"
|
2
1
|
require "uri"
|
3
2
|
require "English"
|
4
3
|
|
@@ -6,11 +5,14 @@ require "foobara/all"
|
|
6
5
|
|
7
6
|
# TODO: allow extracting from a local repo and default to that repo as "."
|
8
7
|
class ExtractRepo < Foobara::Command
|
8
|
+
description "Extracts directories/files of your choosing from one repo to another"
|
9
|
+
|
9
10
|
inputs do
|
10
|
-
|
11
|
-
paths [:string], :required
|
12
|
-
output_path :string, default: "#{Dir.home}/tmp/extract"
|
13
|
-
|
11
|
+
repo_url_or_path :string, :required, "The source repository to extract from. Can be a URL or a local directory"
|
12
|
+
paths [:string], :required, "Paths to each directory/file to extract"
|
13
|
+
output_path :string, default: "#{Dir.home}/tmp/extract",
|
14
|
+
description: "Where to create a new repo and move the extracted files to"
|
15
|
+
delete_extracted :boolean, default: false, description: "Delete the extracted files from the source repository"
|
14
16
|
end
|
15
17
|
|
16
18
|
attr_accessor :file_paths, :absolute_repo_path
|
@@ -33,9 +35,9 @@ class ExtractRepo < Foobara::Command
|
|
33
35
|
|
34
36
|
def determine_absolute_repo_path
|
35
37
|
self.absolute_repo_path = if local_repository?
|
36
|
-
File.absolute_path(
|
38
|
+
File.absolute_path(repo_url_or_path)
|
37
39
|
else
|
38
|
-
|
40
|
+
repo_url_or_path
|
39
41
|
end
|
40
42
|
end
|
41
43
|
|
@@ -56,7 +58,7 @@ class ExtractRepo < Foobara::Command
|
|
56
58
|
end
|
57
59
|
|
58
60
|
def local_repository?
|
59
|
-
!URI.parse(
|
61
|
+
!URI.parse(repo_url_or_path).scheme
|
60
62
|
end
|
61
63
|
|
62
64
|
def remove_origin
|
metadata
CHANGED
@@ -1,42 +1,42 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: extract-repo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miles Georgi
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: foobara
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - "~>"
|
17
17
|
- !ruby/object:Gem::Version
|
18
|
-
version:
|
18
|
+
version: 0.0.102
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
|
-
- - "
|
23
|
+
- - "~>"
|
24
24
|
- !ruby/object:Gem::Version
|
25
|
-
version:
|
25
|
+
version: 0.0.102
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: foobara-sh-cli-connector
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- - "
|
30
|
+
- - "~>"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 0.0.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
35
|
version_requirements: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- - "
|
37
|
+
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: 0.0.1
|
40
40
|
email:
|
41
41
|
- azimux@gmail.com
|
42
42
|
executables:
|
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
|
-
rubygems_version: 3.6.
|
80
|
+
rubygems_version: 3.6.7
|
81
81
|
specification_version: 4
|
82
82
|
summary: Extract code from one repository into a new repository, preserving history
|
83
83
|
of the extracted files.
|