falkorlib 0.6.19 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +88 -0
- data/.travis.yml +56 -4
- data/Gemfile +4 -4
- data/Gemfile.lock +55 -27
- data/Rakefile +12 -8
- data/Vagrantfile +68 -0
- data/completion/_falkor +55 -7
- data/falkorlib.gemspec +14 -12
- data/lib/falkorlib.rb +22 -21
- data/lib/falkorlib/bootstrap.rb +5 -1
- data/lib/falkorlib/bootstrap/base.rb +385 -693
- data/lib/falkorlib/bootstrap/git.rb +137 -0
- data/lib/falkorlib/bootstrap/latex.rb +186 -0
- data/lib/falkorlib/bootstrap/link.rb +108 -96
- data/lib/falkorlib/bootstrap/ruby.rb +102 -0
- data/lib/falkorlib/cli.rb +82 -26
- data/lib/falkorlib/cli/config.rb +8 -8
- data/lib/falkorlib/cli/link.rb +8 -9
- data/lib/falkorlib/cli/new.rb +25 -39
- data/lib/falkorlib/common.rb +425 -425
- data/lib/falkorlib/config.rb +114 -110
- data/lib/falkorlib/error.rb +27 -16
- data/lib/falkorlib/gem_tasks.rb +12 -11
- data/lib/falkorlib/git.rb +3 -4
- data/lib/falkorlib/git/base.rb +439 -396
- data/lib/falkorlib/git/flow.rb +163 -165
- data/lib/falkorlib/git_tasks.rb +31 -31
- data/lib/falkorlib/loader.rb +1 -1
- data/lib/falkorlib/puppet.rb +3 -5
- data/lib/falkorlib/puppet/base.rb +10 -15
- data/lib/falkorlib/puppet/modules.rb +367 -365
- data/lib/falkorlib/puppet_tasks.rb +11 -8
- data/lib/falkorlib/tasks.rb +51 -54
- data/lib/falkorlib/tasks/gem.rake +42 -43
- data/lib/falkorlib/tasks/gem.rb +12 -11
- data/lib/falkorlib/tasks/git.rake +101 -107
- data/lib/falkorlib/tasks/git.rb +31 -31
- data/lib/falkorlib/tasks/gitflow.rake +131 -141
- data/lib/falkorlib/tasks/puppet.rb +11 -8
- data/lib/falkorlib/tasks/puppet_modules.rake +143 -154
- data/lib/falkorlib/tasks/rspec.rake +94 -59
- data/lib/falkorlib/tasks/yard.rake +35 -39
- data/lib/falkorlib/version.rb +55 -55
- data/lib/falkorlib/versioning.rb +169 -167
- data/spec/falkorlib/bootstrap_helpers_spec.rb +106 -56
- data/spec/falkorlib/bootstrap_latex_spec.rb +145 -0
- data/spec/falkorlib/bootstrap_link_spec.rb +137 -0
- data/spec/falkorlib/bootstrap_ruby_spec.rb +118 -0
- data/spec/falkorlib/bootstrap_spec.rb +112 -129
- data/spec/falkorlib/git_spec.rb +94 -22
- data/spec/falkorlib/gitflow_spec.rb +54 -42
- data/spec/falkorlib/puppet_modules_spec.rb +35 -26
- data/spec/falkorlib/versioning_puppet_module_spec.rb +94 -90
- data/spec/falkorlib_spec.rb +5 -0
- data/spec/spec_helper.rb +88 -47
- data/templates/latex/article-ieee/main.tex.erb +509 -0
- data/templates/latex/article/_abstract.tex.erb +19 -0
- data/templates/latex/article/_acronyms.tex.erb +116 -0
- data/templates/latex/article/_conclusion.tex.erb +25 -0
- data/templates/latex/article/_context.tex.erb +17 -0
- data/templates/latex/article/_experiments.tex.erb +27 -0
- data/templates/latex/article/_implem.tex.erb +17 -0
- data/templates/latex/article/_introduction.tex.erb +39 -0
- data/templates/latex/article/_related_works.tex.erb +19 -0
- data/templates/latex/article/biblio.bib.erb +28 -0
- data/templates/latex/article/template.tex.erb +16 -0
- data/templates/latex/ieee/IEEEtran.bst +2409 -0
- data/templates/latex/ieee/IEEEtran.cls +6347 -0
- data/templates/motd/motd.erb +2 -1
- metadata +82 -2
@@ -0,0 +1,102 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
################################################################################
|
3
|
+
# Time-stamp: <Sat 2016-11-12 02:32 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
|
+
|
19
|
+
|
20
|
+
module FalkorLib
|
21
|
+
module Bootstrap #:nodoc:
|
22
|
+
|
23
|
+
module_function
|
24
|
+
|
25
|
+
###### rvm ######
|
26
|
+
# Initialize RVM in the current directory
|
27
|
+
# Supported options:
|
28
|
+
# * :force [boolean] force overwritting
|
29
|
+
# * :ruby [string] Ruby version to configure for RVM
|
30
|
+
# * :versionfile [string] Ruby Version file
|
31
|
+
# * :gemset [string] RVM Gemset to configure
|
32
|
+
# * :gemsetfile [string] RVM Gemset file
|
33
|
+
# * :commit [boolean] Commit the changes NOT YET USED
|
34
|
+
##
|
35
|
+
def rvm(dir = Dir.pwd, options = {})
|
36
|
+
info "Initialize Ruby Version Manager (RVM)"
|
37
|
+
ap options if options[:debug]
|
38
|
+
path = normalized_path(dir)
|
39
|
+
use_git = FalkorLib::Git.init?(path)
|
40
|
+
rootdir = (use_git) ? FalkorLib::Git.rootdir(path) : path
|
41
|
+
files = {}
|
42
|
+
exit_status = 1
|
43
|
+
[:versionfile, :gemsetfile].each do |type|
|
44
|
+
f = (options[type.to_sym].nil?) ? FalkorLib.config[:rvm][type.to_sym] : options[type.to_sym]
|
45
|
+
if File.exist?( File.join( rootdir, f ))
|
46
|
+
content = `cat #{File.join( rootdir, f)}`.chomp
|
47
|
+
warning "The RVM file '#{f}' already exists (and contains '#{content}')"
|
48
|
+
next unless options[:force]
|
49
|
+
warning "... and it WILL BE overwritten"
|
50
|
+
end
|
51
|
+
files[type.to_sym] = f
|
52
|
+
end
|
53
|
+
# ==== Ruby version ===
|
54
|
+
unless files[:versionfile].nil?
|
55
|
+
file = File.join(rootdir, files[:versionfile])
|
56
|
+
v = FalkorLib.config[:rvm][:version]
|
57
|
+
if options[:ruby]
|
58
|
+
v = options[:ruby]
|
59
|
+
else
|
60
|
+
select_from(FalkorLib.config[:rvm][:rubies],
|
61
|
+
"Select RVM ruby to configure for this directory",
|
62
|
+
(FalkorLib.config[:rvm][:rubies].find_index(FalkorLib.config[:rvm][:version]) + 1))
|
63
|
+
end
|
64
|
+
info " ==> configuring RVM version file '#{files[:versionfile]}' for ruby version '#{v}'"
|
65
|
+
File.open(file, 'w') do |f|
|
66
|
+
f.puts v
|
67
|
+
end
|
68
|
+
exit_status = (File.exist?(file) && (`cat #{file}`.chomp == v)) ? 0 : 1
|
69
|
+
FalkorLib::Git.add(File.join(rootdir, files[:versionfile])) if use_git
|
70
|
+
end
|
71
|
+
# === Gemset ===
|
72
|
+
if files[:gemsetfile]
|
73
|
+
file = File.join(rootdir, files[:gemsetfile])
|
74
|
+
default_gemset = File.basename(rootdir)
|
75
|
+
default_gemset = `cat #{file}`.chomp if File.exist?( file )
|
76
|
+
g = (options[:gemset]) ? options[:gemset] : ask("Enter RVM gemset name for this directory", default_gemset)
|
77
|
+
info " ==> configuring RVM gemset file '#{files[:gemsetfile]}' with content '#{g}'"
|
78
|
+
File.open( File.join(rootdir, files[:gemsetfile]), 'w') do |f|
|
79
|
+
f.puts g
|
80
|
+
end
|
81
|
+
exit_status = (File.exist?(file) && (`cat #{file}`.chomp == g)) ? 0 : 1
|
82
|
+
FalkorLib::Git.add(File.join(rootdir, files[:gemsetfile])) if use_git
|
83
|
+
end
|
84
|
+
# ==== Gemfile ===
|
85
|
+
gemfile = File.join(rootdir, 'Gemfile')
|
86
|
+
unless File.exist?( gemfile )
|
87
|
+
# Dir.chdir(rootdir) do
|
88
|
+
# run %{ bundle init }
|
89
|
+
# end
|
90
|
+
info " ==> configuring Gemfile with Falkorlib"
|
91
|
+
File.open( gemfile, 'a') do |f|
|
92
|
+
f.puts "source 'https://rubygems.org'"
|
93
|
+
f.puts ""
|
94
|
+
f.puts "gem 'falkorlib' #, :path => '~/git/github.com/Falkor/falkorlib'"
|
95
|
+
end
|
96
|
+
FalkorLib::Git.add(gemfile) if use_git
|
97
|
+
end
|
98
|
+
exit_status.to_i
|
99
|
+
end # rvm
|
100
|
+
|
101
|
+
end # module Bootstrap
|
102
|
+
end # module FalkorLib
|
data/lib/falkorlib/cli.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Mon 2016-11-07 22:42 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the CLI
|
6
6
|
#
|
@@ -10,22 +10,21 @@ require 'thor/actions'
|
|
10
10
|
require 'thor/group'
|
11
11
|
require 'thor/zsh_completion'
|
12
12
|
|
13
|
-
require
|
13
|
+
require 'falkorlib'
|
14
14
|
|
15
|
-
require
|
16
|
-
require
|
15
|
+
require 'falkorlib/cli/new'
|
16
|
+
require 'falkorlib/cli/link'
|
17
17
|
|
18
18
|
|
19
19
|
|
20
20
|
module FalkorLib
|
21
|
-
|
22
21
|
# Falkor CLI Application, based on [Thor](http://whatisthor.com)
|
23
22
|
module CLI
|
24
|
-
|
25
23
|
# Main Application
|
26
24
|
class App < ::Thor
|
27
|
-
|
28
|
-
|
25
|
+
|
26
|
+
package_name 'Falkor[Lib]'
|
27
|
+
map %w(--version -V) => :version
|
29
28
|
|
30
29
|
namespace :falkor
|
31
30
|
|
@@ -35,11 +34,12 @@ module FalkorLib
|
|
35
34
|
|
36
35
|
#default_command :info
|
37
36
|
|
38
|
-
class_option :verbose, :aliases =>
|
39
|
-
|
40
|
-
class_option :debug,
|
41
|
-
|
42
|
-
class_option :dry_run, :aliases => '-n', :
|
37
|
+
class_option :verbose, :aliases => '-v', :type => :boolean,
|
38
|
+
:desc => "Enable verbose output mode"
|
39
|
+
class_option :debug, :type => :boolean, :default => FalkorLib.config[:debug],
|
40
|
+
:desc => "Enable debug output mode"
|
41
|
+
class_option :dry_run, :aliases => '-n', :type => :boolean,
|
42
|
+
:desc => "Perform a trial run with (normally) no changes made"
|
43
43
|
|
44
44
|
###### commands ######
|
45
45
|
desc "commands", "Lists all available commands"
|
@@ -54,28 +54,86 @@ This command allows you to interact with FalkorLib's configuration system.
|
|
54
54
|
FalkorLib retrieves its configuration from the local repository (in '<git_rootdir>/.falkor/config'),
|
55
55
|
environment variables (NOT YET IMPLEMENTED), and the user's home directory (<home>/.falkor/config), in that order of priority.
|
56
56
|
CONFIG_LONG_DESC
|
57
|
-
method_option :global, :aliases => '-g', :type => :boolean,
|
58
|
-
|
59
|
-
|
57
|
+
method_option :global, :aliases => '-g', :type => :boolean,
|
58
|
+
:desc => 'Operate on the global configuration'
|
59
|
+
method_option :local, :aliases => '-l', :type => :boolean,
|
60
|
+
:desc => 'Operate on the local configuration of the repository'
|
61
|
+
def config(_key = '')
|
60
62
|
info "Thor options:"
|
61
63
|
puts options.to_yaml
|
62
64
|
info "FalkorLib internal configuration:"
|
63
65
|
puts FalkorLib.config.to_yaml
|
64
66
|
end # config
|
65
67
|
|
68
|
+
#map %w[--help -h] => :help
|
69
|
+
|
70
|
+
###### init ######
|
71
|
+
desc "init <PATH> [options]", "Bootstrap a Git Repository"
|
72
|
+
long_desc <<-INIT_LONG_DESC
|
73
|
+
Initiate a Git repository according to my classical layout.
|
74
|
+
\x5 * the repository will be configured according to the guidelines of Git Flow
|
75
|
+
\x5 * the high-level operations will be piloted either by a Makefile (default) or a Rakefile
|
76
|
+
|
77
|
+
By default, <PATH> is '.' meaning that the repository will be initialized in the current directory.
|
78
|
+
\x5Otherwise, the NAME subdirectory will be created and bootstraped accordingly.
|
79
|
+
INIT_LONG_DESC
|
80
|
+
#......................................................
|
81
|
+
method_option :git_flow, :default => true, :type => :boolean,
|
82
|
+
:desc => 'Bootstrap the repository with Git-glow'
|
83
|
+
method_option :make, :default => true, :type => :boolean,
|
84
|
+
:desc => 'Use a Makefile to pilot the repository actions'
|
85
|
+
method_option :rake, :type => :boolean,
|
86
|
+
:desc => 'Use a Rakefile (and FalkorLib) to pilot the repository actions'
|
87
|
+
method_option :interactive, :aliases => '-i', :default => true, :type => :boolean,
|
88
|
+
:desc => "Interactive mode, in particular to confirm Gitflow branch names"
|
89
|
+
method_option :remote_sync, :aliases => '-r', :type => :boolean,
|
90
|
+
:desc => "Operate a git remote synchronization with remote. By default, all commits stay local"
|
91
|
+
method_option :master, :default => 'production', :banner => 'BRANCH',
|
92
|
+
:desc => "Master Branch name for production releases"
|
93
|
+
method_option :develop, :aliases => [ '-b', '--branch', '--devel'],
|
94
|
+
:default => 'devel', :banner => 'BRANCH',
|
95
|
+
:desc => "Branch name for development commits"
|
96
|
+
# method_option :latex, :aliases => '-l', :type => :boolean, :desc => "Initiate a LaTeX project"
|
97
|
+
# #method_option :gem, :type => :boolean, :desc => "Initiate a Ruby gem project"
|
98
|
+
# method_option :rvm, :type => :boolean, :desc => "Initiate a RVM-based Ruby project"
|
99
|
+
# method_option :ruby, :default => '1.9.3', :desc => "Ruby version to configure for RVM"
|
100
|
+
# method_option :pyenv, :type => :boolean, :desc => "Initiate a pyenv-based Python project"
|
101
|
+
# method_option :octopress, :aliases => ['-o', '--www'], :type => :boolean, :desc => "Initiate an Octopress web site"
|
102
|
+
#___________________
|
103
|
+
def init(name = '.')
|
104
|
+
#options[:rvm] = true if options[:rake] or options[:gem]
|
105
|
+
# _newrepo(name, options)
|
106
|
+
FalkorLib::Bootstrap.repo(name, options)
|
107
|
+
end # repo
|
108
|
+
|
109
|
+
###### link <subcommand> ######
|
110
|
+
desc "link <TYPE> [<path>]", "Initialize a special symlink in <path> (the current directory by default)"
|
111
|
+
subcommand "link", FalkorLib::CLI::Link
|
66
112
|
|
67
|
-
# map %w[--help -h] => :help
|
68
113
|
|
69
|
-
######
|
70
|
-
|
114
|
+
###### motd ######
|
115
|
+
method_option :file, :aliases => '-f', :default => '/etc/motd',
|
116
|
+
:desc => "File storing the message of the day"
|
117
|
+
method_option :width, :aliases => '-w', :default => 80, :type => :numeric,
|
118
|
+
:desc => "Width for the text"
|
119
|
+
method_option :title, :aliases => '-t',
|
120
|
+
:desc => "Title to be placed in the motd (using asciify/figlet)"
|
121
|
+
method_option :subtitle, :desc => "Eventual subtitle to place below the title"
|
122
|
+
method_option :hostname, :desc => "Hostname"
|
123
|
+
method_option :support, :aliases => '-s', :desc => "Support/Contact mail"
|
124
|
+
method_option :desc, :aliases => '-d', :desc => "Short Description of the host"
|
125
|
+
method_option :nodemodel, :aliases => '-n', :desc => "Node Model"
|
126
|
+
#......................................
|
127
|
+
desc "motd <PATH> [options]", "Initiate a 'motd' file - message of the day"
|
128
|
+
def motd(path = '.')
|
129
|
+
FalkorLib::Bootstrap.motd(path, options)
|
130
|
+
end # motd
|
131
|
+
|
132
|
+
###### new <subcommand> ######
|
133
|
+
desc "new <type> [<path>]", "Initialize the directory PATH with one of FalkorLib's template(s)"
|
71
134
|
subcommand "new", FalkorLib::CLI::New
|
72
135
|
|
73
|
-
###### link ######
|
74
|
-
desc "link <type> [<path>]", "Initialize a special symlink in <path> (the current directory by default)"
|
75
|
-
subcommand "link", FalkorLib::CLI::Link
|
76
|
-
|
77
136
|
|
78
|
-
map %w[--version -V] => :version
|
79
137
|
###### version ######
|
80
138
|
desc "--version, -V", "Print the version number"
|
81
139
|
def version
|
@@ -85,9 +143,7 @@ CONFIG_LONG_DESC
|
|
85
143
|
end # class App
|
86
144
|
|
87
145
|
#puts Thor::ZshCompletion::Generator.new(App, "falkor").generate
|
88
|
-
|
89
146
|
end # module CLI
|
90
|
-
|
91
147
|
end
|
92
148
|
|
93
149
|
|
data/lib/falkorlib/cli/config.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Fri 2016-11-11 15:11 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Management of the configuration specializations
|
6
6
|
#
|
@@ -9,14 +9,14 @@ require 'thor'
|
|
9
9
|
require 'falkorlib'
|
10
10
|
|
11
11
|
module FalkorLib
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
module CLI
|
13
|
+
class Config #< ::Thor
|
15
14
|
|
16
|
-
|
17
15
|
|
18
16
|
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
end # class Config
|
21
|
+
end # module CLI
|
22
22
|
end # module FalkorLib
|
data/lib/falkorlib/cli/link.rb
CHANGED
@@ -10,7 +10,6 @@ require 'falkorlib'
|
|
10
10
|
|
11
11
|
module FalkorLib
|
12
12
|
module CLI
|
13
|
-
|
14
13
|
# Thor class for symlink creation
|
15
14
|
class Link < ::Thor
|
16
15
|
|
@@ -33,19 +32,19 @@ module FalkorLib
|
|
33
32
|
|
34
33
|
###### make ######
|
35
34
|
method_option :latex, :default => true, :type => :boolean, :aliases => '-l',
|
36
|
-
|
35
|
+
:desc => "Makefile to compile LaTeX documents"
|
37
36
|
method_option :gnuplot, :type => :boolean, :aliases => ['--plot', '-p'],
|
38
|
-
|
37
|
+
:desc => "Makefile to compile GnuPlot scripts"
|
39
38
|
method_option :generic, :type => :boolean, :aliases => '-g',
|
40
|
-
|
39
|
+
:desc => "Generic Makefile for sub directory"
|
41
40
|
method_option :markdown, :type => :boolean, :aliases => '-m',
|
42
|
-
|
41
|
+
:desc => "Makefile to convert Markdown files to HTML"
|
43
42
|
method_option :images, :type => :boolean, :aliases => [ '-i', '--img' ],
|
44
|
-
|
43
|
+
:desc => "Makefile to optimize images"
|
45
44
|
method_option :refdir, :default => "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles",
|
46
|
-
|
47
|
-
method_option :src,
|
48
|
-
|
45
|
+
:aliases => '-d', :desc => "Path to Falkor's Makefile repository (Relative to Git root dir)"
|
46
|
+
method_option :src, :type => :boolean, :aliases => [ '--src', '-s' ],
|
47
|
+
:desc => "Path to Falkor's Makefile for latex_src"
|
49
48
|
#......................................
|
50
49
|
desc "make [options]", "Create a symlink to one of Falkor's Makefile, set as Git submodule"
|
51
50
|
def make(dir = Dir.pwd)
|
data/lib/falkorlib/cli/new.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Mon 2016-11-07 10:23 svarrette>
|
4
4
|
################################################################################
|
5
5
|
|
6
6
|
require 'thor'
|
@@ -10,10 +10,16 @@ require "falkorlib/bootstrap"
|
|
10
10
|
|
11
11
|
module FalkorLib
|
12
12
|
module CLI
|
13
|
-
|
14
13
|
# Thor class for all bootstrapping / initialization
|
15
14
|
class New < ::Thor
|
16
15
|
|
16
|
+
package_name "Falkor[Lib] 'new'"
|
17
|
+
namespace :new
|
18
|
+
|
19
|
+
def self.banner(task, _namespace = true, subcommand = false)
|
20
|
+
"#{basename} #{task.formatted_usage(self, true, subcommand)}"
|
21
|
+
end
|
22
|
+
|
17
23
|
###### commands ######
|
18
24
|
desc "commands", "Lists all available commands", :hide => true
|
19
25
|
def commands
|
@@ -22,12 +28,6 @@ module FalkorLib
|
|
22
28
|
|
23
29
|
#map %w[--help -h] => :help
|
24
30
|
|
25
|
-
###### commands ######
|
26
|
-
# desc "commands", "Lists available commands" #, :hide => true
|
27
|
-
# def commands
|
28
|
-
# puts App.all_commands.to_yaml #.keys - ["commands", "completions"]
|
29
|
-
# end
|
30
|
-
|
31
31
|
###### repo ######
|
32
32
|
desc "repo NAME [options]", "Bootstrap a Git Repository"
|
33
33
|
long_desc <<-REPO_LONG_DESC
|
@@ -41,23 +41,23 @@ By default, NAME is '.' meaning that the repository will be initialized in the c
|
|
41
41
|
#......................................................
|
42
42
|
method_option :git_flow, :default => true, :type => :boolean, :desc => 'Bootstrap the repository with Git-glow'
|
43
43
|
method_option :make, :default => true, :type => :boolean, :desc => 'Use a Makefile to pilot the repository actions'
|
44
|
-
method_option :rake,
|
44
|
+
method_option :rake, :type => :boolean, :desc => 'Use a Rakefile (and FalkorLib) to pilot the repository actions'
|
45
45
|
method_option :interactive, :aliases => '-i', :default => true,
|
46
|
-
|
46
|
+
:type => :boolean, :desc => "Interactive mode, in particular to confirm Gitflow branch names"
|
47
47
|
method_option :remote_sync, :aliases => '-r',
|
48
|
-
|
48
|
+
:type => :boolean, :desc => "Operate a git remote synchronization with remote. By default, all commits stay local"
|
49
49
|
method_option :master, :default => 'production', :banner => 'BRANCH', :desc => "Master Branch name for production releases"
|
50
50
|
method_option :develop, :aliases => [ '-b', '--branch', '--devel'],
|
51
|
-
|
52
|
-
method_option :latex, :aliases => '-l', :type => :boolean, :desc => "Initiate a LaTeX project"
|
51
|
+
:default => 'devel', :banner => 'BRANCH', :desc => "Branch name for development commits"
|
52
|
+
#method_option :latex, :aliases => '-l', :type => :boolean, :desc => "Initiate a LaTeX project"
|
53
53
|
#method_option :gem, :type => :boolean, :desc => "Initiate a Ruby gem project"
|
54
|
-
method_option :rvm,
|
55
|
-
method_option :ruby, :default => '1.
|
54
|
+
method_option :rvm, :type => :boolean, :desc => "Initiate a RVM-based Ruby project"
|
55
|
+
method_option :ruby, :default => '2.1.10', :desc => "Ruby version to configure for RVM"
|
56
56
|
#method_option :pyenv, :type => :boolean, :desc => "Initiate a pyenv-based Python project"
|
57
57
|
#method_option :octopress, :aliases => ['-o', '--www'], :type => :boolean, :desc => "Initiate an Octopress web site"
|
58
58
|
#___________________
|
59
59
|
def repo(name = '.')
|
60
|
-
options[:rvm] = true if options[:rake]
|
60
|
+
options[:rvm] = true if options[:rake] || options[:gem]
|
61
61
|
# _newrepo(name, options)
|
62
62
|
FalkorLib::Bootstrap.repo(name, options)
|
63
63
|
end # repo
|
@@ -114,14 +114,14 @@ It consists of two files:
|
|
114
114
|
These files will be committed in Git to ensure a consistent environment for the project.
|
115
115
|
RVM_LONG_DESC
|
116
116
|
method_option :force, :aliases => '-f',
|
117
|
-
|
117
|
+
:type => :boolean, :desc => 'Force overwritting the RVM config'
|
118
118
|
method_option :ruby, :banner => 'VERSION',
|
119
|
-
|
119
|
+
:desc => 'Ruby version to configure / install for RVM'
|
120
120
|
method_option :versionfile, :banner => 'FILE',
|
121
|
-
|
121
|
+
:default => FalkorLib.config[:rvm][:versionfile], :desc => 'RVM ruby version file'
|
122
122
|
method_option :gemset, :desc => 'RVM gemset to configure for this directory'
|
123
123
|
method_option :gemsetfile, :banner => 'FILE',
|
124
|
-
|
124
|
+
:default => FalkorLib.config[:rvm][:gemsetfile], :desc => 'RVM gemset file'
|
125
125
|
#____________________
|
126
126
|
def rvm(path = '.')
|
127
127
|
FalkorLib::Bootstrap.rvm(path, options)
|
@@ -130,34 +130,20 @@ RVM_LONG_DESC
|
|
130
130
|
###### versionfile ######
|
131
131
|
desc "versionfile PATH [options]", "initiate a VERSION file"
|
132
132
|
method_option :file, :aliases => '-f',
|
133
|
-
|
133
|
+
:desc => "Set the VERSION filename"
|
134
134
|
method_option :tag, :aliases => '-t',
|
135
|
-
|
136
|
-
method_option :version,
|
137
|
-
|
135
|
+
:desc => "Git tag to use"
|
136
|
+
method_option :version, :aliases => '-v',
|
137
|
+
:desc => "Set the version to initialize in the version file"
|
138
138
|
#_______________
|
139
139
|
def versionfile(path = '.')
|
140
140
|
FalkorLib::Bootstrap.versionfile(path, options)
|
141
141
|
end # versionfile
|
142
142
|
|
143
|
-
###### motd ######
|
144
|
-
method_option :file, :aliases => '-f', :default => '/etc/motd', :desc => "File storing the message of the day"
|
145
|
-
method_option :width, :aliases => '-w', :default => 80, :type => :numeric, :desc => "Width for the text"
|
146
|
-
method_option :title, :aliases => '-t', :default => "Title", :desc => "Title to place in the motd"
|
147
|
-
method_option :subtitle, :desc => "Eventual subtitle to place below the title"
|
148
|
-
method_option :hostname, :aliases => '-h', :default => `hostname -f`, :desc => "Hostname"
|
149
|
-
method_option :support, :aliases => '-s', :default => "#{ENV['GIT_AUTHOR_EMAIL']}", :desc => "Support/Contact mail"
|
150
|
-
method_option :desc, :aliases => '-d', :desc => "Short Description of the host"
|
151
|
-
method_option :nodemodel,:aliases => '-n', :desc => "Node Model"
|
152
|
-
#......................................
|
153
|
-
desc "motd PATH [options]", "Initiate a 'motd' file - message of the day"
|
154
|
-
def motd(path = '.')
|
155
|
-
FalkorLib::Bootstrap.motd(path, options)
|
156
|
-
end # motd
|
157
143
|
|
158
144
|
###### readme ######
|
159
145
|
method_option :make, :default => true,
|
160
|
-
|
146
|
+
:type => :boolean, :desc => 'Use a Makefile to pilot the repository actions'
|
161
147
|
method_option :rake,
|
162
148
|
:type => :boolean, :desc => 'Use a Rakefile (and FalkorLib) to pilot the repository actions'
|
163
149
|
method_option :latex, :aliases => '-l', :type => :boolean, :desc => "Describe a LaTeX project"
|