indoctrinatr-tools 0.10.0 → 0.11.0

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
  SHA1:
3
- metadata.gz: 6cfcf2736b68b9902cc18507c94b29a88f934cd4
4
- data.tar.gz: 4fa1c18ad931c87f30ce99b1dd0ac4ae86c91fe9
3
+ metadata.gz: b0fe5d601575b7ece3e77dc6b7dde2b31a291c46
4
+ data.tar.gz: 80e84638993fb7a8a771d3fa2c7c7bfad4317242
5
5
  SHA512:
6
- metadata.gz: a18f5e2bbb59133915532cf9651428b6eec4b3981d5f700f1696a3556bc56dce37ff7b38cbb07d7901ac13f7d016f15874da287248262100f2eabccb17358397
7
- data.tar.gz: fc606fac8c306de16693b5c8d1d60b50f45a042e1ae6e510eab49a45dfc2e2d9b651a3f178b73393739b5da749cb6f5e6460d42fa689d3a36560cf1bdd989a18
6
+ metadata.gz: ddff4b9e60e6b0ae25345c6365268966942ff1461949b306b1db036cb30cbefd74e4cf62ef2f8aaaf0b167def2963b038c7df57f2a382e7b1b87d8dcd994901c
7
+ data.tar.gz: 45a39be9f0bf9d8b4e743944317b45fa56e621b6cd35c9bcc07588aae5a51949a2b35c11b4f2b9524e0c8fd002c4d5ace58759abc37ef7dfb3e3ad069017078c
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  Metrics/LineLength:
2
- Max: 200
2
+ Max: 240
3
3
  Style/MethodDefParentheses:
4
4
  EnforcedStyle: require_no_parentheses
5
5
  Style/Documentation:
data/.travis.yml CHANGED
@@ -8,12 +8,8 @@ cache:
8
8
  - bundler
9
9
  - apt
10
10
  before_install:
11
- - sudo apt-get install -qq texlive texlive-xetex texlive-latex-extra texlive-generic-extra
11
+ - sudo apt-get update && sudo wget https://github.com/scottkosty/install-tl-ubuntu/raw/master/install-tl-ubuntu && sudo chmod +x ./install-tl-ubuntu && sudo ./install-tl-ubuntu
12
12
  - gem install bundler -v 1.10.6
13
13
  script:
14
- - bundle exec cucumber --backtrace --verbose
15
- - bundle exec rake test_with_coveralls
16
- addons:
17
- apt:
18
- packages:
19
- - texlive-full
14
+ - bundle exec indoctrinatr demo
15
+ - bundle exec rake test_with_coveralls
@@ -1,7 +1,7 @@
1
1
  Feature: Running the "demo" command
2
2
 
3
3
  Background:
4
- Given the default aruba exit timeout is 20 seconds
4
+ Given the default aruba exit timeout is 60 seconds
5
5
 
6
6
  Scenario:
7
7
  When I successfully run `indoctrinatr demo`
@@ -2,4 +2,4 @@ Feature: Running the "version" command
2
2
 
3
3
  Scenario:
4
4
  When I successfully run `indoctrinatr version`
5
- Then the output should contain "0.10.0"
5
+ Then the output should contain "0.11.0"
@@ -18,7 +18,7 @@ module Indoctrinatr
18
18
  configuration.default_file_name = "#{template_pack_name}_with_default_values.pdf"
19
19
  configuration.output_file_name = config_file.fetch('output_file_name', "#{template_pack_name}_with_default_values.pdf")
20
20
  configuration.template_name = config_file.fetch 'template_name'
21
- configuration.textual_description = config_file.fetch 'textual_description'
21
+ configuration.textual_description = config_file.fetch('textual_description'), ''
22
22
  configuration.attributes_as_hashes_in_array = config_file.fetch 'fields', []
23
23
  configuration
24
24
  end
@@ -1,5 +1,5 @@
1
1
  module Indoctrinatr
2
2
  module Tools
3
- VERSION = '0.10.0'
3
+ VERSION = '0.11.0'
4
4
  end
5
5
  end
@@ -22,12 +22,18 @@ module RedCloth
22
22
  end
23
23
  end
24
24
 
25
+ def del opts
26
+ "\\st{#{opts[:text]}}"
27
+ end
28
+
25
29
  def table_close _opts
26
30
  output = "\\begin{tabu}{ #{'l ' * @table[0].size}}\n"
27
- @table.each do |row|
31
+ output << " #{@table[0].join(' & ')} \\\\\n"
32
+ output << " \\tabletoprule\n"
33
+ @table[1..-1].each do |row|
28
34
  output << " #{row.join(' & ')} \\\\\n"
29
35
  end
30
- output << "\\end{tabu}\n"
36
+ output << " \\tablebottomrule\n\\end{tabu}\n"
31
37
  output
32
38
  end
33
39
  end
@@ -3,6 +3,6 @@ require 'indoctrinatr/tools/version'
3
3
 
4
4
  describe Indoctrinatr::Tools do
5
5
  it 'defines a VERSION constant' do
6
- expect(Indoctrinatr::Tools::VERSION).to eq '0.10.0'
6
+ expect(Indoctrinatr::Tools::VERSION).to eq '0.11.0'
7
7
  end
8
8
  end
@@ -24,7 +24,15 @@ describe 'patches for RedCloth::LATEX::Formatter' do
24
24
 
25
25
  it 'transforms a table to LaTeX tabu notation' do
26
26
  input = "|_.Headerspalte 1|_.Headerspalte 2|\n|Feld 1,1 |Feld 2,1 |\n|Feld 1,2 |Feld 2,2 |"
27
- expected_result = "\\begin{tabu}{ l l }\n Headerspalte 1 & Headerspalte 2 \\\\\n Feld 1,1 & Feld 2,1 \\\\\n Feld 1,2 & Feld 2,2 \\\\\n\\end{tabu}\n"
27
+ expected_result = "\\begin{tabu}{ l l }\n Headerspalte 1 & Headerspalte 2 \\\\\n \\tabletoprule\n Feld 1,1 & Feld 2,1 \\\\\n Feld 1,2 & Feld 2,2 \\\\\n \\tablebottomrule\n\\end{tabu}\n"
28
28
  expect(RedCloth.new(input).to_latex).to eq expected_result
29
29
  end
30
+
31
+ it 'transforms -text- to to LaTeX \st{}' do
32
+ expect(RedCloth.new('-no no no-').to_latex).to eq "\\st{no no no}\n\n"
33
+ end
34
+
35
+ it 'transforms *text* to to LaTeX \st{}' do
36
+ expect(RedCloth.new('-no no no-').to_latex).to eq "\\st{no no no}\n\n"
37
+ end
30
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: indoctrinatr-tools
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolai Reuschling
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-25 00:00:00.000000000 Z
11
+ date: 2015-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler