falkorlib 0.6.17 → 0.6.18

Sign up to get free protection for your applications and to get access to all the features.
data/falkorlib.gemspec CHANGED
@@ -1,222 +1,167 @@
1
1
  # -*- coding: utf-8 -*-
2
- # We require your library, mainly to have access to the VERSION number.
3
- # Feel free to set $version manually.
4
2
  $LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
5
3
  require "falkorlib/version"
6
4
  $version = FalkorLib::Version.to_s
7
5
 
8
- #
9
- # This is your Gem specification. Default values are provided so that your library
10
- # should be correctly packaged given what you have described in the .noespec file.
11
- #
12
6
  Gem::Specification.new do |s|
13
-
14
- ################################################################### ABOUT YOUR GEM
15
-
16
- # Gem name (required)
17
- s.name = "falkorlib"
18
-
19
- # Gem version (required)
20
- s.version = $version
21
-
22
- # A short summary of this gem
23
- #
24
- # This is displayed in `gem list -d`.
25
- s.summary = "Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap} tasks"
26
-
27
- # A long description of this gem (required)
28
- #
29
- # The description should be more detailed than the summary. For example,
30
- # you might wish to copy the entire README into the description.
31
- s.description = "This is my personal library I use to share the Ruby tidbits, Rake and Capistrano tasks I made for my various projects. \nThis is also my first gem so any comments on the code/organization are welcome, I'm a newbie in this domain. \nNote that I used [Noe](https://github.com/blambeau/noe) to bootstrap this project and get a fully documented environment."
32
-
33
- # The URL of this gem home page (optional)
34
- s.homepage = "https://github.com/Falkor/falkorlib"
35
-
36
- # Gem publication date (required but auto)
37
- #
38
- # Today is automatically used by default, uncomment only if
39
- # you know what you do!
40
- #
41
- # s.date = Time.now.strftime('%Y-%m-%d')
42
-
43
- # The license(s) for the library. Each license must be a short name, no
44
- # more than 64 characters.
45
- #
46
- s.licenses = ['MIT']
47
-
48
- # The rubyforge project this gem lives under (optional)
49
- #
50
- # s.rubyforge_project = nil
51
-
52
- ################################################################### ABOUT THE AUTHORS
53
-
54
- # The list of author names who wrote this gem.
55
- #
56
- # If you are providing multiple authors and multiple emails they should be
57
- # in the same order.
58
- #
59
- s.authors = ["Sebastien Varrette"]
60
-
61
- # Contact emails for this gem
62
- #
63
- # If you are providing multiple authors and multiple emails they should be
64
- # in the same order.
65
- #
66
- # NOTE: Somewhat strangly this attribute is always singular!
67
- # Don't replace by s.emails = ...
68
- s.email = ["Sebastien.Varrette@uni.lu"]
69
-
70
- ################################################################### PATHS, FILES, BINARIES
71
-
72
- # Paths in the gem to add to $LOAD_PATH when this gem is
73
- # activated (required).
74
- #
75
- # The default 'lib' is typically sufficient.
76
- s.require_paths = ["lib"]
77
-
78
- # Files included in this gem.
79
- #
80
- # By default, we take all files included in the .Manifest.txt file on root
81
- # of the project. Entries of the manifest are interpreted as Dir[...]
82
- # patterns so that lazy people may use wilcards like lib/**/*
83
- #
84
- # here = File.expand_path(File.dirname(__FILE__))
85
- # s.files = File.readlines(File.join(here, '.Manifest.txt')).
86
- # inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
87
- # collect{|x| x[(1+here.size)..-1]}
88
-
89
- # Test files included in this gem.
90
- #
91
- s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
92
-
93
- # Alternative:
94
- s.files = `git ls-files`.split("\n")
95
- #s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
96
- #s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
97
-
98
- # The path in the gem for executable scripts (optional)
99
- #
100
- #s.bindir = "bin"
101
-
102
- # Executables included in the gem.
103
- #
104
- s.executables = (Dir["bin/*"]).collect{|f| File.basename(f)}
105
-
106
- ################################################################### REQUIREMENTS & INSTALL
107
- # Remember the gem version requirements operators and schemes:
108
- # = Equals version
109
- # != Not equal to version
110
- # > Greater than version
111
- # < Less than version
112
- # >= Greater than or equal to
113
- # <= Less than or equal to
114
- # ~> Approximately greater than
115
- #
116
- # Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
117
- # for setting your gem version.
118
- #
119
- # For your requirements to other gems, remember that
120
- # ">= 2.2.0" (optimistic: specify minimal version)
121
- # ">= 2.2.0", "< 3.0" (pessimistic: not greater than the next major)
122
- # "~> 2.2" (shortcut for ">= 2.2.0", "< 3.0")
123
- # "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
124
- #
125
- #s.add_dependency("rake", ">= 10.1.0")
126
- s.add_runtime_dependency 'rake', '~> 10.1', '>= 10.1.0'
127
- s.add_runtime_dependency 'git_remote_branch', '~> 0'
128
- #s.add_runtime_dependency 'git', '~> 1.2', '>= 1.2.5'
129
- s.add_runtime_dependency('minigit', '~> 0')
130
- s.add_runtime_dependency("term-ansicolor", "~> 1.3")
131
- s.add_runtime_dependency("configatron", "~> 3.2")
132
- s.add_runtime_dependency("awesome_print", "~> 1.2")
133
- s.add_runtime_dependency("json", "~> 1.8")
134
- s.add_runtime_dependency("license-generator", '~> 0')
135
- s.add_runtime_dependency("deep_merge", '~> 1.0.1')
136
- s.add_runtime_dependency("diffy", '>= 3.0')
137
- s.add_runtime_dependency("logger", '>= 1.2.8')
138
- s.add_runtime_dependency("thor", '>= 0.19')
139
- s.add_runtime_dependency("artii", '>= 2.1')
140
- s.add_runtime_dependency("facter", '~> 2.4.1')
141
-
142
- #s.add_runtime_dependency("mercenary", '>= 0.3.5')
143
-
144
- #
145
- #
146
- # One call to add_dependency('gem_name', 'gem version requirement') for each
147
- # runtime dependency. These gems will be installed with your gem.
148
- # One call to add_development_dependency('gem_name', 'gem version requirement')
149
- # for each development dependency. These gems are required for developers
150
- #
151
- #s.add_development_dependency("rake", ">= 10.1.0") #"~> 0.9.2")
152
- s.add_development_dependency("bundler", "~> 1.0")
153
- s.add_development_dependency 'rspec', '~> 2.7', '>= 2.7.0'
154
- s.add_development_dependency("pry", "~> 0.9")
155
- s.add_development_dependency("yard", "~> 0.8")
156
- #s.add_development_dependency("minitest", "~> 5.3")
157
- s.add_development_dependency("rubygems-tasks", "~> 0.2")
158
- s.add_development_dependency("travis", "~> 1.6")
159
- s.add_development_dependency("travis-lint", "~> 1.8")
160
-
161
- s.add_development_dependency("codeclimate-test-reporter", '~> 0') #, group: :test, require: nil)
162
- #s.add_development_dependency("bluecloth", "~> 2.2.0")
163
- #s.add_development_dependency("wlang", "~> 0.10.2")
164
-
165
-
166
- # The version of ruby required by this gem
167
- #
168
- # Uncomment and set this if your gem requires specific ruby versions.
169
- #
170
- # s.required_ruby_version = ">= 0"
171
-
172
- # The RubyGems version required by this gem
173
- #
174
- # s.required_rubygems_version = ">= 0"
175
-
176
- # The platform this gem runs on. See Gem::Platform for details.
177
- #
178
- # s.platform = nil
179
-
180
- # Extensions to build when installing the gem.
181
- #
182
- # Valid types of extensions are extconf.rb files, configure scripts
183
- # and rakefiles or mkrf_conf files.
184
- #
185
- s.extensions = []
186
-
187
- # External (to RubyGems) requirements that must be met for this gem to work.
188
- # It’s simply information for the user.
189
- #
190
- s.requirements = nil
191
-
192
- # A message that gets displayed after the gem is installed
193
- #
194
- # Uncomment and set this if you want to say something to the user
195
- # after gem installation
196
- #
197
- s.post_install_message = "Thanks for installing FalkorLib.\n"
198
-
199
- ################################################################### SECURITY
200
-
201
- # The key used to sign this gem. See Gem::Security for details.
202
- #
203
- #s.signing_key = "0xDD01D5C0"
204
-
205
- # The certificate chain used to sign this gem. See Gem::Security for
206
- # details.
207
- #
208
- # s.cert_chain = []
209
-
210
- ################################################################### RDOC
211
-
212
- # An ARGV style array of options to RDoc
213
- #
214
- # See 'rdoc --help' about this
215
- #
216
- s.rdoc_options = []
217
-
218
- # Extra files to add to RDoc such as README
219
- #
220
- s.extra_rdoc_files = Dir["README.md"] + Dir["CHANGELOG.md"] + Dir["LICENCE.md"]
7
+ s.name = "falkorlib"
8
+ s.version = $version
9
+ s.date = Time.now.strftime('%Y-%m-%d')
10
+ s.summary = "Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap} tasks"
11
+ s.description = "This is my personal library I use to share the Ruby tidbits and Rake tasks I made it for my various projects, and also to bootstrap easily several element of my daily workflow (new git repository, new beamer slides etc.).\nThis is also my first gem so any comments on the code/organization are welcome, I'm a newbie in this domain. \nNote that I used [Noe](https://github.com/blambeau/noe) to bootstrap this project and get a fully documented environment."
12
+
13
+ s.homepage = "https://github.com/Falkor/falkorlib"
14
+ s.licenses = 'MIT'
15
+
16
+ s.authors = ['Sebastien Varrette']
17
+ # The list of author names who wrote this gem.
18
+ s.email = ['Sebastien.Varrette@uni.lu']
19
+
20
+ # Paths in the gem to add to $LOAD_PATH when this gem is activated (required).
21
+ #
22
+ # The default 'lib' is typically sufficient.
23
+ s.require_paths = ["lib"]
24
+
25
+ # Files included in this gem.
26
+ #
27
+ # By default, we take all files included in the .Manifest.txt file on root
28
+ # of the project. Entries of the manifest are interpreted as Dir[...]
29
+ # patterns so that lazy people may use wilcards like lib/**/*
30
+ #
31
+ # here = File.expand_path(File.dirname(__FILE__))
32
+ # s.files = File.readlines(File.join(here, '.Manifest.txt')).
33
+ # inject([]){|files, pattern| files + Dir[File.join(here, pattern.strip)]}.
34
+ # collect{|x| x[(1+here.size)..-1]}
35
+
36
+ # Test files included in this gem.
37
+ #
38
+ s.test_files = Dir["test/**/*"] + Dir["spec/**/*"]
39
+
40
+ # Alternative:
41
+ s.files = `git ls-files`.split("\n")
42
+ #s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
43
+ #s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
44
+
45
+ # The path in the gem for executable scripts (optional)
46
+ #
47
+ #s.bindir = "bin"
48
+
49
+ s.executables = (Dir["bin/*"]).collect{|f| File.basename(f)}
50
+
51
+ ################################################################### REQUIREMENTS & INSTALL
52
+ # Remember the gem version requirements operators and schemes:
53
+ # = Equals version
54
+ # != Not equal to version
55
+ # > Greater than version
56
+ # < Less than version
57
+ # >= Greater than or equal to
58
+ # <= Less than or equal to
59
+ # ~> Approximately greater than
60
+ #
61
+ # Don't forget to have a look at http://lmgtfy.com/?q=Ruby+Versioning+Policies
62
+ # for setting your gem version.
63
+ #
64
+ # For your requirements to other gems, remember that
65
+ # ">= 2.2.0" (optimistic: specify minimal version)
66
+ # ">= 2.2.0", "< 3.0" (pessimistic: not greater than the next major)
67
+ # "~> 2.2" (shortcut for ">= 2.2.0", "< 3.0")
68
+ # "~> 2.2.0" (shortcut for ">= 2.2.0", "< 2.3.0")
69
+ #
70
+ #s.add_dependency("rake", ">= 10.1.0")
71
+ s.add_runtime_dependency 'rake', '~> 10.1', '>= 10.1.0'
72
+ s.add_runtime_dependency 'git_remote_branch', '~> 0'
73
+ #s.add_runtime_dependency 'git', '~> 1.2', '>= 1.2.5'
74
+ s.add_runtime_dependency('minigit', '~> 0')
75
+ s.add_runtime_dependency("term-ansicolor", "~> 1.3")
76
+ s.add_runtime_dependency("configatron", "~> 3.2")
77
+ s.add_runtime_dependency("awesome_print", "~> 1.2")
78
+ s.add_runtime_dependency("json", "~> 1.8")
79
+ s.add_runtime_dependency("license-generator", '~> 0')
80
+ s.add_runtime_dependency("deep_merge", '~> 1.0.1')
81
+ s.add_runtime_dependency("diffy", '>= 3.0')
82
+ s.add_runtime_dependency("logger", '>= 1.2.8')
83
+ s.add_runtime_dependency("thor", '>= 0.19')
84
+ s.add_runtime_dependency("artii", '>= 2.1')
85
+ s.add_runtime_dependency("facter", '~> 2.4.1')
86
+
87
+ #s.add_runtime_dependency("mercenary", '>= 0.3.5')
88
+
89
+ #
90
+ #
91
+ # One call to add_dependency('gem_name', 'gem version requirement') for each
92
+ # runtime dependency. These gems will be installed with your gem.
93
+ # One call to add_development_dependency('gem_name', 'gem version requirement')
94
+ # for each development dependency. These gems are required for developers
95
+ #
96
+ #s.add_development_dependency("rake", ">= 10.1.0") #"~> 0.9.2")
97
+ s.add_development_dependency("bundler", "~> 1.0")
98
+ #s.add_development_dependency 'rspec', '~> 2.7', '>= 2.7.0'
99
+ s.add_development_dependency("pry", "~> 0.9")
100
+ s.add_development_dependency("yard", "~> 0.8")
101
+ #s.add_development_dependency("minitest", "~> 5.3")
102
+ s.add_development_dependency("rubygems-tasks", "~> 0.2")
103
+ s.add_development_dependency("travis", "~> 1.6")
104
+ s.add_development_dependency("travis-lint", "~> 1.8")
105
+
106
+ s.add_development_dependency("codeclimate-test-reporter", '~> 0') #, group: :test, require: nil)
107
+ #s.add_development_dependency("bluecloth", "~> 2.2.0")
108
+ #s.add_development_dependency("wlang", "~> 0.10.2")
109
+
110
+
111
+ # The version of ruby required by this gem
112
+ #
113
+ # Uncomment and set this if your gem requires specific ruby versions.
114
+ #
115
+ # s.required_ruby_version = ">= 0"
116
+
117
+ # The RubyGems version required by this gem
118
+ #
119
+ # s.required_rubygems_version = ">= 0"
120
+
121
+ # The platform this gem runs on. See Gem::Platform for details.
122
+ #
123
+ # s.platform = nil
124
+
125
+ # Extensions to build when installing the gem.
126
+ #
127
+ # Valid types of extensions are extconf.rb files, configure scripts
128
+ # and rakefiles or mkrf_conf files.
129
+ #
130
+ s.extensions = []
131
+
132
+ # External (to RubyGems) requirements that must be met for this gem to work.
133
+ # It’s simply information for the user.
134
+ #
135
+ s.requirements = nil
136
+
137
+ # A message that gets displayed after the gem is installed
138
+ #
139
+ # Uncomment and set this if you want to say something to the user
140
+ # after gem installation
141
+ #
142
+ s.post_install_message = "Thanks for installing FalkorLib.\n"
143
+
144
+ ################################################################### SECURITY
145
+
146
+ # The key used to sign this gem. See Gem::Security for details.
147
+ #
148
+ #s.signing_key = "0xDD01D5C0"
149
+
150
+ # The certificate chain used to sign this gem. See Gem::Security for
151
+ # details.
152
+ #
153
+ # s.cert_chain = []
154
+
155
+ ################################################################### RDOC
156
+
157
+ # An ARGV style array of options to RDoc
158
+ #
159
+ # See 'rdoc --help' about this
160
+ #
161
+ s.rdoc_options = []
162
+
163
+ # Extra files to add to RDoc such as README
164
+ #
165
+ s.extra_rdoc_files = Dir["README.md"] + Dir["CHANGELOG.md"] + Dir["LICENCE.md"]
221
166
 
