falkorlib 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f6c753e462c35ce2c8cb3f896315931ef6eedb0cc8a2976955fc45baee50a1b
4
- data.tar.gz: 2d6f11affc72651b6156fcf905d6498d2e2d1a925619d366fc5a1be233ebea25
3
+ metadata.gz: 78758647f5f8fa786afc72d81e8b57866f774e548fd956237c417d9d9c53f871
4
+ data.tar.gz: 6107fcdcf59e970dac03f536d51a641c665e1505d9c3f8ca257747a46fa0fc6f
5
5
  SHA512:
6
- metadata.gz: 4f04f7cdaaf56fe15cda4632bdb0f7ae37dc94eeb01a5b03b6c8070cae836b77ad4398bbd7d46d6a46c94ec0f57d667fc99b020737ad59c8e63b35e3cd68db4b
7
- data.tar.gz: bfd68a396b5063be6f044851d23927ad8cf2919423a94834aaec7c74fd16235e399d435c76fd9569d3445c48048c0ee5efccc3698eebb598be1f3654a42ff554
6
+ metadata.gz: af645b81860ddcb17091a3ae3f046f7e33d74c72aa90f5a431f967efd77d116bb9067b3fce96dd83e7d244ff4a37f2d093fddbc20197120102a050d430a7999d
7
+ data.tar.gz: f066036ac70f16331bc14c4ebdf1fd08a79fdd3cdd81e09cf50227aee45b05bf871b8dce8121b8381e8c063684123df0befd2240abd0862f3733afd2749ab52c
data/Gemfile.lock CHANGED
@@ -1,23 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.8.3)
4
+ falkorlib (0.8.4)
5
5
  activesupport (~> 4.0)
6
6
  artii (>= 2.1)
7
7
  awesome_print (~> 1.2)
8
- configatron (~> 3.2)
8
+ configatron (~> 3.0)
9
9
  deep_merge (~> 1.0.1)
10
10
  diffy (>= 3.0)
11
11
  facter (~> 2.4.1)
12
12
  git_remote_branch (~> 0)
13
- json (~> 1.8)
13
+ json (~> 2.0)
14
14
  license-generator (~> 0)
15
15
  logger (>= 1.2.8)
16
16
  minigit (~> 0)
17
17
  rake (>= 12.3.3)
18
18
  term-ansicolor (~> 1.3)
19
- thor (>= 0.19)
20
- thor-zsh_completion
19
+ thor (>= 1.0)
21
20
 
22
21
  GEM
23
22
  remote: http://rubygems.org/
@@ -63,12 +62,12 @@ GEM
63
62
  concurrent-ruby (~> 1.0)
64
63
  irb (1.1.1)
65
64
  jaro_winkler (1.5.4)
66
- json (1.8.6)
65
+ json (2.3.0)
67
66
  launchy (2.4.3)
68
67
  addressable (~> 2.3)
69
68
  license-generator (0.4.1)
70
69
  thor
71
- logger (1.3.0)
70
+ logger (1.4.2)
72
71
  method_source (1.0.0)
73
72
  minigit (0.0.4)
74
73
  minitest (5.14.0)
@@ -111,16 +110,14 @@ GEM
111
110
  rubygems-tasks (0.2.5)
112
111
  irb (~> 1.0)
113
112
  safe_yaml (0.9.7)
114
- simplecov (0.17.1)
113
+ simplecov (0.18.5)
115
114
  docile (~> 1.1)
116
- json (>= 1.8, < 3)
117
- simplecov-html (~> 0.10.0)
118
- simplecov-html (0.10.2)
115
+ simplecov-html (~> 0.11)
116
+ simplecov-html (0.12.2)
119
117
  sync (0.5.0)
120
118
  term-ansicolor (1.7.1)
121
119
  tins (~> 1.0)
122
120
  thor (1.0.1)
123
- thor-zsh_completion (0.1.2)
124
121
  thread_safe (0.3.6)
125
122
  tins (1.24.1)
126
123
  sync
data/falkorlib.gemspec CHANGED
@@ -73,18 +73,18 @@ Gem::Specification.new do |s|
73
73
  #s.add_runtime_dependency 'git', '~> 1.2', '>= 1.2.5'
74
74
  s.add_runtime_dependency('minigit', '~> 0')
