falkorlib 0.6.19 → 0.7.0

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.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.rubocop.yml +88 -0
  4. data/.travis.yml +56 -4
  5. data/Gemfile +4 -4
  6. data/Gemfile.lock +55 -27
  7. data/Rakefile +12 -8
  8. data/Vagrantfile +68 -0
  9. data/completion/_falkor +55 -7
  10. data/falkorlib.gemspec +14 -12
  11. data/lib/falkorlib.rb +22 -21
  12. data/lib/falkorlib/bootstrap.rb +5 -1
  13. data/lib/falkorlib/bootstrap/base.rb +385 -693
  14. data/lib/falkorlib/bootstrap/git.rb +137 -0
  15. data/lib/falkorlib/bootstrap/latex.rb +186 -0
  16. data/lib/falkorlib/bootstrap/link.rb +108 -96
  17. data/lib/falkorlib/bootstrap/ruby.rb +102 -0
  18. data/lib/falkorlib/cli.rb +82 -26
  19. data/lib/falkorlib/cli/config.rb +8 -8
  20. data/lib/falkorlib/cli/link.rb +8 -9
  21. data/lib/falkorlib/cli/new.rb +25 -39
  22. data/lib/falkorlib/common.rb +425 -425
  23. data/lib/falkorlib/config.rb +114 -110
  24. data/lib/falkorlib/error.rb +27 -16
  25. data/lib/falkorlib/gem_tasks.rb +12 -11
  26. data/lib/falkorlib/git.rb +3 -4
  27. data/lib/falkorlib/git/base.rb +439 -396
  28. data/lib/falkorlib/git/flow.rb +163 -165
  29. data/lib/falkorlib/git_tasks.rb +31 -31
  30. data/lib/falkorlib/loader.rb +1 -1
  31. data/lib/falkorlib/puppet.rb +3 -5
  32. data/lib/falkorlib/puppet/base.rb +10 -15
  33. data/lib/falkorlib/puppet/modules.rb +367 -365
  34. data/lib/falkorlib/puppet_tasks.rb +11 -8
  35. data/lib/falkorlib/tasks.rb +51 -54
  36. data/lib/falkorlib/tasks/gem.rake +42 -43
  37. data/lib/falkorlib/tasks/gem.rb +12 -11
  38. data/lib/falkorlib/tasks/git.rake +101 -107
  39. data/lib/falkorlib/tasks/git.rb +31 -31
  40. data/lib/falkorlib/tasks/gitflow.rake +131 -141
  41. data/lib/falkorlib/tasks/puppet.rb +11 -8
  42. data/lib/falkorlib/tasks/puppet_modules.rake +143 -154
  43. data/lib/falkorlib/tasks/rspec.rake +94 -59
  44. data/lib/falkorlib/tasks/yard.rake +35 -39
  45. data/lib/falkorlib/version.rb +55 -55
  46. data/lib/falkorlib/versioning.rb +169 -167
  47. data/spec/falkorlib/bootstrap_helpers_spec.rb +106 -56
  48. data/spec/falkorlib/bootstrap_latex_spec.rb +145 -0
  49. data/spec/falkorlib/bootstrap_link_spec.rb +137 -0
  50. data/spec/falkorlib/bootstrap_ruby_spec.rb +118 -0
  51. data/spec/falkorlib/bootstrap_spec.rb +112 -129
  52. data/spec/falkorlib/git_spec.rb +94 -22
  53. data/spec/falkorlib/gitflow_spec.rb +54 -42
  54. data/spec/falkorlib/puppet_modules_spec.rb +35 -26
  55. data/spec/falkorlib/versioning_puppet_module_spec.rb +94 -90
  56. data/spec/falkorlib_spec.rb +5 -0
  57. data/spec/spec_helper.rb +88 -47
  58. data/templates/latex/article-ieee/main.tex.erb +509 -0
  59. data/templates/latex/article/_abstract.tex.erb +19 -0
  60. data/templates/latex/article/_acronyms.tex.erb +116 -0
  61. data/templates/latex/article/_conclusion.tex.erb +25 -0
  62. data/templates/latex/article/_context.tex.erb +17 -0
  63. data/templates/latex/article/_experiments.tex.erb +27 -0
  64. data/templates/latex/article/_implem.tex.erb +17 -0
  65. data/templates/latex/article/_introduction.tex.erb +39 -0
  66. data/templates/latex/article/_related_works.tex.erb +19 -0
  67. data/templates/latex/article/biblio.bib.erb +28 -0
  68. data/templates/latex/article/template.tex.erb +16 -0
  69. data/templates/latex/ieee/IEEEtran.bst +2409 -0
  70. data/templates/latex/ieee/IEEEtran.cls +6347 -0
  71. data/templates/motd/motd.erb +2 -1
  72. metadata +82 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2991193ba63366cf054fbf23cafb5b36dfaa2bc9
