Skip to content

Commit 7f96eaa

Browse files
authored
Merge pull request #1062 from lucperkins/lperkins/ruby-vendoring
Provide vendored Ruby setup
2 parents deda44c + 722667f commit 7f96eaa

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ tmp/
1111
# Crash Log
1212
crash.log
1313

14-
# OS X file
15-
static/.DS_Store
14+
# macOS artifacts
15+
.DS_Store
1616

1717
prometheus_rsa
18+
19+
# Ruby artifacts
20+
.bundle/
21+
vendor/

Makefile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
1+
NANOC = bundle exec nanoc
2+
GUARD = bundle exec guard
13
DOWNLOADS := prometheus alertmanager blackbox_exporter consul_exporter graphite_exporter haproxy_exporter memcached_exporter mysqld_exporter node_exporter pushgateway statsd_exporter
24

35
build: clean downloads compile
46

7+
bundle:
8+
bundle config build.nokogiri --use-system-libraries
9+
bundle install --path vendor
10+
511
clean:
612
rm -rf output downloads repositories
713

814
compile:
9-
bundle exec nanoc
15+
$(NANOC)
1016

1117
downloads: $(DOWNLOADS:%=downloads/%/repo.json) $(DOWNLOADS:%=downloads/%/releases.json)
1218

@@ -20,4 +26,10 @@ downloads/%/releases.json:
2026
@echo "curl -sf -H 'Accept: application/vnd.github.v3+json' <GITHUB_AUTHENTICATION> https://api.github.com/repos/prometheus/$*/releases > $@"
2127
@curl -sf -H 'Accept: application/vnd.github.v3+json' $(GITHUB_AUTHENTICATION) https://api.github.com/repos/prometheus/$*/releases > $@
2228

23-
.PHONY: build compile deploy
29+
guard:
30+
$(GUARD)
31+
32+
serve:
33+
$(NANOC) view
34+
35+
.PHONY: build bundle clean compile downloads serve

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ As a guideline, please keep the documentation generally applicable and avoid use
1515

1616
## Prerequisites
1717

18-
You need to have a working Ruby environment set up and then install the
19-
necessary gems:
18+
You need to have a working Ruby environment set up (including [bundler](https://bundler.io/))
19+
and then install the necessary gems:
2020

2121
```bash
2222
cd docs
23-
bundle
23+
make bundle
2424
```
2525

2626
## Building
@@ -39,9 +39,9 @@ To run a local server that displays the generated site, run:
3939

4040
```bash
4141
# Rebuild the site whenever relevant files change:
42-
bundle exec guard
43-
# Start the local development server:
44-
bundle exec nanoc view
42+
make guard
43+
# Start the local development server in a separate shell:
44+
make serve
4545
```
4646

4747
You should now be able to view the generated site at

0 commit comments

Comments
 (0)