just 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/just.gemspec +1 -2
- data/lib/just/cli/add.rb +2 -20
- data/lib/just/version.rb +1 -1
- metadata +4 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f7c743b97391ff354aa3e5f12c2076f7cd4a6b7
|
4
|
+
data.tar.gz: 608ee581c82918f96929cdd0a0ff6b93b405d013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c452c7b6060d4459a3728f7e16081b3d3f664100defd350d4710d0847a8b3816ffc15fd4e4daa3df7142e052e1564d5ba6aca83d0750b3ced47a70f43a0edbc
|
7
|
+
data.tar.gz: 757ce5b2e29942b54437a5910a908702f3509dc53e4bd0c4d5f6b3df9fab98e5373046376158e51b20edcc596dd2a0ec64195bc303ce51ec702d64fddb04677a
|
data/just.gemspec
CHANGED
@@ -24,8 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.license = "MIT"
|
25
25
|
|
26
26
|
spec.add_dependency "main", "~> 6.2.2"
|
27
|
-
spec.add_dependency "
|
28
|
-
spec.add_dependency "ruby-progressbar", "~> 1.9.0"
|
27
|
+
spec.add_dependency "git", "~> 1.3.0"
|
29
28
|
spec.add_dependency "dry-transaction", "~> 0.10.2"
|
30
29
|
spec.add_dependency "dry-monads", "~> 0.4.0"
|
31
30
|
spec.add_dependency "rainbow", "~> 3.0.0"
|
data/lib/just/cli/add.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
require '
|
2
|
-
require 'ruby-progressbar'
|
1
|
+
require 'git'
|
3
2
|
require 'dry/transaction'
|
4
3
|
|
5
4
|
module Just
|
@@ -27,29 +26,12 @@ module Just
|
|
27
26
|
|
28
27
|
|
29
28
|
def clone_repository(username_and_repo)
|
30
|
-
progressbar = build_progress_bar(username_and_repo)
|
31
|
-
|
32
29
|
destination = Just.path(username_and_repo)
|
33
|
-
|
34
|
-
transfer_progress: lambda { |total_objects, _, received_objects, _, _, _, _|
|
35
|
-
progress = (received_objects / total_objects.to_f * 100).ceil
|
36
|
-
progressbar.progress = progress
|
37
|
-
})
|
30
|
+
Git.clone(Just.git(username_and_repo), destination)
|
38
31
|
|
39
32
|
Success(username_and_repo)
|
40
33
|
end
|
41
34
|
|
42
|
-
|
43
|
-
private
|
44
|
-
|
45
|
-
def build_progress_bar(username_and_repo)
|
46
|
-
ProgressBar.create(
|
47
|
-
output: Just.progress_bar,
|
48
|
-
title: "Adding #{username_and_repo}",
|
49
|
-
throttle_rate: 0.1,
|
50
|
-
length: 80
|
51
|
-
)
|
52
|
-
end
|
53
35
|
end
|
54
36
|
end
|
55
37
|
end
|
data/lib/just/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: just
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Bigg
|
@@ -25,33 +25,19 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 6.2.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: git
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.3.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: ruby-progressbar
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: 1.9.0
|
48
|
-
type: :runtime
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: 1.9.0
|
40
|
+
version: 1.3.0
|
55
41
|
- !ruby/object:Gem::Dependency
|
56
42
|
name: dry-transaction
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|