brick_and_mortar 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +7 -0
  2. data/.gitattributes +17 -0
  3. data/.gitignore +35 -0
  4. data/Gemfile +4 -0
  5. data/LICENSE +22 -0
  6. data/README.md +68 -0
  7. data/Rakefile +18 -0
  8. data/bin/mortar +39 -0
  9. data/brick_and_mortar.gemspec +29 -0
  10. data/docs/Makefile +39 -0
  11. data/docs/html.template.pandoc +61 -0
  12. data/docs/pdf.template.pandoc +206 -0
  13. data/docs/references.bib +9 -0
  14. data/docs/tex.template.pandoc +213 -0
  15. data/lib/brick_and_mortar/brick.rb +150 -0
  16. data/lib/brick_and_mortar/config.rb +131 -0
  17. data/lib/brick_and_mortar/coverage/.last_run.json +5 -0
  18. data/lib/brick_and_mortar/coverage/.resultset.json +7 -0
  19. data/lib/brick_and_mortar/coverage/.resultset.json.lock +0 -0
  20. data/lib/brick_and_mortar/coverage/assets/0.10.0/application.css +799 -0
  21. data/lib/brick_and_mortar/coverage/assets/0.10.0/application.js +1707 -0
  22. data/lib/brick_and_mortar/coverage/assets/0.10.0/colorbox/border.png +0 -0
  23. data/lib/brick_and_mortar/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  24. data/lib/brick_and_mortar/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  25. data/lib/brick_and_mortar/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  26. data/lib/brick_and_mortar/coverage/assets/0.10.0/favicon_green.png +0 -0
  27. data/lib/brick_and_mortar/coverage/assets/0.10.0/favicon_red.png +0 -0
  28. data/lib/brick_and_mortar/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  29. data/lib/brick_and_mortar/coverage/assets/0.10.0/loading.gif +0 -0
  30. data/lib/brick_and_mortar/coverage/assets/0.10.0/magnify.png +0 -0
  31. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  32. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  33. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  34. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  35. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  36. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  37. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  38. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  39. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  40. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  41. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  42. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  43. data/lib/brick_and_mortar/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  44. data/lib/brick_and_mortar/coverage/index.html +72 -0
  45. data/lib/brick_and_mortar/download.rb +99 -0
  46. data/lib/brick_and_mortar/git.rb +12 -0
  47. data/lib/brick_and_mortar/project.rb +33 -0
  48. data/lib/brick_and_mortar/svn.rb +19 -0
  49. data/lib/brick_and_mortar/version.rb +3 -0
  50. data/lib/brick_and_mortar.rb +10 -0
  51. data/spec/config_spec.rb +277 -0
  52. data/spec/download_spec.rb +38 -0
  53. data/spec/git_spec.rb +38 -0
  54. data/spec/mortar_spec.rb +6 -0
  55. data/spec/project_spec.rb +34 -0
  56. data/spec/support/mocks.rb +23 -0
  57. data/spec/support/network_mocks.rb +34 -0
  58. data/spec/support/spec_helper.rb +18 -0
  59. data/spec/support/test_files/git_https_brickfile.yml +6 -0
  60. data/spec/support/test_files/git_ssh_brickfile.yml +6 -0
  61. data/spec/support/test_files/hg_brickfile.yml +6 -0
  62. data/spec/support/test_files/local_project/README.md +1 -0
  63. data/spec/support/test_files/local_project_brickfile.yml +4 -0
  64. data/spec/support/test_files/svn_brickfile.yml +6 -0
  65. data/spec/support/test_files/test_project/Brickfile +22 -0
  66. data/spec/support/test_files/url_brickfile.yml +4 -0
  67. data/spec/svn_spec.rb +38 -0
  68. metadata +227 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c2557c969ebe8a92317f0e5162fc010844402d67
