middleman-gh_pages 0.6.0 → 0.7.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: 827fb67060f2b25e7e35f1378ae336b3688f68fb
4
- data.tar.gz: 1be736f463da60a86ae0a167cb9ee49fadcfb1e3
3
+ metadata.gz: 0bdc1073568a27d2320574aea50573b2862581eb
4
+ data.tar.gz: a9071014a8edd59019a9a51b6108193241fecf86
5
5
  SHA512:
6
- metadata.gz: a24d05079d8b893874afc5dc5315c021aff8a8f8367893724da9e006317c8ec2c8c981993b1d49396e9f2a00cc2ded1e92a3e906e98f7e20291b6ea7451c529d
7
- data.tar.gz: 7ceb3e3a960adafbd9e9cb60d01c1c2118582c44a0a475d7d88510ce3769cceb31692f0209d20944ad3b2516d9942f4bd5adf5cffd9abdfd45c43be8eb2e6c2e
6
+ metadata.gz: '008885b4e56ae60ec0bab2dbb5abdf9f4cd8b7cf8f2cd6b041f3481f6ee91f533e4d9000372e0d2b420e2c7356c53c0c1f1ee74db806096d7fa47a7ef670495d'
7
+ data.tar.gz: 0314b24cfe7ea432b8a45a9726a3ae0d9ca9e00177a3933563533b36032ac2b2142944753e805be3cb60caabf019a0fad160e1a19d910c03270e2391ac3b5e31
data/Gemfile CHANGED
@@ -2,3 +2,9 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in middleman-gh_pages.gemspec
4
4
  gemspec
5
+
6
+ gem 'middleman-core'
7
+ gem 'middleman-cli'
8
+
9
+ gem 'minitest'
10
+ gem 'byebug'
data/Rakefile CHANGED
@@ -1,2 +1,10 @@
1
- require "bundler/gem_tasks"
2
- task :default => :spec
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs << 'test'
6
+ t.test_files = FileList['test/**/*_test.rb']
7
+ t.verbose = true
8
+ end
9
+
10
+ task default: :test
@@ -5,7 +5,11 @@ module Middleman
5
5
  attr_reader :status
6
6
 
7
7
  def initialize
8
- @status = $?.exitstatus if $?
8
+ @status = ($?.exitstatus if $?)
9
+ end
10
+
11
+ def to_s
12
+ @status ? @status.to_s : super
9
13
  end
10
14
  end
11
15
 
@@ -15,7 +19,7 @@ module Middleman
15
19
  if args.empty?
16
20
  command
17
21
  else
18
- command.public_send(*args, &block)
22
+ command.__send__(*args, &block)
19
23
  end
20
24
  end
21
25
  end
@@ -26,7 +30,7 @@ module Middleman
26
30
 
27
31
  def method_missing(name, *args, &block)
28
32
  unless ::Kernel.system(@cmd, name.to_s, *args.map(&:to_s))
29
- ::Kernel.raise Error
33
+ ::Kernel.raise ::Middleman::GhPages::Command::Error
30
34
  end
31
35
  end
32
36
  end
@@ -1,6 +1,10 @@
1
+ require 'fileutils'
2
+
1
3
  module Middleman
2
4
  module GhPages
3
5
  class Deploy
6
+ include FileUtils
7
+
4
8
  def initialize(options = {})
5
9
  @build_dir = options.fetch(:build_dir)
6
10
  @remote = options.fetch(:remote)
@@ -11,7 +15,8 @@ module Middleman
11
15
  bundle.exec 'middleman', 'build', '-e', @environment
12
16
 
13
17
  Dir.chdir(@build_dir) do
14
- rm '-rf', '.git'
18
+ rm_rf '.git'
19
+
15
20
  git.init
16
21
  git.remote 'add', 'origin', @remote
17
22
  git.add '.'
@@ -30,10 +35,6 @@ module Middleman
30
35
  def git
31
36
  @git ||= Command.git
32
37
  end
33
-
34
- def rm(*args)
35
- Command.rm(*args)
36
- end
37
38
  end
38
39
  end
39
40
  end
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module GhPages
3
- VERSION = '0.6.0'
3
+ VERSION = '0.7.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-gh_pages
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genadi Samokovarov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-02-26 00:00:00.000000000 Z
11
+ date: 2017-06-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  version: '0'
81
81
  requirements: []
82
82
  rubyforge_project:
83
- rubygems_version: 2.6.8
83
+ rubygems_version: 2.6.11
84
84
  signing_key:
85
85
  specification_version: 4
86
86
  summary: Middleman deploy to GitHub that just works.