Update middleman-hashicorp
This commit is contained in:
parent
e2f083b21c
commit
24264ef0dc
|
@ -1,6 +1,3 @@
|
||||||
source "https://rubygems.org"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
gem "middleman-hashicorp",
|
gem "middleman-hashicorp", "0.3.12"
|
||||||
git: "https://github.com/hashicorp/middleman-hashicorp.git"
|
|
||||||
|
|
||||||
gem "htmlbeautifier"
|
|
||||||
|
|
|
@ -1,30 +1,17 @@
|
||||||
GIT
|
|
||||||
remote: https://github.com/hashicorp/middleman-hashicorp.git
|
|
||||||
revision: 462267352881543bbc5d2606f1ca17a6165ac8ec
|
|
||||||
specs:
|
|
||||||
middleman-hashicorp (0.3.5)
|
|
||||||
bootstrap-sass (~> 3.3)
|
|
||||||
builder (~> 3.2)
|
|
||||||
middleman (~> 3.4)
|
|
||||||
middleman-livereload (~> 3.4)
|
|
||||||
middleman-syntax (~> 3.0)
|
|
||||||
redcarpet (~> 3.3)
|
|
||||||
|
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activesupport (4.2.7.1)
|
activesupport (4.2.8)
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
json (~> 1.7, >= 1.7.7)
|
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
autoprefixer-rails (6.5.3)
|
autoprefixer-rails (6.7.6)
|
||||||
execjs
|
execjs
|
||||||
bootstrap-sass (3.3.7)
|
bootstrap-sass (3.3.7)
|
||||||
autoprefixer-rails (>= 5.2.1)
|
autoprefixer-rails (>= 5.2.1)
|
||||||
sass (>= 3.3.4)
|
sass (>= 3.3.4)
|
||||||
builder (3.2.2)
|
builder (3.2.3)
|
||||||
capybara (2.4.4)
|
capybara (2.4.4)
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
nokogiri (>= 1.3.3)
|
nokogiri (>= 1.3.3)
|
||||||
|
@ -35,7 +22,7 @@ GEM
|
||||||
coffee-script (2.4.1)
|
coffee-script (2.4.1)
|
||||||
coffee-script-source
|
coffee-script-source
|
||||||
execjs
|
execjs
|
||||||
coffee-script-source (1.10.0)
|
coffee-script-source (1.12.2)
|
||||||
compass (1.0.3)
|
compass (1.0.3)
|
||||||
chunky_png (~> 1.2)
|
chunky_png (~> 1.2)
|
||||||
compass-core (~> 1.0.2)
|
compass-core (~> 1.0.2)
|
||||||
|
@ -52,19 +39,18 @@ GEM
|
||||||
eventmachine (>= 0.12.9)
|
eventmachine (>= 0.12.9)
|
||||||
http_parser.rb (~> 0.6.0)
|
http_parser.rb (~> 0.6.0)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
eventmachine (1.2.0.1)
|
eventmachine (1.2.3)
|
||||||
execjs (2.7.0)
|
execjs (2.7.0)
|
||||||
ffi (1.9.14)
|
ffi (1.9.18)
|
||||||
haml (4.0.7)
|
haml (4.0.7)
|
||||||
tilt
|
tilt
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
hooks (0.4.1)
|
hooks (0.4.1)
|
||||||
uber (~> 0.0.14)
|
uber (~> 0.0.14)
|
||||||
htmlbeautifier (1.2.0)
|
|
||||||
http_parser.rb (0.6.0)
|
http_parser.rb (0.6.0)
|
||||||
i18n (0.7.0)
|
i18n (0.7.0)
|
||||||
json (1.8.3)
|
json (2.0.3)
|
||||||
kramdown (1.12.0)
|
kramdown (1.13.2)
|
||||||
listen (3.0.8)
|
listen (3.0.8)
|
||||||
rb-fsevent (~> 0.9, >= 0.9.4)
|
rb-fsevent (~> 0.9, >= 0.9.4)
|
||||||
rb-inotify (~> 0.9, >= 0.9.7)
|
rb-inotify (~> 0.9, >= 0.9.7)
|
||||||
|
@ -91,6 +77,14 @@ GEM
|
||||||
rack (>= 1.4.5, < 2.0)
|
rack (>= 1.4.5, < 2.0)
|
||||||
thor (>= 0.15.2, < 2.0)
|
thor (>= 0.15.2, < 2.0)
|
||||||
tilt (~> 1.4.1, < 2.0)
|
tilt (~> 1.4.1, < 2.0)
|
||||||
|
middleman-hashicorp (0.3.12)
|
||||||
|
bootstrap-sass (~> 3.3)
|
||||||
|
builder (~> 3.2)
|
||||||
|
middleman (~> 3.4)
|
||||||
|
middleman-livereload (~> 3.4)
|
||||||
|
middleman-syntax (~> 3.0)
|
||||||
|
redcarpet (~> 3.3)
|
||||||
|
turbolinks (~> 5.0)
|
||||||
middleman-livereload (3.4.6)
|
middleman-livereload (3.4.6)
|
||||||
em-websocket (~> 0.5.1)
|
em-websocket (~> 0.5.1)
|
||||||
middleman-core (>= 3.3)
|
middleman-core (>= 3.3)
|
||||||
|
@ -107,9 +101,9 @@ GEM
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2016.0521)
|
mime-types-data (3.2016.0521)
|
||||||
mini_portile2 (2.1.0)
|
mini_portile2 (2.1.0)
|
||||||
minitest (5.9.1)
|
minitest (5.10.1)
|
||||||
multi_json (1.12.1)
|
multi_json (1.12.1)
|
||||||
nokogiri (1.6.8.1)
|
nokogiri (1.7.0.1)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.1.0)
|
||||||
padrino-helpers (0.12.8.1)
|
padrino-helpers (0.12.8.1)
|
||||||
i18n (~> 0.6, >= 0.6.7)
|
i18n (~> 0.6, >= 0.6.7)
|
||||||
|
@ -123,11 +117,11 @@ GEM
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rb-fsevent (0.9.8)
|
rb-fsevent (0.9.8)
|
||||||
rb-inotify (0.9.7)
|
rb-inotify (0.9.8)
|
||||||
ffi (>= 0.5.0)
|
ffi (>= 0.5.0)
|
||||||
redcarpet (3.3.4)
|
redcarpet (3.4.0)
|
||||||
rouge (2.0.6)
|
rouge (2.0.7)
|
||||||
sass (3.4.22)
|
sass (3.4.23)
|
||||||
sprockets (2.12.4)
|
sprockets (2.12.4)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
@ -138,9 +132,12 @@ GEM
|
||||||
sprockets-sass (1.3.1)
|
sprockets-sass (1.3.1)
|
||||||
sprockets (~> 2.0)
|
sprockets (~> 2.0)
|
||||||
tilt (~> 1.1)
|
tilt (~> 1.1)
|
||||||
thor (0.19.1)
|
thor (0.19.4)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.6)
|
||||||
tilt (1.4.1)
|
tilt (1.4.1)
|
||||||
|
turbolinks (5.0.1)
|
||||||
|
turbolinks-source (~> 5)
|
||||||
|
turbolinks-source (5.0.0)
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.2)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
uber (0.0.15)
|
uber (0.0.15)
|
||||||
|
@ -154,8 +151,7 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
htmlbeautifier
|
middleman-hashicorp (= 0.3.12)
|
||||||
middleman-hashicorp!
|
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.13.6
|
1.14.6
|
||||||
|
|
|
@ -1,22 +1,14 @@
|
||||||
all: build
|
VERSION?="0.3.12"
|
||||||
|
|
||||||
init:
|
website:
|
||||||
bundle
|
@echo "==> Starting website in Docker..."
|
||||||
|
@docker run \
|
||||||
|
--interactive \
|
||||||
|
--rm \
|
||||||
|
--tty \
|
||||||
|
--publish "4567:4567" \
|
||||||
|
--publish "35729:35729" \
|
||||||
|
--volume "$(shell pwd):/website" \
|
||||||
|
hashicorp/middleman-hashicorp:${VERSION}
|
||||||
|
|
||||||
docker-dev:
|
.PHONY: website
|
||||||
docker run -it --expose 4567 -p 4567:4567 -v "$(PWD)":/usr/src/app -w /usr/src/app ruby:2.3.1 \
|
|
||||||
bash -c "apt-get update && apt-get -qy install curl git libgmp3-dev nodejs && \
|
|
||||||
gem install bundler && bundle install && make dev"
|
|
||||||
|
|
||||||
dev: init
|
|
||||||
PACKER_DISABLE_DOWNLOAD_FETCH=true PACKER_VERSION=1.0 bundle exec middleman server
|
|
||||||
|
|
||||||
build: init
|
|
||||||
PACKER_DISABLE_DOWNLOAD_FETCH=true PACKER_VERSION=1.0 bundle exec middleman build
|
|
||||||
|
|
||||||
format:
|
|
||||||
bundle exec htmlbeautifier -t 2 source/*.erb
|
|
||||||
bundle exec htmlbeautifier -t 2 source/layouts/*.erb
|
|
||||||
@pandoc -v > /dev/null || echo "pandoc must be installed in order to format markdown content"
|
|
||||||
pandoc -v > /dev/null && find . -iname "*.html.md" | xargs -I{} bash -c "pandoc -r markdown -w markdown --tab-stop=4 --atx-headers -s --columns=80 {} > {}.new"\; || true
|
|
||||||
pandoc -v > /dev/null && find . -iname "*.html.md" | xargs -I{} bash -c "mv {}.new {}"\; || true
|
|
||||||
|
|
|
@ -1,33 +1,21 @@
|
||||||
# Packer Website
|
# Vault Website
|
||||||
|
|
||||||
This subdirectory contains the entire source for the [Packer website](http://www.packer.io).
|
This subdirectory contains the entire source for the [Packer Website][packer].
|
||||||
This is a [Middleman](http://middlemanapp.com) project, which builds a static
|
This is a [Middleman][middleman] project, which builds a static site from these
|
||||||
site from these source files.
|
source files.
|
||||||
|
|
||||||
## Contributions Welcome!
|
## Contributions Welcome!
|
||||||
|
|
||||||
If you find a typo or you feel like you can improve the HTML, CSS, or
|
If you find a typo or you feel like you can improve the HTML, CSS, or
|
||||||
JavaScript, we welcome contributions. Feel free to open issues or pull
|
JavaScript, we welcome contributions. Feel free to open issues or pull requests
|
||||||
requests like any normal GitHub project, and we'll merge it in.
|
like any normal GitHub project, and we'll merge it in.
|
||||||
|
|
||||||
## Running the Site Locally
|
## Running the Site Locally
|
||||||
|
|
||||||
Running the site locally is simple. Clone this repo and run the following
|
Running the site locally is simple. Clone this repo and run `make website`.
|
||||||
commands:
|
|
||||||
|
|
||||||
```
|
Then open up `http://localhost:4567`. Note that some URLs you may need to append
|
||||||
make dev
|
".html" to make them work (in the navigation).
|
||||||
```
|
|
||||||
|
|
||||||
Then open up `localhost:4567`. Note that some URLs you may need to append
|
[middleman]: https://www.middlemanapp.com
|
||||||
".html" to make them work (in the navigation and such).
|
[vault]: https://www.packer.io
|
||||||
|
|
||||||
## Keeping Tidy
|
|
||||||
|
|
||||||
To keep the source code nicely formatted, there is a `make format` target. This
|
|
||||||
runs `htmlbeautify` and `pandoc` to reformat the source code so it's nicely formatted.
|
|
||||||
|
|
||||||
make format
|
|
||||||
|
|
||||||
Note that you will need to install pandoc yourself. `make format` will skip it
|
|
||||||
if you don't have it installed.
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
# -*- mode: ruby -*-
|
|
||||||
# vi: set ft=ruby :
|
|
||||||
|
|
||||||
$script = <<SCRIPT
|
|
||||||
sudo apt-get -y update
|
|
||||||
|
|
||||||
# RVM/Ruby
|
|
||||||
sudo apt-get -qy install curl git libgmp3-dev nodejs
|
|
||||||
gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
|
|
||||||
# Install rvm and the latest version of ruby
|
|
||||||
curl -sSL https://get.rvm.io | bash -s stable
|
|
||||||
. ~/.bashrc
|
|
||||||
. ~/.bash_profile
|
|
||||||
rvm install ruby-2.3.1
|
|
||||||
gem install bundler
|
|
||||||
|
|
||||||
# Middleman deps
|
|
||||||
cd /vagrant
|
|
||||||
make dev
|
|
||||||
SCRIPT
|
|
||||||
|
|
||||||
Vagrant.configure(2) do |config|
|
|
||||||
config.vm.box = "bento/ubuntu-14.04"
|
|
||||||
config.vm.network "private_network", ip: "33.33.30.10"
|
|
||||||
config.vm.provision "shell", inline: $script, privileged: false
|
|
||||||
config.vm.synced_folder ".", "/vagrant", type: "rsync"
|
|
||||||
end
|
|
|
@ -8,15 +8,16 @@
|
||||||
"builders": [
|
"builders": [
|
||||||
{
|
{
|
||||||
"type": "docker",
|
"type": "docker",
|
||||||
"image": "ruby:2.3-slim",
|
"image": "hashicorp/middleman-hashicorp:0.3.12",
|
||||||
"commit": "true"
|
"discard": "true",
|
||||||
|
"run_command": ["-d", "-i", "-t", "{{ .Image }}", "/bin/sh"]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"provisioners": [
|
"provisioners": [
|
||||||
{
|
{
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"source": ".",
|
"source": ".",
|
||||||
"destination": "/app"
|
"destination": "/website"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
|
@ -27,16 +28,9 @@
|
||||||
"FASTLY_API_KEY={{ user `fastly_api_key` }}"
|
"FASTLY_API_KEY={{ user `fastly_api_key` }}"
|
||||||
],
|
],
|
||||||
"inline": [
|
"inline": [
|
||||||
"apt-get -qq update",
|
"bundle check || bundle install",
|
||||||
"apt-get -yqq install build-essential curl git libffi-dev wget nodejs",
|
|
||||||
"apt-get -yqq install python-pip",
|
|
||||||
"pip install s3cmd",
|
|
||||||
"cd /app",
|
|
||||||
|
|
||||||
"bundle check || bundle install --jobs 7",
|
|
||||||
"bundle exec middleman build",
|
"bundle exec middleman build",
|
||||||
|
"/bin/sh ./scripts/deploy.sh"
|
||||||
"/bin/bash ./scripts/deploy.sh"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue