teuton-get 0.2.0 → 0.2.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 514a1e09803689eda7e6475c56b91ee42cef303221138beb6170fb0529dc359b
4
- data.tar.gz: 0071f6c6009a2910afcb419d0a3b8d10234b0aa66c45368f7a524756880e9093
3
+ metadata.gz: c9a7d30a57e1d17315bdc1a70eca4bb76e397c901c46cb5a5709fd72802945ea
4
+ data.tar.gz: 12d9f68bfbd6a1f4c3107acb4059527b829def841e2049753f4ed77e3c70c362
5
5
  SHA512:
6
- metadata.gz: 1cb61d8605da22e792bd4bf6a153c0c5f39b567727cc4c892dcba311e5d2a50449d75ab7a246886e8f7027adcaa957ed04b62a11437c28867033be6ec2f22147
7
- data.tar.gz: a8586c74954443d00ce1def318568f46c79c5fe44ce3d69b0eb36d310cafbe092625da6666bc169f758309107997dcdcd4ebcf9cd7188ff25c3fcb7d7c3fe16f
6
+ metadata.gz: 6b5a55be18579de050724e9cc48dfdd1aebd0e87108b3810d2a785034b94de87c392fdff0f85ba87858227bda8f604e77173193bd65b5efe9867aecf02e31011
7
+ data.tar.gz: 23a880ed0a732db0891947a828a12188a034cc4b6f9611b30748916751e7104f530eb77b61b95a492bc2db574a46b5a59e97ca7dcbf48354573e8adb25592909
data/README.md CHANGED
@@ -21,24 +21,13 @@
21
21
 
22
22
  ## Example
23
23
 
24
- ```bash
25
- ❯ teutonget search conf
26
- (x3) teuton.en:systems.1/01-windows-conf
27
- (x3) teuton.en:systems.1/02-opensuse-conf
28
- (x3) teuton.en:systems.1/03-debian-conf
29
- (x3) teuton.en:systems.1/04-winserver-conf
30
- (x2) teuton.en:systems.2/01-install-w10-vbox
31
- (x2) teuton.en:systems.2/02-debian-basic-configuration
32
-
33
- ❯ teutonget download teuton.en:systems.1/02-opensuse-conf
34
- ==> Downloading systems.1/02-opensuse-conf from teuton.en...
35
- ==> File: README.md
36
- ==> File: config.yaml
37
- ==> File: network.rb
38
- ==> File: opensuse.rb
39
- ==> File: start.rb
40
- ==> File: tt-info.yaml
41
- ```
24
+ * Search and download test:
25
+
26
+ ![](docs/images/teutonget-download.png)
27
+
28
+ * Refresh repos and show test details:
29
+
30
+ ![](docs/images/teutonget-info.png)
42
31
 
43
32
  # Contact
44
33
 
data/bin/teuton-get ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ system("teutonget #{ARGV.join(" ")}")
@@ -56,7 +56,7 @@ class Downloader
56
56
  end
57
57
 
58
58
  def download(reponame, url, path, files)
59
- @dev.writeln "==> Downloading #{path} from #{reponame}...", color: :light_yellow
59
+ @dev.writeln "==> Downloading '#{path}' from repo '#{reponame}'...", color: :light_yellow
60
60
  localpath = path.tr("/", "_")
61
61
  FileUtils.mkdir(localpath) unless File.exist? localpath
62
62
  files.each do |filename|
@@ -47,7 +47,7 @@ class LocalInfo
47
47
  @data[:name] = prompt.ask("name?", default: @data[:name])
48
48
  @data[:author] = prompt.ask("author?", default: @data[:author])
49
49
  @data[:date] = prompt.ask("date?", default: @data[:date])
50
- @data[:desc] = prompt.ask("desc?", default: @data[:desc])
50
+ @data[:desc] = sanityze(prompt.ask("desc?", default: @data[:desc]))
51
51
  input = prompt.ask("tags?", default: @data[:tags].join(","))
52
52
  @data[:tags] = input.split(",")
53
53
  end
@@ -68,4 +68,8 @@ class LocalInfo
68
68
 
69
69
  true
70
70
  end
71
+
72
+ def sanityze(text)
73
+ text.tr(":", " ")
74
+ end
71
75
  end
@@ -44,7 +44,7 @@ class RepoData
44
44
 
45
45
  def show_testinfo(item)
46
46
  return unless item
47
- @dev.writeln ""
47
+
48
48
  ["name", "author", "date", "desc"].each do |key|
49
49
  @dev.write "#{key.ljust(7)} : ", color: :white
50
50
  @dev.writeln item[key].to_s
@@ -1,6 +1,6 @@
1
1
  module Version
2
2
  NAME = "teuton-get"
3
3
  EXECUTABLE = "teutonget"
4
- VERSION = "0.2.0"
4
+ VERSION = "0.2.1"
5
5
  HOMEPAGE = "https://github.com/teuton-software/#{NAME}"
6
6
  end
@@ -1,7 +1,10 @@
1
1
  require_relative "writer"
2
+ require "fileutils"
2
3
 
3
4
  class FileWriter < Writer
4
5
  def open(filepath)
6
+ dirpath = File.dirname(filepath)
7
+ FileUtils.mkdir_p(dirpath) unless Dir.exist? dirpath
5
8
  @file = File.open(filepath, "w")
6
9
  end
7
10
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teuton-get
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Vargas Ruiz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-05 00:00:00.000000000 Z
11
+ date: 2022-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inifile
@@ -84,17 +84,19 @@ description: " Find and download Teuton Test.\n"
84
84
  email: teuton.software@protonmail.com
85
85
  executables:
86
86
  - teutonget
87
+ - teuton-get
87
88
  extensions: []
88
89
  extra_rdoc_files:
89
90
  - README.md
90
91
  - LICENSE
91
92
  - docs/commands.md
92
93
  - docs/get.md
93
- - docs/settings.md
94
94
  - docs/repo.md
95
+ - docs/settings.md
95
96
  files:
96
97
  - LICENSE
97
98
  - README.md
99
+ - bin/teuton-get
98
100
  - bin/teutonget
99
101
  - docs/commands.md
100
102
  - docs/get.md
@@ -143,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
145
  - !ruby/object:Gem::Version
144
146
  version: '0'
145
147
  requirements: []
146
- rubygems_version: 3.1.6
148
+ rubygems_version: 3.3.3
147
149
  signing_key:
148
150
  specification_version: 4
149
151
  summary: TeutonGet (Teuton Software)