limarka 20.6.8.pre.350 → 20.6.8.pre.358

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: 36d248ccf20ef4fe2f1d54d4f376fde272fb463fa6904571e90932e3020b713c
4
- data.tar.gz: 4537a2fc39a6e1fce79fa157b998e5d58e02c842364abf1779179751037f1de0
3
+ metadata.gz: 1e04e1b49b83129cd8175b2dbe0c7f0e22555265dc692905bcdccf685b500a06
4
+ data.tar.gz: 4f1b840ae56c1f1d31c04df4e310edd34dfac0caeedfe4b24f145a721e254bc2
5
5
  SHA512:
6
- metadata.gz: 468e561e1518c0694cbe181dc6cc2d7cdf711db3d9680b00afaca039b19bd50c52478261074db283851c7f52ebbed189645694b582963ba40db093afbcc5d8f5
7
- data.tar.gz: 81966466cd3d906ef1ebc42bbb897870617a7da6b9aa8bae079b7d3f258df9143962ecf687e64590eb92e7204970d032b21098ce87ccb1f16e0e712133fe9e35
6
+ metadata.gz: 98cc2bd28e4eeea96a0c542b13a85993d8f527a9752269d0bdaf65991974b2f2c00ed344ab3ee18b7dc5a4518643dc90d3f39e902a7836bf03f1720ae12c1b24
7
+ data.tar.gz: b5dbe027b9e14b8b1e7eb6cf451f5fbcfd6248642958d5262da09da2ef8538243ff2c45e6e694d384505827a747d701c7129dee1b881ecccecf29b25a8991ca1
@@ -11,29 +11,35 @@ env:
11
11
  jobs:
12
12
  include:
13
13
  - stage: testes
14
+ name: "Testes RUBY"
14
15
  before_install:
15
16
  - sudo apt-get update -qq
16
- - bin/instalador.sh -dp
17
+ - sudo bin/instaladores/dependencias_execucao_install.sh && sudo bin/instaladores/dependencias_desenvolvimento_install.sh
18
+ - sudo bin/instaladores/pandoc_install.sh -q
17
19
  before_script:
18
20
  - pandoc -v
19
- - git clone https://github.com/abntex/trabalho-academico-limarka.git modelo-oficial
21
+ - git clone --depth=1 https://github.com/abntex/trabalho-academico-limarka.git modelo-oficial
20
22
  script:
21
23
  - bundle exec rake spec:ruby
22
24
  - bundle exec rake cucumber:ruby
23
25
  - stage: testes
26
+ name: "Testes com LaTeX (PDFs)"
24
27
  cache:
25
28
  directories:
26
29
  - $HOME/.TinyTeX
27
30
  before_install:
28
31
  - sudo apt-get update -qq
29
- - export PATH=$PATH:~/.TinyTeX2/bin/x86_64-linux
30
- - bin/instalador.sh -dptc
32
+ - sudo bin/instaladores/dependencias_execucao_install.sh && sudo bin/instaladores/dependencias_desenvolvimento_install.sh
33
+ - sudo bin/instaladores/pandoc_install.sh -q
34
+ - sudo bin/instaladores/tinytex_install.sh
35
+ - export PATH=$PATH:~/.TinyTeX/bin/x86_64-linux
31
36
  before_script:
37
+ - tlmgr --version && tlmgr show --only-installed
32
38
  - latexmk -v
33
39
  - xelatex -v
34
40
  - pdftotext -v
35
41
  - pandoc -v
36
- - git clone https://github.com/abntex/trabalho-academico-limarka.git modelo-oficial
42
+ - git clone --depth=1 https://github.com/abntex/trabalho-academico-limarka.git modelo-oficial
37
43
  script:
38
44
  - bundle exec rspec spec/dependencias/latex_spec.rb
39
45
  - bundle exec rspec spec/simples_spec.rb
@@ -62,5 +68,5 @@ jobs:
62
68
  script: bin/build-docker.sh && bin/deploy-docker.sh $TRAVIS_TAG
