texas 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/bin/texas +1 -1
- data/lib/texas.rb +13 -2
- data/lib/texas/build.rb +32 -0
- data/lib/texas/build/base.rb +47 -24
- data/lib/texas/build/config.rb +118 -0
- data/lib/texas/build/config_loader.rb +93 -0
- data/lib/texas/build/dry.rb +1 -1
- data/lib/texas/build/final.rb +2 -2
- data/lib/texas/build/task/add_default_templates_to_build_path.rb +4 -0
- data/lib/texas/build/task/base.rb +2 -0
- data/lib/texas/build/task/copy_contents_to_build_path.rb +3 -0
- data/lib/texas/build/task/execute_after_scripts.rb +18 -0
- data/lib/texas/build/task/execute_before_scripts.rb +18 -0
- data/lib/texas/build/task/open_pdf.rb +7 -21
- data/lib/texas/build/task/publish_pdf.rb +35 -27
- data/lib/texas/build/task/run_master_template.rb +2 -0
- data/lib/texas/build/task/script.rb +28 -0
- data/lib/texas/core_ext.rb +2 -1
- data/lib/texas/core_ext/hash.rb +34 -0
- data/lib/texas/core_ext/string.rb +1 -128
- data/lib/texas/option_parser.rb +153 -124
- data/lib/texas/output_helper.rb +58 -0
- data/lib/texas/runner.rb +32 -51
- data/lib/texas/task/base.rb +1 -0
- data/lib/texas/task/new_project.rb +1 -1
- data/lib/texas/task/watch.rb +29 -18
- data/lib/texas/template.rb +6 -2
- data/lib/texas/template/helper/base.rb +60 -9
- data/lib/texas/template/helper/tex.rb +2 -4
- data/lib/texas/template/runner.rb +2 -5
- data/lib/texas/template/runner/base.rb +59 -11
- data/lib/texas/template/runner/md.rb +2 -2
- data/lib/texas/template/runner/tex.rb +2 -2
- data/lib/texas/template/template_error.rb +19 -5
- data/lib/texas/version.rb +1 -1
- data/spec/fixtures/basic-tex/contents/{unused_template.tex.erb → sub_dir/unused_template.tex.erb} +0 -0
- data/spec/fixtures/new-project/lib/init.rb +1 -1
- data/spec/fixtures/pdflatex-error/contents/contents.tex.erb +1 -0
- data/spec/spec_helper.rb +16 -7
- data/spec/texas/build/base_spec.rb +53 -9
- data/spec/texas/build/config_spec.rb +73 -0
- data/spec/texas/build/task/base_spec.rb +21 -0
- data/spec/texas/option_parser_spec.rb +53 -0
- data/spec/texas/task/base_spec.rb +49 -0
- data/spec/texas_spec.rb +49 -3
- metadata +76 -73
- data/lib/texas/build/task/run_before_scripts.rb +0 -22
metadata
CHANGED
@@ -1,20 +1,18 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: texas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.7
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- René Föhring
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-05-16 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: term-ansicolor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ! '>='
|
20
18
|
- !ruby/object:Gem::Version
|
@@ -22,7 +20,6 @@ dependencies:
|
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ! '>='
|
28
25
|
- !ruby/object:Gem::Version
|
@@ -30,7 +27,6 @@ dependencies:
|
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: listen
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ! '>='
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ! '>='
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,7 +41,6 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rb-inotify
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
45
|
- - ~>
|
52
46
|
- !ruby/object:Gem::Version
|
@@ -54,7 +48,6 @@ dependencies:
|
|
54
48
|
type: :runtime
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
52
|
- - ~>
|
60
53
|
- !ruby/object:Gem::Version
|
@@ -67,104 +60,114 @@ executables:
|
|
67
60
|
extensions: []
|
68
61
|
extra_rdoc_files: []
|
69
62
|
files:
|
70
|
-
- lib/texas/
|
71
|
-
- lib/texas/
|
72
|
-
- lib/texas/template/helper/info.rb
|
73
|
-
- lib/texas/template/helper/base.rb
|
74
|
-
- lib/texas/template/runner.rb
|
75
|
-
- lib/texas/template/template_error.rb
|
76
|
-
- lib/texas/template/runner/md.rb
|
77
|
-
- lib/texas/template/runner/tex.rb
|
78
|
-
- lib/texas/template/runner/base.rb
|
79
|
-
- lib/texas/template/helper.rb
|
63
|
+
- lib/texas/version.rb
|
64
|
+
- lib/texas/runner.rb
|
80
65
|
- lib/texas/build.rb
|
66
|
+
- lib/texas/task/base.rb
|
81
67
|
- lib/texas/task/watch.rb
|
82
68
|
- lib/texas/task/new_project.rb
|
83
|
-
- lib/texas/
|
69
|
+
- lib/texas/template/helper.rb
|
70
|
+
- lib/texas/template/runner.rb
|
71
|
+
- lib/texas/template/runner/base.rb
|
72
|
+
- lib/texas/template/runner/md.rb
|
73
|
+
- lib/texas/template/runner/tex.rb
|
74
|
+
- lib/texas/template/template_error.rb
|
75
|
+
- lib/texas/template/helper/base.rb
|
76
|
+
- lib/texas/template/helper/md.rb
|
77
|
+
- lib/texas/template/helper/tex.rb
|
78
|
+
- lib/texas/template/helper/info.rb
|
79
|
+
- lib/texas/core_ext.rb
|
80
|
+
- lib/texas/output_helper.rb
|
84
81
|
- lib/texas/option_parser.rb
|
85
82
|
- lib/texas/task.rb
|
86
|
-
- lib/texas/
|
87
|
-
- lib/texas/
|
88
|
-
- lib/texas/
|
83
|
+
- lib/texas/template.rb
|
84
|
+
- lib/texas/build/base.rb
|
85
|
+
- lib/texas/build/final.rb
|
86
|
+
- lib/texas/build/dry.rb
|
87
|
+
- lib/texas/build/task/rewrite_marked_templates.rb
|
88
|
+
- lib/texas/build/task/base.rb
|
89
|
+
- lib/texas/build/task/execute_before_scripts.rb
|
90
|
+
- lib/texas/build/task/script.rb
|
91
|
+
- lib/texas/build/task/execute_after_scripts.rb
|
89
92
|
- lib/texas/build/task/copy_contents_to_build_path.rb
|
93
|
+
- lib/texas/build/task/run_master_template.rb
|
90
94
|
- lib/texas/build/task/open_pdf.rb
|
91
95
|
- lib/texas/build/task/publish_pdf.rb
|
92
|
-
- lib/texas/build/task/rewrite_marked_templates.rb
|
93
96
|
- lib/texas/build/task/add_default_templates_to_build_path.rb
|
94
|
-
- lib/texas/build/
|
95
|
-
- lib/texas/build/
|
96
|
-
- lib/texas/
|
97
|
-
- lib/texas/
|
98
|
-
- lib/texas/build/final.rb
|
99
|
-
- lib/texas/build/dry.rb
|
100
|
-
- lib/texas/core_ext.rb
|
101
|
-
- lib/texas/template.rb
|
97
|
+
- lib/texas/build/config.rb
|
98
|
+
- lib/texas/build/config_loader.rb
|
99
|
+
- lib/texas/core_ext/hash.rb
|
100
|
+
- lib/texas/core_ext/string.rb
|
102
101
|
- lib/texas.rb
|
103
|
-
- spec/texas/template/runner_spec.rb
|
104
|
-
- spec/texas/template/helper/info_spec.rb
|
105
|
-
- spec/texas/template_spec.rb
|
106
|
-
- spec/texas/build/task/publish_pdf_spec.rb
|
107
|
-
- spec/texas/build/base_spec.rb
|
108
|
-
- spec/texas_spec.rb
|
109
|
-
- spec/fixtures/different-master-tex/contents/contents.tex.erb
|
110
|
-
- spec/fixtures/different-master-tex/contents/contents.tex.should
|
111
|
-
- spec/fixtures/different-master-tex/contents/master.tex.should
|
112
|
-
- spec/fixtures/different-master-tex/contents/master.tex.erb
|
113
|
-
- spec/fixtures/basic-tex/contents/unused_template.tex.erb
|
114
|
-
- spec/fixtures/basic-tex/contents/input_template.tex.should
|
115
|
-
- spec/fixtures/basic-tex/contents/input_template.tex.erb
|
116
|
-
- spec/fixtures/basic-tex/contents/contents.tex.erb
|
117
|
-
- spec/fixtures/basic-tex/contents/contents.tex.should
|
118
102
|
- spec/fixtures/basic/figures/test_figure.png
|
119
103
|
- spec/fixtures/basic/contents/contents.tex.erb
|
120
|
-
- spec/fixtures/lib-helpers/lib/init.rb
|
121
|
-
- spec/fixtures/lib-helpers/lib/helpers/document_helper.rb
|
122
|
-
- spec/fixtures/lib-helpers/contents/contents.tex.erb
|
123
|
-
- spec/fixtures/lib-helpers/contents/contents.tex.should
|
124
|
-
- spec/fixtures/new-project/lib/init.rb
|
125
104
|
- spec/fixtures/new-project/lib/helpers/document_helper.rb
|
105
|
+
- spec/fixtures/new-project/lib/init.rb
|
126
106
|
- spec/fixtures/new-project/contents/contents.tex.erb
|
127
|
-
- spec/fixtures/
|
128
|
-
- spec/fixtures/
|
129
|
-
- spec/fixtures/basic-
|
130
|
-
- spec/fixtures/basic-
|
131
|
-
- spec/fixtures/basic-
|
132
|
-
- spec/fixtures/
|
133
|
-
- spec/fixtures/texasrc/contents/contents.tex.should
|
107
|
+
- spec/fixtures/pdflatex-error/contents/contents.tex.erb
|
108
|
+
- spec/fixtures/basic-tex/contents/contents.tex.should
|
109
|
+
- spec/fixtures/basic-tex/contents/sub_dir/unused_template.tex.erb
|
110
|
+
- spec/fixtures/basic-tex/contents/input_template.tex.should
|
111
|
+
- spec/fixtures/basic-tex/contents/contents.tex.erb
|
112
|
+
- spec/fixtures/basic-tex/contents/input_template.tex.erb
|
134
113
|
- spec/fixtures/helper-methods-tex/figures/test_figure.png
|
135
|
-
- spec/fixtures/helper-methods-tex/contents/
|
136
|
-
- spec/fixtures/helper-methods-tex/contents/
|
114
|
+
- spec/fixtures/helper-methods-tex/contents/contents.tex.should
|
115
|
+
- spec/fixtures/helper-methods-tex/contents/some_chapter/test_include.tex.erb
|
116
|
+
- spec/fixtures/helper-methods-tex/contents/some_chapter/another_include.tex
|
117
|
+
- spec/fixtures/helper-methods-tex/contents/some_chapter/test_include.tex.should
|
137
118
|
- spec/fixtures/helper-methods-tex/contents/template/helper/_some_partial.md.erb
|
119
|
+
- spec/fixtures/helper-methods-tex/contents/template/helper/info.tex.should
|
138
120
|
- spec/fixtures/helper-methods-tex/contents/template/helper/base.tex.should
|
139
121
|
- spec/fixtures/helper-methods-tex/contents/template/helper/info.md.erb
|
140
|
-
- spec/fixtures/helper-methods-tex/contents/
|
122
|
+
- spec/fixtures/helper-methods-tex/contents/template/helper/base.tex.erb
|
123
|
+
- spec/fixtures/helper-methods-tex/contents/test_figure.tex.erb
|
141
124
|
- spec/fixtures/helper-methods-tex/contents/input_template.tex.should
|
142
125
|
- spec/fixtures/helper-methods-tex/contents/some_chapter.tex.should
|
143
|
-
- spec/fixtures/helper-methods-tex/contents/
|
126
|
+
- spec/fixtures/helper-methods-tex/contents/some_chapter.tex.erb
|
144
127
|
- spec/fixtures/helper-methods-tex/contents/contents.tex.erb
|
145
|
-
- spec/fixtures/helper-methods-tex/contents/
|
146
|
-
- spec/fixtures/
|
147
|
-
- spec/fixtures/
|
148
|
-
- spec/fixtures/
|
149
|
-
- spec/fixtures/
|
128
|
+
- spec/fixtures/helper-methods-tex/contents/input_template.tex.erb
|
129
|
+
- spec/fixtures/lib-helpers/lib/helpers/document_helper.rb
|
130
|
+
- spec/fixtures/lib-helpers/lib/init.rb
|
131
|
+
- spec/fixtures/lib-helpers/contents/contents.tex.should
|
132
|
+
- spec/fixtures/lib-helpers/contents/contents.tex.erb
|
133
|
+
- spec/fixtures/rerun/contents/contents.tex.should
|
134
|
+
- spec/fixtures/rerun/contents/contents.tex.erb
|
135
|
+
- spec/fixtures/different-master-tex/contents/contents.tex.should
|
136
|
+
- spec/fixtures/different-master-tex/contents/master.tex.erb
|
137
|
+
- spec/fixtures/different-master-tex/contents/master.tex.should
|
138
|
+
- spec/fixtures/different-master-tex/contents/contents.tex.erb
|
139
|
+
- spec/fixtures/texasrc/contents/contents.tex.should
|
140
|
+
- spec/fixtures/texasrc/contents/contents.tex.erb
|
141
|
+
- spec/fixtures/basic-md/contents/contents.tex.should
|
142
|
+
- spec/fixtures/basic-md/contents/input_template.md.erb
|
143
|
+
- spec/fixtures/basic-md/contents/contents.md.erb
|
144
|
+
- spec/texas_spec.rb
|
150
145
|
- spec/spec_helper.rb
|
146
|
+
- spec/texas/template_spec.rb
|
147
|
+
- spec/texas/task/base_spec.rb
|
148
|
+
- spec/texas/template/runner_spec.rb
|
149
|
+
- spec/texas/template/helper/info_spec.rb
|
150
|
+
- spec/texas/build/base_spec.rb
|
151
|
+
- spec/texas/build/config_spec.rb
|
152
|
+
- spec/texas/build/task/base_spec.rb
|
153
|
+
- spec/texas/build/task/publish_pdf_spec.rb
|
154
|
+
- spec/texas/option_parser_spec.rb
|
151
155
|
- bin/texas
|
152
|
-
- contents/_preambel.tex.erb
|
153
156
|
- contents/master.tex.erb
|
157
|
+
- contents/_preambel.tex.erb
|
154
158
|
homepage: http://github.com/rrrene/texas
|
155
159
|
licenses: []
|
160
|
+
metadata: {}
|
156
161
|
post_install_message:
|
157
162
|
rdoc_options: []
|
158
163
|
require_paths:
|
159
164
|
- lib
|
160
165
|
required_ruby_version: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
166
|
requirements:
|
163
167
|
- - ! '>='
|
164
168
|
- !ruby/object:Gem::Version
|
165
169
|
version: '0'
|
166
170
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
171
|
requirements:
|
169
172
|
- - ! '>='
|
170
173
|
- !ruby/object:Gem::Version
|
@@ -172,8 +175,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
175
|
requirements:
|
173
176
|
- none
|
174
177
|
rubyforge_project:
|
175
|
-
rubygems_version:
|
178
|
+
rubygems_version: 2.0.3
|
176
179
|
signing_key:
|
177
|
-
specification_version:
|
180
|
+
specification_version: 4
|
178
181
|
summary: A tool for creating LaTex files from ERb templates.
|
179
182
|
test_files: []
|
@@ -1,22 +0,0 @@
|
|
1
|
-
module Texas
|
2
|
-
module Build
|
3
|
-
module Task
|
4
|
-
class RunBeforeScripts < Base
|
5
|
-
def cmd
|
6
|
-
@cmd ||= scripts && scripts['before']
|
7
|
-
end
|
8
|
-
|
9
|
-
def scripts
|
10
|
-
build.config['script']
|
11
|
-
end
|
12
|
-
|
13
|
-
def run
|
14
|
-
if cmd
|
15
|
-
verbose { "\n[i] Running before script:\n\n #{cmd.cyan}\n\n" }
|
16
|
-
system cmd
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|