falkorlib 0.7.0 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/completion/_falkor +17 -3
- data/lib/falkorlib/bootstrap/base.rb +51 -3
- data/lib/falkorlib/bootstrap/latex.rb +1 -1
- data/lib/falkorlib/bootstrap/mkdocs.rb +50 -0
- data/lib/falkorlib/bootstrap.rb +2 -1
- data/lib/falkorlib/cli.rb +11 -1
- data/lib/falkorlib/git/flow.rb +21 -1
- data/lib/falkorlib/version.rb +1 -1
- data/templates/mkdocs/docs/README.md.erb +24 -0
- data/templates/mkdocs/docs/contributing/README.md.erb +18 -0
- data/templates/mkdocs/docs/contributing/setup.md.erb +26 -0
- data/templates/mkdocs/docs/contributing/versioning.md.erb +30 -0
- data/templates/mkdocs/docs/layout.md.erb +17 -0
- data/templates/mkdocs/docs/setup/README.md.erb +6 -0
- data/templates/mkdocs/docs/setup/install.md.erb +50 -0
- data/templates/mkdocs/docs/setup/preliminaries.md.erb +71 -0
- data/templates/mkdocs/mkdocs.yml.erb +13 -0
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c3236e419d1298b136ca095a3281e55bbd95c24
|
4
|
+
data.tar.gz: 738b0c020f67cb4fe942c0d8f0b20152e08093d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ee4c52e5143aa60d36db2485f648232c7fce15103143f8b24fd375257ad177457677df4a8aea5497f6d9fab325cd98afe0ad24812ca46ee510f6205b6f7127c
|
7
|
+
data.tar.gz: 425cb5392539fef2b19386b2c59436495731719d879f1643e9cc1c940e12dc987597a2a75d2f70957613d2ea7051830bef2fb4ecfd36f6cbe803b418368c0f8c
|
data/Gemfile.lock
CHANGED
data/completion/_falkor
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#compdef falkor
|
2
2
|
########################################################################################
|
3
3
|
# -*- mode:sh; -*-
|
4
|
-
# Time-stamp: <
|
4
|
+
# Time-stamp: <Sun 2017-01-15 23:15 svarrette>
|
5
5
|
#
|
6
6
|
# ZSH completion for [FalkorLib](https://github.com/Falkor/falkorlib)
|
7
7
|
#
|
@@ -43,6 +43,7 @@ _falkor()
|
|
43
43
|
'init:Bootstrap a Git Repository the falkor way'
|
44
44
|
'link:Initialize a special symlink (.root, .makefile.d etc.)'
|
45
45
|
'motd:bootstrap a Message of the Day (motd) file'
|
46
|
+
'mkdocs:Initialize mkdocs for the current project'
|
46
47
|
'new:Initialize the directory PATH with one of Falkors template(s)'
|
47
48
|
'version:Prints the FalkorLib version information'
|
48
49
|
)
|
@@ -71,11 +72,13 @@ _falkor()
|
|
71
72
|
(config)
|
72
73
|
__falkor_config && ret=0 ;;
|
73
74
|
(init)
|
74
|
-
__falkor_init
|
75
|
+
__falkor_init && ret=0 ;;
|
75
76
|
(link)
|
76
77
|
__falkor_link && ret=0 ;;
|
78
|
+
(mkdocs)
|
79
|
+
__falkor_mkdocs && ret=0 ;;
|
77
80
|
(motd)
|
78
|
-
__falkor_motd
|
81
|
+
__falkor_motd && ret=0 ;;
|
79
82
|
(new)
|
80
83
|
__falkor_new && ret=0 ;;
|
81
84
|
(version|*)
|
@@ -228,6 +231,17 @@ __falkor_init() {
|
|
228
231
|
}
|
229
232
|
|
230
233
|
|
234
|
+
##################
|
235
|
+
__falkor_mkdocs() {
|
236
|
+
local curcontext=$curcontext state line ret=1
|
237
|
+
declare -A opt_args
|
238
|
+
|
239
|
+
_arguments -C \
|
240
|
+
{--force,-f}'[Force generation]'
|
241
|
+
'*:directory:_files -/'
|
242
|
+
}
|
243
|
+
|
244
|
+
|
231
245
|
##################
|
232
246
|
__falkor_motd() {
|
233
247
|
local curcontext=$curcontext state line ret=1
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Sun 2017-01-15 22:52 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the main Bootstrapping operations
|
6
6
|
#
|
@@ -177,7 +177,7 @@ module FalkorLib
|
|
177
177
|
puts " ... not overwriting the #{file} file which already exists"
|
178
178
|
else
|
179
179
|
FalkorLib::Versioning.set_version(version, path, :type => 'file',
|
180
|
-
|
180
|
+
:source => { :filename => file })
|
181
181
|
Dir.chdir( path ) do
|
182
182
|
run %( git tag #{options[:tag]} ) if options[:tag]
|
183
183
|
end
|
@@ -298,7 +298,7 @@ module FalkorLib
|
|
298
298
|
#next unless [ :name, :summary, :description ].include?(k.to_sym)
|
299
299
|
default_answer = case k
|
300
300
|
when :author
|
301
|
-
(config[:by] == 'ULHPC') ? 'UL HPC
|
301
|
+
(config[:by] == 'ULHPC') ? 'UL HPC Team' : config[:author]
|
302
302
|
when :mail
|
303
303
|
(config[:by] == 'ULHPC') ? 'hpc-sysadmins@uni.lu' : config[:mail]
|
304
304
|
when :description
|
@@ -383,6 +383,54 @@ module FalkorLib
|
|
383
383
|
#licence
|
384
384
|
end # select_licence
|
385
385
|
|
386
|
+
###### guess_project_config ######
|
387
|
+
# Guess the project configuration
|
388
|
+
##
|
389
|
+
def guess_project_config(dir = Dir.pwd, options = {})
|
390
|
+
path = normalized_path(dir)
|
391
|
+
use_git = FalkorLib::Git.init?(path)
|
392
|
+
rootdir = (use_git) ? FalkorLib::Git.rootdir(path) : path
|
393
|
+
local_config = FalkorLib::Config.get(rootdir, :local)
|
394
|
+
return local_config[:project] if local_config[:project]
|
395
|
+
# Otherwise, guess the rest of the configuration
|
396
|
+
config = FalkorLib::Config::Bootstrap::DEFAULTS[:metadata].clone
|
397
|
+
# Apply options (if provided)
|
398
|
+
[ :name, :forge ].each do |k|
|
399
|
+
config[k.to_sym] = options[k.to_sym] if options[k.to_sym]
|
400
|
+
end
|
401
|
+
config[:name] = ask("\tProject name: ", get_project_name(dir)) if config[:name].empty?
|
402
|
+
if (use_git)
|
403
|
+
config[:origin] = FalkorLib::Git.config('remote.origin.url')
|
404
|
+
if config[:origin] =~ /((gforge|gitlab|github)[\.\w_-]+)[:\d\/]+(\w*)/
|
405
|
+
config[:forge] = Regexp.last_match(2).to_sym
|
406
|
+
config[:by] = Regexp.last_match(3)
|
407
|
+
elsif config[:forge].empty?
|
408
|
+
config[:forge] = select_forge(config[:forge]).to_sym
|
409
|
+
end
|
410
|
+
end
|
411
|
+
forges = FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ]
|
412
|
+
default_source = case config[:forge]
|
413
|
+
when :gforge
|
414
|
+
'https://' + forges[:url] + "/projects/" + config[:name].downcase
|
415
|
+
when :github, :gitlab
|
416
|
+
'https://' + forges[:url] + "/" + config[:by] + "/" + config[:name].downcase
|
417
|
+
else
|
418
|
+
""
|
419
|
+
end
|
420
|
+
config[:source] = config[:project_page] = default_source
|
421
|
+
config[:issues_url] = "#{config[:project_page]}/issues"
|
422
|
+
config[:license] = select_licence if config[:license].empty?
|
423
|
+
[ :summary ].each do |k|
|
424
|
+
config[k.to_sym] = ask( "\t" + Kernel.format("Project %-20s", k.to_s))
|
425
|
+
end
|
426
|
+
config[:description] = config[:summary]
|
427
|
+
config[:gitflow] = FalkorLib::GitFlow.guess_gitflow_config(rootdir)
|
428
|
+
config[:make] = File.exists?(File.join(rootdir, 'Makefile'))
|
429
|
+
config[:rake] = File.exists?(File.join(rootdir, 'Rakefile'))
|
430
|
+
config
|
431
|
+
end # guess_project_config
|
432
|
+
|
433
|
+
|
386
434
|
###### get_badge ######
|
387
435
|
# Return a Markdown-formatted string for a badge to display, typically in a README.
|
388
436
|
# Based on http://shields.io/
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Sun 2017-01-15 22:57 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the main Bootstrapping operations
|
6
6
|
#
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
################################################################################
|
3
|
+
# Time-stamp: <Sun 2017-01-15 23:22 svarrette>
|
4
|
+
################################################################################
|
5
|
+
# Interface for the main Bootstrapping operations
|
6
|
+
#
|
7
|
+
|
8
|
+
require "falkorlib"
|
9
|
+
require "falkorlib/common"
|
10
|
+
require "falkorlib/bootstrap"
|
11
|
+
|
12
|
+
require 'erb' # required for module generation
|
13
|
+
require 'artii'
|
14
|
+
require 'facter'
|
15
|
+
|
16
|
+
include FalkorLib::Common
|
17
|
+
|
18
|
+
module FalkorLib
|
19
|
+
module Bootstrap #:nodoc:
|
20
|
+
|
21
|
+
module_function
|
22
|
+
|
23
|
+
###### mkdocs ######
|
24
|
+
# Initialize MkDocs in the current directory
|
25
|
+
# Supported options:
|
26
|
+
# * :force [boolean] force overwritting
|
27
|
+
##
|
28
|
+
def mkdocs(dir = Dir.pwd, options = {})
|
29
|
+
info "Initialize MkDocs (see http://www.mkdocs.org/)"
|
30
|
+
path = normalized_path(dir)
|
31
|
+
use_git = FalkorLib::Git.init?(path)
|
32
|
+
rootdir = (use_git) ? FalkorLib::Git.rootdir(path) : path
|
33
|
+
templatedir = File.join( FalkorLib.templates, 'mkdocs')
|
34
|
+
config = guess_project_config(rootdir, options)
|
35
|
+
config[:sitename] = ask("\tSite name: ", config[:name].capitalize)
|
36
|
+
puts config.to_yaml
|
37
|
+
#FalkorLib::GitFlow.start('feature', 'mkdocs', rootdir) if (use_git && FalkorLib::GitFlow.init?(rootdir))
|
38
|
+
init_from_template(templatedir, rootdir, config,
|
39
|
+
:no_interaction => true,
|
40
|
+
:no_commit => true)
|
41
|
+
Dir.chdir( File.join(rootdir, 'docs')) do
|
42
|
+
run %(ln -s README.md index.md )
|
43
|
+
run %(ln -s README.md contributing/index.md )
|
44
|
+
run %(ln -s README.md setup/index.md )
|
45
|
+
end
|
46
|
+
#exit_status.to_i
|
47
|
+
end # mkdocs
|
48
|
+
|
49
|
+
end # module Bootstrap
|
50
|
+
end # module FalkorLib
|
data/lib/falkorlib/bootstrap.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Sun 2017-01-15 16:25 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Management of Bootstrapping operations
|
6
6
|
|
@@ -15,5 +15,6 @@ require "falkorlib/bootstrap/link"
|
|
15
15
|
require "falkorlib/bootstrap/ruby"
|
16
16
|
require "falkorlib/bootstrap/git"
|
17
17
|
require "falkorlib/bootstrap/latex"
|
18
|
+
require "falkorlib/bootstrap/mkdocs"
|
18
19
|
|
19
20
|
#require "falkorlib/bootstrap/repo"
|
data/lib/falkorlib/cli.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Sun 2017-01-15 23:13 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the CLI
|
6
6
|
#
|
@@ -110,6 +110,16 @@ By default, <PATH> is '.' meaning that the repository will be initialized in the
|
|
110
110
|
desc "link <TYPE> [<path>]", "Initialize a special symlink in <path> (the current directory by default)"
|
111
111
|
subcommand "link", FalkorLib::CLI::Link
|
112
112
|
|
113
|
+
###### mkdocs ######
|
114
|
+
method_option :force, :aliases => '-f', :default => false, :type => :boolean,
|
115
|
+
:desc => "Force generation (might overwrite files)"
|
116
|
+
#......................................
|
117
|
+
desc "mkdocs [options]", "Initialize mkdocs for the current project"
|
118
|
+
def mkdocs(path = '.')
|
119
|
+
FalkorLib::Bootstrap.mkdocs(path, options)
|
120
|
+
end # mkdocs
|
121
|
+
|
122
|
+
|
113
123
|
|
114
124
|
###### motd ######
|
115
125
|
method_option :file, :aliases => '-f', :default => '/etc/motd',
|
data/lib/falkorlib/git/flow.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Sun 2017-01-15 22:54 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Management of Git Flow operations
|
6
6
|
|
@@ -185,6 +185,26 @@ module FalkorLib
|
|
185
185
|
#confs[type.to_sym]
|
186
186
|
end # master_branch
|
187
187
|
|
188
|
+
###### guess_gitflow_config ######
|
189
|
+
# Guess the gitflow configuration
|
190
|
+
##
|
191
|
+
def guess_gitflow_config(dir = Dir.pwd, options = {})
|
192
|
+
path = normalized_path(dir)
|
193
|
+
use_git = FalkorLib::Git.init?(path)
|
194
|
+
return {} if (!use_git or !FalkorLib::GitFlow.init?(path))
|
195
|
+
rootdir = FalkorLib::Git.rootdir(path)
|
196
|
+
local_config = FalkorLib::Config.get(rootdir, :local)
|
197
|
+
return local_config[:gitflow] if local_config[:gitflow]
|
198
|
+
config = FalkorLib::Config::GitFlow::DEFAULTS.clone
|
199
|
+
[ :master, :develop ].each do |br|
|
200
|
+
config[:branches][br.to_sym] = FalkorLib::Git.config("gitflow.branch.#{br}", rootdir)
|
201
|
+
end
|
202
|
+
[ :feature, :release, :hotfix, :support, :versiontag ].each do |p|
|
203
|
+
config[:prefix][p.to_sym] = FalkorLib::Git.config("gitflow.prefix.#{p}", rootdir)
|
204
|
+
end
|
205
|
+
config
|
206
|
+
end # guess_gitflow_config
|
207
|
+
|
188
208
|
|
189
209
|
end # module FalkorLib::GitFlow
|
190
210
|
|
data/lib/falkorlib/version.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
-*- mode: markdown; mode: visual-line; fill-column: 80 -*-
|
2
|
+
|
3
|
+
<% unless (config[:license].empty? or config[:license] == "none") %>
|
4
|
+
[![Licence](<%= FalkorLib::Bootstrap::get_badge("license", config[:license], 'blue') %>)](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:licenses][ config[:license] ][:url] %>)
|
5
|
+
<% end %>
|
6
|
+
![By <%= config[:by] %>](https://img.shields.io/badge/by-<%= config[:by] %>-blue.svg) [![<%= config[:forge] %>](https://img.shields.io/badge/git-<%= config[:forge] %>-lightgray.svg)](<%= config[:source] %>) [![Issues](https://img.shields.io/badge/issues-<%= config[:forge] %>-green.svg)](<%= config[:issues_url] %>)
|
7
|
+
|
8
|
+
Time-stamp: <Sun 2017-01-15 16:58 svarrette>
|
9
|
+
|
10
|
+
<%= ::Artii::Base.new().asciify( config[:name] ).split("\n").join("\n ") %>
|
11
|
+
Copyright (c) <%= Time.now.year %> <%= config[:author] %> <<%= config[:mail] %>>
|
12
|
+
|
13
|
+
<%= config[:description] %>
|
14
|
+
|
15
|
+
|
16
|
+
This is the main page of the documentation for this repository, which relies on [MkDocs](http://www.mkdocs.org/) and the [Read the Docs](http://readthedocs.io) theme. It proposes to detail the following elements:
|
17
|
+
|
18
|
+
* The [organization and directory layout](layout.md)
|
19
|
+
* Complete [Installation](setup/index.md) notes, including:
|
20
|
+
- [Pre-requisites / Preliminary software](setup/preliminaries.md) to install
|
21
|
+
* How to [contribute](contributing/index.md) to the development of this project. In particular, we detail:
|
22
|
+
- the steps to follow to [setup this repository](contributing/setup.md)
|
23
|
+
- information as regard the [semantic versioning](contributing/versioning.md) of this project
|
24
|
+
- Apart form the directory layout, we will cover various configuration aspects (mainly the [git-flow](https://github.com/nvie/gitflow) workflow)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% unless (config[:license].empty? or config[:license] == "none") %>
|
2
|
+
This project is released under the terms of the [<%= config[:license] %>](LICENSE) licence.
|
3
|
+
|
4
|
+
[![Licence](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:licenses][ config[:license] ][:logo] %>)](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:licenses][ config[:license] ][:url] %>)
|
5
|
+
<% end %>
|
6
|
+
You are more than welcome to contribute to the development of this project as follows (assuming you belong to the project on <%= config[:forge].capitalize %>):
|
7
|
+
|
8
|
+
1. Create your own feature branch, eventually prefixed with your login on <%= config[:forge].capitalize %>:
|
9
|
+
|
10
|
+
$> git checkout -b mylogin/my-new-feature # ADAPT mylogin accordingly
|
11
|
+
|
12
|
+
2. Commit your changes (`git commit -am 'Added some feature'`)
|
13
|
+
3. Push to the branch (`git push origin mylogin/my-new-feature`)
|
14
|
+
4. Create a new [Merge Request](https://gitlab.uni.lu/help/user/project/merge_requests.md) to submit your changes to me.
|
15
|
+
|
16
|
+
This assumes that you have understood the [directory tree structure](../layout.md) of this repository.
|
17
|
+
|
18
|
+
Finally, you shall be aware of the way the [semantic versioning](versioning.md) procedure of this project is handled.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
There is a number of pre-requisite programs / framework you shall install to be able to correctly contribute to this project.
|
2
|
+
|
3
|
+
<% if config[:gitflow] %>
|
4
|
+
__Git Branching Model__
|
5
|
+
|
6
|
+
The Git branching model for this repository follows the guidelines of
|
7
|
+
[gitflow](http://nvie.com/posts/a-successful-git-branching-model/) (see also [this description](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow)).
|
8
|
+
In particular, the central repository holds two main branches with an infinite lifetime:
|
9
|
+
|
10
|
+
* `<%= config[:gitflow][:branches][:master] %>`: the *production-ready* branch
|
11
|
+
* `<%= config[:gitflow][:branches][:develop] %>`: the main branch where the latest developments interviene. This is the *default* branch you get when you clone the repository.
|
12
|
+
|
13
|
+
Thus you are more than encouraged to install the [git-flow](https://github.com/nvie/gitflow) extensions following the [installation procedures](https://github.com/nvie/gitflow/wiki/Installation) to take full advantage of the proposed operations. The associated [bash completion](https://github.com/bobthecow/git-flow-completion) might interest you also.
|
14
|
+
<% end %>
|
15
|
+
|
16
|
+
__Repository Setup__
|
17
|
+
|
18
|
+
As mentioned in the [installation notes](../setup/install.md), to make your local copy of the repository ready to use the [git-flow](https://github.com/nvie/gitflow) workflow
|
19
|
+
|
20
|
+
<% if config[:make] %>
|
21
|
+
$> make setup
|
22
|
+
<% else %>
|
23
|
+
$> rake setup
|
24
|
+
<% end %>
|
25
|
+
|
26
|
+
This will also initiate the [Git submodules of this repository](.gitmodules) for this repository.
|
@@ -0,0 +1,30 @@
|
|
1
|
+
The operation consisting of releasing a new version of this repository is automated by a set of tasks within the root `<%= options[:rake] ? 'R' : 'M' %>akefile`.
|
2
|
+
In this context, a version number have the following format:
|
3
|
+
|
4
|
+
<major>.<minor>.<patch>[-b<build>]
|
5
|
+
|
6
|
+
where:
|
7
|
+
|
8
|
+
* `< major >` corresponds to the major version number
|
9
|
+
* `< minor >` corresponds to the minor version number
|
10
|
+
* `< patch >` corresponds to the patching version number
|
11
|
+
* (eventually) `< build >` states the build number _i.e._ the total number of commits within the `<%= FalkorLib::GitFlow.branches(:develop) %>` branch.
|
12
|
+
|
13
|
+
Example: \`1.0.0-b28\`
|
14
|
+
|
15
|
+
The current version number is stored in the root file `VERSION`. __/!\ NEVER MAKE ANY MANUAL CHANGES TO THIS FILE__
|
16
|
+
|
17
|
+
For more information on the version, run:
|
18
|
+
|
19
|
+
$> <%= options[:make] ? 'make versioninfo' : 'rake version:info' %>
|
20
|
+
|
21
|
+
If a new version number such be bumped, you simply have to run:
|
22
|
+
|
23
|
+
$> <%= options[:make] ? 'make start_bump_{major,minor,patch}' : 'rake version:bump:{major,minor,patch}' %>
|
24
|
+
|
25
|
+
This will start the release process for you using `git-flow`.
|
26
|
+
Once you have finished to commit your last changes, make the release effective by running:
|
27
|
+
|
28
|
+
$> <%= options[:make] ? 'make release' : 'rake version:release' %>
|
29
|
+
|
30
|
+
It will finish the release using `git-flow`, create the appropriate tag in the `<%= FalkorLib::GitFlow.branches(:master) %>` branch and merge all things the way they should be.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
|
2
|
+
This repository is organized as follows:
|
3
|
+
|
4
|
+
~~~bash
|
5
|
+
.
|
6
|
+
├── LICENSE.txt # Licence of this project
|
7
|
+
<% unless options[:rake] %>
|
8
|
+
├── Rakefile # Ruby Rake configuration
|
9
|
+
<% else %>
|
10
|
+
├── Makefile # GNU Make configuration
|
11
|
+
<% end %>
|
12
|
+
├── README.md # Project README
|
13
|
+
├── VERSION # /!\ DO NOT EDIT. Current repository version
|
14
|
+
├── docs/ # [MkDocs](mkdocs.org) main directory
|
15
|
+
├── mkdocs.yml # [MkDocs](mkdocs.org) configuration
|
16
|
+
└── src/ # Source Code
|
17
|
+
~~~
|
@@ -0,0 +1,6 @@
|
|
1
|
+
|
2
|
+
This directory holds the documentation to properly setup the <%= config[:name] %> project on your machine.
|
3
|
+
In particular, check the following resources:
|
4
|
+
|
5
|
+
* [Pre-requisites / Preliminary software](preliminaries.md) to install
|
6
|
+
* How to [Clone and Setup](install.md) your local copy of this repository
|
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
This repository is hosted on [<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:name] %>](<%= config[:project_page] %>).
|
3
|
+
|
4
|
+
<% if (config[:forge] == :gitlab) %>
|
5
|
+
* Git interactions with this repository (push, pull etc.) are performed over SSH using the port 8022
|
6
|
+
<% end %>
|
7
|
+
* To clone this repository, proceed as follows (adapt accordingly):
|
8
|
+
|
9
|
+
$> mkdir -p ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
|
10
|
+
$> cd ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
|
11
|
+
$> git clone <%= config[:origin] %>
|
12
|
+
|
13
|
+
<% if config[:type].include?( :rvm ) %>
|
14
|
+
Now ensure [RVM](https://rvm.io/) is correctly configured for this repository:
|
15
|
+
|
16
|
+
$> rvm current
|
17
|
+
|
18
|
+
Configure the dependencies detailed in the [`Gemfile`](Gemfile) through the [Bundler](http://bundler.io/):
|
19
|
+
|
20
|
+
$> gem install bundler
|
21
|
+
$> bundle install
|
22
|
+
$> rake -T # should work ;)
|
23
|
+
<% end %>
|
24
|
+
|
25
|
+
**`/!\ IMPORTANT`**: Once cloned, initiate your local copy of the repository by running:
|
26
|
+
|
27
|
+
$> cd <%= name.downcase %>
|
28
|
+
<% if options[:make] %>
|
29
|
+
$> make setup
|
30
|
+
<% else %>
|
31
|
+
$> rake setup
|
32
|
+
<% end %>
|
33
|
+
|
34
|
+
This will initiate the [Git submodules of this repository](.gitmodules) and setup the [git flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) layout for this repository.
|
35
|
+
|
36
|
+
Later on, you can upgrade the [Git submodules](.gitmodules) to the latest version by running:
|
37
|
+
|
38
|
+
<% if options[:make] %>
|
39
|
+
$> make upgrade
|
40
|
+
<% else %>
|
41
|
+
$> rake git:submodules:upgrade
|
42
|
+
<% end %>
|
43
|
+
|
44
|
+
If upon pulling the repository, you end in a state where another collaborator have upgraded the Git submodules for this repository, you'll end in a dirty state (as reported by modifications within the `.submodules/` directory). In that case, just after the pull, you **have to run** the following to ensure consistency with regards the Git submodules:
|
45
|
+
|
46
|
+
<% if options[:make] %>
|
47
|
+
$> make update
|
48
|
+
<% else %>
|
49
|
+
$> rake git:submodules:update
|
50
|
+
<% end %>
|
@@ -0,0 +1,71 @@
|
|
1
|
+
|
2
|
+
This projects relies on several components you need to have installed on your system.
|
3
|
+
|
4
|
+
* [Git](https://git-scm.com/)
|
5
|
+
|
6
|
+
The below instructions will help you to install these components, depending on your running platform.
|
7
|
+
|
8
|
+
_Note_: in the following instructions, terminal commands are prefixed by a virtual prompt `$>`which obviously **does not** belong to the command.
|
9
|
+
|
10
|
+
## Pre-requisites
|
11
|
+
|
12
|
+
* Install the following software, depending on your running platform:
|
13
|
+
|
14
|
+
| Platform | Software | Description | Usage |
|
15
|
+
|----------|-------------------------------------------------------|---------------------------------------|-------------------------|
|
16
|
+
| Mac OS | [Homebrew](http://brew.sh/) | The missing package manager for macOS | `brew install ...` |
|
17
|
+
| Mac OS | [Brew Cask Plugin](https://caskroom.github.io) | Mac OS Apps install made easy | `brew cask install ...` |
|
18
|
+
| Mac OS | [iTerm2](https://www.iterm2.com/) | _(optional)_ enhanced Terminal | |
|
19
|
+
| Windows | [Git for Windows](https://git-for-windows.github.io/) | I'm sure you guessed | |
|
20
|
+
| Windows | [SourceTree](https://www.sourcetreeapp.com/) | _(optional)_ enhanced git GUI | |
|
21
|
+
| Windows | [Virtual Box](https://www.virtualbox.org/) | Free hypervisor provider for Vagrant | |
|
22
|
+
| Windows | [Vagrant](https://www.vagrantup.com/downloads.html) | Reproducible environments made easy. | |
|
23
|
+
|
24
|
+
|
25
|
+
* Follow the below custom instructions depending on your running platform
|
26
|
+
|
27
|
+
### Mac OS X
|
28
|
+
|
29
|
+
Now that you have [Homebrew](http://brew.sh/) installed:
|
30
|
+
|
31
|
+
~~~bash
|
32
|
+
$> brew install git-core git-flow # (newer) Git stuff
|
33
|
+
~~~
|
34
|
+
|
35
|
+
### Linux (Debian / Ubuntu)
|
36
|
+
|
37
|
+
~~~bash
|
38
|
+
$> sudo apt-get update
|
39
|
+
$> sudo apt-get install git build-essential
|
40
|
+
~~~
|
41
|
+
|
42
|
+
Adapt the package names (and package manager) in case you are using another Linux distribution.
|
43
|
+
|
44
|
+
|
45
|
+
### Windows
|
46
|
+
|
47
|
+
Follow the instructions provided on this [tutorial](http://rr-tutorials.readthedocs.io/en/latest/setup/#windows).
|
48
|
+
In particular, it may be a good idea to rely on [Vagrant](https://www.vagrantup.com/) to run a Linux box.
|
49
|
+
|
50
|
+
|
51
|
+
## Post-Installations checks
|
52
|
+
|
53
|
+
(Eventually) Make yourself known to Git
|
54
|
+
|
55
|
+
~~~bash
|
56
|
+
$> git config –-global user.name "Firstname LastName" # Adapt accordingly
|
57
|
+
$> git config –-global user.email "Firstname.LastName@domain.org" # Adapt with your mail
|
58
|
+
~~~
|
59
|
+
|
60
|
+
Clone the [project repository](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:name] %><%=config[:project_page] %> from a Terminal (Powershell as `administrator` under windows):
|
61
|
+
|
62
|
+
~~~bash
|
63
|
+
$> mkdir -p ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
|
64
|
+
$> cd ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
|
65
|
+
$> git clone <%= config[:origin] %>
|
66
|
+
<% if options[:make] %>
|
67
|
+
$> make setup # Under Mac OS / Linux
|
68
|
+
<% else %>
|
69
|
+
$> rake setup # Under Mac OS / Linux
|
70
|
+
<% end %>
|
71
|
+
~~~
|
@@ -0,0 +1,13 @@
|
|
1
|
+
site_name: <%= config[:sitename] %>
|
2
|
+
pages:
|
3
|
+
- Home: 'index.md'
|
4
|
+
- Organization: 'layout.md'
|
5
|
+
- Getting Started:
|
6
|
+
- Pre-Requisites: 'setup/preliminaries.md'
|
7
|
+
- Installation: 'setup/install.md'
|
8
|
+
- Contributing:
|
9
|
+
- Overview: 'contributing/index.md'
|
10
|
+
- Directory Layout: 'layout.md'
|
11
|
+
- Repository Setup and Developments: 'contributing/setup.md'
|
12
|
+
- Semantic Versioning: 'contributing/versioning.md'
|
13
|
+
theme: readthedocs
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: falkorlib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Varrette
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -420,6 +420,7 @@ files:
|
|
420
420
|
- lib/falkorlib/bootstrap/git.rb
|
421
421
|
- lib/falkorlib/bootstrap/latex.rb
|
422
422
|
- lib/falkorlib/bootstrap/link.rb
|
423
|
+
- lib/falkorlib/bootstrap/mkdocs.rb
|
423
424
|
- lib/falkorlib/bootstrap/ruby.rb
|
424
425
|
- lib/falkorlib/cli.rb
|
425
426
|
- lib/falkorlib/cli/config.rb
|
@@ -506,6 +507,15 @@ files:
|
|
506
507
|
- templates/latex/images/question.jpg
|
507
508
|
- templates/latex/letter/_content.md.erb
|
508
509
|
- templates/latex/letter/main.tex.erb
|
510
|
+
- templates/mkdocs/docs/README.md.erb
|
511
|
+
- templates/mkdocs/docs/contributing/README.md.erb
|
512
|
+
- templates/mkdocs/docs/contributing/setup.md.erb
|
513
|
+
- templates/mkdocs/docs/contributing/versioning.md.erb
|
514
|
+
- templates/mkdocs/docs/layout.md.erb
|
515
|
+
- templates/mkdocs/docs/setup/README.md.erb
|
516
|
+
- templates/mkdocs/docs/setup/install.md.erb
|
517
|
+
- templates/mkdocs/docs/setup/preliminaries.md.erb
|
518
|
+
- templates/mkdocs/mkdocs.yml.erb
|
509
519
|
- templates/motd/motd.erb
|
510
520
|
- templates/puppet/modules/.gitignore
|
511
521
|
- templates/puppet/modules/.pmtignore
|