63
69
  on:
64
70
  tags: true
65
- after_failure:
71
+ after_script:
66
72
  - cat /root/.TinyTeX/texmf-var/web2c/tlmgr.log
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env sh
2
2
  # $1: limarka version
3
3
  echo "Gerando imagem do limarka..."
4
- docker build -t ruby-latex-pandoc - < containers/ruby-latex-pandoc.dockerfile
4
+ docker build -t ruby-latex-pandoc . -f containers/ruby-latex-pandoc.dockerfile
5
5
  docker build -t limarka - < containers/limarka.dockerfile
6
6
  docker images
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env sh
2
+
1
3
  # $1: TAG
2
4
  # http://codewiki.wikidot.com/shell-script:if-else
3
5
  if [ -n "$1" ]
@@ -52,14 +52,21 @@ done
52
52
  if [ "$codename" = "bionic" ]; then
53
53
 
54
54
  if [ -n "$dependencias" ]; then
55
- $dry sudo apt-get install -y -qq \
55
+ $dry sudo apt-get install -y -qq --no-install-recommends \
56
56
  language-pack-pt \
57
57
  locales \
58
58
  pdfgrep \
59
59
  poppler-utils \
60
- ruby-full \
60
+ ruby-bundler \
61
+ ruby-json \
62
+ ruby-ffi \
63
+ libffi-dev \
61
64
  unzip \
62
- xclip
65
+ xclip \
66
+ wget \
67
+ perl \
68
+ luajit \
69
+ python
63
70
  fi
64
71
 
65
72
  if [ -n "$tex" ]; then
@@ -80,33 +87,42 @@ if [ "$codename" = "bionic" ]; then
80
87
  abntex2 \
81
88
  babel-portuges \
82
89
  bookmark \
90
+ caption \
83
91
  enumitem \
84
92
  epstopdf-pkg \
85
- ifetex \
86
93
  lastpage \
87
94
  lipsum \
88
95
  listings \
89
- ltcaption \
90
96
  memoir \
91
97
  microtype \
92
98
  pdflscape \
93
99
  pdfpages \
100
+ psnfss \
101
+ shipunov \
102
+ texliveonfly \
94
103
  textcase \
95
104
  xcolor
96
105
 
97
106
  tlmgr option -- autobackup 0
98
107
  else
99
108
  $dry wget -qO- "https://yihui.name/gh/tinytex/tools/install-unx.sh" \| sh
100
- $dry tlmgr install abntex2 \
109
+ $dry tlmgr install \
110
+ abntex2 \
101
111
  babel-portuges \
112
+ bookmark \
113
+ caption \
102
114
  enumitem \
103
- ifetex \
115
+ epstopdf-pkg \
104
116
  lastpage \
105
117
  lipsum \
106
118
  listings \
107
119
  memoir \
108
120
  microtype \
121
+ pdflscape \
109
122
  pdfpages \
123
+ psnfss \
124
+ shipunov \
125
+ texliveonfly \
110
126
  textcase \
111
127
  xcolor
112
128
  $dry tlmgr option -- autobackup 0
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env sh
2
+
3
+ apt-get install -y -qq \
4
+ pdfgrep \
5
+ poppler-utils
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env sh
2
+
3
+ apt-get install -y -qq \
4
+ libfontconfig \
5
+ locales \
6
+ perl-doc \
7
+ wget \
8
+ unzip
@@ -11,10 +11,10 @@ while getopts "q" opt; do
11
11
  esac
12
12
  done
13
13
 
14
- if [ $quiet eq 1 ]
14
+ if [ $quiet eq 1 ]; then
15
15
  wget -nv $PANDOC_DEB
16
16
  else
17
17
  wget -c $PANDOC_DEB
18
18
  fi
19
19
 
20
- sudo dpkg -i pandoc-*.deb && rm pandoc-*.deb
20
+ dpkg -i pandoc-*.deb && rm pandoc-*.deb
@@ -1,25 +1,28 @@
1
1
  #!/usr/bin/env sh
