falkorlib 0.6.17 → 0.6.18
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/Gemfile +11 -0
- data/Gemfile.lock +11 -18
- data/bin/falkor +7 -6
- data/completion/.gitignore +1 -0
- data/completion/_falkor +203 -0
- data/falkorlib.gemspec +159 -214
- data/lib/falkorlib/bootstrap/base.rb +19 -9
- data/lib/falkorlib/bootstrap/link.rb +8 -4
- data/lib/falkorlib/cli/link.rb +47 -41
- data/lib/falkorlib/cli/new.rb +146 -141
- data/lib/falkorlib/cli.rb +14 -11
- data/lib/falkorlib/common.rb +3 -3
- data/lib/falkorlib/version.rb +1 -1
- data/templates/gems/Gemfile +3 -0
- data/templates/gems/LICENCE.md +22 -0
- data/templates/gems/README.md +192 -0
- data/templates/gems/Rakefile +39 -0
- data/templates/gems/lib/sysadmin-warrior/loader.rb +5 -0
- data/templates/gems/lib/sysadmin-warrior/version.rb +49 -0
- data/templates/gems/lib/sysadmin-warrior.rb +40 -0
- data/templates/gems/sysadmin-warrior.gemspec +200 -0
- data/templates/latex/.gitignore +1 -0
- data/templates/latex/letter/_content.md.erb +6 -3
- data/templates/latex/letter/main.tex.erb +23 -15
- metadata +19 -28
- data/completion/falkor.zsh +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d745eb3bcd94aa27c60e45fab7c691aee85d3c0
|
4
|
+
data.tar.gz: 36aa55df010f3b05816d13e9795625ebdba47d62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 971806266da376608f5c867d232274b0d00d23e6a68e762db2fc68fc0c641ca7cf55180ca50312697f4b44c7b819e41b115fb26042c8e75c8d11b22474d8fc8d
|
7
|
+
data.tar.gz: 4f56c78980b1fd8053b94c9409a9e854ff7b84403894766cb722c32d274cd9633a539b42d8716afb023d581aeb06c3b19175557c58865b6d953ea56d98a65f86
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
falkorlib (0.6.
|
4
|
+
falkorlib (0.6.18)
|
5
5
|
artii (>= 2.1)
|
6
6
|
awesome_print (~> 1.2)
|
7
7
|
configatron (~> 3.2)
|
@@ -23,14 +23,13 @@ GEM
|
|
23
23
|
CFPropertyList (2.2.8)
|
24
24
|
addressable (2.3.6)
|
25
25
|
artii (2.1.1)
|
26
|
-
awesome_print (1.
|
26
|
+
awesome_print (1.7.0)
|
27
27
|
backports (3.6.0)
|
28
28
|
codeclimate-test-reporter (0.3.0)
|
29
29
|
simplecov (>= 0.7.1, < 1.0.0)
|
30
30
|
coderay (1.1.0)
|
31
31
|
configatron (3.2.0)
|
32
32
|
deep_merge (1.0.1)
|
33
|
-
diff-lcs (1.1.3)
|
34
33
|
diffy (3.1.0)
|
35
34
|
docile (1.1.5)
|
36
35
|
ethon (0.7.0)
|
@@ -52,7 +51,7 @@ GEM
|
|
52
51
|
git_remote_branch (0.3.8)
|
53
52
|
hashr (0.0.22)
|
54
53
|
highline (1.6.21)
|
55
|
-
json (1.8.
|
54
|
+
json (1.8.3)
|
56
55
|
launchy (2.4.2)
|
57
56
|
addressable (~> 2.3)
|
58
57
|
license-generator (0.4.1)
|
@@ -71,15 +70,7 @@ GEM
|
|
71
70
|
pusher-client (0.6.0)
|
72
71
|
json
|
73
72
|
websocket (~> 1.0)
|
74
|
-
rake (10.
|
75
|
-
rspec (2.7.0)
|
76
|
-
rspec-core (~> 2.7.0)
|
77
|
-
rspec-expectations (~> 2.7.0)
|
78
|
-
rspec-mocks (~> 2.7.0)
|
79
|
-
rspec-core (2.7.1)
|
80
|
-
rspec-expectations (2.7.0)
|
81
|
-
diff-lcs (~> 1.1.2)
|
82
|
-
rspec-mocks (2.7.0)
|
73
|
+
rake (10.5.0)
|
83
74
|
rubygems-tasks (0.2.4)
|
84
75
|
safe_yaml (0.9.7)
|
85
76
|
simplecov (0.8.2)
|
@@ -88,10 +79,11 @@ GEM
|
|
88
79
|
simplecov-html (~> 0.8.0)
|
89
80
|
simplecov-html (0.8.0)
|
90
81
|
slop (3.5.0)
|
91
|
-
term-ansicolor (1.
|
82
|
+
term-ansicolor (1.4.0)
|
92
83
|
tins (~> 1.0)
|
93
84
|
thor (0.19.1)
|
94
|
-
|
85
|
+
thor-zsh_completion (0.1.1)
|
86
|
+
tins (1.12.0)
|
95
87
|
travis (1.6.14)
|
96
88
|
addressable (~> 2.3)
|
97
89
|
backports
|
@@ -115,12 +107,13 @@ PLATFORMS
|
|
115
107
|
ruby
|
116
108
|
|
117
109
|
DEPENDENCIES
|
118
|
-
bundler
|
110
|
+
bundler
|
119
111
|
codeclimate-test-reporter (~> 0)
|
120
112
|
falkorlib!
|
121
|
-
pry
|
122
|
-
|
113
|
+
pry
|
114
|
+
rake
|
123
115
|
rubygems-tasks (~> 0.2)
|
116
|
+
thor-zsh_completion
|
124
117
|
travis (~> 1.6)
|
125
118
|
travis-lint (~> 1.8)
|
126
119
|
yard (~> 0.8)
|
data/bin/falkor
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby -U
|
2
2
|
# -*- encoding: utf-8 -*-
|
3
3
|
################################################################################
|
4
|
-
# Time-stamp: <
|
4
|
+
# Time-stamp: <Fri 2016-10-14 21:37 svarrette>
|
5
5
|
#
|
6
|
-
# Copyright (c) 2015 Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
6
|
+
# Copyright (c) 2015-2016 Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
7
7
|
#
|
8
8
|
################################################################################
|
9
9
|
# Resources:
|
@@ -15,15 +15,16 @@
|
|
15
15
|
# Exit cleanly from an early interrupt
|
16
16
|
Signal.trap("INT") { exit 1 }
|
17
17
|
|
18
|
-
|
19
|
-
|
20
18
|
require "thor/error"
|
21
19
|
require 'falkorlib'
|
22
20
|
|
21
|
+
# Stdout/stderr should not buffer output
|
22
|
+
$stdout.sync = true
|
23
|
+
$stderr.sync = true
|
24
|
+
|
25
|
+
|
23
26
|
begin
|
24
27
|
FalkorLib::CLI::App.start(ARGV, :debug => true)
|
25
28
|
rescue Thor::InvocationError => e
|
26
29
|
error e.message.gsub(/^ERROR:/, '')
|
27
30
|
end
|
28
|
-
|
29
|
-
|
@@ -0,0 +1 @@
|
|
1
|
+
_falkor.autogen
|
data/completion/_falkor
ADDED
@@ -0,0 +1,203 @@
|
|
1
|
+
#compdef falkor
|
2
|
+
########################################################################################
|
3
|
+
# -*- mode:sh; -*-
|
4
|
+
# Time-stamp: <Sat 2016-10-15 22:20 svarrette>
|
5
|
+
#
|
6
|
+
# ZSH completion for [FalkorLib](https://github.com/Falkor/falkorlib)
|
7
|
+
#
|
8
|
+
# Copyright (c) 2016 Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
9
|
+
#
|
10
|
+
# This was made with the help of several zsh completion examples:
|
11
|
+
# - the [kameleon gem](https://github.com/oar-team/kameleon),
|
12
|
+
# - the _bundle, _vagrant, _packer and _yum completion file
|
13
|
+
# and these howto:
|
14
|
+
# - https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
|
15
|
+
# - http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Completion-Functions
|
16
|
+
# - https://zv.github.io/note/a-review-of-zsh-completion-utilities
|
17
|
+
########################################################################################
|
18
|
+
# You can inspired from the (unfortunately buggy) automatic generation of the ZSH
|
19
|
+
# completion file (see https://github.com/labocho/thor-zsh_completion) using:
|
20
|
+
# bundle exec falkor zsh-completion > completion/_falkor.autogen
|
21
|
+
|
22
|
+
typeset -A opt_args
|
23
|
+
|
24
|
+
# local _falkor_common_opts
|
25
|
+
# _falkor_common_opts=(
|
26
|
+
# '(- *)'{--version,-V}'[display version info]'
|
27
|
+
# '(- *)'{-h,-help,--h,--help}'[display help information]'
|
28
|
+
# '(- *)'{-n,--dry_run}'[Perform a trial run with (normally) no changes made]'
|
29
|
+
# )
|
30
|
+
|
31
|
+
# Main dispatcher
|
32
|
+
_falkor()
|
33
|
+
{
|
34
|
+
local -a _falkor_cmds
|
35
|
+
_falkor_cmds=(
|
36
|
+
'config:Print the current configuration of FalkorLib'
|
37
|
+
'help:Describe available commands or one specific command'
|
38
|
+
'link:link:Initialize a special symlink (.root, .makefile.d etc.)'
|
39
|
+
'new:Initialize the directory PATH with one of Falkors template(s)'
|
40
|
+
'version:Prints the FalkorLib version information'
|
41
|
+
)
|
42
|
+
|
43
|
+
local curcontext="$curcontext" state line ret=1
|
44
|
+
typeset -A opt_args
|
45
|
+
|
46
|
+
_arguments -C \
|
47
|
+
'(- *)'{--version,-V}'[display version info]' \
|
48
|
+
'(- *)'{-h,-help,--h,--help}'[display help information]' \
|
49
|
+
'(- *)'{-n,--dry_run}'[Perform a trial run with (normally) no changes made]' \
|
50
|
+
': :->command' \
|
51
|
+
'*:: :->options' && ret=0
|
52
|
+
|
53
|
+
case $state in
|
54
|
+
(command)
|
55
|
+
_describe -t commands 'falkor' _falkor_cmds && ret=0
|
56
|
+
;;
|
57
|
+
(options)
|
58
|
+
curcontext=${curcontext%:*}-$line[1]:
|
59
|
+
case $line[1] in
|
60
|
+
(help)
|
61
|
+
_arguments \
|
62
|
+
":Falkor commands:($(falkor commands))" && ret=0
|
63
|
+
;;
|
64
|
+
(config)
|
65
|
+
__falkor_config && ret=0 ;;
|
66
|
+
(new)
|
67
|
+
__falkor_new && ret=0 ;;
|
68
|
+
(link)
|
69
|
+
__falkor_link && ret=0 ;;
|
70
|
+
(version|*)
|
71
|
+
_nothing
|
72
|
+
;;
|
73
|
+
esac
|
74
|
+
;;
|
75
|
+
esac
|
76
|
+
return ret
|
77
|
+
}
|
78
|
+
|
79
|
+
###############
|
80
|
+
__falkor_new()
|
81
|
+
{
|
82
|
+
local -a _falkor_new_cmds
|
83
|
+
_falkor_new_cmds=(
|
84
|
+
'repo:Bootstrap a Git Repository with my favorite git-flow layout'
|
85
|
+
'letter:LaTeX-based letter'
|
86
|
+
'slides:Bootstrap LaTeX Beamer slides'
|
87
|
+
'trash:Add a Trash directory for your LaTeX project'
|
88
|
+
'rvm:Initialize RVM'
|
89
|
+
'versionfile:initiate a VERSION file'
|
90
|
+
'motd:Initiate a ''motd'' file - message of the day'
|
91
|
+
'readme:Initiate a README file in the PATH directory (''./'' by default)'
|
92
|
+
'help:Describe subcommands or one specific subcommand'
|
93
|
+
)
|
94
|
+
|
95
|
+
local curcontext="$curcontext" state line
|
96
|
+
typeset -A opt_args
|
97
|
+
_arguments -C \
|
98
|
+
':command:->command' \
|
99
|
+
'*::options:->options'
|
100
|
+
|
101
|
+
case $state in
|
102
|
+
(command)
|
103
|
+
_describe -t commands "falkor new subcommand" _falkor_new_cmds
|
104
|
+
return
|
105
|
+
;;
|
106
|
+
(options)
|
107
|
+
case $line[1] in
|
108
|
+
(help)
|
109
|
+
_arguments \
|
110
|
+
":Falkor new commands:($(falkor new commands))" && ret=0
|
111
|
+
;;
|
112
|
+
(letter)
|
113
|
+
_arguments -C \
|
114
|
+
'(-n --name)'{-n,--name}'[Name of the LaTeX project]' \
|
115
|
+
'(-d --dir)'{-d,--dir=}':Project directory (relative to the git root directory):_directories' && ret=0
|
116
|
+
;;
|
117
|
+
(repo)
|
118
|
+
_arguments -C \
|
119
|
+
'(--no-git-flow)--git-flow[Bootstrap the repository with Git-flow]' \
|
120
|
+
'--make[Use a Makefile to pilot the repository actions]' \
|
121
|
+
'--rake[Use a Rakefile (and FalkorLib) to pilot the repository actions]' \
|
122
|
+
'(-i --interactive)'{-i,--interactive}'[Interactive mode, in particular to confirm Gitflow branch names]' \
|
123
|
+
'(-r --remote-sync)'{-r,--remote-sync}'[Operate a git remote synchronization with remote. By default, all commits stay local]' \
|
124
|
+
'--master[Master Branch name for production releases]' \
|
125
|
+
'(-b --branch --devel --develop)'{-b,--branch,--devel,--develop}'[Branch name for development commits]' \
|
126
|
+
'(-l --latex)'{-l,--latex}'[Initiate a LaTeX project]' \
|
127
|
+
'--rvm[Initiate a RVM-based Ruby project]' \
|
128
|
+
'--ruby[Ruby version to configure for RVM]' \
|
129
|
+
'*: :->path' && ret=0
|
130
|
+
case "$state" in
|
131
|
+
(path)
|
132
|
+
_directories ;;
|
133
|
+
esac
|
134
|
+
;;
|
135
|
+
esac
|
136
|
+
;;
|
137
|
+
esac
|
138
|
+
return ret
|
139
|
+
}
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
###############
|
144
|
+
__falkor_link()
|
145
|
+
{
|
146
|
+
local -a _falkor_link_cmds
|
147
|
+
_falkor_link_cmds=(
|
148
|
+
'rootdir:Create a symlink ''.root'' which targets the root of the repository'
|
149
|
+
'make:Create a symlink to one of Falkor''s Makefile, set as Git submodule'
|
150
|
+
'help:Describe subcommands or one specific subcommand'
|
151
|
+
)
|
152
|
+
|
153
|
+
local curcontext="$curcontext" state line
|
154
|
+
typeset -A opt_args
|
155
|
+
_arguments -C \
|
156
|
+
':command:->command' \
|
157
|
+
'*::options:->options'
|
158
|
+
|
159
|
+
case $state in
|
160
|
+
(command)
|
161
|
+
_describe -t commands "falkor link subcommand" _falkor_link_cmds
|
162
|
+
return
|
163
|
+
;;
|
164
|
+
(options)
|
165
|
+
case $line[1] in
|
166
|
+
(help)
|
167
|
+
_arguments \
|
168
|
+
":Falkor link commands:($(falkor link commands))" && ret=0
|
169
|
+
;;
|
170
|
+
(make)
|
171
|
+
_arguments -C \
|
172
|
+
{--latex,-l}'[Makefile to compile LaTeX documents]' \
|
173
|
+
{--gnuplot,--plot,-p}'[Makefile to compile GnuPlot scripts]' \
|
174
|
+
{--generic,-g}'[Generic Makefile for sub directory]' \
|
175
|
+
{--markdown,-m}'[Makefile to convert Markdown files to HTML]' \
|
176
|
+
{--images,-i,--img}'[Makefile to optimize images]' \
|
177
|
+
{--refdir,-d}'[Path to Falkor''s Makefile repository (Relative to Git root dir)]' \
|
178
|
+
{--src,-s}'[Path to Falkor''s Makefile for latex_src]' && ret=0
|
179
|
+
;;
|
180
|
+
(rootdir|root)
|
181
|
+
_arguments -C \
|
182
|
+
{--name,--target,-t,-n}'[Name of the symlink]' && ret=0
|
183
|
+
esac
|
184
|
+
;;
|
185
|
+
esac
|
186
|
+
return ret
|
187
|
+
}
|
188
|
+
|
189
|
+
##################
|
190
|
+
__falkor_config() {
|
191
|
+
local curcontext=$curcontext state line ret=1
|
192
|
+
declare -A opt_args
|
193
|
+
|
194
|
+
_arguments -C \
|
195
|
+
'(- *)'{--version,-V}'[display version info]' \
|
196
|
+
'(- *)'{-h,-help,--h,--help}'[display help information]' \
|
197
|
+
'(- *)'{-n,--dry_run}'[Perform a trial run with (normally) no changes made]' \
|
198
|
+
'(- *)'{-g,--global}'Operate on the global configuration' \
|
199
|
+
'(- *)'{-l,--local}'Operate on the local configuration of the repository'
|
200
|
+
}
|
201
|
+
|
202
|
+
|
203
|
+
_falkor "$@"
|