4
+ data.tar.gz: 8b72a255373e652ea6952d377b112c3fdd0f933b
5
+ SHA512:
6
+ metadata.gz: 9c37797f942d56ff20594e59c83850b988a21b94b1f8c9e4d3c2dbd9c5b56d98f5fe881f1cf0c91ced206330792d3b7181b59b2d6f27238d20245b5f821b3c90
7
+ data.tar.gz: ee4bc21678fda01c5e55aecf001334aed1c6ee9d07f8b4c51bd0680daf40c44becbaced24dd085f3f34906e392c129070730c8b912568b832d996836ea67ae2d
data/.gitattributes ADDED
@@ -0,0 +1,17 @@
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
3
+
4
+ # Custom for Visual Studio
5
+ *.cs diff=csharp
6
+
7
+ # Standard to msysgit
8
+ *.doc diff=astextplain
9
+ *.DOC diff=astextplain
10
+ *.docx diff=astextplain
11
+ *.DOCX diff=astextplain
12
+ *.dot diff=astextplain
13
+ *.DOT diff=astextplain
14
+ *.pdf diff=astextplain
15
+ *.PDF diff=astextplain
16
+ *.rtf diff=astextplain
17
+ *.RTF diff=astextplain
data/.gitignore ADDED
@@ -0,0 +1,35 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+
12
+ ## Specific to RubyMotion:
13
+ .dat*
14
+ .repl_history
15
+ build/
16
+
17
+ ## Documentation cache and generated files:
18
+ /.yardoc/
19
+ /_yardoc/
20
+ /doc/
21
+ /rdoc/
22
+
23
+ ## Environment normalisation:
24
+ /.bundle/
25
+ /vendor/bundle
26
+ /lib/bundler/man/
27
+
28
+ # for a library or gem, you might want to ignore these files since the code is
29
+ # intended to run in multiple environments; otherwise, check them in:
30
+ # Gemfile.lock
31
+ # .ruby-version
32
+ # .ruby-gemset
33
+
34
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
+ .rvmrc
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in brick_and_mortar.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Dustin Morrill
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
data/README.md ADDED
@@ -0,0 +1,68 @@
1
+ BrickAndMortar: A Solid Foundation for Software Projects
2
+ ================================================
3
+
4
+ What is BrickAndMortar?
5
+ ---------------
6
+
7
+ Many programming environments have dependency managers for their own libraries, such as *Bundler* for Ruby, *Pip* for Python, *Node Package Manager* for Node, and others. A problem arises however, if one needs to use packages from many environments, those that are in any dependency manager's library, or those written in languages that lack widespread dependency manager support such as C and C++.
8
+
9
+ **BrickAndMortar** is a meant to fill this gap and be a catch-all dependency manager for these projects that require a little extra glue to hold their foundation together.
10
+
11
+ It is not nearly as fancy a tool as *Bundler* or the like that does dependency conflict checking and automated updates. Instead, it seeks to do one much less ambitious, but nonetheless extremely useful job:
12
+
13
+ **Ensure that all specified dependencies, from here on called *bricks*, are linked or copied into the project's `vendor` directory, recursively.**
14
+
15
+ Its possible that there are tools in existence that do exactly this, but I have been unable to find them as of yet. Feel free to point me to them.
16
+
17
+
18
+ Supported Systems
19
+ -----------------
20
+
21
+ Currently only targeted for Linux, and only tested on Ubuntu.
22
+
23
+
24
+ Requirements
25
+ ------------
26
+
27
+ - Ruby (>= 1.8.7)
28
+
29
+
30
+ Usage
31
+ -----
32
+
33
+ 1. Install `brick_and_mortar` gem with `gem install brick_and_mortar`
34
+ 2. Write a `Brickfile.yml` in your project's root directory that has the following fields:
35
+
36
+ `name`
37
+ ~ The name of the dependency. The directory or link that will be present in the `vendor` directory will have this name.
38
+
39
+ `version`
40
+ ~ The version of the brick as a string in whatever format is natural for it. This will be appended to the directory name of the copy of the brick downloaded in the `$BRICK_STORE_PREFIX/.brick_store` directory.
41
+
42
+ `location`
43
+ ~ Location of the brick. Either local system path, version control repository (*Git*, *Mercurial*, and *Subversion* currently supported), or URL.
44
+
45
+ 3. Run `brick_and_mortar lay` to install bricks to `vendor`, downloading them if necessary to `$BRICK_STORE_PREFIX/.brick_store`.
46
+
47
+
48
+ Settings
49
+ --------
50
+
51
+ Write a `$HOME/.brick_and_mortarrc` file to specify:
52
+
53
+ `BRICK_STORE_PREFIX`
54
+ ~ The directory that contains `.brick_store`. As the name suggests, `.brick_store` is where all bricks will be stored before they are linked or copied into the `vendor` directories of individual projects.
55
+
56
+ `DEFAULT_BRICK_SHARING_POLICY`
57
+ ~ Specify the default behavior when placing bricks in projects. Accepts either
58
+ - `copy`, where the brick will be copied into `vendor`, or
59
+ - `link`, where the brick will be symbolically linked into `vendor`.
60
+ Defaults to `link`.
61
+
62
+
63
+ License
64
+ -------
65
+
66
+ Copyright Dustin Morrill, 2015
67
+
68
+ MIT License
data/Rakefile ADDED
@@ -0,0 +1,18 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake'
3
+ require 'rake/clean'
4
+
5
+ require_relative 'lib/brick_and_mortar/version'
6
+
7
+ desc 'Test gem'
8
+ task default: [:test]
9
+
10
+ task :test do
11
+ libs = ['lib', 'spec/support']
12
+ test_files = FileList['spec/**/*_spec.rb']
13
+
14
+ test_files.each do |test_file|
15
+ includes = libs.map { |l| "-I#{l}"}.join ' '
16
+ sh "ruby #{includes} #{test_file}"
17
+ end
18
+ end
data/bin/mortar ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+ require 'brick_and_mortar'
5
+
6
+ options = {}
7
+ OptionParser.new do |opts|
8
+ opts.banner = "Usage: #{__FILE__} [options]"
9
+
10
+ opts.on("-h", "--help", "Show this message") do
11
+ puts opts
12
+ exit
13
+ end
14
+
15
+ options[:brickfile] = File.join(Dir.pwd, 'Brickfile')
16
+ opts.on(
17
+ "-f",
18
+ "--brickfile [Brickfile name]",
19
+ "Lay the bricks specified in this Brickfile. Defaults to \"#{options[:brickfile]}\""
20
+ ) do |x|
21
+ options[:brickfile] = x unless x.nil?
22
+ end
23
+
24
+ options[:brick_store] = BrickAndMortar::Project::DEFAULT_BRICK_STORE
25
+ opts.on(
26
+ "-s",
27
+ "--store [brick store path]",
28
+ "Store bricks here. Defaults to \"#{options[:brick_store]}\""
29
+ ) do |x|
30
+ options[:brick_store] = x unless x.nil?
31
+ end
32
+ end.parse!
33
+
34
+ unless File.file?(options[:brickfile])
35
+ puts "#{options[:brickfile]} does not exist. Please create a Brickfile before trying to lay bricks for this project."
36
+ exit 1
37
+ end
38
+ project = BrickAndMortar::Project.new options[:brickfile], options[:brick_store]
39
+ project.lay!
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'brick_and_mortar/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'brick_and_mortar'
8
+ spec.version = BrickAndMortar::VERSION
9
+ spec.authors = ['Dustin Morrill']
10
+ spec.email = ['dmorrill10@gmail.com']
11
+ spec.summary = 'BrickAndMortar: A Solid Foundation for Software Projects'
12
+ spec.description = ''
13
+ spec.homepage = ''
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_dependency 'git'
22
+ spec.add_dependency 'rubyzip'
23
+ spec.add_dependency 'contextual_exceptions'
24
+
25
+ spec.add_development_dependency 'bundler', '~> 1.6'
26
+ spec.add_development_dependency 'rake'
27
+ spec.add_development_dependency 'minitest'
28
+ spec.add_development_dependency 'simplecov'
29
+ end
data/docs/Makefile ADDED
@@ -0,0 +1,39 @@
1
+ default: pdf
2
+ .PHONY: default
3
+
4
+ #THIS_DIR := $(CURDIR)/$(dir $(lastword $(MAKEFILE_LIST)))
5
+ THIS_DIR := ./
6
+
7
+ TARGET_BASE :=README
8
+ SRC_DIR :=$(THIS_DIR)
9
+ TARGET_SRC :=$(SRC_DIR)/../$(TARGET_BASE).md
10
+
11
+ BIB :=$(SRC_DIR)/references.bib
12
+
13
+ TEMPLATE_DIR :=$(THIS_DIR)
14
+ TEMPLATE :=template.pandoc
15
+
16
+ # Default geometry
17
+ geometry =margin=1cm
18
+
19
+ $(TARGET_BASE).%:: $(TARGET_SRC) $(TEMPLATE_DIR)/%.$(TEMPLATE) | $(TEMPLATE_DIR)
20
+ pandoc $(TARGET_SRC) -o $(THIS_DIR)/$@ --template=$(TEMPLATE_DIR)/$*.$(TEMPLATE) --biblio $(BIB) --variable geometry:$(geometry)
21
+
22
+ # Add rules for different file types like this:
23
+ pdf: $(TARGET_BASE).pdf
24
+ .PHONY: pdf
25
+ tex: $(TARGET_BASE).tex
26
+ .PHONY: tex
27
+ html: $(TARGET_BASE).html
28
+ .PHONY: html
29
+
30
+
31
+ # Meta-rules
32
+ #===========
33
+ print-%:
34
+ @echo $* = $($*)
35
+ .PHONY: print-%
36
+
37
+ clean%:
38
+ -rm $(TARGET_BASE).$*
39
+ .PHONY: clean%
@@ -0,0 +1,61 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
+ <meta http-equiv="Content-Style-Type" content="text/css" />
6
+ <meta name="generator" content="pandoc" />
7
+ $for(author-meta)$
8
+ <meta name="author" content="$author-meta$" />
9
+ $endfor$
10
+ $if(date-meta)$
11
+ <meta name="date" content="$date-meta$" />
12
+ $endif$
13
+ <title>$if(title-prefix)$$title-prefix$ - $endif$$pagetitle$</title>
14
+ <style type="text/css">code{white-space: pre;}</style>
15
+ $if(quotes)$
16
+ <style type="text/css">q { quotes: "“" "”" "‘" "’"; }</style>
17
+ $endif$
18
+ $if(highlighting-css)$
19
+ <style type="text/css">
20
+ $highlighting-css$
21
+ </style>
22
+ $endif$
23
+ $for(css)$
24
+ <link rel="stylesheet" href="$css$" $if(html5)$$else$type="text/css" $endif$/>
25
+ $endfor$
26
+ $if(math)$
27
+ $math$
28
+ $endif$
29
+ $for(header-includes)$
30
+ $header-includes$
31
+ $endfor$
32
+ </head>
33
+ <body>
34
+ $for(include-before)$
35
+ $include-before$
36
+ $endfor$
37
+ $if(title)$
38
+ <div id="$idprefix$header">
39
+ <h1 class="title">$title$</h1>
40
+ $if(subtitle)$
41
+ <h1 class="subtitle">$subtitle$</h1>
42
+ $endif$
43
+ $for(author)$
44
+ <h2 class="author">$author$</h2>
45
+ $endfor$
46
+ $if(date)$
47
+ <h3 class="date">$date$</h3>
48
+ $endif$
49
+ </div>
50
+ $endif$
51
+ $if(toc)$
52
+ <div id="$idprefix$TOC">
53
+ $toc$
54
+ </div>
55
+ $endif$
56
+ $body$
57
+ $for(include-after)$
58
+ $include-after$
59
+ $endfor$
60
+ </body>
61
+ </html>
@@ -0,0 +1,206 @@
1
+ \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$lang$,$endif$$if(papersize)$$papersize$,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$}
2
+ $if(fontfamily)$
3
+ \usepackage{$fontfamily$}
4
+ $else$
5
+ \usepackage{lmodern}
6
+ $endif$
7
+ $if(linestretch)$
8
+ \usepackage{setspace}
9
+ \setstretch{$linestretch$}
10
+ $endif$
11
+ \usepackage{amssymb,amsmath}
12
+ \usepackage{mathtools} % Better boxes around math
13
+ \usepackage{ifxetex,ifluatex}
14
+ \usepackage{fixltx2e} % provides \textsubscript
15
+ \ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
16
+ \usepackage[T1]{fontenc}
17
+ \usepackage[utf8]{inputenc}
18
+ $if(euro)$
19
+ \usepackage{eurosym}
20
+ $endif$
21
+ \else % if luatex or xelatex
22
+ \ifxetex
23
+ \usepackage{mathspec}
24
+ \usepackage{xltxtra,xunicode}
25
+ \else
26
+ \usepackage{fontspec}
27
+ \fi
28
+ \defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
29
+ \newcommand{\euro}{€}
30
+ $if(mainfont)$
31
+ \setmainfont{$mainfont$}
32
+ $endif$
33
+ $if(sansfont)$
34
+ \setsansfont{$sansfont$}
35
+ $endif$
36
+ $if(monofont)$
37
+ \setmonofont[Mapping=tex-ansi]{$monofont$}
38
+ $endif$
39
+ $if(mathfont)$
40
+ \setmathfont(Digits,Latin,Greek){$mathfont$}
41
+ $endif$
42
+ \fi
43
+ % use upquote if available, for straight quotes in verbatim environments
44
+ \IfFileExists{upquote.sty}{\usepackage{upquote}}{}
45
+ % use microtype if available
46
+ \IfFileExists{microtype.sty}{\usepackage{microtype}}{}
47
+ $if(geometry)$
48
+ \usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry}
49
+ $endif$
50
+ $if(natbib)$
51
+ \usepackage{natbib}
52
+ \bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
53
+ $endif$
54
+ $if(biblatex)$
55
+ \usepackage{biblatex}
56
+ $if(biblio-files)$
57
+ \bibliography{$biblio-files$}
58
+ $endif$
59
+ $endif$
60
+ $if(listings)$
61
+ \usepackage{listings}
62
+ $endif$
63
+ $if(lhs)$
64
+ \lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{}
65
+ $endif$
66
+ $if(highlighting-macros)$
67
+ $highlighting-macros$
68
+ $endif$
69
+ $if(verbatim-in-note)$
70
+ \usepackage{fancyvrb}
71
+ $endif$
72
+ $if(tables)$
73
+ \usepackage{longtable,booktabs}
74
+ $endif$
75
+ $if(graphics)$
76
+ \usepackage{graphicx}
77
+ \makeatletter
78
+ \def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
79
+ \def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
80
+ \makeatother
81
+ % Scale images if necessary, so that they will not overflow the page
82
+ % margins by default, and it is still possible to overwrite the defaults
83
+ % using explicit options in \includegraphics[width, height, ...]{}
84
+ \setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
85
+ $endif$
86
+ \ifxetex
87
+ \usepackage[setpagesize=false, % page size defined by xetex
88
+ unicode=false, % unicode breaks when used with xetex
89
+ xetex]{hyperref}
90
+ \else
91
+ \usepackage[unicode=true]{hyperref}
92
+ \fi
93
+ \hypersetup{breaklinks=true,
94
+ bookmarks=true,
95
+ pdfauthor={$author-meta$},
96
+ pdftitle={$title-meta$},
97
+ colorlinks=true,
98
+ citecolor=$if(citecolor)$$citecolor$$else$blue$endif$,
99
+ urlcolor=$if(urlcolor)$$urlcolor$$else$blue$endif$,
100
+ linkcolor=$if(linkcolor)$$linkcolor$$else$magenta$endif$,
101
+ pdfborder={0 0 0}}
102
+ \urlstyle{same} % don't use monospace font for urls
103
+ $if(links-as-notes)$
104
+ % Make links footnotes instead of hotlinks:
105
+ \renewcommand{\href}[2]{#2\footnote{\url{#1}}}
106
+ $endif$
107
+ $if(strikeout)$
108
+ \usepackage[normalem]{ulem}
109
+ % avoid problems with \sout in headers with hyperref:
110
+ \pdfstringdefDisableCommands{\renewcommand{\sout}{}}
111
+ $endif$
112
+ \setlength{\parindent}{0pt}
113
+ \setlength{\parskip}{6pt plus 2pt minus 1pt}
114
+ \setlength{\emergencystretch}{3em} % prevent overfull lines
115
+ $if(numbersections)$
116
+ \setcounter{secnumdepth}{5}
117
+ $else$
118
+ \setcounter{secnumdepth}{0}
119
+ $endif$
120
+ $if(verbatim-in-note)$
121
+ \VerbatimFootnotes % allows verbatim text in footnotes
122
+ $endif$
123
+ $if(lang)$
124
+ \ifxetex
125
+ \usepackage{polyglossia}
126
+ \setmainlanguage{$mainlang$}
127
+ \else
128
+ \usepackage[$lang$]{babel}
129
+ \fi
130
+ $endif$
131
+
132
+ %%% macros
133
+ \newcommand{\final}{\fbox}
134
+ \newcommand{\bs}{\boldsymbol}
135
+ \newcommand{\tr}{\operatorname{tr}}
136
+ \newcommand{\norm}[1]{\left\lVert#1\right\rVert}
137
+ \newcommand{\set}[1]{\left\{ {#1} \right\}}
138
+
139
+ \newcommand{\diag}[1]{\mathop{\bigtriangleup\subex{#1}}\nolimits}
140
+ \newcommand{\stack}[1]{\operatorname{stack}\subex{#1}}
141
+ \newcommand{\deriv}[2]{\frac{d #1}{ d #2 }}
142
+
143
+ \newcommand{\subex}[1]{\left(#1\right)}
144
+ %%%%
145
+
146
+ $if(title)$
147
+ \title{$title$}
148
+ $endif$
149
+ $if(subtitle)$
150
+ \subtitle{$subtitle$}
151
+ $endif$
152
+ $if(author)$
153
+ \author{$for(author)$$author$$sep$ \and $endfor$}
154
+ $endif$
155
+ $if(date)$
156
+ \date{$date$}
157
+ $endif$
158
+ $for(header-includes)$
159
+ $header-includes$
160
+ $endfor$
161
+
162
+ \begin{document}
163
+ $if(title)$
164
+ \maketitle
165
+ $endif$
166
+ $if(abstract)$
167
+ \begin{abstract}
168
+ $abstract$
169
+ \end{abstract}
170
+ $endif$
171
+
172
+ $for(include-before)$
173
+ $include-before$
174
+
175
+ $endfor$
176
+ $if(toc)$
177
+ {
178
+ \hypersetup{linkcolor=black}
179
+ \setcounter{tocdepth}{$toc-depth$}
180
+ \tableofcontents
181
+ }
182
+ $endif$
183
+ $body$
184
+
185
+ $if(natbib)$
186
+ $if(biblio-files)$
187
+ $if(biblio-title)$
188
+ $if(book-class)$
189
+ \renewcommand\bibname{$biblio-title$}
190
+ $else$
191
+ \renewcommand\refname{$biblio-title$}
192
+ $endif$
193
+ $endif$
194
+ \bibliography{$biblio-files$}
195
+
196
+ $endif$
197
+ $endif$
198
+ $if(biblatex)$
199
+ \printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$
200
+
201
+ $endif$
202
+ $for(include-after)$
203
+ $include-after$
204
+
205
+ $endfor$
206
+ \end{document}
@@ -0,0 +1,9 @@
1
+ @inproceedings{rcfr,
2
+ title = {Solving Games with Functional Regret Estimation},
3
+ author = {Kevin Waugh and Dustin Morrill and J. Andrew Bagnell and Michael Bowling},
4
+ booktitle = {{Twenty-Ninth AAAI Conference on Artificial Intelligence, January 25-29, 2015, Austin Texas, USA}},
5
+ year = {2015},
6
+ month = {January},
7
+ location = {Austin Texas, USA},
8
+ pages="2138--2145"
9
+ }