falkorlib 0.6.13 → 0.6.14
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/lib/falkorlib/bootstrap/base.rb +34 -24
- data/lib/falkorlib/bootstrap/link.rb +5 -3
- data/lib/falkorlib/version.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da8fc3d2a1cd71f1081cdbc7e4e82360a8a31d6d
|
4
|
+
data.tar.gz: ded248e0cc1540be8fa3814787a1886a4d6297a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2aca9bc92d82bfc3b23553e45e06d69f74b605d49ae048a0434c7715889a924f17d9792e7d477762a0e172265dcdde3e8a5ae956e6d32ccaa4bb6c7025a1ce52
|
7
|
+
data.tar.gz: a09bea7bd980510a2b73cd814486e6f1e68c89276fb6e19ebaa6c70ee709b265bd12bebde12445139736e061458a0a72c3d4aa73f8aaae969aaf6e5d2f045992
|
data/Gemfile.lock
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Wed 2016-06-29 14:09 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for the main Bootstrapping operations
|
6
6
|
#
|
@@ -561,10 +561,11 @@ module FalkorLib
|
|
561
561
|
else
|
562
562
|
default_project_dir += "/#{config[:name]}" unless default_project_dir =~ /#{config[:name]}$/
|
563
563
|
end
|
564
|
-
project_dir = ask("\tLaTeX Sources directory (relative to the Git root directory)", "#{default_project_dir}
|
564
|
+
project_dir = ask("\tLaTeX Sources directory (relative to the Git root directory)", "#{default_project_dir}")
|
565
565
|
raise FalkorLib::ExecError "Empty project directory" if project_dir.empty?
|
566
|
-
|
567
|
-
|
566
|
+
src_project_dir = File.join(project_dir, 'src')
|
567
|
+
srcdir = File.join(rootdir, sub_project_dir)
|
568
|
+
if File.exists?(File.join(srcdir, '.root'))
|
568
569
|
warn "The directory '#{project_dir}' seems to have been already initialized"
|
569
570
|
really_continue? unless options[:force]
|
570
571
|
end
|
@@ -577,25 +578,30 @@ module FalkorLib
|
|
577
578
|
} if [ :article, :beamer, :bookchapter].include?(type)
|
578
579
|
submodules['beamerthemeFalkor'] = { :url => 'https://github.com/Falkor/beamerthemeFalkor' } if type == :beamer
|
579
580
|
FalkorLib::Git.submodule_init(rootdir, submodules)
|
580
|
-
info "bootstrapping the #{type} project sources in '#{
|
581
|
+
info "bootstrapping the #{type} project sources in '#{src_project_dir}'"
|
581
582
|
# Create the project directory
|
582
583
|
Dir.chdir( rootdir ) do
|
583
|
-
run %{ mkdir -p #{
|
584
|
-
end
|
585
|
-
info "populating '#{
|
586
|
-
FalkorLib::Bootstrap::Link.root(
|
587
|
-
|
588
|
-
[ '
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
584
|
+
run %{ mkdir -p #{src_project_dir}/images } unless File.directory?("#{srcdir}/images")
|
585
|
+
end
|
586
|
+
info "populating '#{src_project_dir}'"
|
587
|
+
#FalkorLib::Bootstrap::Link.root(srcdir, { :verbose => true} )
|
588
|
+
FalkorLib::Bootstrap::Link.makefile(srcdir)
|
589
|
+
[ '_style.sty', '.gitignore' ].each do |f|
|
590
|
+
Dir.chdir( srcdir ) do
|
591
|
+
run %{ ln -s '.makefile.d/latex/#{dst} #{f} } unless File.exist?( File.join(srcdir, f) )
|
592
|
+
end
|
593
|
+
end
|
594
|
+
if type == :beamer
|
595
|
+
f = 'beamerthemeFalkor.sty'
|
596
|
+
dst = "#{FalkorLib.config[:git][:submodulesdir]}/beamerthemeFalkor/#{f}"
|
597
|
+
Dir.chdir( srcdir ) do
|
598
|
+
run %{ ln -s '.root/#{dst} #{f} } unless File.exist?( File.join(srcdir, f) )
|
599
|
+
end
|
595
600
|
end
|
601
|
+
|
596
602
|
# Bootstrap the directory
|
597
603
|
templatedir = File.join( FalkorLib.templates, 'latex', "#{type}")
|
598
|
-
unless File.exists?( File.join(
|
604
|
+
unless File.exists?( File.join(srcdir, "#{config[:name]}.tex"))
|
599
605
|
info "gathering information for the LaTeX templates"
|
600
606
|
prefix = case type
|
601
607
|
when :article
|
@@ -613,27 +619,31 @@ module FalkorLib
|
|
613
619
|
next if k == :name
|
614
620
|
config[k.to_sym] = ask( "\t" + sprintf("%-20s", "#{prefix}#{k.capitalize}"), v)
|
615
621
|
end
|
616
|
-
init_from_template(templatedir,
|
622
|
+
init_from_template(templatedir, srcdir, config, {:no_interaction => true,
|
617
623
|
:no_commit => true })
|
618
624
|
# Rename the main file
|
619
|
-
Dir.chdir(
|
625
|
+
Dir.chdir( srcdir ) do
|
620
626
|
run %{ mv main.tex #{config[:name]}.tex }
|
621
627
|
end
|
622
628
|
end
|
623
629
|
# Create the trash directory
|
624
|
-
trash(
|
630
|
+
trash(srcdir)
|
625
631
|
|
626
632
|
# populate the images/ directory
|
627
633
|
baseimages = File.join( FalkorLib.templates, 'latex', 'images')
|
628
|
-
#images_makefile_src = "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles/generic/Makefile.
|
629
|
-
images = File.join(
|
634
|
+
#images_makefile_src = "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles/generic/Makefile.insrcdir"
|
635
|
+
images = File.join(srcdir, 'images')
|
630
636
|
info "populating the image directory"
|
631
637
|
Dir.chdir( images ) do
|
632
638
|
run %{ rsync -avzu #{baseimages}/ . }
|
633
639
|
run %{ ln -s ../.root .root } unless File.exists?(File.join(images, '.root'))
|
634
640
|
#run %{ ln -s .root/#{images_makefile_src} Makefile } unless File.exists?(File.join(images, 'Makefile'))
|
635
641
|
end
|
636
|
-
FalkorLib::Bootstrap::Link.makefile(images, { :
|
642
|
+
FalkorLib::Bootstrap::Link.makefile(images, { :images => true } )
|
643
|
+
|
644
|
+
# Prepare the src/ directory
|
645
|
+
FalkorLib::Bootstrap::Link.makefile(File.join(rootdir, project_dir), { :src => true } )
|
646
|
+
|
637
647
|
|
638
648
|
# default_project_dir = case type
|
639
649
|
# when :beamer
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
3
|
+
# Time-stamp: <Wed 2016-06-29 13:33 svarrette>
|
4
4
|
################################################################################
|
5
5
|
# Interface for Bootstrapping various symlinks within your project
|
6
6
|
#
|
@@ -32,7 +32,7 @@ module FalkorLib
|
|
32
32
|
def makefile(dir = Dir.pwd, options = {})
|
33
33
|
path = normalized_path(dir)
|
34
34
|
rootdir = FalkorLib::Git.rootdir(path)
|
35
|
-
info "Create a symlink to
|
35
|
+
info "Create a symlink to one of Falkor's Makefile"
|
36
36
|
# Add Falkor's Makefiles
|
37
37
|
submodules = FalkorLib.config[:git][:submodules]
|
38
38
|
submodules['Makefiles'] = {
|
@@ -41,7 +41,9 @@ module FalkorLib
|
|
41
41
|
} if submodules['Makefiles'].nil?
|
42
42
|
FalkorLib::Git.submodule_init(rootdir, submodules)
|
43
43
|
FalkorLib::Bootstrap::Link.root(dir)
|
44
|
-
|
44
|
+
refdir = File.join(FalkorLib.config[:git][:submodulesdir], 'Makefiles')
|
45
|
+
refdir = options[:refdir] unless options[:refdir].nil?
|
46
|
+
dst = File.join('.root', refdir)
|
45
47
|
makefile_d = '.makefile.d'
|
46
48
|
unless File.exists?(File.join(path, makefile_d))
|
47
49
|
Dir.chdir( path ) do
|
data/lib/falkorlib/version.rb
CHANGED
@@ -19,18 +19,18 @@ module FalkorLib #:nodoc:
|
|
19
19
|
# MAJOR: Defines the major version
|
20
20
|
# MINOR: Defines the minor version
|
21
21
|
# PATCH: Defines the patch version
|
22
|
-
MAJOR, MINOR, PATCH = 0, 6,
|
23
|
-
|
22
|
+
MAJOR, MINOR, PATCH = 0, 6, 14
|
23
|
+
|
24
24
|
module_function
|
25
|
-
|
25
|
+
|
26
26
|
## Returns the major version ( big release based off of multiple minor releases )
|
27
27
|
def major
|
28
28
|
MAJOR
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
## Returns the minor version ( small release based off of multiple patches )
|
32
32
|
def minor
|
33
|
-
MINOR
|
33
|
+
MINOR
|
34
34
|
end
|
35
35
|
|
36
36
|
## Returns the patch version ( updates, features and (crucial) bug fixes )
|