2
2
 
3
- if command -v tlmgr > /dev/null; then
3
+ if [ "$IGNORE_CACHE" != "1" ] && command -v tlmgr > /dev/null; then
4
4
  tex_em_cache=1
5
5
  echo TinyTeX não será instalado pois foi encontrado no cache.
6
- fi
7
-
8
- if [ $tex_em_cache -eq 1 ]; then
9
- : #echo TinyTeX não será instalado.
10
6
  else
11
7
  wget -qO- "https://yihui.name/gh/tinytex/tools/install-unx.sh" | sh
12
- tlmgr install abntex2 \
8
+ ~/bin/tlmgr install \
9
+ abntex2 \
13
10
  babel-portuges \
11
+ bookmark \
12
+ caption \
14
13
  enumitem \
15
- ifetex \
14
+ epstopdf-pkg \
16
15
  lastpage \
17
16
  lipsum \
18
17
  listings \
19
18
  memoir \
20
19
  microtype \
20
+ pdflscape \
21
21
  pdfpages \
22
+ psnfss \
23
+ shipunov \
24
+ texliveonfly \
22
25
  textcase \
23
26
  xcolor
24
- tlmgr option -- autobackup 0
27
+ ~/bin/tlmgr option -- autobackup 0
25
28
  fi
@@ -5,37 +5,18 @@ LABEL maintainer="eduardo.ufpb@gmail.com"
5
5
  # Tentamos seguir as melhores práticas:
6
6
  # https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
7
7
 
8
- RUN apt-get update && apt-get install -y -qq \
9
- build-essential \
10
- fontconfig \
11
- locales \
12
- pdfgrep \
13
- poppler-utils \
14
- unzip \
15
- wget
8
+ WORKDIR /tmp
9
+ COPY bin/instaladores/dependencias_execucao_install.sh \
10
+ bin/instaladores/pandoc_install.sh \
11
+ bin/instaladores/tinytex_install.sh \
12
+ /tmp/
16
13
 
17
- # Instala tinytex (/root/.TinyTex)
18
- RUN wget -qO- "https://yihui.name/gh/tinytex/tools/install-unx.sh" | sh
19
- ENV PATH="/root/bin:${PATH}"
14
+ RUN apt-get update && /tmp/dependencias_execucao_install.sh
20
15
 
21
- # instala bibliotecas para o abntex2/limarka
22
- RUN tlmgr install \
23
- abntex2 \
24
- babel-portuges \
25
- bookmark \
26
- enumitem \
27
- epstopdf-pkg \
28
- ifetex \
29
- lastpage \
30
- lipsum \
31
- listings \
32
- ltcaption \
33
- memoir \
34
- microtype \
35
- pdflscape \
36
- pdfpages \
37
- textcase \
38
- xcolor
16
+ # Instala tinytex (/root/.TinyTex)
17
+ # e bibliotecas para o abntex2/limarka
18
+ RUN IGNORE_CACHE=1 /tmp/tinytex_install.sh
19
+ ENV PATH="/root/bin:~/.TinyTeX/bin/x86_64-linux:${PATH}"
39
20
 
40
21
  # Configurando o idioma português #175: https://hub.docker.com/_/debian/#locales
