jekyll_push 0.1.1 → 0.1.2
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/jekyll_push.gemspec +1 -1
- data/lib/jekyll_push.rb +2 -2
- data/lib/jekyll_push/branch.rb +2 -2
- data/lib/jekyll_push/command.rb +4 -2
- data/lib/jekyll_push/local.rb +1 -1
- data/lib/jekyll_push/travis.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29bfccecd23f571b59ee7933cacc207c1ff06f46a3cf052d4e2684a6d9b69714
|
4
|
+
data.tar.gz: 8c47f936c1988284b45f4a278b3ed36224e0b3ac9d427963504f26a3dd47ecb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06e3db28cd27763adfeb95d448acd986fc3b17aa71929c2313142822d3548d59dca72b24ad4e87e1a243e855e397acd821a523ce9f2e9cd2f6fb8daa87caed5
|
7
|
+
data.tar.gz: 45d33f897f000a6d8ac10cffea4d74455e0c7c23edcea9e8930eb6d7069dc78cba71653437d6e6f109f338f0e98c88e341cfc8ad845f1b13c446eb07ef681689
|
data/jekyll_push.gemspec
CHANGED
data/lib/jekyll_push.rb
CHANGED
@@ -18,9 +18,9 @@ require_relative 'jekyll_push/utils'
|
|
18
18
|
module JekyllPush
|
19
19
|
#
|
20
20
|
# @return [Nil]
|
21
|
-
def self.run_command(arg)
|
21
|
+
def self.run_command(arg, opts)
|
22
22
|
site = JekyllPush::Site.new
|
23
|
-
branch = JekyllPush::Branch.new arg
|
23
|
+
branch = JekyllPush::Branch.new arg, opts
|
24
24
|
|
25
25
|
site.rebuild branch.target
|
26
26
|
branch.push site.dir
|
data/lib/jekyll_push/branch.rb
CHANGED
@@ -7,7 +7,7 @@ module JekyllPush
|
|
7
7
|
attr_reader :target
|
8
8
|
|
9
9
|
# @param target [String] the name of the Git branch to deploy to
|
10
|
-
def initialize(target)
|
10
|
+
def initialize(target, opts)
|
11
11
|
@target = JekyllPush::Utils.slugify target
|
12
12
|
@time = Time.now.strftime('%H:%M on %Y-%m-%d')
|
13
13
|
|
@@ -15,7 +15,7 @@ module JekyllPush
|
|
15
15
|
(class << self; include JekyllPush::Local; end) if local?
|
16
16
|
|
17
17
|
@commit = commit
|
18
|
-
@origin = origin
|
18
|
+
@origin = origin opts
|
19
19
|
@msg = msg
|
20
20
|
|
21
21
|
raise JekyllPush::Error::NoOrigin, 'No remote origin was found for the project GitHub repository.' if @origin.empty?
|
data/lib/jekyll_push/command.rb
CHANGED
@@ -9,10 +9,12 @@ module JekyllPush
|
|
9
9
|
prog.command(:push) do |c|
|
10
10
|
c.syntax 'push [args]'
|
11
11
|
c.description 'pushes compiled site to specified github branch'
|
12
|
-
c.
|
12
|
+
c.option :user, '--user USER', 'Override GitHub user name use'
|
13
|
+
c.option :pw, '--pw PASSWORD', 'Override GitHub user password to use'
|
14
|
+
c.action do |args, opts|
|
13
15
|
raise Error::MissingBranch, "You must specify a target branch name after 'jekyll push'." if args.empty?
|
14
16
|
|
15
|
-
args.each { |a| JekyllPush.run_command a }
|
17
|
+
args.each { |a| JekyllPush.run_command a, opts }
|
16
18
|
end
|
17
19
|
end
|
18
20
|
end
|
data/lib/jekyll_push/local.rb
CHANGED
data/lib/jekyll_push/travis.rb
CHANGED
@@ -12,10 +12,10 @@ module JekyllPush
|
|
12
12
|
|
13
13
|
#
|
14
14
|
# @return [String]
|
15
|
-
def origin
|
15
|
+
def origin(opts)
|
16
16
|
@repo_slug = ENV['TRAVIS_REPO_SLUG']
|
17
|
-
@user = @repo_slug.split('/').first
|
18
|
-
@token = ENV['ACCESS_TOKEN']
|
17
|
+
@user = opts.fetch :user, @repo_slug.split('/').first
|
18
|
+
@token = opts.fetch :pw, ENV['ACCESS_TOKEN']
|
19
19
|
|
20
20
|
"https://#{@user}:#{@token}@github.com/#{@repo_slug}.git"
|
21
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll_push
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- marii
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|