75
75
  s.add_runtime_dependency("term-ansicolor", "~> 1.3")
76
- s.add_runtime_dependency("configatron", "~> 3.2")
76
+ s.add_runtime_dependency("configatron", "~> 3.0")
77
77
  s.add_runtime_dependency("awesome_print", "~> 1.2")
78
- s.add_runtime_dependency("json", "~> 1.8")
78
+ s.add_runtime_dependency("json", "~> 2.0")
79
79
  s.add_runtime_dependency("license-generator", '~> 0')
80
80
  s.add_runtime_dependency("deep_merge", '~> 1.0.1')
81
81
  s.add_runtime_dependency("diffy", '>= 3.0')
82
82
  s.add_runtime_dependency("logger", '>= 1.2.8')
83
- s.add_runtime_dependency("thor", '>= 0.19')
83
+ s.add_runtime_dependency("thor", '>= 1.0')
84
84
  s.add_runtime_dependency("artii", '>= 2.1')
85
85
  s.add_runtime_dependency("facter", '~> 2.4.1')
86
- s.add_runtime_dependency("thor-zsh_completion", '>= 0')
87
86
  s.add_runtime_dependency("activesupport", '~> 4.0')
87
+ #s.add_runtime_dependency("bundler-stats", '~> 2.0')
88
88
  #s.add_runtime_dependency("benchmark", '~> 4.0')
89
89
  #s.add_runtime_dependency("mercenary", '>= 0.3.5')
90
90
 
@@ -107,6 +107,7 @@ Gem::Specification.new do |s|
107
107
  s.add_development_dependency("travis-lint", "~> 1.8")
108
108
  s.add_development_dependency('simplecov', '~> 0.12.0')
109
109
  s.add_development_dependency("codeclimate-test-reporter", '~> 0') #, group: :test, require: nil)
110
+ #s.add_development_dependency("thor-zsh_completion", '>= 0.1.5')
110
111
  #s.add_development_dependency("bluecloth", "~> 2.2.0")
111
112
  #s.add_development_dependency("wlang", "~> 0.10.2")
112
113
 
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Thu 2018-11-29 11:39 svarrette>
3
+ # Time-stamp: <Sun 2020-04-12 14:37 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Bootstrapping operations
6
6
  #
@@ -28,11 +28,12 @@ module FalkorLib #:nodoc:
28
28
  :hooksdir => 'config/hooks',
29
29
  :hook => 'pre-commit.git-crypt.sh',
30
30
  :ulhpc => [
31
- #'Ox5D08BCDD4F156AD7', # S. Varrette
32
- '0x3F3242C5B34D98C2', # V. Plugaru
31
+ #'0x5D08BCDD4F156AD7', # S. Varrette
32
+ #'0x3F3242C5B34D98C2', # V. Plugaru
33
33
  '0x6429C2514EBC4737', # S. Peter
34
- '0x07FEA8BA69203C2D', # C. Parisot
34
+ #'0x07FEA8BA69203C2D', # C. Parisot
35
35
  '0x37183CEF550DF40B', # H. Cartiaux
36
+
36
37
  ],
37
38
  # :hooks => {
38
39
  # :precommit => 'https://gist.github.com/848c82daa63710b6c132bb42029b30ef.git',
@@ -534,7 +535,9 @@ module FalkorLib
534
535
  config[k.to_sym] = ask( "\t" + Kernel.format("Project %-20s", k.to_s))
535
536
  end
536
537
  config[:description] = config[:summary]
537
- config[:gitflow] = FalkorLib::GitFlow.guess_gitflow_config(rootdir)
538
+ if FalkorLib::GitFlow.init?(rootdir)
539
+ config[:gitflow] = FalkorLib::GitFlow.guess_gitflow_config(rootdir)
540
+ end
538
541
  config[:make] = File.exists?(File.join(rootdir, 'Makefile'))
539
542
  config[:rake] = File.exists?(File.join(rootdir, 'Rakefile'))
540
543
  config