41
22
  RUN rm -rf /var/lib/apt/lists/* \
@@ -43,7 +24,4 @@ RUN rm -rf /var/lib/apt/lists/* \
43
24
  ENV LANG pt_BR.UTF8
44
25
 
45
26
  # Instalação do pandoc
46
- WORKDIR /tmp
47
- RUN wget https://github.com/jgm/pandoc/releases/download/2.9.2.1/pandoc-2.9.2.1-1-amd64.deb \
48
- && dpkg -i pandoc-*.deb \
49
- && rm pandoc-*.deb
27
+ RUN /tmp/pandoc_install.sh
@@ -58,6 +58,9 @@ module Limarka
58
58
  def compila
59
59
  Dir.chdir(options[:output_dir]) do
60
60
  basename = File.basename(texto_tex_file, '.tex')
61
+ if system ("whereis texliveonfly")
62
+ system "texliveonfly -c xelatex -f #{basename}", :out=>'xxx-texliveonfly-std.txt'
63
+ end
61
64
  system "latexmk --quiet --xelatex -f #{basename}", :out=>'xxx-latexmk-std.txt', :err=>'xxx-latexmk-erros.txt'
62
65
  if (usa_pdftotext) then
63
66
  system "pdftotext -enc UTF-8 #{basename}.pdf"
@@ -50,5 +50,6 @@ Gem::Specification.new do |spec|
50
50
  spec.add_dependency "pandoc_abnt", "~> 2.0.0"
51
51
  spec.add_dependency "guard"
52
52
  spec.add_dependency "guard-shell"
53
+ spec.add_dependency "guard-rake"
53
54
 
54
55
  end
@@ -0,0 +1,28 @@
1
+ ERB_TEMPLATE = <<~HEREDOC
2
+ guard :shell do
3
+ <% all_tasks.each do |t, files| %>
4
+ watch(%r{^(<%= files.join('|') %>)$}) do |m|
5
+ system("rake <%= t %>")
6
+ end
7
+ <% end %>
8
+ end
9
+ HEREDOC
10
+
11
+ desc "Generates a Guardfile from Rake tasks"
12
+ task :guard do
13
+ app = Rake::application
14
+ app.init
15
+ app.load_rakefile
16
+
17
+ all_tasks = {}
18
+ app.tasks.each do |t|
19
+ t.sources.each do |src|
20
+ if File.file?(src) then
21
+ all_tasks[t.name] = [] unless all_tasks[t.name]
22
+ all_tasks[t.name] << src
23
+ end
24
+ end
25
+ end
26
+ template = ERB.new(ERB_TEMPLATE)
27
+ File.write('Guardfile', template.result(binding))
28
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limarka
3
3
  version: !ruby/object:Gem::Version
4
- version: 20.6.8.pre.350
4
+ version: 20.6.8.pre.358
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo de Santana Medeiros Alexandre
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-06-08 00:00:00.000000000 Z
11
+ date: 2020-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -262,6 +262,20 @@ dependencies:
262
262
  - - ">="
263
263
  - !ruby/object:Gem::Version
264
264
  version: '0'
265
+ - !ruby/object:Gem::Dependency
266
+ name: guard-rake
267
+ requirement: !ruby/object:Gem::Requirement
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ version: '0'
272
+ type: :runtime
273
+ prerelease: false
274
+ version_requirements: !ruby/object:Gem::Requirement
275
+ requirements:
276
+ - - ">="
277
+ - !ruby/object:Gem::Version
278
+ version: '0'
265
279
  description: Com essa ferramenta você poderá escrever sua monografia, dissertação
266
280
  ou tese utilizando Markdown (linguagem mais simples que Latex).
267
281
  email:
@@ -288,7 +302,8 @@ files:
288
302
  - bin/console
289
303
  - bin/deploy-docker.sh
290
304
  - bin/instalador.sh
291
- - bin/instaladores/dependencias_install.sh
305
+ - bin/instaladores/dependencias_desenvolvimento_install.sh
306
+ - bin/instaladores/dependencias_execucao_install.sh
292
307
  - bin/instaladores/pandoc_install.sh
293
308
  - bin/instaladores/tinytex_install.sh
294
309
  - bin/setup
@@ -346,6 +361,7 @@ files:
346
361
  - lib/limarka/trabalho.rb
347
362
  - lib/limarka/version.rb
348
363
  - limarka.gemspec
364
+ - rakelib/guard.rake
349
365
  - referencias.bib
350
366
  homepage: https://github.com/abntex/limarka
351
367
  licenses:
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env sh
2
-
3
- sudo apt-get install -y -qq \
4
- language-pack-pt \
5
- locales \
6
- pdfgrep \
7
- poppler-utils \
8
- unzip