4
- data.tar.gz: 59f153625348b86b00d58631c88c8fd4635f8b67
3
+ metadata.gz: 7404b7fd3411800081fd155935da665979a7a493
4
+ data.tar.gz: 7787857ad80882180f9558299b2ff012c48ac202
5
5
  SHA512:
6
- metadata.gz: d8907de32c3abb0988912fc1165501d946f1fc9bdfb7f50aeeb6a838edea4346915a9407bc6c6dc0dc757a805a3ce47e3efc39e0e83906bc790c783e6485ffe6
7
- data.tar.gz: c9dda2e193d2c72a498c60b631aeba60044d842f3131108c9f788b1bf8d8c80dca172ee1cef07610ee180a7b6eb3fa876b375a0b0cc9a1f97fdc40e9ed15eb34
6
+ metadata.gz: 983ed35dfc02c2dfc7edce8e7b55e732753a77362aec3fe0da1ba4be47138d94c16b4296410af8a4c0254a4b8b9f602dd90eed5bc38e318643ff02b61d976077
7
+ data.tar.gz: 22619f68a31bc6c3ec9fdb49152b0b464e5d2590917284a8edb731c534a855d126c3f300ad1187d0319e2906b7b64375fb4320284c4bbfc572681c0dd30d1ac2
data/.gitignore CHANGED
@@ -12,3 +12,4 @@ tmp/
12
12
  /.falkorlib.yaml
13
13
  /lib/falkorlib/thor.old/
14
14
  /.falkor/
15
+ .vagrant/
@@ -0,0 +1,88 @@
1
+ # -*- mode: yaml; -*-
2
+ AllCops:
3
+ DisplayCopNames: true
4
+ Exclude:
5
+ - 'templates/**/*'
6
+ - 'spec/**/*'
7
+
8
+ Style/EmptyLines:
9
+ Enabled: false
10
+ Style/LeadingCommentSpace:
11
+ Enabled: false
12
+ Style/HashSyntax:
13
+ EnforcedStyle: hash_rockets
14
+
15
+ # I dislike these test
16
+ Style/StringLiterals:
17
+ Enabled: false
18
+
19
+ Style/RegexpLiteral:
20
+ Enabled: false
21
+
22
+ # Parenthesis
23
+ Style/ParenthesesAroundCondition:
24
+ Enabled: false
25
+ Style/RedundantParentheses:
26
+ Enabled: false
27
+ Style/TernaryParentheses:
28
+ EnforcedStyle: require_parentheses
29
+
30
+ # Rules for spaces
31
+ Style/EmptyLinesAroundBlockBody:
32
+ EnforcedStyle: no_empty_lines
33
+ Style/EmptyLinesAroundClassBody:
34
+ EnforcedStyle: empty_lines_except_namespace
35
+ Style/EmptyLinesAroundModuleBody:
36
+ EnforcedStyle: empty_lines_except_namespace
37
+
38
+ Style/Alias:
39
+ EnforcedStyle: prefer_alias_method
40
+
41
+ # this one would crash with configatron
42
+ Style/MutableConstant:
43
+ Enabled: false
44
+
45
+ # No I don't want $? to be changed in $CHILD_STATUS...
46
+ Style/SpecialGlobalVars:
47
+ Enabled: false
48
+
49
+ ### Metrics
50
+ # Rubocop was chosen only for style, and not for complexity or quality checks.
51
+ Metrics/BlockLength:
52
+ Enabled: false
53
+ Metrics/ClassLength:
54
+ Enabled: false
55
+
56
+ Metrics/ModuleLength:
57
+ Enabled: false
58
+
59
+ Metrics/MethodLength:
60
+ Enabled: false
61
+
62
+ Metrics/BlockNesting:
63
+ Enabled: false
64
+
65
+ Metrics/AbcSize:
66
+ Enabled: false
67
+
68
+ Metrics/CyclomaticComplexity:
69
+ Enabled: false
70
+
71
+ Metrics/ParameterLists:
72
+ Enabled: false
73
+
74
+ Metrics/LineLength:
75
+ Enabled: false
76
+
77
+ Style/ParallelAssignment:
78
+ Enabled: false
79
+
80
+ Style/SpaceInsideBrackets:
81
+ Enabled: false
82
+ Style/SpaceInsideParens:
83
+ Enabled: false
84
+
85
+ # It will be obvious which code is complex, Rubocop should only lint simple
86
+ # rules for us.
87
+ Metrics/PerceivedComplexity:
88
+ Enabled: false
@@ -1,19 +1,71 @@
1
1
  language: ruby