@@ -0,0 +1,32 @@
1
+ # -*- encoding: utf-8 -*-
2
+ ################################################################################
3
+ # Time-stamp: <Mon 2017-01-16 10:14 svarrette>
4
+ ################################################################################
5
+ # Interface for Bootstrapping a Ruby gem
6
+ #
7
+
8
+ require "falkorlib"
9
+ require "falkorlib/common"
10
+ require "falkorlib/bootstrap"
11
+
12
+ include FalkorLib::Common
13
+
14
+ module FalkorLib
15
+ module Bootstrap #:nodoc:
16
+
17
+ module_function
18
+
19
+ ###### gem ######
20
+ # Initialize a Ruby gem project
21
+ # Supported options:
22
+ # * :force [boolean] force action
23
+ ##
24
+ def gem(dir = Dir.pwd, options = {})
25
+ info "Initialize a Ruby gem "
26
+
27
+ end # gem
28
+
29
+
30
+
31
+ end # module Bootstrap
32
+ end # module FalkorLib
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Thu 2018-11-08 18:27 svarrette>
3
+ # Time-stamp: <Sun 2020-04-12 14:35 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main Bootstrapping operations
6
6
  #
@@ -120,6 +120,7 @@ module FalkorLib
120
120
  warning "no Git remote 'origin' found, thus no remote synchronization performed"
121
121
  end
122
122
  end
123
+ return 0
123
124
  end # repo
124
125
 
125
126
  ###### gitcrypt ######
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Wed 2018-11-21 11:46 svarrette>
3
+ # Time-stamp: <Sun 2020-04-12 09:04 svarrette>
4
4
  ################################################################################
5
5
  # Interface for the main python Bootstrapping operations
6
6
  #
@@ -149,6 +149,7 @@ Now you probably need to perform the following actions:
149
149
  direnv allow .
150
150
  # Eventually install the pyenv version
151
151
  pyenv install #{config[:version]}
152
+ cd ..; cd - # To reload the appropriate version
152
153
 
153
154
  You can then enjoy your newly configured sand-boxed environment
154
155
 
@@ -164,6 +165,8 @@ To freeze your environment to pass it around
164
165
  pip freeze -l > requirements.txt # Dump it to a requirements file
165
166
  git add requirements.txt
166
167
  git commit -s -m 'Python package list' requirements.txt
168
+ # Later for collaborators upon clone
169
+ pip install -r requirements.txt
167
170
 
168
171
  MOTD
169
172
  exit_status.to_i
data/lib/falkorlib/cli.rb CHANGED
@@ -8,7 +8,7 @@
8
8
  require 'thor'
9
9
  require 'thor/actions'
10
10
  require 'thor/group'
11
- require 'thor/zsh_completion'
11
+ #require 'thor/zsh_completion'
12
12
 
13
13
  require 'falkorlib'
14
14
 
@@ -31,7 +31,7 @@ module FalkorLib
31
31
 
32
32
  include Thor::Actions
33
33
  include FalkorLib::Common
34
- include ZshCompletion::Command
34
+ # include ZshCompletion::Command
35
35
 
36
36
  #default_command :info
37
37
 
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Fri 2016-11-11 14:17 svarrette>
3
+ # Time-stamp: <Sun 2020-04-12 14:38 svarrette>
4
4
  ################################################################################
5
5
 
6
6
  require "falkorlib"
@@ -374,6 +374,7 @@ module FalkorLib #:nodoc:
374
374
  really_continue? unless options[:no_interaction]
375
375
  next
376
376
  end
377
+ #puts config.to_yaml
377
378
  content += ERB.new(File.read(erb.to_s), nil, '<>').result(binding)
378
379
  end
379
380
  # error "Unable to find the template file #{erbfile}" unless File.exists? (erbfile )
@@ -1,6 +1,6 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  ################################################################################
3
- # Time-stamp: <Mon 2018-11-12 07:15 svarrette>
3
+ # Time-stamp: <Sun 2020-04-12 14:57 svarrette>
4
4
  ################################################################################
5
5
  # FalkorLib Configuration
6
6
  #
@@ -55,8 +55,9 @@ module FalkorLib #:nodoc:
55
55
  },
56
56
  #:custom_cfg => '.falkorlib.yaml',
57
57
  :rvm => {
58
- :rubies => [ '2.4.1', '2.3.4', '2.2.7', '2.1.10', '2.0.0', '1.9.3' ],
59
- :version => '2.3.4',
58
+ # See https://www.ruby-lang.org/en/downloads/branches/ for stable branches
59
+ :rubies => [ '2.7.0', '2.6.5', '2.5.6', '2.4.9' ],
60
+ :version => '2.6.5',
60
61
  :versionfile => '.ruby-version',
61
62
  :gemsetfile => '.ruby-gemset'
62
63
  },
