kickster 1.0.4 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f11d555cb64cf770b2a256d1f3d955ae3782c92
4
- data.tar.gz: c852f26aafee071d001bb310ba4949b37120f861
3
+ metadata.gz: 3511ee71c03172e31d91b46d3555c63d8bbfc30d
4
+ data.tar.gz: 04ef65b82134bd1a1a28969058dced69d3c1250d
5
5
  SHA512:
6
- metadata.gz: fd28899f1b05453e31d8277b81e9a1246586658d9576fcb019bdbc50b420de909b5bd11eda42078e1756d366c585a4714ade5633aa7af57906366e6ad8359408
7
- data.tar.gz: c3bf7b9f42947e0d603e334099aea9b3d9503138a35eed7373c1b8f2828eaa50d334a3324c17409ba0530c9181d235c2027ca20abbcebf1bd5d24d7974624043
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 TravisCI
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
- Copy the generated token.
58
+ #### 2. Update `circle.yml`
74
59
 
75
- *Don't forget to enable your repository in [Travis CI](https://travis-ci.org/)*
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
- Go back to your project in terminal and input the following:
62
+ - USER_NAME: <your-github-username>
63
+ - USER_EMAIL: <your-github-email>
78
64
 
79
- gem install travis
80
- travis encrypt GITHUB_TOKEN=secret-token-from-github --add
65
+ #### 3. Enable Circle CI.
81
66
 
82
- This added a line inside your `.travis.yml' file like this:
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
- secure: <encrypted token>
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
 
@@ -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 "#"
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Kickster
2
- VERSION = "1.0.4"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -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
@@ -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
@@ -1,9 +1,9 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- gem "autoprefixer-rails", "~> 6.1.0.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.2"
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"
@@ -13,6 +13,7 @@ exclude:
13
13
  - .travis.yml
14
14
  - bin/*
15
15
  - bower.json
16
+ - circle.yml
16
17
  - Gemfile
17
18
  - Gemfile.lock
18
19
  - README.md
@@ -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>
@@ -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
- # Generate site.
17
+ # Build site.
19
18
  bower install
20
- bundle exec jekyll build --destination temp
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
- # Move site to root and cleanup files.
27
- mv temp/* .
28
- rm -R temp/
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
@@ -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
@@ -0,0 +1,12 @@
1
+ machine:
2
+ ruby:
3
+ version: 2.2.3
4
+
5
+ dependencies:
6
+ pre:
7
+ - ./bin/setup
8
+
9
+ test:
10
+ post:
11
+ - bundle exec jekyll build
12
+ - bundle exec htmlproof ./_site --only-4xx --href-ignore "#"
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
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-22 00:00:00.000000000 Z
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/.travis.yml
77
- - snippets/automated
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/.keep
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
@@ -1,10 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.3
4
- branches:
5
- except:
6
- - gh-pages
7
- - website
8
- notifications:
9
- email: false
10
- script: 'bundle install'
@@ -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
@@ -1,11 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.3
4
- install:
5
- - ./bin/setup
6
- script:
7
- - bundle exec jekyll build --trace
8
- - bundle exec htmlproof ./_site --only-4xx
9
- env:
10
- global:
11
- - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
File without changes