2
- cache: bundler
2
+ sudo: false
3
+ cache:
4
+ - bundler
5
+ - apt
3
6
  bundler_args: "--without=release doc"
7
+ addons:
8
+ apt:
9
+ packages:
10
+ - build-essential
11
+ - texlive-base
12
+ - texlive-binaries
13
+ - texlive-latex-base
14
+ - texlive-latex-extra
15
+ - texlive-bibtex-extra
16
+ - lmodern
17
+ - texlive-fonts-recommended
18
+ - texlive-latex-recommended
19
+ - texlive-science
20
+ - latex-beamer
21
+ - pgf
22
+ - pandoc
23
+ - unzip
24
+ - git
25
+ - git-flow
26
+ hosts:
27
+ - travis.dev
4
28
  before_install:
5
29
  - gem install bundler
6
- - sudo apt-get update -qq
7
- - sudo apt-get install -qq git-flow git-core
8
30
  rvm:
9
31
  - 2.0.0
10
32
  - 2.1
11
33
  - 2.2
34
+ env:
35
+ global:
36
+ - TRAVIS_CI_RUN=true
37
+ - GIT_SSH='ssh -o StrictHostKeyChecking=no'
38
+ - GIT_AUTHOR_NAME='Travis CI'
39
+ - GIT_AUTHOR_EMAIL='travis@example.com'
40
+ - TEXMFLOCAL=/tmp/texmf/
41
+ # installing a couple of LaTeX packages from CTAN manually as the
42
+ # tlmgr command is mising on ubuntu/precise
43
+ before_install:
44
+ - mkdir -p $TEXMFLOCAL/tex/latex/
45
+ - wget -N -q http://mirrors.ctan.org/install/macros/latex/contrib/tcolorbox.tds.zip
46
+ - wget -N -q http://mirrors.ctan.org/install/macros/latex/contrib/acronym.tds.zip
47
+ - wget -N -q http://mirrors.ctan.org/macros/latex/contrib/floatflt.zip
48
+ - wget -N -q http://mirrors.ctan.org/macros/latex/contrib/todonotes.zip
49
+ - unzip -qq tcolorbox.tds.zip -d $TEXMFLOCAL
50
+ - unzip -qq acronym.tds.zip -d $TEXMFLOCAL
51
+ - unzip -qq floatflt.zip
52
+ - unzip -qq todonotes.zip
53
+ - cd ./floatflt/ && latex floatflt.ins && cd -
54
+ - cd ./todonotes/ && latex todonotes.ins && cd -
55
+ - cp ./floatflt/floatflt.sty $TEXMFLOCAL/tex/latex/
56
+ - cp ./todonotes/todonotes.sty $TEXMFLOCAL/tex/latex/
57
+ - texhash
12
58
  notifications:
59
+ email:
60
+ on_success: never
13
61
  hipchat:
14
62
  rooms:
15
63
  secure: E0V9xQtCyPSB+SZ5n+ztdM5tzJ7d1eR+XR1gIBfAwe0JYnRb735B1v0Z3CVBmosKpv16KEoKUDjum1vHGk8fnOOcxoHx+TtTCF1TVpuBtKzXqG6t4YZAYjkGSIBUM1Zd7kXLlsdmdwRToGmKRqblQHutnm0LkyII/CAwaO+UeY8=
64
+ # slack:
65
+ # secure: NBN4QhHuaXpwZIxUOzZi29Z4iW0EK/d2ID7zZqz+1RDO/9BD7QqX5unM/SFP46oTbhEqNH/vMLLMFQ9i9l7Z1i6Z6nCNRiLRIjgPSL+3GMamPQm1Pj4JaLkwLHogxHdRvozfU3tdSG9uGmK++Aak/NLC/i5TASGrBMgKrmXLXEk=
66
+ slack:
67
+ secure: BKYRevAa4+qThbhsYbsgBxA8bzuNx0lUFTDnIkS1Vw+lwnM0I4o38X7/ZtJccL1YXqEbCBIaz21mNx4UWxMQEcPNyJENHXYLX9zjHxPPuW83KNnrgVLtel0keGwgxl0Ah4eRhPvYzdA5FonfAurw9GuxW4au2XcUNFNy/iKEpX0=
16
68
  # addons:
