jekyll-theme-guides-mbland 0.2.3 → 1.0.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: 3290c0cba4042440a3d6e63cd9f2d7dd8a442bc5
4
- data.tar.gz: '00783b02c6a9784a1dd3977ba9ecd22e2a042edc'
3
+ metadata.gz: 31bb6a84daf944f81ad480c59ea0fec455c9a73c
4
+ data.tar.gz: a462851af85fb3e85190e2e8bec80e5dd779f3c5
5
5
  SHA512:
6
- metadata.gz: 5622fb4635fe633cef41ade355d7b75622cc522e7c46a1667217fe895c9e8b22542b8cf51bf6451677791e8bfa50b4ffc5896e39d57a264798411dd8a3d656c6
7
- data.tar.gz: ed6a0d1fc1117adfc44d5493fb27b6052c6058fd866c7e64a6a99f7999ed129e38561c4dbec981b1f9c73b00fb6414cdc30999813508d4ca4b285a5930132acf
6
+ metadata.gz: fb76abc124e81151407376fa903791459fa72804774b011c27a4d805ebf3cd4b495e770e95707a676a96a81f5f910a79dc8ea8243535641537cf001b12e51b73
7
+ data.tar.gz: bf57b6dfffb7988ea287f809945780d66e0d77b9f5ed1dc96bab3eb297e4d066fe705543bfd2d41510918b591096b53f7a2515bedac907580781e72a2aaca78c
data/README.md CHANGED
@@ -123,7 +123,7 @@ updates and clone its repository; then clone this repository into the same
123
123
  parent directory. For example, to use the Guides Template:
124
124
 
125
125
  ```shell
126
- $ git clone git@github.com:mbland/guides-template-mbland.git
126
+ $ git clone git@github.com:mbland/guides-template.git
127
127
  $ git clone git@github.com:mbland/jekyll-theme-guides-mbland.git
128
128
  ```
129
129
 
@@ -1,9 +1,7 @@
1
1
  require 'jekyll-theme-guides-mbland/breadcrumbs'
2
2
  require 'jekyll-theme-guides-mbland/generator'
3
3
  require 'jekyll-theme-guides-mbland/navigation'
4
- require 'jekyll-theme-guides-mbland/repository'
5
4
  require 'jekyll-theme-guides-mbland/tags'
6
- require 'jekyll-theme-guides-mbland/update'
7
5
  require 'jekyll-theme-guides-mbland/version'
8
6
 
9
7
  require 'jekyll_pages_api'
@@ -1,3 +1,3 @@
1
1
  module JekyllThemeGuidesMbland
2
- VERSION = '0.2.3'.freeze
2
+ VERSION = '1.0.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-guides-mbland
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Bland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-08 00:00:00.000000000 Z
11
+ date: 2017-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -201,9 +201,7 @@ files:
201
201
  - lib/jekyll-theme-guides-mbland/generator.rb
202
202
  - lib/jekyll-theme-guides-mbland/namespace_flattener.rb
203
203
  - lib/jekyll-theme-guides-mbland/navigation.rb
204
- - lib/jekyll-theme-guides-mbland/repository.rb
205
204
  - lib/jekyll-theme-guides-mbland/tags.rb
206
- - lib/jekyll-theme-guides-mbland/update.rb
207
205
  - lib/jekyll-theme-guides-mbland/version.rb
208
206
  homepage: https://github.com/mbland/jekyll-theme-guides-mbland
209
207
  licenses:
@@ -1,73 +0,0 @@
1
- require 'English'
2
- require 'fileutils'
3
-
4
- module JekyllThemeGuidesMbland
5
- TEMPLATE_FILES = %w[
6
- _pages/add-a-new-page/make-a-child-page.md
7
- _pages/add-a-new-page.md
8
- _pages/add-images.md
9
- _pages/advanced-features.md
10
- _pages/github-setup.md
11
- _pages/images.png
12
- _pages/post-your-guide.md
13
- _pages/update-the-config-file/understanding-baseurl.md
14
- _pages/update-the-config-file.md
15
- images/description.png
16
- images/gh-add-guide.png
17
- images/gh-branches-link.png
18
- images/gh-default-branch.png
19
- images/gh-settings-button.png
20
- images/gh-webhook.png
21
- ].freeze
22
-
23
- def self.clear_template_files_and_create_new_repository(basedir,
24
- outstream = $stdout)
25
- remove_template_files basedir, outstream
26
- delete_create_repo_command_from_go_script basedir, outstream
27
- create_new_git_repository basedir, outstream
28
- end
29
-
30
- def self.remove_template_files(basedir, outstream)
31
- Dir.chdir basedir do
32
- outstream.puts 'Clearing Guides Template files.'
33
- files = TEMPLATE_FILES.map { |f| File.join basedir, f }
34
- .select { |f| File.exist? f }
35
- File.delete(*files)
36
- end
37
- end
38
-
39
- def self.delete_create_repo_command_from_go_script(basedir, outstream)
40
- Dir.chdir basedir do
41
- outstream.puts 'Removing `:create_repo` command from the `./go` script.'
42
- go_script = File.join basedir, 'go'
43
- content = File.read go_script
44
- match = /\ndef_command\(\n :create_repo,.*?end\n/m.match content
45
- content = "#{match.pre_match}#{match.post_match}" unless match.nil?
46
- File.write go_script, content
47
- end
48
- end
49
-
50
- GIT_COMMANDS = {
51
- 'Creating a new git repository.' => 'git init',
52
- 'Creating mbland-pages branch.' => 'git checkout -b mbland-pages',
53
- 'Adding files for initial commit.' => 'git add .',
54
- }.freeze
55
-
56
- def self.create_new_git_repository(basedir, outstream)
57
- Dir.chdir basedir do
58
- outstream.puts 'Removing old git repository.'
59
- FileUtils.rm_rf '.git'
60
- GIT_COMMANDS.each do |description, command|
61
- outstream.puts description
62
- exec_cmd_capture_output command, outstream
63
- end
64
- outstream.puts "All done! Run \'git commit\' to create your first commit."
65
- end
66
- end
67
- private_class_method :create_new_git_repository
68
-
69
- def self.exec_cmd_capture_output(command, outstream)
70
- opts = { out: outstream, err: outstream }
71
- exit $CHILD_STATUS.exitstatus unless system command, opts
72
- end
73
- end
@@ -1,6 +0,0 @@
1
- module JekyllThemeGuidesMbland
2
- def self.update_theme
3
- exec({ 'RUBYOPT' => nil }, 'bundle',
4
- *%w[update --source jekyll-theme-guides-mbland].freeze)
5
- end
6
- end