@@ -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, 8, 3
22
+ MAJOR, MINOR, PATCH = 0, 8, 4
23
23
 
24
24
  module_function
25
25
 
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/ruby
2
+ #########################################
3
+ # bootstrap_mkdocs_spec.rb
4
+ # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
+ # Time-stamp: <Sun 2020-04-12 12:25 svarrette>
6
+ #
7
+ # @description Check the Bootstrapping operations for mkdocs
8
+ #
9
+ # Copyright (c) 2020 Sebastien Varrette <Sebastien.Varrette@uni.lu>
10
+ # . http://varrette.gforge.uni.lu
11
+ ##############################################################################
12
+
13
+ require 'spec_helper'
14
+ require 'tmpdir'
15
+ require 'fileutils'
16
+
17
+ describe FalkorLib::Bootstrap do
18
+
19
+ include FalkorLib::Common
20
+
21
+ dirs = {
22
+ :without_git => Dir.mktmpdir,
23
+ :with_git => Dir.mktmpdir,
24
+ }
25
+
26
+ #_____________
27
+ before :all do
28
+ $stdout.sync = true
29
+ FalkorLib.config[:no_interaction] = true
30
+ end
31
+
32
+ #____________
33
+ after :all do
34
+ dirs.each do |t,d|
35
+ #next if t == :with_git
36
+ FileUtils.remove_entry_secure d
37
+ end
38
+ FalkorLib.config[:no_interaction] = false
39
+ end
40
+
41
+ [ :without_git, :with_git ].each do |ctx|
42
+ # [ :without_git ].each do |ctx|
43
+ # [ :with_git ].each do |ctx|
44
+ dir = dirs[ctx]
45
+ ########################################################################
46
+ context "bootstrap/mkdocs (#{ctx}) within temporary directory '#{dir}'" do
47
+
48
+ if ctx == :with_git
49
+ it "initialize Git in the temporary directory #{dir}" do
50
+ c = FalkorLib::Git.init(dir)
51
+ expect(c).to eq(0)
52
+ t = FalkorLib::Git.init?(dir)
53
+ expect(t).to be true
54
+ end
55
+ end
56
+
57
+ ######### mkdocs #########
58
+ it "#mkdocs -- #{ctx}" do
59
+ c = FalkorLib::Bootstrap.mkdocs(dir)
60
+ expect(c).to eq(0)
61
+ d = File.join(dir, 'docs')
62
+ conffile = File.join(dir, 'mkdocs.yml')
63
+ expect(File.directory?(d)).to be true
64
+ expect(File.exists?(conffile)).to be true
65
+ File.read(File.realpath(conffile)) do |f|
66
+ [
67
+ "site_name: #{File.basename(dir)}",
68
+ "nav:"
69
+ ].each do |pattern|
70
+ f.should include "#{pattern}"
71
+ end
72
+ end
73
+ end
74
+
75
+ end # context "bootstrap/mkdocs"
76
+ end # each
77
+
78
+ end
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/ruby
2
+ #########################################
3
+ # bootstrap_vagrant_spec.rb
4
+ # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
+ # Time-stamp: <Sun 2020-04-12 15:35 svarrette>
6
+ #
7
+ # @description Check the Bootstrapping operations for a new repo
8
+ #
9
+ # Copyright (c) 2020 Sebastien Varrette <Sebastien.Varrette@uni.lu>
10
+ # . http://varrette.gforge.uni.lu
11
+ ##############################################################################
12
+
13
+ require 'spec_helper'
14
+ require 'tmpdir'
15
+ require 'fileutils'
16
+
17
+ describe FalkorLib::Bootstrap do
18
+
19
+ include FalkorLib::Common
20
+
21
+ dirs = {
22
+ :with_make => Dir.mktmpdir,
23
+ :with_rake => Dir.mktmpdir,
24
+ }
25
+
26
+ #_____________
27
+ before :all do
28
+ $stdout.sync = true
29
+ FalkorLib.config[:no_interaction] = true
30
+ end
31
+
32
+ #____________
33
+ after :all do
34
+ dirs.each do |t,d|
35
+ FileUtils.remove_entry_secure d
36
+ end
37
+ FalkorLib.config[:no_interaction] = false
38
+ end
39
+
40
+ [ :with_make, :with_rake ].each do |ctx|
41
+ # [ :with_make ].each do |ctx|
42
+ # [ :with_rake ].each do |ctx|
43
+ dir = dirs[ctx]
44
+ ########################################################################
45
+ context "bootstrap/repo (#{ctx}) within temporary directory '#{dir}'" do
46
+
47
+ it "#repo -- bootstrap a new repository" do
48
+ c = FalkorLib::Bootstrap.repo(dir,
49
+ {
50
+ :no_interaction => true,
51
+ :make => (ctx == :with_make),
52
+ :rake => (ctx == :with_rake),
53
+ :git_flow => true
54
+ })
55
+ expect(c).to eq(0)
56
+ files_to_check = (ctx == :with_make) ? [ 'Makefile' ] : [ 'Rakefile', 'Gemfile', '.ruby-version', '.ruby-gemset' ]
57
+ files_to_check += [ 'VERSION', 'README.md', '.falkor/config' ]
58
+ files_to_check.each do |f|
59
+ expect(File).to exist( File.join(dir, f))
60
+ end
61
+ if (ctx == :with_make)
62
+ [ '.submodules/Makefiles' ].each do |d|
63
+ expect(File.directory?(File.join(dir, d))).to be true
64
+ end
65
+ end
66
+ end
67
+
68
+ it "#repo -- repeat bootstrap" do
69
+ c = capture(:stdout) {
70
+ FalkorLib::Bootstrap.repo(dir,
71
+ {
72
+ :no_interaction => true,
73
+ :make => (ctx == :with_make),
74
+ :rake => (ctx == :with_rake)
75
+ })
76
+ }
77
+ [
78
+ "Git is already initialized for the repository "
79
+ ].each do |pattern|
80
+ expect(c).to include pattern
81
+ end
82
+ end
83
+
84
+ end # context "bootstrap/repo"
85
+ end # each
86
+ end
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/ruby
2
+ #########################################
3
+ # bootstrap_vagrant_spec.rb
4
+ # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
+ # Time-stamp: <Sun 2020-04-12 14:22 svarrette>
6
+ #
7
+ # @description Check the Bootstrapping operations for Vagrant
8
+ #
9
+ # Copyright (c) 2020 Sebastien Varrette <Sebastien.Varrette@uni.lu>
10
+ # . http://varrette.gforge.uni.lu
11
+ ##############################################################################
12
+
13
+ require 'spec_helper'
14
+ require 'tmpdir'
15
+ require 'fileutils'
16
+
17
+ describe FalkorLib::Bootstrap do
18
+
19
+ include FalkorLib::Common
20
+
21
+ dirs = {
22
+ :without_git => Dir.mktmpdir,
23
+ :with_git => Dir.mktmpdir,
24
+ }
25
+
26
+ #_____________
27
+ before :all do
28
+ $stdout.sync = true
29
+ FalkorLib.config[:no_interaction] = true
30
+ end
31
+
32
+ #____________
33
+ after :all do
34
+ dirs.each do |t,d|
35
+ #next if t == :with_git
36
+ FileUtils.remove_entry_secure d
37
+ end
38
+ FalkorLib.config[:no_interaction] = false
39
+ end
40
+
41
+ #[ :without_git, :with_git ].each do |ctx|
42
+ # [ :without_git ].each do |ctx|
43
+ [ :with_git ].each do |ctx|
44
+ dir = dirs[ctx]
45
+ ########################################################################
46
+ context "bootstrap/vagrant (#{ctx}) within temporary directory '#{dir}'" do
47
+
48
+ if ctx == :with_git
49
+ it "initialize Git in the temporary directory #{dir}" do
50
+ c = FalkorLib::Git.init(dir)
51
+ expect(c).to eq(0)
52
+ t = FalkorLib::Git.init?(dir)
53
+ expect(t).to be true
54
+ end
55
+ end
56
+
57
+ ######### vagrant #########
58
+ it "#vagrant -- #{ctx}" do
59
+ c = FalkorLib::Bootstrap.vagrant(dir)
60
+ expect(c).to eq(0)
61
+ confdir = File.join(dir, 'vagrant')
62
+ conffile = File.join(dir, 'Vagrantfile')
63
+ expect(File.directory?(confdir)).to be true
64
+ expect(File.exists?(conffile)).to be true
65
+ bootstrap = File.join(confdir, 'bootstrap.sh')
66
+ expect(File.exists?(bootstrap)).to be true
67
+
68
+ # File.read(File.realpath(conffile)) do |f|
69
+ # [
70
+ # "site_name: #{File.basename(dir)}",
71
+ # "nav:"
72
+ # ].each do |pattern|
73
+ # f.should include "#{pattern}"
74
+ # end
75
+ # end
76
+ end
77
+
78
+ end # context "bootstrap/mkdocs"
79
+ end # each
80
+
81
+ end
@@ -2,7 +2,7 @@
2
2
  #########################################
