falkorlib 0.6.8 → 0.6.9

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: 29361d1eaf30aff1060e7637f8673f97526b64d0
4
- data.tar.gz: 23172d2ef795128d7d9a37443bb15dbf2a5b623b
3
+ metadata.gz: 7c4ac751e681194fa46db7b0e9a1a542d8ef01dc
4
+ data.tar.gz: c72d8fab6a413daad6189e65436539b49f4a9ef0
5
5
  SHA512:
6
- metadata.gz: 1f94d7e8bc8f7c6e9810f4ca397528cb0beef83696684bab26dd597c2101cfe2bb6c62f8a4d30e113ee0d283bf7bb8f9192e5ff5a7cc3291b758fdef71b59a4f
7
- data.tar.gz: 20bb94f68292bf491fa5f9b3afb6e59ad4cd9d63abc13cdc0bab23f15149094a03427c56487e8edfbc02e39c90aef9c5ba99b8a4aded59d9fc6185002a18a7e7
6
+ metadata.gz: f249fd1c98e79c512c78fbb04d5ac730a897f761c779d174fa94355f704ac5de36a248f290c3248ccc233d6a2244f2a763a6bed075316d06e3b43521f7897bb3
7
+ data.tar.gz: cd3e62ec9122aabad2a9eb834652e9118b8df52dbcce5010025ff5074d21159d587cf23595329086e392679402d11cd973b03fefa293383b8efef5815cbbcbb3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.6.8)
4
+ falkorlib (0.6.9)
5
5
  artii (>= 2.1)
6
6
  awesome_print (~> 1.2)
7
7
  configatron (~> 3.2)
@@ -31,11 +31,11 @@ GEM
31
31
  configatron (3.2.0)
32
32
  deep_merge (1.0.1)
33
33
  diff-lcs (1.1.3)
34
- diffy (3.0.7)
34
+ diffy (3.1.0)
35
35
  docile (1.1.5)
36
36
  ethon (0.7.0)
37
37
  ffi (>= 1.3.0)
38
- facter (2.4.1)
38
+ facter (2.4.6)
39
39
  CFPropertyList (~> 2.2.6)
40
40
  faraday (0.9.0)
41
41
  multipart-post (>= 1.2, < 3)
@@ -88,10 +88,10 @@ GEM
88
88
  simplecov-html (~> 0.8.0)
89
89
  simplecov-html (0.8.0)
90
90
  slop (3.5.0)
91
- term-ansicolor (1.3.0)
91
+ term-ansicolor (1.3.2)
92
92
  tins (~> 1.0)
93
93
  thor (0.19.1)
94
- tins (1.3.5)
94
+ tins (1.8.2)
95
95
  travis (1.6.14)
96
96
  addressable (~> 2.3)
97
97
  backports
@@ -124,3 +124,6 @@ DEPENDENCIES
124
124
  travis (~> 1.6)
125
125
  travis-lint (~> 1.8)
126
126
  yard (~> 0.8)
127
+
128
+ BUNDLED WITH
129
+ 1.11.2
data/README.md CHANGED
@@ -41,7 +41,7 @@ Or install it yourself as:
41
41
  **Note** you probably wants to do the above within an isolated environment. See
42
42
  below for some explanation on this setup.
43
43
 
44
- ## Usage
44
+ ## Usage
45
45
 
46
46
  This library features two aspects
47
47
 
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Thu 2016-02-04 12:18 svarrette>
3
+ # Time-stamp: <Mon 2016-02-22 23:25 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Bootstrapping operations
6
6
  #
@@ -207,6 +207,8 @@ module FalkorLib
207
207
  run %{ bundle init }
208
208
  info " ==> configuring Gemfile with Falkorlib"
209
209
  File.open( gemfile, 'a') do |f|
210
+ f.puts "source 'https://rubygems.org'"
211
+ f.puts ""
210
212
  f.puts "gem 'falkorlib' #, :path => '~/git/github.com/Falkor/falkorlib'"
211
213
  end
212
214
  FalkorLib::Git.add(gemfile) if use_git
@@ -406,6 +408,11 @@ module FalkorLib
406
408
  else
407
409
  config[:name] = ask("\tProject name: ", name) unless options[:name]
408
410
  end
411
+ if options[:rake]
412
+ options[:make] = false
413
+ options[:rvm] = true
414
+ end
415
+ config[:type] << :rvm if options[:rake]
409
416
  # Type of project
410
417
  config[:type] << :latex if options[:latex]
411
418
  if config[:type].empty?
@@ -415,6 +422,8 @@ module FalkorLib
415
422
  config[:type] << [ :ruby, :rvm ] if [ :gem, :rvm, :octopress, :puppet_module ].include?( t )
416
423
  config[:type] << :python if t == :pyenv
417
424
  end
425
+ config[:type].uniq!
426
+ ap config
418
427
  config[:type] = config[:type].uniq.flatten
419
428
  # Apply options (if provided)
420
429
  [ :name, :forge ].each do |k|
@@ -513,8 +522,12 @@ module FalkorLib
513
522
  raise FalkorLib::ExecError "Not used in a Git repository" unless FalkorLib::Git.init?
514
523
  path = normalized_path(dir)
515
524
  relative_path_to_root = (Pathname.new( FalkorLib::Git.rootdir(dir) ).relative_path_from Pathname.new( File.realpath(path)))
516
- FalkorLib::Common.error "Already at the root directory of the Git repository" if "#{relative_path_to_root}" == "."
525
+ if "#{relative_path_to_root}" == "."
526
+ FalkorLib::Common.warning "Already at the root directory of the Git repository"
527
+ FalkorLib::Common.really_continue?
528
+ end
517
529
  target = options[:name] ? options[:name] : '.root'
530
+ puts "Entering '#{relative_path_to_root}'"
518
531
  unless File.exists?( File.join(path, target))
519
532
  warning "creating the symboling link '#{target}' which points to '#{relative_path_to_root}'" if options[:verbose]
520
533
  # Format: ln_s(old, new, options = {}) -- Creates a symbolic link new which points to old.