222
167
  end
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Wed 2016-06-29 14:45 svarrette>
3
+ # Time-stamp: <Sat 2016-10-15 23:44 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Bootstrapping operations
6
6
  #
@@ -28,12 +28,13 @@ module FalkorLib #:nodoc:
28
28
  },
29
29
  :latex => {
30
30
  :name => '',
31
- :author => "#{ENV['GIT_AUTHOR_NAME']}",
32
- :mail => "#{ENV['GIT_AUTHOR_EMAIL']}",
31
+ :author => %x( git config user.name ).chomp,
32
+ :mail => %x( git config user.email ).chomp,
33
33
  :title => 'Title',
34
- :subtitle => '',
34
+ :subtitle => 'Overview and Open Challenges',
35
35
  :image => 'images/logo_ULHPC.pdf',
36
- :logo => 'images/logo_UL.pdf'
36
+ :logo => 'images/logo_UL.pdf',
37
+ :url => 'http://csc.uni.lu/sebastien.varrette'
37
38
  },
38
39
  :letter => {
39
40
  :author_title => 'PhD',
@@ -44,6 +45,10 @@ module FalkorLib #:nodoc:
44
45
  :zipcode => 'L-1359',
45
46
  :location => 'Luxembourg',
46
47
  :phone => '(+352) 46 66 44 6600',
48
+ :twitter => 'svarrette',
49
+ :linkedin => 'svarrette',
50
+ :skype => 'sebastien.varrette',
51
+ :scholar => '6PTStIcAAAAJ'
47
52
  },
48
53
  :metadata => {
49
54
  :name => '',
@@ -531,6 +536,11 @@ module FalkorLib
531
536
  print_error_and_exit "Unsupported type" unless [ :beamer, :article, :letter ].include?( type )
532
537
  path = normalized_path(dir)
533
538
  config = FalkorLib::Config::Bootstrap::DEFAULTS[:latex].clone
539
+ if type == :letter
540
+ config.merge!(FalkorLib::Config::Bootstrap::DEFAULTS[:letter].clone)
541
+ [ :title, :subtitle, :image ].each { |k| config.delete k }
542
+ end
543
+ config.deep_merge!(FalkorLib::Config::Bootstrap::DEFAULTS[:letter].clone) if type == :letter
534
544
  # initiate the repository if needed
535
545
  unless File.directory?( path )
536
546
  warn "The directory '#{path}' does not exists and will be created"
@@ -561,7 +571,7 @@ module FalkorLib
561
571
  else
562
572
  default_project_dir += "/#{config[:name]}" unless default_project_dir =~ /#{config[:name]}$/
563
573
  end
564
- project_dir = ask("\tLaTeX Sources directory (relative to the Git root directory)", "#{default_project_dir}")
574
+ project_dir = options[:dir] ? options[:dir] : ask("\tLaTeX Sources directory (relative to the Git root directory)", "#{default_project_dir}")
565
575
  raise FalkorLib::ExecError "Empty project directory" if project_dir.empty?
566
576
  src_project_dir = File.join(project_dir, 'src')
567
577
  srcdir = File.join(rootdir, src_project_dir)
@@ -585,7 +595,7 @@ module FalkorLib
585
595
  end
586
596
  info "populating '#{src_project_dir}'"
587
597
  #FalkorLib::Bootstrap::Link.root(srcdir, { :verbose => true} )
588
- FalkorLib::Bootstrap::Link.makefile(srcdir)
598
+ FalkorLib::Bootstrap::Link.makefile(srcdir, { :no_interaction => true })
589
599
  [ '_style.sty', '.gitignore' ].each do |f|
590
600
  Dir.chdir( srcdir ) do
591
601
  dst = ".makefile.d/latex/#{f}"
@@ -640,10 +650,10 @@ module FalkorLib
640
650
  run %{ ln -s ../.root .root } unless File.exists?(File.join(images, '.root'))
641
651
  #run %{ ln -s .root/#{images_makefile_src} Makefile } unless File.exists?(File.join(images, 'Makefile'))
642
652
  end
643
- FalkorLib::Bootstrap::Link.makefile(images, { :images => true } )
653
+ FalkorLib::Bootstrap::Link.makefile(images, { :images => true, :no_interaction => true } )
644
654
 
645
655
  # Prepare the src/ directory
646
- FalkorLib::Bootstrap::Link.makefile(File.join(rootdir, project_dir), { :src => true } )
656
+ FalkorLib::Bootstrap::Link.makefile(File.join(rootdir, project_dir), { :src => true, :no_interaction => true } )
647
657
 
648
658
 
649
659
  # default_project_dir = case type
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Wed 2016-06-29 13:33 svarrette>
3
+ # Time-stamp: <Sat 2016-10-15 22:55 svarrette>
4
4
  ################################################################################
5
5
  # Interface for Bootstrapping various symlinks within your project
6
6
  #
@@ -28,8 +28,12 @@ module FalkorLib
28
28
  # * :markdown [boolean] Makefile to convert Markdown files to HTML
29
29
  # * :refdir [string] Path to Falkor's Makefile repository
30
30
  # * :src [boolean] Path to latex_src
31
+ # * :no_interaction [boolean] do not interact
31
32
  ##
32
- def makefile(dir = Dir.pwd, options = {})
33
+ def makefile(dir = Dir.pwd,
34
+ options = {
35
+ :no_interaction => false
36
+ })
33
37
  path = normalized_path(dir)
34
38
  rootdir = FalkorLib::Git.rootdir(path)
35
39
  info "Create a symlink to one of Falkor's Makefile"
@@ -67,7 +71,7 @@ module FalkorLib
67
71
  dst = File.join(makefile_d, type, makefile)
68
72
  unless File.exists?( File.join(path, 'Makefile'))
69
73
  info "Bootstrapping #{type.capitalize} Makefile (as symlink to Falkor's Makefile)"
70
- really_continue?
74
+ really_continue? unless options[:no_interaction]
71
75
  Dir.chdir( path ) do
72
76
  run %{ ln -s #{dst} Makefile }
73
77
  end
@@ -89,7 +93,7 @@ module FalkorLib
89
93
  relative_path_to_root = (Pathname.new( FalkorLib::Git.rootdir(dir) ).relative_path_from Pathname.new( File.realpath(path)))
90
94
  if "#{relative_path_to_root}" == "."
91
95
  FalkorLib::Common.warning "Already at the root directory of the Git repository"
92
- FalkorLib::Common.really_continue?
96
+ FalkorLib::Common.really_continue? unless options[:no_interaction]
93
97
  end
94
98
  target = options[:name] ? options[:name] : '.root'
95
99
  puts "Entering '#{relative_path_to_root}'"
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Sun 2016-03-27 23:47 svarrette>
3
+ # Time-stamp: <Sat 2016-10-15 18:28 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -9,44 +9,50 @@ require 'falkorlib'
9
9
  #require "falkorlib/bootstrap"
10
10
 
11
11
  module FalkorLib
12
- module CLI
13
-
14
- # Thor class for symlink creation
15
- class Link < ::Thor
16
-
17
- include FalkorLib::Common
18
-
19
- ###### rootdir (root beeing reserved) ######
20
- method_option :name, :aliases => ['--target', '-t', '-n'], :default => '.root', :desc => "Name of the symlink"
21
- #......................................
22
- desc "rootdir [options]", "Create a symlink '.root' which targets the root of the repository"
23
- def rootdir(dir = Dir.pwd)
24
- FalkorLib::Bootstrap::Link.root(dir, options)
25
- end # rootdir
26
-
27
-
28
- ###### make ######
29
- method_option :latex, :default => true, :type => :boolean, :aliases => '-l',
30
- :desc => "Makefile to compile LaTeX documents"
31
- method_option :gnuplot, :type => :boolean, :aliases => ['--plot', '-p'],
32
- :desc => "Makefile to compile GnuPlot scripts"
33
- method_option :generic, :type => :boolean, :aliases => '-g',
34
- :desc => "Generic Makefile for sub directory"
35
- method_option :markdown, :type => :boolean, :aliases => '-m',
36
- :desc => "Makefile to convert Markdown files to HTML"
37
- method_option :images, :type => :boolean, :aliases => [ '-i', '--img' ],
38
- :desc => "Makefile to optimize images"
39
- method_option :refdir, :default => "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles",
40
- :aliases => '-d', :desc => "Path to Falkor's Makefile repository (Relative to Git root dir)"
41
- method_option :src, :type => :boolean, :aliases => [ '--src', '-s' ],
42
- :desc => "Path to Falkor's Makefile for latex_src"
43
- #......................................
44
- desc "make [options]", "Create a symlink to one of Falkor's Makefile, set as Git submodule"
45
- def make(dir = Dir.pwd)
46
- FalkorLib::Bootstrap::Link.makefile(dir, options)
47
- end # make
48
-
49
-
50
- end # class Link
51
- end # module CLI
12
+ module CLI
13
+
14
+ # Thor class for symlink creation
15
+ class Link < ::Thor
16
+
17
+ include FalkorLib::Common
18
+
19
+ ###### commands ######
20
+ desc "commands", "Lists all available commands", :hide => true
21
+ def commands
22
+ puts Link.all_commands.keys.sort - [ 'commands' ]
23
+ end
24
+
25
+ ###### rootdir (root beeing reserved) ######
26
+ method_option :name, :aliases => ['--target', '-t', '-n'], :default => '.root', :desc => "Name of the symlink"
27
+ #......................................
28
+ desc "rootdir [options]", "Create a symlink '.root' which targets the root of the repository"
29
+ def rootdir(dir = Dir.pwd)
30
+ FalkorLib::Bootstrap::Link.root(dir, options)
31
+ end # rootdir
32
+
33
+
34
+ ###### make ######
35
+ method_option :latex, :default => true, :type => :boolean, :aliases => '-l',
36
+ :desc => "Makefile to compile LaTeX documents"
37
+ method_option :gnuplot, :type => :boolean, :aliases => ['--plot', '-p'],
38
+ :desc => "Makefile to compile GnuPlot scripts"
39
+ method_option :generic, :type => :boolean, :aliases => '-g',
40
+ :desc => "Generic Makefile for sub directory"
41
+ method_option :markdown, :type => :boolean, :aliases => '-m',
42
+ :desc => "Makefile to convert Markdown files to HTML"
43
+ method_option :images, :type => :boolean, :aliases => [ '-i', '--img' ],
44
+ :desc => "Makefile to optimize images"
45
+ method_option :refdir, :default => "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles",
46
+ :aliases => '-d', :desc => "Path to Falkor's Makefile repository (Relative to Git root dir)"
47
+ method_option :src, :type => :boolean, :aliases => [ '--src', '-s' ],
48
+ :desc => "Path to Falkor's Makefile for latex_src"
49
+ #......................................
50
+ desc "make [options]", "Create a symlink to one of Falkor's Makefile, set as Git submodule"
51
+ def make(dir = Dir.pwd)
52
+ FalkorLib::Bootstrap::Link.makefile(dir, options)
53
+ end # make
54
+
55
+
56
+ end # class Link
57
+ end # module CLI
52
58
  end # module FalkorLib