3
3
  # gitflow_spec.rb
4
4
  # @author Sebastien Varrette <Sebastien.Varrette@uni.lu>
5
- # Time-stamp: <Wed 2016-11-09 09:16 svarrette>
5
+ # Time-stamp: <Sun 2020-04-12 15:15 svarrette>
6
6
  #
7
7
  # @description Check the Git Flow operations -- see https://github.com/nvie/gitflow
8
8
  #
@@ -77,6 +77,26 @@ describe FalkorLib::GitFlow do
77
77
  expect(br).to eq(FalkorLib.config[:gitflow][:branches][:develop])
78
78
  end
79
79
  end
80
+
81
+ it "#guess_gitflow_config" do
82
+ c = FalkorLib::GitFlow.guess_gitflow_config(dir)
83
+ {
84
+ :master => 'production',
85
+ :develop => 'devel'
86
+ }.each do |type,v|
87
+ expect(c[:branches][type.to_sym]).to eq(v)
88
+ end
89
+ {
90
+ :feature => 'feature/',
91
+ :release => 'release/',
92
+ :hotfix => 'hotfix/',
93
+ :support => 'support/',
94
+ :versiontag => 'v'
95
+ }.each do |type,v|
96
+ expect(c[:prefix][type.to_sym]).to eq(v)
97
+ end
98
+ end
99
+
80
100
  end
81
101
 
82
102
  end
@@ -1,13 +1,33 @@
1
1
  require 'spec_helper'
2
2
  describe FalkorLib do
3
3
 
4
- it "should have a version number" do
5
- expect(FalkorLib.const_defined?(:VERSION)).to be true
6
- end
4
+ it "should have a version number" do
5
+ expect(FalkorLib.const_defined?(:VERSION)).to be true
6
+ end
7
7
 
8
- it "self.lib" do
9
- expect(FalkorLib.lib).to include 'lib'
8
+ it "should have a Major/Minor/Patch number" do
9
+ [ :MAJOR, :MINOR, :PATCH].each do |t|
10
+ expect(FalkorLib::Version.const_defined?(t)).to be true
10
11
  end
12
+ end
13
+
14
+ it "#self.lib" do
15
+ expect(FalkorLib.lib).to include 'lib'
16
+ end
17
+
18
+ it "#self.major" do
19
+ v = FalkorLib::Version::MAJOR
20
+ expect(FalkorLib::Version.major).to eq(v)
21
+ end
22
+
23
+ it "#self.minor" do
24
+ v = FalkorLib::Version::MINOR
25
+ expect(FalkorLib::Version.minor).to eq(v)
26
+ end
11
27
 
28
+ it "#self.patch" do
29
+ v = FalkorLib::Version::PATCH
30
+ expect(FalkorLib::Version.patch).to eq(v)
31
+ end
12
32
 
13
33
  end
@@ -1,18 +1,13 @@
1
- -*- mode: markdown; mode: visual-line; fill-column: 80 -*-
2
-
3
1
  <% unless (config[:license].empty? or config[:license] == "none") %>
4
2
  [![Licence](<%= FalkorLib::Bootstrap::get_badge("license", config[:license], 'blue') %>)](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:licenses][ config[:license] ][:url] %>)
5
3
  <% end %>