17
69
  # code_climate:
18
- # repo_token:
70
+ # repo_token:
19
71
  # secure: "ZBtaK84ZnjyT4X7mGSYDx31HgD94nZccxAzKA2SBjakW/hfsx9sBGOusxYN7EuC6JydjwLFN3MwLfEGMgjC1zxNwvLO9PGQbh52QawKBue09qouitJbOODwUfQgzNHj/Z0x3dMv3X1Qz31gbfDaC6DJsnTtG2q7R7Kni8hq4/FU="
data/Gemfile CHANGED
@@ -4,11 +4,11 @@ group :development do
4
4
  gem "bundler"
5
5
  gem "pry"
6
6
  gem "rake"
7
- gem "thor-zsh_completion"
8
7
  end
9
8
 
10
- # group :test do
11
- # gem "rspec", ">= 3"
12
- # end
9
+ group :test do
10
+ gem "simplecov", :require => false
11
+ gem "rubocop", :require => false
12
+ end
13
13
 
14
14
  gemspec
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- falkorlib (0.6.19)
4
+ falkorlib (0.7.0)
5
+ activesupport (~> 4.0)
5
6
  artii (>= 2.1)
6
7
  awesome_print (~> 1.2)
7
8
  configatron (~> 3.2)
@@ -16,33 +17,42 @@ PATH
16
17
  rake (~> 10.1, >= 10.1.0)
17
18
  term-ansicolor (~> 1.3)
18
19
  thor (>= 0.19)
20
+ thor-zsh_completion
19
21
 
20
22
  GEM
21
23
  remote: http://rubygems.org/
22
24
  specs:
23
25
  CFPropertyList (2.2.8)
24
- addressable (2.3.6)
25
- artii (2.1.1)
26
+ activesupport (4.2.7.1)
27
+ i18n (~> 0.7)
28
+ json (~> 1.7, >= 1.7.7)
29
+ minitest (~> 5.1)
30
+ thread_safe (~> 0.3, >= 0.3.4)
31
+ tzinfo (~> 1.1)
32
+ addressable (2.5.0)
33
+ public_suffix (~> 2.0, >= 2.0.2)
34
+ artii (2.1.2)
35
+ ast (2.3.0)
26
36
  awesome_print (1.7.0)
27
- backports (3.6.0)
37
+ backports (3.6.8)
28
38
  codeclimate-test-reporter (0.3.0)
29
39
  simplecov (>= 0.7.1, < 1.0.0)
30
- coderay (1.1.0)
40
+ coderay (1.1.1)
31
41
  configatron (3.2.0)
32
42
  deep_merge (1.0.1)
33
43
  diff-lcs (1.2.5)
34
44
  diffy (3.1.0)
35
45
  docile (1.1.5)
36
- ethon (0.7.0)
46
+ ethon (0.9.1)
37
47
  ffi (>= 1.3.0)
38
48
  facter (2.4.6)
39
49
  CFPropertyList (~> 2.2.6)
40
- faraday (0.9.0)
50
+ faraday (0.10.0)
41
51
  multipart-post (>= 1.2, < 3)
42
- faraday_middleware (0.9.1)
43
- faraday (>= 0.7.4, < 0.10)
44
- ffi (1.9.3)
45
- gh (0.13.2)
52
+ faraday_middleware (0.10.1)
53
+ faraday (>= 0.7.4, < 1.0)
54
+ ffi (1.9.14)
55
+ gh (0.14.0)
46
56
  addressable
47
57
  backports
48
58
  faraday (~> 0.8)
@@ -51,26 +61,33 @@ GEM
51
61
  net-http-pipeline
52
62
  git_remote_branch (0.3.8)
53
63
  hashr (0.0.22)
54
- highline (1.6.21)
64
+ highline (1.7.8)
65
+ i18n (0.7.0)
55
66
  json (1.8.3)
56
- launchy (2.4.2)
67
+ launchy (2.4.3)
57
68
  addressable (~> 2.3)
58
69
  license-generator (0.4.1)
59
70
  thor
60
71
  logger (1.2.8)
61
72
  method_source (0.8.2)
62
73
  minigit (0.0.4)
63
- multi_json (1.10.1)
74
+ minitest (5.9.1)
75
+ multi_json (1.12.1)
64
76
  multipart-post (2.0.0)
