ltx 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +42 -0
- data/.rspec +6 -0
- data/.rubocop.yml +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +6 -0
- data/Guardfile +43 -0
- data/LICENSE +20 -0
- data/README.md +25 -0
- data/Rakefile +6 -0
- data/bin/ltx +8 -0
- data/config/devtools.yml +2 -0
- data/config/flay.yml +3 -0
- data/config/flog.yml +2 -0
- data/config/mutant.yml +3 -0
- data/config/reek.yml +103 -0
- data/config/rubocop.yml +5 -0
- data/config/yardstick.yml +2 -0
- data/lib/ltx.rb +8 -0
- data/lib/ltx/build.rb +105 -0
- data/lib/ltx/config.rb +72 -0
- data/lib/ltx/version.rb +4 -0
- data/ltx.gemspec +33 -0
- data/spec/fixtures/main.tex +4 -0
- data/spec/fixtures/project.yml +5 -0
- data/spec/integration/build_spec.rb +38 -0
- data/spec/spec_helper.rb +31 -0
- data/spec/support/helper.rb +6 -0
- metadata +156 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 72b57a2490f51b68108c3d6221a246d80922cbe0
|
4
|
+
data.tar.gz: f56953d780dec504532e9fba584e7fe0b2542701
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 25ed0b18b366f30b3e45e68cc2f882c821ea50b9a304fa0d2d3be041ac2a0f04c95725481da8fd8516b83fa8e1f91fecfc7bf7d36f516cfa42ec8132aa912d22
|
7
|
+
data.tar.gz: 93bc013610df2f409bd2eda3954e2fc928acf0c4117bd0b41653d90d76f844feb61fb0cb2590cfdd2b29fc62aafe79a6f386fde4f3b1ba03f3bf1fb53101cd2c
|
data/.gitignore
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
## MAC OS
|
2
|
+
.DS_Store
|
3
|
+
|
4
|
+
## TEXTMATE
|
5
|
+
*.tmproj
|
6
|
+
tmtags
|
7
|
+
|
8
|
+
## EMACS
|
9
|
+
*~
|
10
|
+
\#*
|
11
|
+
.\#*
|
12
|
+
|
13
|
+
## VIM
|
14
|
+
*.sw[op]
|
15
|
+
|
16
|
+
## Rubinius
|
17
|
+
*.rbc
|
18
|
+
.rbx
|
19
|
+
|
20
|
+
## PROJECT::GENERAL
|
21
|
+
*.gem
|
22
|
+
coverage
|
23
|
+
profiling
|
24
|
+
turbulence
|
25
|
+
rdoc
|
26
|
+
pkg
|
27
|
+
tmp
|
28
|
+
doc
|
29
|
+
log
|
30
|
+
.yardoc
|
31
|
+
measurements
|
32
|
+
|
33
|
+
## BUNDLER
|
34
|
+
.bundle
|
35
|
+
Gemfile.lock
|
36
|
+
|
37
|
+
## ctags
|
38
|
+
tags
|
39
|
+
gems.tags
|
40
|
+
|
41
|
+
## PROJECT::SPECIFIC
|
42
|
+
tmp-*
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
config/rubocop.yml
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.3
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
guard :bundler do
|
5
|
+
watch('Gemfile')
|
6
|
+
watch('Gemfile.lock')
|
7
|
+
watch(/\A(.+)\.gemspec\z/)
|
8
|
+
end
|
9
|
+
|
10
|
+
guard :rspec, cmd: 'bundle exec rspec ' +
|
11
|
+
File.read('.rspec').split.join(' '),
|
12
|
+
failed_mode: :keep do
|
13
|
+
# Run all specs if configuration is modified
|
14
|
+
watch('.rspec') { 'spec' }
|
15
|
+
watch('Guardfile') { 'spec' }
|
16
|
+
watch('Gemfile.lock') { 'spec' }
|
17
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
18
|
+
|
19
|
+
# Run all specs if supporting files files are modified
|
20
|
+
watch(%r{\Aspec/(?:fixtures|lib|support|shared)/.+\.rb\z}) { 'spec' }
|
21
|
+
|
22
|
+
# Run unit specs if associated lib code is modified
|
23
|
+
watch(%r{\Alib/(.+)\.rb\z}) do |m|
|
24
|
+
Dir["spec/unit/#{m[1]}*"]
|
25
|
+
end
|
26
|
+
|
27
|
+
watch(%r{\Alib/(.+)/support/(.+)\.rb\z}) do |m|
|
28
|
+
Dir["spec/unit/#{m[1]}/#{m[2]}*"]
|
29
|
+
end
|
30
|
+
|
31
|
+
watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") do
|
32
|
+
'spec'
|
33
|
+
end
|
34
|
+
|
35
|
+
# Run a spec if it is modified
|
36
|
+
watch(%r{\Aspec/(?:unit|integration|features)/.+_spec\.rb\z})
|
37
|
+
end
|
38
|
+
|
39
|
+
guard :rubocop, cli: %w(--config config/rubocop.yml) do
|
40
|
+
watch(/.+\.(?:rb|rake|gemspec)\z/)
|
41
|
+
watch(%r{\Aconfig/rubocop\.yml\z}) { |m| File.dirname(m[0]) }
|
42
|
+
watch(%r{(?:.+/)?\.rubocop\.yml\z}) { |m| File.dirname(m[0]) }
|
43
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014-2017 Firas Zaidan
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# ltx - LaTeX Project Build Tool
|
2
|
+
|
3
|
+
This project provides the ltx command. It reads your `project.yml` and
|
4
|
+
compiles your LaTeX files to a tmp folder in your project subdirectory. This
|
5
|
+
does not mess your project with temporary files and simplifies the clean up
|
6
|
+
procedure. It also let you define a project specific file name with optional
|
7
|
+
version number and version prefix.
|
8
|
+
|
9
|
+
## Example project.yml
|
10
|
+
|
11
|
+
```yaml
|
12
|
+
title: Your Name - Some Project
|
13
|
+
version: 1.0.0
|
14
|
+
version_prefix: ' v'
|
15
|
+
main: main.tex
|
16
|
+
compiler: pdflatex
|
17
|
+
```
|
18
|
+
|
19
|
+
## Credits
|
20
|
+
|
21
|
+
* [Firas Zaidan](https://github.com/zaidan)
|
22
|
+
|
23
|
+
## License
|
24
|
+
|
25
|
+
See `LICENSE` file.
|
data/Rakefile
ADDED
data/bin/ltx
ADDED
data/config/devtools.yml
ADDED
data/config/flay.yml
ADDED
data/config/flog.yml
ADDED
data/config/mutant.yml
ADDED
data/config/reek.yml
ADDED
@@ -0,0 +1,103 @@
|
|
1
|
+
---
|
2
|
+
Attribute:
|
3
|
+
enabled: false
|
4
|
+
exclude: []
|
5
|
+
BooleanParameter:
|
6
|
+
enabled: true
|
7
|
+
exclude: []
|
8
|
+
ClassVariable:
|
9
|
+
enabled: true
|
10
|
+
exclude: []
|
11
|
+
ControlParameter:
|
12
|
+
enabled: true
|
13
|
+
exclude: []
|
14
|
+
DataClump:
|
15
|
+
enabled: true
|
16
|
+
exclude: []
|
17
|
+
max_copies: 0
|
18
|
+
min_clump_size: 2
|
19
|
+
DuplicateMethodCall:
|
20
|
+
enabled: true
|
21
|
+
exclude: []
|
22
|
+
max_calls: 1
|
23
|
+
allow_calls: []
|
24
|
+
FeatureEnvy:
|
25
|
+
enabled: true
|
26
|
+
exclude: []
|
27
|
+
IrresponsibleModule:
|
28
|
+
enabled: true
|
29
|
+
exclude: []
|
30
|
+
LongParameterList:
|
31
|
+
enabled: true
|
32
|
+
exclude: []
|
33
|
+
max_params: 2
|
34
|
+
overrides: {}
|
35
|
+
LongYieldList:
|
36
|
+
enabled: true
|
37
|
+
exclude: []
|
38
|
+
max_params: 0
|
39
|
+
NestedIterators:
|
40
|
+
enabled: true
|
41
|
+
exclude: []
|
42
|
+
max_allowed_nesting: 1
|
43
|
+
ignore_iterators: []
|
44
|
+
NilCheck:
|
45
|
+
enabled: true
|
46
|
+
exclude: []
|
47
|
+
RepeatedConditional:
|
48
|
+
enabled: true
|
49
|
+
exclude: []
|
50
|
+
max_ifs: 1
|
51
|
+
TooManyConstants:
|
52
|
+
enabled: true
|
53
|
+
exclude: []
|
54
|
+
TooManyInstanceVariables:
|
55
|
+
enabled: true
|
56
|
+
exclude: []
|
57
|
+
max_instance_variables: 2
|
58
|
+
TooManyMethods:
|
59
|
+
enabled: true
|
60
|
+
exclude: []
|
61
|
+
max_methods: 15
|
62
|
+
TooManyStatements:
|
63
|
+
enabled: true
|
64
|
+
exclude: []
|
65
|
+
max_statements: 5
|
66
|
+
UncommunicativeMethodName:
|
67
|
+
enabled: true
|
68
|
+
exclude: []
|
69
|
+
reject:
|
70
|
+
- !ruby/regexp /^[a-z]$/
|
71
|
+
- !ruby/regexp /[0-9]$/
|
72
|
+
- !ruby/regexp /[A-Z]/
|
73
|
+
accept: []
|
74
|
+
UncommunicativeModuleName:
|
75
|
+
enabled: true
|
76
|
+
exclude: []
|
77
|
+
reject:
|
78
|
+
- !ruby/regexp /^.$/
|
79
|
+
- !ruby/regexp /[0-9]$/
|
80
|
+
accept: []
|
81
|
+
UncommunicativeParameterName:
|
82
|
+
enabled: true
|
83
|
+
exclude: []
|
84
|
+
reject:
|
85
|
+
- !ruby/regexp /^.$/
|
86
|
+
- !ruby/regexp /[0-9]$/
|
87
|
+
- !ruby/regexp /[A-Z]/
|
88
|
+
accept: []
|
89
|
+
UncommunicativeVariableName:
|
90
|
+
enabled: true
|
91
|
+
exclude: []
|
92
|
+
reject:
|
93
|
+
- !ruby/regexp /^.$/
|
94
|
+
- !ruby/regexp /[0-9]$/
|
95
|
+
- !ruby/regexp /[A-Z]/
|
96
|
+
accept: []
|
97
|
+
UnusedParameters:
|
98
|
+
enabled: true
|
99
|
+
exclude: []
|
100
|
+
UtilityFunction:
|
101
|
+
enabled: true
|
102
|
+
exclude: []
|
103
|
+
max_helper_calls: 0
|
data/config/rubocop.yml
ADDED
data/lib/ltx.rb
ADDED
data/lib/ltx/build.rb
ADDED
@@ -0,0 +1,105 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module LTX
|
4
|
+
# Ruby LaTeX builder
|
5
|
+
class Build
|
6
|
+
# LTX build error
|
7
|
+
class Error
|
8
|
+
end
|
9
|
+
|
10
|
+
def initialize(config)
|
11
|
+
@config = config
|
12
|
+
|
13
|
+
@command = build_command
|
14
|
+
end
|
15
|
+
|
16
|
+
def call
|
17
|
+
t1 = Time.now
|
18
|
+
puts 'Compiling Latex Project...'
|
19
|
+
puts @command.join(' ')
|
20
|
+
FileUtils.mkdir_p @config.compile_dir
|
21
|
+
# FileUtils.cp Dir.glob(File.join(@config.root,("*.bst"))),
|
22
|
+
# @config.compile_dir
|
23
|
+
Kernel.system(*@command)
|
24
|
+
t = Time.now - t1
|
25
|
+
puts "Finished compiling in #{t} seconds"
|
26
|
+
self
|
27
|
+
end
|
28
|
+
|
29
|
+
def view
|
30
|
+
puts 'Starting PDF Viewer...'
|
31
|
+
puts view_command.join(' ')
|
32
|
+
Kernel.system(*view_command)
|
33
|
+
|
34
|
+
self
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def build_command
|
40
|
+
case @config.compiler
|
41
|
+
when 'pdflatex' then pdflatex_command
|
42
|
+
when 'latex' then latex_command
|
43
|
+
when 'xelatex' then xelatex_command
|
44
|
+
when 'lualatex' then lualatex_command
|
45
|
+
else
|
46
|
+
raise Error, "unknown compiler: #{compiler}"
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def view_command
|
51
|
+
[
|
52
|
+
'evince',
|
53
|
+
'--fullscreen',
|
54
|
+
File.join(@config.compile_dir, "#{@config.title}.pdf")
|
55
|
+
]
|
56
|
+
end
|
57
|
+
|
58
|
+
def latexmk_base_command
|
59
|
+
[
|
60
|
+
'latexmk',
|
61
|
+
'-cd',
|
62
|
+
'-f',
|
63
|
+
"-jobname=#{@config.title}",
|
64
|
+
'-auxdir=' + @config.compile_dir,
|
65
|
+
'-outdir=' + @config.compile_dir
|
66
|
+
]
|
67
|
+
end
|
68
|
+
|
69
|
+
def pdflatex_command
|
70
|
+
latexmk_base_command.concat [
|
71
|
+
'-pdf',
|
72
|
+
'-e',
|
73
|
+
"$pdflatex='pdflatex -synctex=1 -interaction=batchmode %O %S'",
|
74
|
+
File.join(@config.compile_dir, @config.main)
|
75
|
+
]
|
76
|
+
end
|
77
|
+
|
78
|
+
def latex_command
|
79
|
+
latexmk_base_command.concat [
|
80
|
+
'-pdfdvi',
|
81
|
+
'-e',
|
82
|
+
"$latex='latex -synctex=1 -interaction=batchmode %O %S'",
|
83
|
+
File.join(@config.compile_dir, @config.main)
|
84
|
+
]
|
85
|
+
end
|
86
|
+
|
87
|
+
def xelatex_command
|
88
|
+
latexmk_base_command.concat [
|
89
|
+
'-xelatex',
|
90
|
+
'-e',
|
91
|
+
"$pdflatex='xelatex -synctex=1 -interaction=batchmode %O %S'",
|
92
|
+
File.join(@config.compile_dir, @config.main)
|
93
|
+
]
|
94
|
+
end
|
95
|
+
|
96
|
+
def lualatex_command
|
97
|
+
latexmk_base_command.concat [
|
98
|
+
'-pdf',
|
99
|
+
'-e',
|
100
|
+
"$pdflatex='lualatex -synctex=1 -interaction=batchmode %O %S'",
|
101
|
+
File.join(@config.compile_dir, @config.main)
|
102
|
+
]
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
data/lib/ltx/config.rb
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
module LTX
|
3
|
+
# Load config from project.yaml
|
4
|
+
class Config
|
5
|
+
# Config errors
|
6
|
+
class Error
|
7
|
+
end
|
8
|
+
attr_reader :main
|
9
|
+
attr_reader :compiler
|
10
|
+
attr_reader :compile_dir
|
11
|
+
attr_reader :timeout
|
12
|
+
attr_reader :title
|
13
|
+
attr_reader :version
|
14
|
+
attr_reader :version_prefix
|
15
|
+
|
16
|
+
MISSING_MAIN_ERROR = 'Please supply path to main tex file!'
|
17
|
+
DEFAULT_PROJECT_YAML = 'project.yml'
|
18
|
+
DEFAULT_MAIN_TEX = 'main.tex'
|
19
|
+
|
20
|
+
def initialize
|
21
|
+
@config = load_config
|
22
|
+
fetch_settings
|
23
|
+
end
|
24
|
+
|
25
|
+
def root
|
26
|
+
File.dirname(@main)
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def load_config(file = DEFAULT_PROJECT_YAML)
|
32
|
+
config_file = File.join(Dir.pwd, file)
|
33
|
+
File.exist?(config_file) ? YAML.load_file(file) : {}
|
34
|
+
end
|
35
|
+
|
36
|
+
def fetch(name, n, default)
|
37
|
+
ARGV.fetch(n, @config.fetch(name, default))
|
38
|
+
end
|
39
|
+
|
40
|
+
def fetch_settings
|
41
|
+
@main = fetch_main
|
42
|
+
|
43
|
+
@compiler = fetch('compiler', 1, 'pdflatex')
|
44
|
+
@compile_dir = fetch_compile_dir
|
45
|
+
|
46
|
+
@timeout = fetch('timeout', 3, 60_000)
|
47
|
+
@version = fetch('version', 5, '')
|
48
|
+
@version_prefix = fetch('version_prefix', 5, ' - v')
|
49
|
+
@title = fetch_title
|
50
|
+
end
|
51
|
+
|
52
|
+
def fetch_main(mainfile = DEFAULT_MAIN_TEX)
|
53
|
+
main = File.absolute_path(fetch('main', 0, mainfile))
|
54
|
+
raise Error, MISSING_MAIN_ERROR unless File.exist?(main)
|
55
|
+
main
|
56
|
+
end
|
57
|
+
|
58
|
+
def fetch_compile_dir
|
59
|
+
base = File.basename(@main, '.*')
|
60
|
+
File.absolute_path(fetch('compile_dir', 2, "tmp-#{base}"))
|
61
|
+
end
|
62
|
+
|
63
|
+
def fetch_title
|
64
|
+
title = fetch('title', 4, 'output')
|
65
|
+
if @version.nil? || @version == ''
|
66
|
+
title
|
67
|
+
else
|
68
|
+
"#{title}#{@version_prefix}#{@version}"
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
data/lib/ltx/version.rb
ADDED
data/ltx.gemspec
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
require File.expand_path('../lib/ltx/version', __FILE__)
|
5
|
+
|
6
|
+
Gem::Specification.new do |gem|
|
7
|
+
gem.name = 'ltx'
|
8
|
+
gem.version = LTX::VERSION.dup
|
9
|
+
gem.authors = ['Firas Zaidan']
|
10
|
+
gem.email = ['firas@zaidan.de']
|
11
|
+
gem.description = 'LaTeX Project Build Tool'
|
12
|
+
gem.summary = gem.description
|
13
|
+
gem.homepage = 'https://github.com/zaidan/ltx'
|
14
|
+
gem.license = 'MIT'
|
15
|
+
|
16
|
+
gem.bindir = 'bin'
|
17
|
+
gem.require_paths = %w(lib bin)
|
18
|
+
gem.files = `git ls-files`
|
19
|
+
.split($INPUT_RECORD_SEPARATOR)
|
20
|
+
gem.executables = `git ls-files -- bin/*`
|
21
|
+
.split("\n").map { |f| File.basename(f) }
|
22
|
+
gem.test_files = `git ls-files -- spec`
|
23
|
+
.split($INPUT_RECORD_SEPARATOR)
|
24
|
+
gem.extra_rdoc_files = %w(README.md)
|
25
|
+
gem.required_ruby_version = '>= 2.2'
|
26
|
+
|
27
|
+
gem.requirements << 'latexmk'
|
28
|
+
gem.add_development_dependency 'devtools', '~> 0.1.x'
|
29
|
+
gem.add_development_dependency 'guard', '~> 2.14'
|
30
|
+
gem.add_development_dependency 'guard-bundler', '~> 2.1'
|
31
|
+
gem.add_development_dependency 'guard-rspec', '~> 4.7', '>= 4.7.3'
|
32
|
+
gem.add_development_dependency 'guard-rubocop', '~> 1.2'
|
33
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
require 'English'
|
5
|
+
|
6
|
+
describe 'ltx command' do
|
7
|
+
let(:root) do
|
8
|
+
File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:fixtures) { File.join(root, 'spec', 'fixtures') }
|
12
|
+
|
13
|
+
let(:command) { File.join(root, 'bin', 'ltx') }
|
14
|
+
|
15
|
+
let(:tmp) { File.join(fixtures, 'tmp-main') }
|
16
|
+
let(:title) { 'Your Name - Some Project v1.0.0' }
|
17
|
+
let(:pdf) { File.join(tmp, "#{title}.pdf") }
|
18
|
+
let(:log) { File.join(tmp, "#{title}.log") }
|
19
|
+
|
20
|
+
def clean
|
21
|
+
FileUtils.rm_r tmp
|
22
|
+
end
|
23
|
+
|
24
|
+
after do
|
25
|
+
clean
|
26
|
+
end
|
27
|
+
|
28
|
+
it 'should build project' do
|
29
|
+
Dir.chdir fixtures
|
30
|
+
`'#{command}'`
|
31
|
+
expect($CHILD_STATUS.success?).to be true
|
32
|
+
expect(File).to exist(pdf)
|
33
|
+
expect(File).to exist(log)
|
34
|
+
log_content = File.read(log)
|
35
|
+
expect(log_content).to_not include('error')
|
36
|
+
expect(log_content).to include('Output written on')
|
37
|
+
end
|
38
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# encoding: utf-8
|
3
|
+
|
4
|
+
if ENV['COVERAGE'] == 'true'
|
5
|
+
require 'simplecov'
|
6
|
+
|
7
|
+
SimpleCov.start do
|
8
|
+
command_name 'spec:unit'
|
9
|
+
|
10
|
+
add_filter 'config'
|
11
|
+
add_filter 'spec'
|
12
|
+
|
13
|
+
minimum_coverage 100
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
$LOAD_PATH << 'lib'
|
18
|
+
|
19
|
+
require 'ltx'
|
20
|
+
|
21
|
+
require 'devtools/spec_helper'
|
22
|
+
|
23
|
+
# require spec support files and shared behavior
|
24
|
+
Dir[File.expand_path('../{support,shared}/**/*.rb', __FILE__)].each do |file|
|
25
|
+
require file
|
26
|
+
end
|
27
|
+
|
28
|
+
RSpec.configure do |config|
|
29
|
+
config.include(SpecHelper)
|
30
|
+
config.mock_framework = :rspec
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ltx
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Firas Zaidan
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-03-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: devtools
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.1.x
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.1.x
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: guard
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '2.14'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.14'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: guard-bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2.1'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: guard-rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.7'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 4.7.3
|
65
|
+
type: :development
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '4.7'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 4.7.3
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: guard-rubocop
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '1.2'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.2'
|
89
|
+
description: LaTeX Project Build Tool
|
90
|
+
email:
|
91
|
+
- firas@zaidan.de
|
92
|
+
executables:
|
93
|
+
- ltx
|
94
|
+
extensions: []
|
95
|
+
extra_rdoc_files:
|
96
|
+
- README.md
|
97
|
+
files:
|
98
|
+
- ".gitignore"
|
99
|
+
- ".rspec"
|
100
|
+
- ".rubocop.yml"
|
101
|
+
- ".ruby-version"
|
102
|
+
- Gemfile
|
103
|
+
- Guardfile
|
104
|
+
- LICENSE
|
105
|
+
- README.md
|
106
|
+
- Rakefile
|
107
|
+
- bin/ltx
|
108
|
+
- config/devtools.yml
|
109
|
+
- config/flay.yml
|
110
|
+
- config/flog.yml
|
111
|
+
- config/mutant.yml
|
112
|
+
- config/reek.yml
|
113
|
+
- config/rubocop.yml
|
114
|
+
- config/yardstick.yml
|
115
|
+
- lib/ltx.rb
|
116
|
+
- lib/ltx/build.rb
|
117
|
+
- lib/ltx/config.rb
|
118
|
+
- lib/ltx/version.rb
|
119
|
+
- ltx.gemspec
|
120
|
+
- spec/fixtures/main.tex
|
121
|
+
- spec/fixtures/project.yml
|
122
|
+
- spec/integration/build_spec.rb
|
123
|
+
- spec/spec_helper.rb
|
124
|
+
- spec/support/helper.rb
|
125
|
+
homepage: https://github.com/zaidan/ltx
|
126
|
+
licenses:
|
127
|
+
- MIT
|
128
|
+
metadata: {}
|
129
|
+
post_install_message:
|
130
|
+
rdoc_options: []
|
131
|
+
require_paths:
|
132
|
+
- lib
|
133
|
+
- bin
|
134
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '2.2'
|
139
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
requirements:
|
145
|
+
- latexmk
|
146
|
+
rubyforge_project:
|
147
|
+
rubygems_version: 2.5.2
|
148
|
+
signing_key:
|
149
|
+
specification_version: 4
|
150
|
+
summary: LaTeX Project Build Tool
|
151
|
+
test_files:
|
152
|
+
- spec/fixtures/main.tex
|
153
|
+
- spec/fixtures/project.yml
|
154
|
+
- spec/integration/build_spec.rb
|
155
|
+
- spec/spec_helper.rb
|
156
|
+
- spec/support/helper.rb
|