6
4
  ![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
5
 
8
- Time-stamp: <Sun 2017-01-15 16:58 svarrette>
9
-
10
6
  <%= ::Artii::Base.new().asciify( config[:name] ).split("\n").join("\n ") %>
11
7
  Copyright (c) <%= Time.now.year %> <%= config[:author] %> <<%= config[:mail] %>>
12
8
 
13
9
  <%= config[:description] %>
14
10
 
15
-
16
11
  This is the main page of the documentation for this repository, which relies on [MkDocs](http://www.mkdocs.org/) and the [Read the Docs](http://readthedocs.io) theme. It proposes to detail the following elements:
17
12
 
18
13
  * The [organization and directory layout](layout.md)
@@ -1,3 +1,4 @@
1
+ <% unless config[:forge].empty? %>
1
2
 
2
3
  This repository is hosted on [<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:name] %>](<%= config[:project_page] %>).
3
4
 
@@ -9,6 +10,7 @@ This repository is hosted on [<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge]
9
10
  $> mkdir -p ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
10
11
  $> cd ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
11
12
  $> git clone <%= config[:origin] %>
13
+ <% end %>
12
14
 
13
15
  <% if config[:type].include?( :rvm ) %>
14
16
  Now ensure [RVM](https://rvm.io/) is correctly configured for this repository:
@@ -25,26 +27,35 @@ Configure the dependencies detailed in the [`Gemfile`](Gemfile) through the [Bun
25
27
  **`/!\ IMPORTANT`**: Once cloned, initiate your local copy of the repository by running:
26
28
 
27
29
  $> cd <%= name.downcase %>
28
- <% if options[:make] %>
30
+ <% if config[:make] %>
29
31
  $> make setup
30
32
  <% else %>
31
33
  $> rake setup
32
34
  <% end %>
33
35
 
34
- This will initiate the [Git submodules of this repository](.gitmodules) and setup the [git flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) layout for this repository.
36
+ This will initiate the [Git submodules of this repository](.gitmodules), setup the [git flow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow) layout for this repository.
37
+ Later on, instead of pulling, you may want you can update **all** of your local branches by running:
35
38
 
36
- Later on, you can upgrade the [Git submodules](.gitmodules) to the latest version by running:
39
+ ```
40
+ make up
41
+ ```
37
42
 
38
- <% if options[:make] %>
39
- $> make upgrade
43
+ 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 command to ensure consistency with regards the Git submodules:
44
+
45
+ ```bash
46
+ <% if config[:make] %>
47
+ $> make update # OR make up
40
48
  <% else %>
41
- $> rake git:submodules:upgrade
49
+ $> rake git:submodules:update
42
50
  <% end %>
51
+ # OR
52
+ git submodule update
53
+ ```
43
54
 
44
- 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:
55
+ finally, if you want to upgrade the [Git submodules](https://git-scm.com/book/en/v2/Git-Tools-Submodules) (see `.gitmodules`) to the latest version by running:
45
56
 
46
57
  <% if options[:make] %>
47
- $> make update
58
+ $> make upgrade
48
59
  <% else %>
49
- $> rake git:submodules:update
60
+ $> rake git:submodules:upgrade
50
61
  <% end %>
@@ -57,15 +57,17 @@ $> git config –-global user.name "Firstname LastName" # Adapt ac
57
57
  $> git config –-global user.email "Firstname.LastName@domain.org" # Adapt with your mail
58
58
  ~~~
59
59
 
60
- Clone the [project repository](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:name] %><%=config[:project_page] %> from a Terminal (Powershell as `administrator` under windows):
60
+ <% unless config[:forge].empty? %>
61
+ Clone the [project repository](<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:name] %><%= config[:project_page] %> from a Terminal (Powershell as `administrator` under windows):
61
62
 
62
63
  ~~~bash
63
64
  $> mkdir -p ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
64
65
  $> cd ~/git/<%= FalkorLib::Config::Bootstrap::DEFAULTS[:forge][ config[:forge].to_sym ][:url] %>/<%= config[:by] %>
65
66
  $> git clone <%= config[:origin] %>
66
- <% if options[:make] %>
67
+ <% if config[:make] %>
67
68
  $> make setup # Under Mac OS / Linux
68
69
  <% else %>
69
70
  $> rake setup # Under Mac OS / Linux
70
71
  <% end %>
71
72
  ~~~
73
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  site_name: <%= config[:sitename] %>
2
- pages:
2
+ nav:
3
3
  - Home: 'index.md'
4
4
  - Organization: 'layout.md'
5
5
  - Getting Started:
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.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Varrette
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-10 00:00:00.000000000 Z
11
+ date: 2020-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.2'
75
+ version: '3.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.2'
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: awesome_print
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '1.8'
103
+ version: '2.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '1.8'
110
+ version: '2.0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: license-generator
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -170,14 +170,14 @@ dependencies:
170
170
  requirements:
171
171
  - - ">="
172
172
  - !ruby/object:Gem::Version
173
- version: '0.19'
173
+ version: '1.0'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - ">="
179
179
  - !ruby/object:Gem::Version
180
- version: '0.19'
180
+ version: '1.0'
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: artii
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -206,20 +206,6 @@ dependencies:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
208
  version: 2.4.1
209
- - !ruby/object:Gem::Dependency
210
- name: thor-zsh_completion
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :runtime
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
209
  - !ruby/object:Gem::Dependency
224
210
  name: activesupport
225
211
  requirement: !ruby/object:Gem::Requirement
@@ -374,8 +360,11 @@ dependencies:
374
360
  - - "~>"
375
361
  - !ruby/object:Gem::Version
376
362
  version: '0'
377
- description: |
378
- 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.).
363
+ description: 'This is my personal library I use to share the Ruby tidbits and Rake
364
+ tasks I made it for my various projects, and also to bootstrap easily several element
365
+ of my daily workflow (new git repository, new beamer slides etc.).
366
+
367
+ '
379
368
  email:
380
369
  - Sebastien.Varrette@uni.lu
381
370
  executables:
@@ -407,6 +396,7 @@ files:
407
396
  - lib/falkorlib.rb
408
397
  - lib/falkorlib/bootstrap.rb
409
398
  - lib/falkorlib/bootstrap/base.rb
399
+ - lib/falkorlib/bootstrap/gems.rb
410
400
  - lib/falkorlib/bootstrap/git.rb
411
401
  - lib/falkorlib/bootstrap/latex.rb
412
402
  - lib/falkorlib/bootstrap/link.rb
@@ -447,9 +437,12 @@ files:
447
437
  - spec/falkorlib/bootstrap_helpers_spec.rb
448
438
  - spec/falkorlib/bootstrap_latex_spec.rb
449
439
  - spec/falkorlib/bootstrap_link_spec.rb
440
+ - spec/falkorlib/bootstrap_mkdocs_spec.rb
450
441
  - spec/falkorlib/bootstrap_python_spec.rb
442
+ - spec/falkorlib/bootstrap_repo_spec.rb
451
443
  - spec/falkorlib/bootstrap_ruby_spec.rb
452
444
  - spec/falkorlib/bootstrap_spec.rb
445
+ - spec/falkorlib/bootstrap_vagrant_spec.rb
453
446
  - spec/falkorlib/common_spec.rb
454
447
  - spec/falkorlib/config_spec.rb
455
448
  - spec/falkorlib/error_spec.rb
@@ -560,8 +553,9 @@ homepage: https://github.com/Falkor/falkorlib
560
553
  licenses:
561
554
  - MIT
562
555
  metadata: {}
563
- post_install_message: |
564
- Thanks for installing FalkorLib.
556
+ post_install_message: 'Thanks for installing FalkorLib.
557
+
558
+ '
565
559
  rdoc_options: []
566
560
  require_paths:
567
561
  - lib
@@ -576,8 +570,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
576
570
  - !ruby/object:Gem::Version
577
571
  version: '0'
578
572
  requirements: []
579
- rubyforge_project:
580
- rubygems_version: 2.7.7
573
+ rubygems_version: 3.0.8
581
574
  signing_key:
582
575
  specification_version: 4
583
576
  summary: Sebastien Varrette aka Falkor's Common library to share Ruby code and {rake,cap}
@@ -599,4 +592,7 @@ test_files:
599
592
  - spec/falkorlib/versioning_spec.rb
600
593
  - spec/falkorlib/puppet_modules_spec.rb
601
594
  - spec/falkorlib/versioning_puppet_module_spec.rb
595
+ - spec/falkorlib/bootstrap_vagrant_spec.rb
596
+ - spec/falkorlib/bootstrap_mkdocs_spec.rb
602
597
  - spec/falkorlib/versioning_gem_spec.rb
598
+ - spec/falkorlib/bootstrap_repo_spec.rb