65
77
  net-http-persistent (2.9.4)
66
78
  net-http-pipeline (1.0.1)
67
- pry (0.9.12.6)
68
- coderay (~> 1.0)
69
- method_source (~> 0.8)
79
+ parser (2.3.1.4)
80
+ ast (~> 2.2)
81
+ powerpack (0.1.1)
82
+ pry (0.10.4)
83
+ coderay (~> 1.1.0)
84
+ method_source (~> 0.8.1)
70
85
  slop (~> 3.4)
71
- pusher-client (0.6.0)
86
+ public_suffix (2.0.4)
87
+ pusher-client (0.6.2)
72
88
  json
73
89
  websocket (~> 1.0)
90
+ rainbow (2.1.0)
74
91
  rake (10.5.0)
75
92
  rspec (3.5.0)
76
93
  rspec-core (~> 3.5.0)
@@ -85,6 +102,13 @@ GEM
85
102
  diff-lcs (>= 1.2.0, < 2.0)
86
103
  rspec-support (~> 3.5.0)
87
104
  rspec-support (3.5.0)
105
+ rubocop (0.45.0)
106
+ parser (>= 2.3.1.1, < 3.0)
107
+ powerpack (~> 0.1)
108
+ rainbow (>= 1.99.1, < 3.0)
109
+ ruby-progressbar (~> 1.7)
110
+ unicode-display_width (~> 1.0, >= 1.0.1)
111
+ ruby-progressbar (1.8.1)
88
112
  rubygems-tasks (0.2.4)
89
113
  safe_yaml (0.9.7)
90
114
  simplecov (0.8.2)
@@ -92,29 +116,32 @@ GEM
92
116
  multi_json
93
117
  simplecov-html (~> 0.8.0)
94
118
  simplecov-html (0.8.0)
95
- slop (3.5.0)
119
+ slop (3.6.0)
96
120
  term-ansicolor (1.4.0)
97
121
  tins (~> 1.0)
98
122
  thor (0.19.1)
99
123
  thor-zsh_completion (0.1.1)
124
+ thread_safe (0.3.5)
100
125
  tins (1.12.0)
101
- travis (1.6.14)
102
- addressable (~> 2.3)
126
+ travis (1.8.4)
103
127
  backports
104
128
  faraday (~> 0.9)
105
129
  faraday_middleware (~> 0.9, >= 0.9.1)
106
130
  gh (~> 0.13)
107
131
  highline (~> 1.6)
108
132
  launchy (~> 2.1)
109
- pry (~> 0.9, < 0.10)
133
+ net-http-persistent (~> 2.9)
110
134
  pusher-client (~> 0.4)
111
135
  typhoeus (~> 0.6, >= 0.6.8)
112
136
  travis-lint (1.8.0)
113
137
  hashr (~> 0.0.22)
114
138
  safe_yaml (~> 0.9.0)
115
- typhoeus (0.6.8)
116
- ethon (>= 0.7.0)
117
- websocket (1.1.4)
139
+ typhoeus (0.8.0)
140
+ ethon (>= 0.8.0)
141
+ tzinfo (1.2.2)
142
+ thread_safe (~> 0.1)
143
+ unicode-display_width (1.1.1)
144
+ websocket (1.2.3)
118
145
  yard (0.8.7.4)
119
146
 
120
147
  PLATFORMS
@@ -127,11 +154,12 @@ DEPENDENCIES
127
154
  pry
128
155
  rake
129
156
  rspec (~> 3.0)
157
+ rubocop
130
158
  rubygems-tasks (~> 0.2)
131
- thor-zsh_completion
159
+ simplecov
132
160
  travis (~> 1.6)
133
161
  travis-lint (~> 1.8)
134
162
  yard (~> 0.8)
135
163
 
136
164
  BUNDLED WITH
137
- 1.13.5
165
+ 1.13.6
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
1
  ##############################################################################
2
2
  # Rakefile - Configuration file for rake (http://rake.rubyforge.org/)
3
- # Time-stamp: <Lun 2015-01-12 21:10 svarrette>
3
+ # Time-stamp: <Sun 2016-11-13 20:53 svarrette>
4
4
  #
5
5
  # Copyright (c) 2012 Sebastien Varrette <Sebastien.Varrette@uni.lu>
6
6
  # . http://varrette.gforge.uni.lu
@@ -16,10 +16,13 @@
16
16
  # * http://www.stuartellis.eu/articles/rake/
