diff --git a/Gemfile.lock b/Gemfile.lock index fd16f36f..fc2b9be8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -22,7 +22,7 @@ GEM eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) eventmachine (1.0.7) - ffi (1.9.8) + ffi (1.15.5) formatador (0.2.5) guard (2.12.6) formatador (>= 0.2.4) @@ -40,7 +40,8 @@ GEM guard-nanoc (1.0.3) guard (~> 2.8) nanoc (~> 3.6) - haml (4.0.6) + haml (5.0.0) + temple (>= 0.8.0) tilt hitimes (1.2.2) http_parser.rb (0.6.0) @@ -50,7 +51,7 @@ GEM rb-inotify (>= 0.9) lumberjack (1.0.9) method_source (0.8.2) - mini_portile (0.6.2) + mini_portile2 (2.8.0) multi_json (1.11.0) nanoc (3.7.4) cri (~> 2.3) @@ -58,8 +59,9 @@ GEM asciidoctor (> 0.1, < 2.0) nanoc (>= 3.6.7, < 4.0.0) nenv (0.2.0) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) + nokogiri (1.13.2) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) notiffany (0.0.6) nenv (~> 0.1) shellany (~> 0.0) @@ -71,11 +73,12 @@ GEM pygments.rb (0.6.0) posix-spawn (~> 0.3.6) yajl-ruby (~> 1.1.0) - rack (1.6.1) + racc (1.6.0) + rack (2.2.3) rb-fsevent (0.9.5) rb-inotify (0.9.5) ffi (>= 0.5.0) - redcarpet (3.3.1) + redcarpet (3.5.1) sass (3.4.9) sassy-maps (0.4.0) sass (~> 3.3) @@ -83,8 +86,9 @@ GEM slop (3.6.0) susy (2.2.1) sass (>= 3.3.0, < 3.5) + temple (0.8.2) thor (0.19.1) - tilt (2.0.1) + tilt (2.0.10) timers (4.0.1) hitimes yajl-ruby (1.1.0) diff --git a/content/cftbat/appendix-b.html b/content/cftbat/appendix-b.html index 4e82ebc0..da11c20c 100644 --- a/content/cftbat/appendix-b.html +++ b/content/cftbat/appendix-b.html @@ -87,7 +87,7 @@

The REPL

And of course, you can use deftask in the REPL as well—it’s just Clojure, after all. The takeaway is that Boot lets you interact with your tasks as Clojure functions, because that’s what they are.

Composition and Coordination

If what you’ve seen so far was all that Boot had to offer, it’d be a pretty swell tool, but it wouldn’t be very different from other build tools. One feature that sets Boot apart is how it lets you compose tasks. For comparison’s sake, here’s an example Rake invocation (Rake is the premier Ruby build tool):

-
rake db:create d{:tag :a, :attrs {:href "db:seed"}, :content ["b:migra"]}te db:seed
+	
rake db:create d{:tag :a, :attrs {:href "db:seed"}, :content ["b:migrate"]} db:seed
 

This code will create a database, run migrations on it, and populate it with seed data when run in a Rails project. However, worth noting is that Rake doesn’t provide any way for these tasks to communicate with each other. Specifying multiple tasks is just a convenience, saving you from having to run rake db:create; rake db:migrate; rake db:seed. If you want to access the result of Task A within Task B, the build tool doesn’t help you; you have to manage that coordination yourself. Usually, you’ll do this by shoving the result of Task A into a special place on the filesystem and then making sure Task B reads that special place. This looks like programming with mutable, global variables, and it’s just as brittle.