jekyll-publish 0.0.1
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 +7 -0
- data/lib/jekyll-publish.rb +28 -0
- metadata +44 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: c43d3a18af50c6f1ce1c9dc705bb9b51d729b002
|
4
|
+
data.tar.gz: d5261c563aa3883f6887755a4783a78b66040b17
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 86e8271e783d9134e83b7e3a9d285d1c61e36a25038479f844f81de5f9ff6b3e3ca1910f30df5ff3bcc1e5b117526e853f44abb6103f602c7b5574f12605b9ed
|
7
|
+
data.tar.gz: b1da91572fc5d46a097a4bb92dd395d0b20108d62e1282730513444d4668c80bc0b6f75000a5eb65211f8ecf9651bc595d35c0b02d0d431adbe4103cd40658fd
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'aws-sdk'
|
2
|
+
class Publish < Jekyll::Command
|
3
|
+
class << self
|
4
|
+
def init_with_program(prog)
|
5
|
+
prog.command(:publish) do |c|
|
6
|
+
c.syntax "publish [options]"
|
7
|
+
c.description 'Publish Jekyll site to AWS S3.'
|
8
|
+
|
9
|
+
c.option 'region', '-r AWS_REGION', 'Region with the S3 Bucket.'
|
10
|
+
c.option 'bucket_name', '-b BUCKET_NAME', 'Region with the S3 Bucket.'
|
11
|
+
|
12
|
+
c.action do |args, options|
|
13
|
+
puts "hello"
|
14
|
+
Dir.chdir("./_site")
|
15
|
+
puts Dir.pwd
|
16
|
+
#Jekyll::Site.new_site_at(options['dest'])
|
17
|
+
s3 = Aws::S3::Resource.new(region: options['region'])
|
18
|
+
Dir['./**/*.(?:html|css|js|xml)'].each do |file|
|
19
|
+
key = file[2..-1]
|
20
|
+
puts key
|
21
|
+
obj = s3.bucket(options['bucket_name']).object(key)
|
22
|
+
obj.upload_file(File.absolute_path(file))
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-publish
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sean Rankine
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Allows you to easily publish your static website to S3
|
14
|
+
email: srdeveloper@icloud.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/jekyll-publish.rb
|
20
|
+
homepage: http://rubygems.org/gems/jekyll_publish
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubyforge_project:
|
40
|
+
rubygems_version: 2.0.14
|
41
|
+
signing_key:
|
42
|
+
specification_version: 4
|
43
|
+
summary: Publish Jekyll's static files.
|
44
|
+
test_files: []
|