kickster 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +13 -28
- data/circle.yml +16 -0
- data/lib/kickster/install.rb +5 -0
- data/lib/kickster/version.rb +1 -1
- data/snippets/circle/automated +43 -0
- data/snippets/circle/circle.yml +21 -0
- data/snippets/{.travis.yml → travis/.travis.yml} +0 -0
- data/snippets/travis/README.md +47 -0
- data/snippets/travis/automated +45 -0
- data/template/Gemfile +2 -2
- data/template/{apple-touch-icon.png → _assets/images/apple-touch-icon.png} +0 -0
- data/template/_config.yml.tt +1 -0
- data/template/_layouts/default.html +1 -1
- data/template/bin/deploy +12 -14
- data/template/bin/setup +2 -2
- data/template/circle.yml +12 -0
- metadata +10 -8
- data/.travis.yml +0 -10
- data/snippets/automated +0 -41
- data/template/.travis.yml +0 -11
- data/template/_assets/images/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3511ee71c03172e31d91b46d3555c63d8bbfc30d
|
4
|
+
data.tar.gz: 04ef65b82134bd1a1a28969058dced69d3c1250d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a67cea205154d7351dbbae9cbc789271a057474c90bf8676b96b2677452588283eb6bbb8e9b34516ad8dc08317a2f3568ee2c792dd760a299f8fec6ff31b526
|
7
|
+
data.tar.gz: bfaf3024f2ddd82df69423fbcd2e54a5606a90fa8494f40dc05af9ceae3581b2e84c4572ba23e6f245e34e2e21b6464445bfc92c11419356167e6349ccbf8139
|
data/README.md
CHANGED
@@ -19,6 +19,8 @@ Setup your environment:
|
|
19
19
|
|
20
20
|
bin/setup
|
21
21
|
|
22
|
+
Don't forget to enable your repository on [Circle CI](https://circleci.com/docs/getting-started)!
|
23
|
+
|
22
24
|
*If you do not want the Kickster files but just the deploy then copy the `bin/deploy` script to your repo and your ready to go.*
|
23
25
|
|
24
26
|
## Development
|
@@ -30,10 +32,10 @@ Run Jekyll:
|
|
30
32
|
Used tools:
|
31
33
|
- [Autoprefixer](https://github.com/postcss/autoprefixer)
|
32
34
|
- [Bower](http://bower.io/)
|
35
|
+
- [Circle CI](https://circleci.com/)
|
33
36
|
- [Jekyll](http://jekyllrb.com/)
|
34
37
|
- [Jekyll assets](https://github.com/jekyll/jekyll-assets)
|
35
38
|
- [HTML5 Boilerplate](https://html5boilerplate.com/) (Influenced by)
|
36
|
-
- [Travis CI](http://travis-ci.org)
|
37
39
|
|
38
40
|
## Manual deploy to GitHub Pages
|
39
41
|
|
@@ -43,7 +45,7 @@ Run this in the root project folder in your console:
|
|
43
45
|
|
44
46
|
That's it, enjoy your nicely build project on GitHub pages!
|
45
47
|
|
46
|
-
## Automated deployment with
|
48
|
+
## Automated deployment with Circle CI
|
47
49
|
|
48
50
|
Automated deployment is by default not included in your Kickster generated Jekyll project. Please follow the steps below to include automated deployment.
|
49
51
|
|
@@ -51,39 +53,22 @@ Automated deployment is by default not included in your Kickster generated Jekyl
|
|
51
53
|
|
52
54
|
#### 1. Copy the required automated deploy script
|
53
55
|
|
54
|
-
Copy the [automated](https://github.com/nielsenramon/kickster/blob/master/snippets/automated) script inside the `/bin` folder of your project.
|
55
|
-
|
56
|
-
#### 2. Update `.travis.yml`
|
57
|
-
|
58
|
-
Replace your `.travis.yml` file with [this](https://github.com/nielsenramon/kickster/blob/master/snippets/.travis.yml) one.
|
59
|
-
And adjust the following 2 lines with your information:
|
60
|
-
|
61
|
-
- USERNAME: <your-github-username>
|
62
|
-
- EMAIL: <your-github-email>
|
63
|
-
|
64
|
-
#### 3. Create a personal access token
|
65
|
-
|
66
|
-
This is required to push to the GitHub repo from a script.
|
67
|
-
|
68
|
-
In GitHub go to `settings > Personal access tokens` and create a new one.
|
69
|
-
First give it a proper name so it is easy to recognize later. Then check `repo` (check `public_repo` if it is a public repository) and click on create.
|
70
|
-
|
71
|
-
<img src="https://dl.dropboxusercontent.com/u/20823269/kickster-token.png" alt="Screenshot of token generation in GitHub">
|
56
|
+
Copy the [automated](https://github.com/nielsenramon/kickster/blob/master/snippets/circle/automated) script inside the `/bin` folder of your project (check if the file has execute permissions!).
|
72
57
|
|
73
|
-
|
58
|
+
#### 2. Update `circle.yml`
|
74
59
|
|
75
|
-
|
60
|
+
Replace your `circle.yml` file with [this](https://github.com/nielsenramon/kickster/blob/master/snippets/circle/circle.yml) one. And adjust the following 2 lines with your information:
|
76
61
|
|
77
|
-
|
62
|
+
- USER_NAME: <your-github-username>
|
63
|
+
- USER_EMAIL: <your-github-email>
|
78
64
|
|
79
|
-
|
80
|
-
travis encrypt GITHUB_TOKEN=secret-token-from-github --add
|
65
|
+
#### 3. Enable Circle CI.
|
81
66
|
|
82
|
-
|
67
|
+
Make sure you enable your repository in Circle CI. In Circle CI go to `Project settings > Checkout SSH Keys` and create a new User key. This is required to push to the GitHub repo from a script (permissions).
|
83
68
|
|
84
|
-
|
69
|
+
<img src="https://dl.dropboxusercontent.com/u/20823269/kickster-circle.jpg" alt="Screenshot of user key creating in Circle CI">
|
85
70
|
|
86
|
-
That's it, enjoy your automated deployments from now on!
|
71
|
+
That's it, start pushing changes and enjoy your automated deployments from now on!
|
87
72
|
|
88
73
|
## License
|
89
74
|
|
data/circle.yml
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
machine:
|
2
|
+
ruby:
|
3
|
+
version: 2.2.3
|
4
|
+
|
5
|
+
dependencies:
|
6
|
+
pre:
|
7
|
+
- gem build kickster.gemspec
|
8
|
+
- gem install kickster
|
9
|
+
|
10
|
+
test:
|
11
|
+
override:
|
12
|
+
- kickster new test
|
13
|
+
- ls -al
|
14
|
+
- cd test && bin/setup
|
15
|
+
- cd test && bundle exec jekyll build
|
16
|
+
- cd test && bundle exec htmlproof ./_site --only-4xx --href-ignore "#"
|
data/lib/kickster/install.rb
CHANGED
@@ -34,6 +34,11 @@ module Kickster
|
|
34
34
|
directory("./", "./#{snake_name}")
|
35
35
|
end
|
36
36
|
|
37
|
+
def grant_permissions
|
38
|
+
chmod "./#{snake_name}/bin/deploy", 0755
|
39
|
+
chmod "./#{snake_name}/bin/setup", 0755
|
40
|
+
end
|
41
|
+
|
37
42
|
def report_success
|
38
43
|
say "Kickster template folder successfully created!", :green
|
39
44
|
end
|
data/lib/kickster/version.rb
CHANGED
@@ -0,0 +1,43 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Automated deploy script with Circle CI.
|
4
|
+
|
5
|
+
# Exit if any subcommand fails.
|
6
|
+
set -e
|
7
|
+
|
8
|
+
# Variables
|
9
|
+
ORIGIN_URL=`git config --get remote.origin.url`
|
10
|
+
|
11
|
+
echo "Started deploying"
|
12
|
+
|
13
|
+
# Checkout gh-pages branch.
|
14
|
+
if [ `git branch | grep gh-pages` ]
|
15
|
+
then
|
16
|
+
git branch -D gh-pages
|
17
|
+
fi
|
18
|
+
git checkout -b gh-pages
|
19
|
+
|
20
|
+
# Build site.
|
21
|
+
bower install
|
22
|
+
bundle exec jekyll build
|
23
|
+
|
24
|
+
# Delete and move files.
|
25
|
+
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
26
|
+
mv _site/* .
|
27
|
+
rm -R _site/
|
28
|
+
|
29
|
+
# Push to gh-pages.
|
30
|
+
git config user.name "$USER_NAME"
|
31
|
+
git config user.email "$USER_EMAIL"
|
32
|
+
|
33
|
+
git add -fA
|
34
|
+
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
|
35
|
+
git push -f $ORIGIN_URL gh-pages
|
36
|
+
|
37
|
+
# Move back to previous branch.
|
38
|
+
git checkout -
|
39
|
+
bower install
|
40
|
+
|
41
|
+
echo "Deployed Successfully!"
|
42
|
+
|
43
|
+
exit 0
|
@@ -0,0 +1,21 @@
|
|
1
|
+
machine:
|
2
|
+
environment:
|
3
|
+
USER_NAME: <your-github-username>
|
4
|
+
USER_EMAIL: <your-github-email>
|
5
|
+
ruby:
|
6
|
+
version: 2.2.3
|
7
|
+
|
8
|
+
dependencies:
|
9
|
+
pre:
|
10
|
+
- ./bin/setup
|
11
|
+
|
12
|
+
test:
|
13
|
+
post:
|
14
|
+
- bundle exec jekyll build
|
15
|
+
- bundle exec htmlproof ./_site --only-4xx --href-ignore "#"
|
16
|
+
|
17
|
+
deployment:
|
18
|
+
production:
|
19
|
+
branch: master
|
20
|
+
commands:
|
21
|
+
- ./bin/automated
|
File without changes
|
@@ -0,0 +1,47 @@
|
|
1
|
+
Automated deploy with Travis CI
|
2
|
+
===============================
|
3
|
+
|
4
|
+
Kickster can also work with [Travis CI](https://travis-ci.org/), follow the steps below to set it up.
|
5
|
+
|
6
|
+
## Automated deployment with TravisCI
|
7
|
+
|
8
|
+
Automated deployment is by default not included in your Kickster generated Jekyll project. Please follow the steps below to include automated deployment with travis.
|
9
|
+
|
10
|
+
*Note that changes will only deploy when your code is merged into master.*
|
11
|
+
|
12
|
+
#### 1. Copy the required automated deploy script
|
13
|
+
|
14
|
+
Copy the [automated](https://github.com/nielsenramon/kickster/blob/master/snippets/travis/automated) script inside the `/bin` folder of your project (check if the file has execute permissions!).
|
15
|
+
|
16
|
+
#### 2. Add `.travis.yml`
|
17
|
+
|
18
|
+
Copy the `.travis.yml` from the [snippets](https://github.com/nielsenramon/kickster/blob/master/snippets/travis/.travis.yml) folder inside the `/bin` folder of your project(check if the file has execute permissions!).
|
19
|
+
|
20
|
+
And adjust the following 2 lines with your information:
|
21
|
+
|
22
|
+
- USERNAME: <your-github-username>
|
23
|
+
- EMAIL: <your-github-email>
|
24
|
+
|
25
|
+
#### 3. Create a personal access token
|
26
|
+
|
27
|
+
This is required to push to the GitHub repo from a script.
|
28
|
+
|
29
|
+
In GitHub go to `settings > Personal access tokens` and create a new one.
|
30
|
+
First give it a proper name so it is easy to recognize later. Then check `repo` (check `public_repo` if it is a public repository) and click on create.
|
31
|
+
|
32
|
+
<img src="https://dl.dropboxusercontent.com/u/20823269/kickster-token.png" alt="Screenshot of token generation in GitHub">
|
33
|
+
|
34
|
+
Copy the generated token.
|
35
|
+
|
36
|
+
*Don't forget to enable your repository in [Travis CI](https://travis-ci.org/)*
|
37
|
+
|
38
|
+
Go back to your project in terminal and input the following:
|
39
|
+
|
40
|
+
gem install travis
|
41
|
+
travis encrypt GITHUB_TOKEN=secret-token-from-github --add
|
42
|
+
|
43
|
+
This added a line inside your `.travis.yml' file like this:
|
44
|
+
|
45
|
+
secure: <encrypted token>
|
46
|
+
|
47
|
+
That's it, enjoy your automated deployments from now on!
|
@@ -0,0 +1,45 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
# Automated deploy script with Travis CI.
|
4
|
+
|
5
|
+
# Exit if any subcommand fails.
|
6
|
+
set -e
|
7
|
+
|
8
|
+
# Variables
|
9
|
+
ORIGIN_URL=`git config --get remote.origin.url`
|
10
|
+
ORIGIN_CREDENTIALS=${ORIGIN_URL/\/\/github.com/\/\/$GITHUB_TOKEN@github.com}
|
11
|
+
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
12
|
+
|
13
|
+
echo "Started deploying"
|
14
|
+
|
15
|
+
# Checkout gh-pages branch.
|
16
|
+
if [ `git branch | grep gh-pages` ]
|
17
|
+
then
|
18
|
+
git branch -D gh-pages
|
19
|
+
fi
|
20
|
+
git checkout -b gh-pages
|
21
|
+
|
22
|
+
# Build site.
|
23
|
+
bower install
|
24
|
+
bundle exec jekyll build
|
25
|
+
|
26
|
+
# Delete and move files.
|
27
|
+
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
28
|
+
mv _site/* .
|
29
|
+
rm -R _site/
|
30
|
+
|
31
|
+
# Push to gh-pages.
|
32
|
+
git config user.name "$USERNAME"
|
33
|
+
git config user.email "$EMAIL"
|
34
|
+
|
35
|
+
git add -fA
|
36
|
+
git commit --allow-empty -m "$COMMIT_MESSAGE [ci skip]"
|
37
|
+
git push -f -q $ORIGIN_CREDENTIALS gh-pages
|
38
|
+
|
39
|
+
# Move back to previous branch.
|
40
|
+
git checkout -
|
41
|
+
bower install
|
42
|
+
|
43
|
+
echo "Deployed Successfully!"
|
44
|
+
|
45
|
+
exit 0
|
data/template/Gemfile
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
gem "autoprefixer-rails", "~> 6.1.
|
3
|
+
gem "autoprefixer-rails", "~> 6.1.1"
|
4
4
|
gem "html-proofer", "~> 2.5.2"
|
5
5
|
gem "jekyll", "~> 3.0.1"
|
6
|
-
gem "jekyll-assets", "~> 2.0.
|
6
|
+
gem "jekyll-assets", "~> 2.0.3"
|
7
7
|
gem "jekyll-sitemap", "~> 0.9.0"
|
8
8
|
gem "sass", "~> 3.4.19"
|
9
9
|
gem "uglifier", "~> 2.7.2"
|
File without changes
|
data/template/_config.yml.tt
CHANGED
@@ -19,7 +19,7 @@
|
|
19
19
|
<meta name="twitter:description" content="{{ page.description }}">
|
20
20
|
<meta name="twitter:image" content="">
|
21
21
|
|
22
|
-
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
22
|
+
<link rel="apple-touch-icon" href="{% asset_path apple-touch-icon.png %}">
|
23
23
|
|
24
24
|
{% stylesheet application %}
|
25
25
|
</head>
|
data/template/bin/deploy
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
# Run this script to deploy the app to Github Pages.
|
4
4
|
|
5
|
-
# Exit if any subcommand fails
|
5
|
+
# Exit if any subcommand fails.
|
6
6
|
set -e
|
7
7
|
|
8
8
|
echo "Started deploying"
|
@@ -12,28 +12,26 @@ if [ `git branch | grep gh-pages` ]
|
|
12
12
|
then
|
13
13
|
git branch -D gh-pages
|
14
14
|
fi
|
15
|
-
|
16
15
|
git checkout -b gh-pages
|
17
16
|
|
18
|
-
#
|
17
|
+
# Build site.
|
19
18
|
bower install
|
20
|
-
bundle exec jekyll build
|
21
|
-
|
22
|
-
# Port everyting needed inside temp folder.
|
23
|
-
mkdir tmp
|
24
|
-
find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
19
|
+
bundle exec jekyll build
|
25
20
|
|
26
|
-
#
|
27
|
-
|
28
|
-
|
21
|
+
# Delete and move files.
|
22
|
+
find . -maxdepth 1 ! -name '_site' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
23
|
+
mv _site/* .
|
24
|
+
rm -R _site/
|
29
25
|
|
30
|
-
# Push to gh-pages
|
26
|
+
# Push to gh-pages.
|
31
27
|
git add -fA
|
32
|
-
git commit --allow-empty -m "$(git log -1 --pretty=%B)"
|
28
|
+
git commit --allow-empty -m "$(git log -1 --pretty=%B) [ci skip]"
|
33
29
|
git push -f -q origin gh-pages
|
34
30
|
|
35
|
-
# Move back to previous branch
|
31
|
+
# Move back to previous branch.
|
36
32
|
git checkout -
|
37
33
|
bower install
|
38
34
|
|
39
35
|
echo "Deployed Successfully!"
|
36
|
+
|
37
|
+
exit 0
|
data/template/bin/setup
CHANGED
@@ -6,10 +6,10 @@
|
|
6
6
|
# Exit if any subcommand fails
|
7
7
|
set -e
|
8
8
|
|
9
|
-
# Set up Ruby dependencies via Bundler
|
9
|
+
# Set up Ruby dependencies via Bundler.
|
10
10
|
gem install bundler --conservative
|
11
11
|
bundle check || bundle install
|
12
12
|
|
13
|
-
# Set up JS dependencies via Bower
|
13
|
+
# Set up JS dependencies via Bower.
|
14
14
|
bower --version > /dev/null || npm install -g bower
|
15
15
|
bower install
|
data/template/circle.yml
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kickster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nielsen Ramon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -63,26 +63,28 @@ extra_rdoc_files: []
|
|
63
63
|
files:
|
64
64
|
- ".gitignore"
|
65
65
|
- ".hound.yml"
|
66
|
-
- ".travis.yml"
|
67
66
|
- Gemfile
|
68
67
|
- README.md
|
69
68
|
- Rakefile
|
70
69
|
- bin/kickster
|
70
|
+
- circle.yml
|
71
71
|
- kickster.gemspec
|
72
72
|
- lib/kickster.rb
|
73
73
|
- lib/kickster/generator.rb
|
74
74
|
- lib/kickster/install.rb
|
75
75
|
- lib/kickster/version.rb
|
76
|
-
- snippets
|
77
|
-
- snippets/
|
76
|
+
- snippets/circle/automated
|
77
|
+
- snippets/circle/circle.yml
|
78
|
+
- snippets/travis/.travis.yml
|
79
|
+
- snippets/travis/README.md
|
80
|
+
- snippets/travis/automated
|
78
81
|
- template/.bowerrc
|
79
82
|
- template/.gitignore
|
80
83
|
- template/.ruby-version
|
81
|
-
- template/.travis.yml
|
82
84
|
- template/Gemfile
|
83
85
|
- template/README.md.tt
|
84
86
|
- template/_assets/fonts/.keep
|
85
|
-
- template/_assets/images
|
87
|
+
- template/_assets/images/apple-touch-icon.png
|
86
88
|
- template/_assets/javascripts/application.js
|
87
89
|
- template/_assets/javascripts/vendor.js
|
88
90
|
- template/_assets/stylesheets/application.scss
|
@@ -90,10 +92,10 @@ files:
|
|
90
92
|
- template/_data/.keep
|
91
93
|
- template/_includes/.keep
|
92
94
|
- template/_layouts/default.html
|
93
|
-
- template/apple-touch-icon.png
|
94
95
|
- template/bin/deploy
|
95
96
|
- template/bin/setup
|
96
97
|
- template/bower.json.tt
|
98
|
+
- template/circle.yml
|
97
99
|
- template/favicon.ico
|
98
100
|
- template/index.html
|
99
101
|
- template/robots.txt
|
data/.travis.yml
DELETED
data/snippets/automated
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
ORIGIN_URL=`git config --get remote.origin.url`
|
4
|
-
ORIGIN_CREDENTIALS=${ORIGIN_URL/\/\/github.com/\/\/$GITHUB_TOKEN@github.com}
|
5
|
-
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
6
|
-
|
7
|
-
echo "Started deploying to the gh-pages branch."
|
8
|
-
|
9
|
-
echo "Creating clean gh-pages branch."
|
10
|
-
if [ `git branch | grep gh-pages` ]
|
11
|
-
then
|
12
|
-
git branch -D gh-pages
|
13
|
-
fi
|
14
|
-
git checkout -b gh-pages
|
15
|
-
|
16
|
-
echo "Building site."
|
17
|
-
bower install
|
18
|
-
bundle exec jekyll build --destination temp || exit 1
|
19
|
-
|
20
|
-
echo "Removing old files"
|
21
|
-
find . -maxdepth 1 ! -name 'temp' ! -name '.git' ! -name '.gitignore' -exec rm -rf {} \;
|
22
|
-
|
23
|
-
mv temp/* . || exit 1
|
24
|
-
rm -R temp/ || exit 1
|
25
|
-
|
26
|
-
echo "Pushing content"
|
27
|
-
git config user.name "$USERNAME"
|
28
|
-
git config user.email "$EMAIL"
|
29
|
-
|
30
|
-
git add -fA || exit 1
|
31
|
-
git commit --allow-empty -m "$COMMIT_MESSAGE" || exit 1
|
32
|
-
|
33
|
-
git push -f -q "$ORIGIN_CREDENTIALS" gh-pages > /dev/null 2>&1
|
34
|
-
|
35
|
-
echo "Deployed Successfully"
|
36
|
-
|
37
|
-
echo "Checking out previous branch"
|
38
|
-
git checkout -
|
39
|
-
bower install
|
40
|
-
|
41
|
-
exit 0
|
data/template/.travis.yml
DELETED
File without changes
|