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 +4 -4
- data/Gemfile.lock +8 -5
- data/README.md +1 -1
- data/lib/falkorlib/bootstrap/base.rb +44 -4
- data/lib/falkorlib/cli/link.rb +6 -5
- data/lib/falkorlib/tasks/rspec.rake +1 -1
- data/lib/falkorlib/version.rb +1 -1
- data/spec/falkorlib/git_spec.rb +5 -3
- data/templates/README/header_readme.erb +12 -2
- data/templates/README/readme_issues.erb +3 -0
- data/templates/README/readme_rvm.erb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c4ac751e681194fa46db7b0e9a1a542d8ef01dc
|
4
|
+
data.tar.gz: c72d8fab6a413daad6189e65436539b49f4a9ef0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f249fd1c98e79c512c78fbb04d5ac730a897f761c779d174fa94355f704ac5de36a248f290c3248ccc233d6a2244f2a763a6bed075316d06e3b43521f7897bb3
|
7
|
+
data.tar.gz: cd3e62ec9122aabad2a9eb834652e9118b8df52dbcce5010025ff5074d21159d587cf23595329086e392679402d11cd973b03fefa293383b8efef5815cbbcbb3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
falkorlib (0.6.
|
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
|
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.
|
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.
|
91
|
+
term-ansicolor (1.3.2)
|
92
92
|
tins (~> 1.0)
|
93
93
|
thor (0.19.1)
|
94
|
-
tins (1.
|
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
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
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
|
-
|
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
|
|
data/lib/falkorlib/cli/link.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
################################################################################
|
3
|
-
# Time-stamp: <
|
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', '-
|
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 :
|
33
|
-
method_option :
|
34
|
-
:aliases => '-
|
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/**/
|
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
|
|
data/lib/falkorlib/version.rb
CHANGED
data/spec/falkorlib/git_spec.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
#########################################
|
3
3
|
# git_spec.rb
|
4
4
|
# @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
|
5
|
-
# Time-stamp: <
|
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
|
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
|
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] %>) [](<%= config[:issues_url] %>)
|
7
7
|
|
8
|
-
Time-stamp: <
|
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
|
+
|
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.
|
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-
|
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.
|
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}
|