jalpha 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/Gemfile +4 -0
- data/README.md +48 -0
- data/Rakefile +3 -0
- data/bin/jalpha +4 -0
- data/circle.yml +16 -0
- data/jalpha.gemspec +21 -0
- data/lib/jalpha.rb +3 -0
- data/lib/jalpha/generator.rb +16 -0
- data/lib/jalpha/install.rb +46 -0
- data/lib/jalpha/version.rb +3 -0
- data/template/.bowerrc +3 -0
- data/template/.gitignore +6 -0
- data/template/.ruby-version +1 -0
- data/template/Gemfile +9 -0
- data/template/README.md.tt +23 -0
- data/template/_assets/fonts/.keep +0 -0
- data/template/_assets/images/apple-touch-icon.png +0 -0
- data/template/_assets/images/og-image.jpg +0 -0
- data/template/_assets/javascripts/application.js +1 -0
- data/template/_assets/javascripts/vendor.js +1 -0
- data/template/_assets/stylesheets/application.scss +0 -0
- data/template/_config.yml.tt +32 -0
- data/template/_data/.keep +0 -0
- data/template/_includes/.keep +0 -0
- data/template/_layouts/default.html +45 -0
- data/template/bin/cideploy.sh +42 -0
- data/template/bin/setup +16 -0
- data/template/bower.json.tt +6 -0
- data/template/circle.yml +23 -0
- data/template/favicon.ico +0 -0
- data/template/index.html +5 -0
- data/template/manifest.yml +7 -0
- data/template/robots.txt +5 -0
- metadata +121 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 460f98590528e8f9b0e3567b4407c8fcde7ffb11
|
4
|
+
data.tar.gz: 106b63a87c4aca745ef33092a205b0e214db9eeb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 46e638556367a3d8fb61f2f480cbbd9fbb4f7e4ce63f01b71750c1347feb29a72fed5c58c40a2e5ff344fcfe3a65db86c2f98b0772d92e82230d797fa7c573c0
|
7
|
+
data.tar.gz: 5acd8e3a0cfa2c8bbea45d743c1c12b517c6521f40afc0e7e6b88f9df67517d52a060f84a3b95814753e2562da23d0fc6e62553cb6cfd05fa52e0869a78e660f
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# Jalpha
|
2
|
+
|
3
|
+
Jalpha generates a new Jekyll project packed with everything you should need to get started on your examplar's Alpha. This allows you to concentrate on your project from day one.
|
4
|
+
|
5
|
+
## What do you get
|
6
|
+
|
7
|
+
- [Jekyll](https://jekyllrb.com/)
|
8
|
+
- [Jekyll assets](https://github.com/jekyll/jekyll-assets)
|
9
|
+
- [Jekyll Sitemap](https://github.com/jekyll/jekyll-sitemap)
|
10
|
+
- [Autoprefixer](https://github.com/postcss/autoprefixer)
|
11
|
+
- [Bower](http://bower.io/)
|
12
|
+
- [Html-proofer](https://github.com/gjtorikian/html-proofer)
|
13
|
+
- [HTML5 Boilerplate](https://html5boilerplate.com/) (Influenced by)
|
14
|
+
- [Circle CI](https://circleci.com/)
|
15
|
+
- [Cloudfoundry manifest.yml](https://www.cloudfoundry.org/)
|
16
|
+
- setup for multibranch continual deployment to a cloudfoundry platform
|
17
|
+
|
18
|
+
## Installation
|
19
|
+
|
20
|
+
Install the gem:
|
21
|
+
|
22
|
+
gem install jalpha
|
23
|
+
|
24
|
+
Execute gem and generate a new project:
|
25
|
+
|
26
|
+
jalpha new site_name
|
27
|
+
|
28
|
+
Setup your environment:
|
29
|
+
|
30
|
+
bin/setup
|
31
|
+
|
32
|
+
## Bugs
|
33
|
+
|
34
|
+
If you have found a bug please report it in [GitHub issues](https://github.com/AusDTO/jalpha/issues).
|
35
|
+
|
36
|
+
## License
|
37
|
+
|
38
|
+
MIT License
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
1. Fork it
|
43
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
44
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
45
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
46
|
+
5. Create a new Pull Request
|
47
|
+
|
48
|
+
Big thanks to [@nielsenramon](https://github.com/nielsenramon) for https://github.com/nielsenramon/kickster
|
data/Rakefile
ADDED
data/bin/jalpha
ADDED
data/circle.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
machine:
|
2
|
+
ruby:
|
3
|
+
version: 2.3.1
|
4
|
+
|
5
|
+
dependencies:
|
6
|
+
pre:
|
7
|
+
- gem build jalpha.gemspec
|
8
|
+
- gem install jalpha
|
9
|
+
|
10
|
+
test:
|
11
|
+
override:
|
12
|
+
- jalpha new test
|
13
|
+
- ls -al
|
14
|
+
- cd test && bin/setup
|
15
|
+
- cd test && bundle exec jekyll build
|
16
|
+
- cd test && bundle exec htmlproofer ./_site --allow-hash-href
|
data/jalpha.gemspec
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
2
|
+
require "jalpha/version"
|
3
|
+
|
4
|
+
Gem::Specification.new do |spec|
|
5
|
+
spec.name = "jalpha"
|
6
|
+
spec.version = Jalpha::VERSION
|
7
|
+
spec.platform = Gem::Platform::RUBY
|
8
|
+
spec.author = "Mick Pollard"
|
9
|
+
spec.summary = "Opinionated Jekyll project generator."
|
10
|
+
spec.description = "Jalpha scaffolds new Jekyll projects complete with everything needed for continual deployment to a cloud foundry platform."
|
11
|
+
spec.email = "mick.pollard@digital.gov.au"
|
12
|
+
spec.license = "MIT"
|
13
|
+
|
14
|
+
spec.files = `git ls-files`.split("\n")
|
15
|
+
spec.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
16
|
+
spec.require_paths = ['lib']
|
17
|
+
|
18
|
+
spec.add_runtime_dependency("thor", "~> 0")
|
19
|
+
spec.add_development_dependency "bundler", "~> 1.8"
|
20
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
21
|
+
end
|
data/lib/jalpha.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Jalpha
|
4
|
+
class Generator < Thor
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
map ["-v", "--version"] => :version
|
8
|
+
|
9
|
+
desc "version", "Show Jalpha version"
|
10
|
+
def version
|
11
|
+
say "Jalpha #{Jalpha::VERSION}"
|
12
|
+
end
|
13
|
+
|
14
|
+
register(Jalpha::Install, "new", "new", "Create new folder with the Jalpha template")
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Jalpha
|
4
|
+
class Install < Thor::Group
|
5
|
+
include Thor::Actions
|
6
|
+
|
7
|
+
argument :name
|
8
|
+
class_options force: :boolean
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
File.expand_path("../../../template", __FILE__)
|
12
|
+
end
|
13
|
+
|
14
|
+
def name_components
|
15
|
+
@_name_components ||= name.scan(/[[:alnum:]]+/)
|
16
|
+
end
|
17
|
+
|
18
|
+
def snake_name
|
19
|
+
@_snake_name = name_components.map(&:downcase).join("_")
|
20
|
+
end
|
21
|
+
|
22
|
+
def camel_name
|
23
|
+
@_camel_name = name_components.map(&:capitalize).join("")
|
24
|
+
end
|
25
|
+
|
26
|
+
def check_if_exists?
|
27
|
+
if File.directory?(snake_name) && !options[:force]
|
28
|
+
say "Folder already exist, use --force to overwrite.", :red
|
29
|
+
exit 1
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def copy_templates
|
34
|
+
directory("./", "./#{snake_name}")
|
35
|
+
end
|
36
|
+
|
37
|
+
def grant_permissions
|
38
|
+
chmod "./#{snake_name}/bin/cideploy.sh", 0755
|
39
|
+
chmod "./#{snake_name}/bin/setup", 0755
|
40
|
+
end
|
41
|
+
|
42
|
+
def report_success
|
43
|
+
say "Jalpha template folder successfully created!", :green
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/template/.bowerrc
ADDED
data/template/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/template/Gemfile
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# <%= camel_name %>
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Setup your environment:
|
6
|
+
|
7
|
+
bin/setup
|
8
|
+
|
9
|
+
## Development
|
10
|
+
|
11
|
+
Run Jekyll:
|
12
|
+
|
13
|
+
bundle exec jekyll serve --watch
|
14
|
+
|
15
|
+
Used tools:
|
16
|
+
- [Autoprefixer](https://github.com/postcss/autoprefixer)
|
17
|
+
- [Bower](http://bower.io/)
|
18
|
+
- [Circle CI](https://circleci.com/)
|
19
|
+
- [Html-proofer](https://github.com/gjtorikian/html-proofer)
|
20
|
+
- [Jekyll](http://jekyllrb.com/)
|
21
|
+
- [Jekyll assets](https://github.com/jekyll/jekyll-assets)
|
22
|
+
- [Jekyll Sitemap](https://github.com/jekyll/jekyll-sitemap)
|
23
|
+
- [HTML5 Boilerplate](https://html5boilerplate.com/) (Influenced by)
|
File without changes
|
Binary file
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require_self
|
@@ -0,0 +1 @@
|
|
1
|
+
//= require jquery/dist/jquery
|
File without changes
|
@@ -0,0 +1,32 @@
|
|
1
|
+
assets:
|
2
|
+
sources:
|
3
|
+
- _assets/fonts
|
4
|
+
- _assets/images
|
5
|
+
- _assets/javascripts
|
6
|
+
- _assets/stylesheets
|
7
|
+
- _vendor/
|
8
|
+
|
9
|
+
baseurl: /
|
10
|
+
|
11
|
+
exclude:
|
12
|
+
- .bowerrc
|
13
|
+
- .travis.yml
|
14
|
+
- bin/*
|
15
|
+
- bower.json
|
16
|
+
- circle.yml
|
17
|
+
- Gemfile
|
18
|
+
- Gemfile.lock
|
19
|
+
- README.md
|
20
|
+
- vendor/
|
21
|
+
|
22
|
+
ga_analytics: UA-XXXXXXXX-X
|
23
|
+
|
24
|
+
gems:
|
25
|
+
- jekyll-assets
|
26
|
+
- jekyll-sitemap
|
27
|
+
|
28
|
+
name: <%= snake_name %>
|
29
|
+
|
30
|
+
permalink: pretty
|
31
|
+
|
32
|
+
url: # add site url
|
File without changes
|
File without changes
|
@@ -0,0 +1,45 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
6
|
+
<title>{{ site.name }} | {{ page.title }}</title>
|
7
|
+
<meta name="description" content="{{ page.description }}">
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
|
10
|
+
<meta property="og:title" content="{{ page.title }}">
|
11
|
+
<meta property="og:url" content="{{ site.url }}">
|
12
|
+
<meta property="og:description" content="{{ page.description }}">
|
13
|
+
<meta property="og:site_name" content="{{ site.name }}">
|
14
|
+
<meta property="og:image" content="{% asset_path og-image.jpg %}">
|
15
|
+
|
16
|
+
<meta name="twitter:card" content="summary">
|
17
|
+
<meta name="twitter:url" content="{{ site.url }}">
|
18
|
+
<meta name="twitter:title" content="{{ page.title }}">
|
19
|
+
<meta name="twitter:description" content="{{ page.description }}">
|
20
|
+
<meta name="twitter:image" content="{% asset_path og-image.jpg %}">
|
21
|
+
|
22
|
+
<link rel="apple-touch-icon" href="{% asset_path apple-touch-icon.png %}">
|
23
|
+
|
24
|
+
{% stylesheet application %}
|
25
|
+
</head>
|
26
|
+
<body>
|
27
|
+
<!--[if lt IE 8]>
|
28
|
+
<p class="browserupgrade">You are using an <strong>outdated</strong>
|
29
|
+
browser. Please <a href="http://browsehappy.com/">upgrade your browser</a>
|
30
|
+
to improve your experience.</p>
|
31
|
+
<![endif]-->
|
32
|
+
|
33
|
+
<main role="main">
|
34
|
+
{{ content }}
|
35
|
+
</main>
|
36
|
+
|
37
|
+
{% javascript vendor %}
|
38
|
+
{% javascript application %}
|
39
|
+
|
40
|
+
<script>
|
41
|
+
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
|
42
|
+
ga('create','{{ site.ga_analytics }}','auto');ga('send','pageview')
|
43
|
+
</script>
|
44
|
+
</body>
|
45
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
!/usr/bin/env bash
|
2
|
+
|
3
|
+
# Exit immediately if there is an error
|
4
|
+
set -e
|
5
|
+
|
6
|
+
# cause a pipeline (for example, curl -s http://sipb.mit.edu/ | grep foo) to produce a failure return code if any command errors not just the last command of the pipeline.
|
7
|
+
set -o pipefail
|
8
|
+
|
9
|
+
# setup basic auth on the container
|
10
|
+
#
|
11
|
+
basicauth() {
|
12
|
+
if [[ -n ${CF_BASIC_AUTH_PASSWORD+x} ]]
|
13
|
+
then
|
14
|
+
htpasswd -cb site/Staticfile.auth $CF_BASIC_AUTH_USERNAME $CF_BASIC_AUTH_PASSWORD
|
15
|
+
else
|
16
|
+
echo "Not setting a password."
|
17
|
+
fi
|
18
|
+
}
|
19
|
+
|
20
|
+
# main script function
|
21
|
+
#
|
22
|
+
main() {
|
23
|
+
readonly GITBRANCH="${CIRCLE_BRANCH}"
|
24
|
+
|
25
|
+
case "${GITBRANCH}" in
|
26
|
+
master)
|
27
|
+
appname="${CIRCLE_PROJECT_REPONAME}"
|
28
|
+
;;
|
29
|
+
*)
|
30
|
+
appname="${CIRCLE_PROJECT_REPONAME}-${GITBRANCH}"
|
31
|
+
;;
|
32
|
+
esac
|
33
|
+
|
34
|
+
basicauth
|
35
|
+
cf api $CF_API
|
36
|
+
cf auth $CF_USER $CF_PASSWORD
|
37
|
+
cf target -o $CF_ORG
|
38
|
+
cf target -s $CF_SPACE
|
39
|
+
cf push $appname
|
40
|
+
}
|
41
|
+
|
42
|
+
main $@
|
data/template/bin/setup
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
#!/usr/bin/env sh
|
2
|
+
|
3
|
+
# Set up Jekyll site. Run this script immediately after cloning the codebase.
|
4
|
+
# https://github.com/thoughtbot/guides/tree/master/protocol
|
5
|
+
|
6
|
+
# Exit if any subcommand fails
|
7
|
+
set -e
|
8
|
+
|
9
|
+
# Set up Ruby dependencies via Bundler.
|
10
|
+
gem install bundler --conservative
|
11
|
+
bundle check || bundle install
|
12
|
+
bundle update
|
13
|
+
|
14
|
+
# Set up JS dependencies via Bower.
|
15
|
+
bower --version > /dev/null || npm install -g bower
|
16
|
+
bower install
|
data/template/circle.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
machine:
|
2
|
+
ruby:
|
3
|
+
version: 2.3.1
|
4
|
+
post:
|
5
|
+
- "curl -v -L -o cf-cli_amd64.deb 'https://cli.run.pivotal.io/stable?release=debian64&version=6.18.1&source=github-rel'"
|
6
|
+
- sudo dpkg -i cf-cli_amd64.deb
|
7
|
+
- cf -v
|
8
|
+
|
9
|
+
dependencies:
|
10
|
+
override:
|
11
|
+
- ./bin/setup
|
12
|
+
|
13
|
+
test:
|
14
|
+
override:
|
15
|
+
- bundle exec jekyll hyde
|
16
|
+
- bundle exec jekyll build
|
17
|
+
- bundle exec htmlproofer ./_site --allow-hash-href
|
18
|
+
|
19
|
+
deployment:
|
20
|
+
alpha:
|
21
|
+
branch: /.*/
|
22
|
+
commands:
|
23
|
+
- ./bin/cideploy.sh
|
Binary file
|
data/template/index.html
ADDED
data/template/robots.txt
ADDED
metadata
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jalpha
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.1'
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mick Pollard
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-06-08 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
description: Jalpha scaffolds new Jekyll projects complete with everything needed
|
56
|
+
for continual deployment to a cloud foundry platform.
|
57
|
+
email: mick.pollard@digital.gov.au
|
58
|
+
executables:
|
59
|
+
- jalpha
|
60
|
+
extensions: []
|
61
|
+
extra_rdoc_files: []
|
62
|
+
files:
|
63
|
+
- ".gitignore"
|
64
|
+
- Gemfile
|
65
|
+
- README.md
|
66
|
+
- Rakefile
|
67
|
+
- bin/jalpha
|
68
|
+
- circle.yml
|
69
|
+
- jalpha.gemspec
|
70
|
+
- lib/jalpha.rb
|
71
|
+
- lib/jalpha/generator.rb
|
72
|
+
- lib/jalpha/install.rb
|
73
|
+
- lib/jalpha/version.rb
|
74
|
+
- template/.bowerrc
|
75
|
+
- template/.gitignore
|
76
|
+
- template/.ruby-version
|
77
|
+
- template/Gemfile
|
78
|
+
- template/README.md.tt
|
79
|
+
- template/_assets/fonts/.keep
|
80
|
+
- template/_assets/images/apple-touch-icon.png
|
81
|
+
- template/_assets/images/og-image.jpg
|
82
|
+
- template/_assets/javascripts/application.js
|
83
|
+
- template/_assets/javascripts/vendor.js
|
84
|
+
- template/_assets/stylesheets/application.scss
|
85
|
+
- template/_config.yml.tt
|
86
|
+
- template/_data/.keep
|
87
|
+
- template/_includes/.keep
|
88
|
+
- template/_layouts/default.html
|
89
|
+
- template/bin/cideploy.sh
|
90
|
+
- template/bin/setup
|
91
|
+
- template/bower.json.tt
|
92
|
+
- template/circle.yml
|
93
|
+
- template/favicon.ico
|
94
|
+
- template/index.html
|
95
|
+
- template/manifest.yml
|
96
|
+
- template/robots.txt
|
97
|
+
homepage:
|
98
|
+
licenses:
|
99
|
+
- MIT
|
100
|
+
metadata: {}
|
101
|
+
post_install_message:
|
102
|
+
rdoc_options: []
|
103
|
+
require_paths:
|
104
|
+
- lib
|
105
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
requirements: []
|
116
|
+
rubyforge_project:
|
117
|
+
rubygems_version: 2.4.5.1
|
118
|
+
signing_key:
|
119
|
+
specification_version: 4
|
120
|
+
summary: Opinionated Jekyll project generator.
|
121
|
+
test_files: []
|