falkorlib 0.6.13 → 0.6.14

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 07c37a3c0993e8e543f6b895c18aeaa1050696f3
4
- data.tar.gz: 10833cc728d26411d8c90f45d5edf066c78862fd
3
+ metadata.gz: da8fc3d2a1cd71f1081cdbc7e4e82360a8a31d6d
4
+ data.tar.gz: ded248e0cc1540be8fa3814787a1886a4d6297a7
5
5
  SHA512:
6
- metadata.gz: b4a11fe0b45860ec73947829988297672128d4715fe481e318db0c46a1e424774048d859d3e088a25b8e52cc6eaacdd29e1c2bda5bac81476864081daaf11941
7
- data.tar.gz: d59c872bc5fdf200aa55f41cba4e874ce5aab6e1feda3ec72be4fb09ecfc20bafb30cb19cd8ffd1930ff8e9bb206bab9a3c717c8d2364f9810caf964033a178a
6
+ metadata.gz: 2aca9bc92d82bfc3b23553e45e06d69f74b605d49ae048a0434c7715889a924f17d9792e7d477762a0e172265dcdde3e8a5ae956e6d32ccaa4bb6c7025a1ce52
7
+ data.tar.gz: a09bea7bd980510a2b73cd814486e6f1e68c89276fb6e19ebaa6c70ee709b265bd12bebde12445139736e061458a0a72c3d4aa73f8aaae969aaf6e5d2f045992
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.6.13)
4
+ falkorlib (0.6.14)
5
5
  artii (>= 2.1)
6
6
  awesome_print (~> 1.2)
7
7
  configatron (~> 3.2)
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Tue 2016-06-28 18:51 svarrette>
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}/src")
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
- subdir = File.join(rootdir, project_dir)
567
- if File.exists?(File.join(subdir, '.root'))
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 '#{project_dir}'"
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 #{project_dir}/images } unless File.directory?("#{subdir}/images")
584
- end
585
- info "populating '#{project_dir}'"
586
- FalkorLib::Bootstrap::Link.root(subdir, { :verbose => true} )
587
- # Prepare the links from the sub-module files
588
- [ 'Makefile', '_style.sty', '.gitignore', 'beamerthemeFalkor.sty' ].each do |f|
589
- next if (f =~ /beamer/) and (type != :beamer)
590
- submoduledir = (f =~ /beamer/) ? 'beamerthemeFalkor' : 'Makefiles/latex'
591
- dst = "#{FalkorLib.config[:git][:submodulesdir]}/#{submoduledir}/#{f}"
592
- Dir.chdir( subdir ) do
593
- run %{ ln -s .root/#{dst} #{f} } unless File.exist?( File.join(subdir, f) )
594
- end
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(subdir, "#{config[:name]}.tex"))
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, subdir, config, {:no_interaction => true,
622
+ init_from_template(templatedir, srcdir, config, {:no_interaction => true,
617
623
  :no_commit => true })
618
624
  # Rename the main file
619
- Dir.chdir( subdir ) do
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(subdir)
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.insubdir"
629
- images = File.join(subdir, 'images')
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, { :src => true } )
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: <Sun 2016-03-27 23:58 svarrette>
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 the one of Falkor's Makefile"
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
- dst = File.join('.root', options[:refdir])
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
@@ -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, 13
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 )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: falkorlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.13
4
+ version: 0.6.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette