github-pages 28 → 29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/github-pages +51 -13
  3. data/lib/github-pages.rb +1 -1
  4. metadata +44 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e0e5335fd52159df733f234d6785627933e30af1
4
- data.tar.gz: ef8d95f4aac1830f45d397cdb0d8e6ae7ae6c9aa
3
+ metadata.gz: 3681cdbedd8d2ea5d79ba4f4a43282ef7d9f538f
4
+ data.tar.gz: e64ba15c2462c9d8a3e3797d2e600591a5cfb537
5
5
  SHA512:
6
- metadata.gz: 8ca0eb1f80c6736952df967f753b59ccbd61389623bbfa02444788a65a7559cca8d994948290bddc11f39b9642447c216c7944491c2f180d3f8f86c4552fb189
7
- data.tar.gz: f533e5b28ee6fe06d9dc563b0415e93b0a3e23e6b0cfcc8d4b91fa3fbe52cddef79fc66375d070970219777f6ccf237e1558a42e89a1116f7ed8991d6f30d2d2
6
+ metadata.gz: 82accbe6046ecb659d82fefac38ab8a2d351577dbaf294ee21905bafc8ca12197ed5bb8b8fa794a1a7fb6d565f9f0718678eba542848328a3289d90a85e45ba4
7
+ data.tar.gz: b2a8d4cde93a7bee00f06ae9a33fd9cdc42022bec439ec8dc54ffda36276883d713d128b986066109c599014514d9f281bd9c428143b9e65f04c1ea2216f4ac5
@@ -1,17 +1,55 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- command = ARGV[0].to_s.downcase
3
+ require 'mercenary'
4
+ require_relative "../lib/github-pages"
4
5
 
5
- case command
6
- when "versions"
7
- require File.expand_path("../../lib/github-pages", __FILE__)
8
- GitHubPages.gems.each { |g,v| puts "gem '#{g}', '#{v}'" }
9
- when "br"
10
- puts [
11
- "gem 'github-pages'",
12
- ":branch => '#{ARGV[1]}'",
13
- ":git => 'git://github.com/github/pages-gem'"
14
- ].join(", ")
15
- else
16
- abort "error: '#{command}' is an unrecognized command. options are: 'versions', 'br'."
6
+ Mercenary.program(:"github-pages") do |p|
7
+ p.version GitHubPages::VERSION
8
+ p.description
9
+ p.syntax "github-pages <subcommand> options"
10
+
11
+ p.command(:versions) do |c|
12
+ c.syntax "versions"
13
+ c.description "lists the current gem dependency versions"
14
+ c.option "gemfile", "--gemfile", "use Gemfile formatting"
15
+ c.action do |args, options|
16
+ if options["gemfile"]
17
+ GitHubPages.gems.each { |g,v| puts "gem '#{g}', '#{v}'" }
18
+ else
19
+ require 'terminal-table'
20
+ puts Terminal::Table.new :rows => GitHubPages.gems, :headings => ["Gem", "Version"]
21
+ end
22
+ end
23
+ end
24
+
25
+ p.command(:branch) do |c|
26
+ c.syntax "branch BRANCH"
27
+ c.description "Generates the gem dependency at given branch"
28
+ c.alias(:br)
29
+ c.action do |args, options|
30
+ puts [
31
+ "gem 'github-pages'",
32
+ ":branch => '#{args[0] || "master"}'",
33
+ ":git => 'git://github.com/github/pages-gem'"
34
+ ].join(", ")
35
+ end
36
+ end
37
+
38
+ p.command(:"health-check") do |c|
39
+ c.syntax "health-check"
40
+ c.description "Checks your GitHub Pages site for common DNS configuration issues"
41
+ c.action do |args, options|
42
+ require 'github-pages-health-check'
43
+ cname_path = File.expand_path "CNAME", Dir.pwd
44
+ raise "No CNAME file found in current directory" unless File.exists?(cname_path)
45
+ cname = File.open(cname_path).read.strip
46
+ check = GitHubPages::HealthCheck.new(cname)
47
+ puts "Checking domain #{cname}..."
48
+ if check.valid?
49
+ puts "Everything looks a-okay! :)"
50
+ else
51
+ puts "Uh oh. Looks like something's fishy: #{check.reason}"
52
+ end
53
+ end
54
+ end
17
55
  end
@@ -1,5 +1,5 @@
1
1
  class GitHubPages
2
- VERSION = 28
2
+ VERSION = 29
3
3
 
4
4
  # Jekyll and related dependency versions as used by GitHub Pages.
5
5
  # For more information see:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: github-pages
3
3
  version: !ruby/object:Gem::Version
4
- version: '28'
4
+ version: '29'
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-25 00:00:00.000000000 Z
11
+ date: 2014-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -206,6 +206,48 @@ dependencies:
206
206
  - - '='
207
207
  - !ruby/object:Gem::Version
208
208
  version: 0.6.0
209
+ - !ruby/object:Gem::Dependency
210
+ name: github-pages-health-check
211
+ requirement: !ruby/object:Gem::Requirement
212
+ requirements:
213
+ - - "~>"
214
+ - !ruby/object:Gem::Version
215
+ version: '0.1'
216
+ type: :runtime
217
+ prerelease: false
218
+ version_requirements: !ruby/object:Gem::Requirement
219
+ requirements:
220
+ - - "~>"
221
+ - !ruby/object:Gem::Version
222
+ version: '0.1'
223
+ - !ruby/object:Gem::Dependency
224
+ name: mercenary
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - "~>"
228
+ - !ruby/object:Gem::Version
229
+ version: '0.3'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - "~>"
235
+ - !ruby/object:Gem::Version
236
+ version: '0.3'
237
+ - !ruby/object:Gem::Dependency
238
+ name: terminal-table
239
+ requirement: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - "~>"
242
+ - !ruby/object:Gem::Version
243
+ version: '1.4'
244
+ type: :runtime
245
+ prerelease: false
246
+ version_requirements: !ruby/object:Gem::Requirement
247
+ requirements:
248
+ - - "~>"
249
+ - !ruby/object:Gem::Version
250
+ version: '1.4'
209
251
  - !ruby/object:Gem::Dependency
210
252
  name: rspec
211
253
  requirement: !ruby/object:Gem::Requirement