17
17
  ##############################################################################
18
18
 
19
- task :default => [ :rspec ]
19
+ # require 'rubygems'
20
+ # FALKORLIB_SPEC = Gem::Specification.load("falkorlib.gemspec")
21
+
22
+ task :default => [ 'rspec' ]
23
+
20
24
  #.....................
21
25
  require 'rake/clean'
22
-
23
26
  CLEAN.add 'pkg'
24
27
  CLOBBER.add 'doc'
25
28
 
@@ -31,20 +34,21 @@ require "falkorlib"
31
34
 
32
35
  # Adapt the versioning aspects
33
36
  FalkorLib.config.versioning do |c|
34
- c[:type] = 'gem'
37
+ c[:type] = 'gem'
35
38
  end
36
39
 
37
40
  # Adapt the Git flow aspects
38
41
  FalkorLib.config.gitflow do |c|
39
- c[:branches] = {
40
- :master => 'production',
41
- :develop => 'devel'
42
- }
42
+ c[:branches] = {
43
+ :master => 'production',
44
+ :develop => 'devel'
45
+ }
43
46
  end
44
47
 
45
48
  require "falkorlib/tasks/git" # OR require "falkorlib/git_tasks"
46
49
  require "falkorlib/tasks/gem" # OR require "falkorlib/gem_tasks"
47
50
 
51
+
48
52
  # [ 'rspec', 'yard' ] .each do |tasks|
49
53
  # load "falkorlib/tasks/#{tasks}.rake"
50
54
  # end
@@ -0,0 +1,68 @@
1
+ # -*- mode: ruby -*-
2
+ # vi: set ft=ruby :
3
+
4
+ require 'yaml'
5
+
6
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
7
+ # configures the configuration version (we support older styles for
8
+ # backwards compatibility). Please don't change it unless you know what
9
+ # you're doing.
10
+
11
+ Vagrant.configure("2") do |config|
12
+ # The most common configuration options are documented and commented below.
13
+ # For a complete reference, please see the online documentation at
14
+ # https://docs.vagrantup.com.
15
+ #config.vm.box = "debian/contrib-jessie64"
16
+ config.vm.box = "ubuntu/precise64"
17
+
18
+ # Benefit from travis infos
19
+ travis_yaml = File.join(File.dirname(__FILE__), '.travis.yml')
20
+ travis_config = File.exist?(travis_yaml) ? YAML.load_file(travis_yaml) : {}
21
+ # Manage requested packages installation through 'addons.apt.packages'
22
+ if travis_config['addons']
23
+ if travis_config['addons']['apt']
24
+ if travis_config['addons']['apt']['packages']
25
+ config.vm.provision "shell", inline: <<-SHELL
26
+ sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install #{travis_config['addons']['apt']['packages'].join(" ")}
27
+ SHELL
28
+ end
29
+ end
30
+ end
31
+ # Manage pre-hook commands listed under before_install
32
+ if travis_config['before_install']
33
+ config.vm.provision "shell", env: { 'TEXMFLOCAL' => '/tmp/texmf' }, inline: <<-SHELL
34
+ #{travis_config['before_install'].join("\n").gsub(/\.\//, '/home/vagrant/')}
35
+ SHELL
36
+ end
37
+
38
+
39
+ # Bootstrap the gem dependencies according to two approaches:
40
+ # 1. :system - rely on system ruby
41
+ # 2. :rvm (experimental) - mimic Travis-CI approach by relying on RVM
42
+ # Any other value for bootstrap_mode will discard this phase
43
+ bootstrap_mode = :none
44
+ next unless [ :system, :rvm ].include?( bootstrap_mode)
45
+ if bootstrap_mode == :system
46
+ # Preliminaries
47
+ config.vm.provision "shell", inline: <<-SHELL
48
+ sudo apt-get install -qq rubygems;
49
+ sudo gem install bundler;
50
+
51
+ SHELL
52
+ end
53
+
54
+
55
+
56
+
57
+
58
+ # # Benefit from travis infos
59
+ # travis_yaml = File.join(File.dirname(__FILE__), '.travis.yml')
60
+ # travis_config = File.exist?(travis_yaml) ? YAML.load_file(travis_yaml) : {}
61
+ # if travis_config['before_install']
62
+ # config.vm.provision "shell", inline: <<-SHELL
63
+ # #{travis_config['before_install'].join("\n")}
64
+ # SHELL
65
+ # end
66
+
67
+ # Post-provision: run bundle
68
+ end