rigit 0.0.3 → 0.1.0
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/README.md +1 -0
- data/lib/rigit/command_line.rb +4 -2
- data/lib/rigit/commands/list.rb +41 -0
- data/lib/rigit/docopt.txt +9 -0
- data/lib/rigit/version.rb +1 -1
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8076af9f15739de9c3b1fb2a14ec2cdf4294d231e71e7a145d4e6caf6c43eae
|
4
|
+
data.tar.gz: 7e02b86550c1f344cda505558a4cf85ed61bf5c5a211052f3f324a7b60db87a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfe4ba68fe6c433e6111d6c2bf94c22b7f09c0f585147f8f262fff5f5fc4ad290e91aff5510b0d9e5d4e6ce657d288cdd6e3916d9a9d738dfd4cf8b2c2d4774e
|
7
|
+
data.tar.gz: 61441041f37c51e0d7c739a20e053f716d0335b3f120dd040710e2b0373740b652d5eab2bdce7b5ead38ac69c494555b47f7ceeb47decce59efce8a5479e9ce6
|
data/README.md
CHANGED
data/lib/rigit/command_line.rb
CHANGED
@@ -2,19 +2,21 @@ require 'super_docopt'
|
|
2
2
|
require 'rigit/version'
|
3
3
|
|
4
4
|
require 'rigit/commands/build'
|
5
|
+
require 'rigit/commands/info'
|
5
6
|
require 'rigit/commands/install'
|
7
|
+
require 'rigit/commands/list'
|
6
8
|
require 'rigit/commands/update'
|
7
|
-
require 'rigit/commands/info'
|
8
9
|
|
9
10
|
module Rigit
|
10
11
|
class CommandLine < SuperDocopt::Base
|
11
12
|
version VERSION
|
12
13
|
docopt File.expand_path 'docopt.txt', __dir__
|
13
|
-
subcommands [:build, :install, :update, :info]
|
14
|
+
subcommands [:build, :install, :update, :info, :list]
|
14
15
|
|
15
16
|
include Commands::Build
|
16
17
|
include Commands::Install
|
17
18
|
include Commands::Update
|
18
19
|
include Commands::Info
|
20
|
+
include Commands::List
|
19
21
|
end
|
20
22
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'colsole'
|
2
|
+
|
3
|
+
module Rigit::Commands
|
4
|
+
module List
|
5
|
+
def list
|
6
|
+
ListHandler.new(args).execute
|
7
|
+
end
|
8
|
+
|
9
|
+
class ListHandler
|
10
|
+
include Colsole
|
11
|
+
|
12
|
+
attr_reader :args, :subfolder
|
13
|
+
|
14
|
+
def initialize(args)
|
15
|
+
@args = args
|
16
|
+
@subfolder = args['SUBFOLDER']
|
17
|
+
end
|
18
|
+
|
19
|
+
def execute
|
20
|
+
prefix = subfolder ? "Subfolders" : "Rigs"
|
21
|
+
say "#{prefix} in !txtgrn!#{basedir}!txtrst!:"
|
22
|
+
dirs.each do |file|
|
23
|
+
say "- #{file}"
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def dirs
|
30
|
+
files = Dir["#{basedir}/*"]
|
31
|
+
files.select! { |f| File.directory? f }
|
32
|
+
files.map { |f| File.basename f }
|
33
|
+
end
|
34
|
+
|
35
|
+
def basedir
|
36
|
+
base = Rigit::Rig.home
|
37
|
+
subfolder ? "#{base}/#{subfolder}" : base
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/rigit/docopt.txt
CHANGED
@@ -5,6 +5,7 @@ Usage:
|
|
5
5
|
rig install RIG REPO
|
6
6
|
rig update RIG
|
7
7
|
rig info RIG
|
8
|
+
rig list [SUBFOLDER]
|
8
9
|
rig (-h|--help|--version)
|
9
10
|
|
10
11
|
Commands:
|
@@ -24,6 +25,10 @@ Commands:
|
|
24
25
|
info
|
25
26
|
Show some meta information about an installed rig.
|
26
27
|
|
28
|
+
list
|
29
|
+
Show a list of installed rigs. If a subfolder is provided, show a list
|
30
|
+
of subfolders (possibly rigs) inside it.
|
31
|
+
|
27
32
|
Parameters:
|
28
33
|
RIG
|
29
34
|
The name of the source folder (installed rig).
|
@@ -36,6 +41,9 @@ Parameters:
|
|
36
41
|
Specify any of the rig's parameters in the format 'param=value'.
|
37
42
|
For boolean parameters, use 'param=y' or 'param=n'.
|
38
43
|
|
44
|
+
SUBFOLDER
|
45
|
+
A folder inside your rigs directory.
|
46
|
+
|
39
47
|
Environment Variables:
|
40
48
|
RIG_HOME
|
41
49
|
The path where your local rigs are installed (default: ~/.rigs)
|
@@ -45,4 +53,5 @@ Examples:
|
|
45
53
|
rig install example https://github.com/DannyBen/example-rig.git
|
46
54
|
rig update example
|
47
55
|
rig info example
|
56
|
+
rig list
|
48
57
|
|
data/lib/rigit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rigit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
@@ -178,6 +178,20 @@ dependencies:
|
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
180
|
version: '0.9'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: github_changelog_generator
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '1.14'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '1.14'
|
181
195
|
description: Build project templates with ease
|
182
196
|
email: db@dannyben.com
|
183
197
|
executables:
|
@@ -192,6 +206,7 @@ files:
|
|
192
206
|
- lib/rigit/commands/build.rb
|
193
207
|
- lib/rigit/commands/info.rb
|
194
208
|
- lib/rigit/commands/install.rb
|
209
|
+
- lib/rigit/commands/list.rb
|
195
210
|
- lib/rigit/commands/update.rb
|
196
211
|
- lib/rigit/config.rb
|
197
212
|
- lib/rigit/docopt.txt
|