@@ -523,6 +536,8 @@ module FalkorLib
523
536
  run %{ ln -s #{relative_path_to_root} #{target} }
524
537
  end
525
538
  FalkorLib::Git.add(File.join(path, target), "Add symlink to the root directory as .root")
539
+ else
540
+ puts " ... the symbolic link '#{target}' already exists"
526
541
  end
527
542
  end # rootlink
528
543
 
@@ -540,14 +555,39 @@ module FalkorLib
540
555
  path = normalized_path(dir)
541
556
  rootdir = FalkorLib::Git.rootdir(path)
542
557
  info "Create a symlink to the one of Falkor's Makefile"
543
- # Add Falkor's
558
+ # Add Falkor's Makefiles
544
559
  submodules = FalkorLib.config[:git][:submodules]
545
560
  submodules['Makefiles'] = {
546
561
  :url => 'https://github.com/Falkor/Makefiles.git',
547
562
  :branch => 'devel'
548
563
  } if submodules['Makefiles'].nil?
549
564
  FalkorLib::Git.submodule_init(rootdir, submodules)
550
-
565
+ FalkorLib::Bootstrap.rootlink(dir)
566
+ dst = File.join('.root', options[:refdir])
567
+ ap options
568
+ makefile = 'Makefile'
569
+ type = 'latex'
570
+ # recall to place the default option (--latex) at the last position
571
+ [ :gnuplot, :images, :generic, :markdown] .each do |e|
572
+ if options[e.to_sym]
573
+ type = e.to_s
574
+ break
575
+ end
576
+ end
577
+ makefile = 'Makefile.insubdir' if options[:generic]
578
+ makefile = 'Makefile.to_html' if options[:markdown]
579
+ dst = File.join(dst, type, makefile)
580
+ unless File.exists?( File.join(path, 'Makefile'))
581
+ info "Bootstrapping #{type.capitalize} Makefile (as symlink to Falkor's Makefile)"
582
+ really_continue?
583
+ Dir.chdir( path ) do
584
+ run %{ ln -s #{dst} Makefile }
585
+ end
586
+ ap File.join(path, 'Makefile')
587
+ FalkorLib::Git.add(File.join(path, 'Makefile'), "Add symlink to the #{type.capitalize} Makefile")
588
+ else
589
+ puts " ... Makefile already setup"
590
+ end
551
591
  end # makefile_link
552
592
 
553
593
 
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Thu 2015-10-22 20:16 svarrette>
3
+ # Time-stamp: <Mon 2016-02-22 23:25 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require 'thor'
@@ -27,11 +27,12 @@ module FalkorLib
27
27
 
28
28
  ###### make ######
29
29
  method_option :latex, :default => true, :type => :boolean, :aliases => '-l', :desc => "Makefile to compile LaTeX documents"
30
- method_option :gnuplot, :type => :boolean, :aliases => ['--plot', '-g', '-p'], :desc => "Makefile to compile GnuPlot scripts"
30
+ method_option :gnuplot, :type => :boolean, :aliases => ['--plot', '-p'], :desc => "Makefile to compile GnuPlot scripts"
31
+ method_option :generic, :type => :boolean, :aliases => '-g', :desc => "Generic Makefile for sub directory"
31
32
  method_option :markdown, :type => :boolean, :aliases => '-m', :desc => "Makefile to convert Markdown files to HTML"
32
- method_option :markdown, :type => :boolean, :aliases => '-m', :desc => "Makefile to convert Markdown files to HTML"
33
- method_option :repo, :default => "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles",
34
- :aliases => '-r', :desc => "Path to Falkor's Makefile repository (Relative to Git root dir)"
33
+ method_option :images, :type => :boolean, :aliases => [ '-i', '--img' ], :desc => "Makefile to optimize images"
34
+ method_option :refdir, :default => "#{FalkorLib.config[:git][:submodulesdir]}/Makefiles",
35
+ :aliases => '-d', :desc => "Path to Falkor's Makefile repository (Relative to Git root dir)"
35
36
  method_option :target, :aliases => '-t', :desc => "Symlink target"
36
37
  #......................................
37
38
  desc "make [options]", "Create a symlink to one of Falkor's Makefile, set as Git submodule"
@@ -34,7 +34,7 @@ begin
34
34
  #t.pattern = "spec/**/versioning_*spec.rb"
35
35
  #t.pattern = "spec/**/puppet*spec.rb"
36
36
  #t.pattern = "spec/**/bootstrap*spec.rb"
37
- #t.pattern = "spec/**/gitf*spec.rb"
37
+ #t.pattern = "spec/**/git*spec.rb"
38
38
  #t.pattern = "spec/**/error*spec.rb"
39
39
  #t.pattern = "spec/**/config*spec.rb"
40
40
 
@@ -19,7 +19,7 @@ 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, 8
22
+ MAJOR, MINOR, PATCH = 0, 6, 9
23
23
 
24
24
  module_function
25
25
 
@@ -2,7 +2,7 @@
2
2
  #########################################
3
3
  # git_spec.rb
4
4
  # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
- # Time-stamp: <Dim 2015-01-25 00:00 svarrette>
5
+ # Time-stamp: <Mon 2016-02-22 23:34 svarrette>
6
6
  #
7
7
  # @description Check the Git operations
8
8
  #
@@ -153,7 +153,8 @@ describe FalkorLib::Git do
153
153
  c.should_not be_empty
154
154
  t = c.is_a? Array
155
155
  t.should be_true
156
- c.length.should == 2
156
+ ap c
157
+ c.length.should >= 2
157
158
  end
158
159
 
159
160
  it "#config -- check pattern 2" do
@@ -169,7 +170,8 @@ describe FalkorLib::Git do
169
170
  c.should_not be_empty
170
171
  t = c.is_a? Hash
171
172
  t.should be_true
172
- c.keys.length.should == 2
173
+ ap c
174
+ c.keys.length.should >= 2
173
175
  end
174
176
 
175
177
  it "#config -- check hash correctness" do
@@ -5,12 +5,11 @@
5
5
  <% end %>
6
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
7
 
8
- Time-stamp: <Thu 2016-02-04 12:11 svarrette>
8
+ Time-stamp: <Mon 2016-02-22 22:04 svarrette>
9
9
 
10
10
  <%= ::Artii::Base.new().asciify( config[:name] ).split("\n").join("\n ") %>
11
11
  Copyright (c) <%= Time.now.year %> <%= config[:author] %> <<%= config[:mail] %>>
12
12
 
13
- <%= config[:summary] %>
14
13
 
15
14
  ## Synopsis
16
15
 
@@ -60,3 +59,14 @@ Later on, you can upgrade the [Git submodules](.gitmodules) to the latest versio
60
59
  <% else %>
61
60
  $> rake git:submodules:upgrade
62
61
  <% end %>
62
+
63
+ 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:
64
+
65
+ <% if options[:make] %>
66
+ $> make update
67
+ <% else %>
68
+ $> rake git:submodules:update
69
+ <% end %>
70
+
71
+
72
+
@@ -2,3 +2,6 @@
2
2
  ## Issues / Feature request
3
3
 
4
4
  You can submit bug / issues / feature request using the [`<%= config[:by] %>/<%= name.downcase %>` Project Tracker](<%= config[:issues_url] %>)
5
+
6
+
7
+
@@ -20,3 +20,4 @@ If things are fine, you should be able to access the list of available tasks by
20
20
 
21
21
  You probably want to activate the bash-completion for rake tasks.
22
22
  I personally use the one provided [here](https://github.com/ai/rake-completion).
23
+
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.6.8
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-04 00:00:00.000000000 Z
11
+ date: 2016-02-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -472,7 +472,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
472
472
  version: '0'
473
473
  requirements: []
474
474
  rubyforge_project:
475
- rubygems_version: 2.2.1
475
+ rubygems_version: 2.4.8
476
476
  signing_key:
477
477
  specification_version: 4
478
478
  summary: Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap}