s3_website 0.2.1 → 0.3.0
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/README.md +11 -7
- data/Rakefile +6 -0
- data/bin/s3_website +4 -3
- data/changelog.md +4 -0
- data/features/cloudfront.feature +1 -1
- data/features/delete.feature +1 -1
- data/features/instructions-for-new-user.feature +7 -1
- data/features/jekyll-support.feature +13 -0
- data/features/nanoc-support.feature +13 -0
- data/features/{sync.feature → push.feature} +19 -8
- data/features/redirects.feature +1 -3
- data/features/step_definitions/steps.rb +6 -1
- data/features/support/test_site_dirs/jekyllrb.com/_site/css/styles.css +3 -0
- data/features/support/test_site_dirs/jekyllrb.com/_site/index.html +5 -0
- data/features/support/test_site_dirs/jekyllrb.com/s3_website.yml +3 -0
- data/features/support/test_site_dirs/nanoc.ws/public/output/css/styles.css +3 -0
- data/features/support/test_site_dirs/nanoc.ws/public/output/index.html +5 -0
- data/features/support/test_site_dirs/nanoc.ws/s3_website.yml +3 -0
- data/lib/s3_website.rb +15 -1
- data/lib/s3_website/config_loader.rb +7 -9
- data/lib/s3_website/errors.rb +8 -2
- data/lib/s3_website/jekyll.rb +5 -0
- data/lib/s3_website/keyboard.rb +1 -1
- data/lib/s3_website/nanoc.rb +5 -0
- data/lib/s3_website/paths.rb +32 -0
- data/lib/s3_website/tasks.rb +3 -3
- data/lib/s3_website/uploader.rb +1 -1
- data/s3_website.gemspec +1 -1
- data/spec/lib/config_loader_spec.rb +3 -3
- data/spec/lib/paths_spec.rb +7 -0
- metadata +24 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58f0b0262858ded1fa65316ca84b921529f02302
|
4
|
+
data.tar.gz: 882765a34ba7e488ef2f08e2838f3c9f1d9f93f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a209de0e13692763cf9901e8a6f8bf235e8ca90a8dee600495d738ae2992ed27c286fd7138b4ba4fd375afd565b8bbd6bdbcfd97ab149a3fac76e77c56561361
|
7
|
+
data.tar.gz: 0eacf9898f13c40904bd089f5f933dc173a6e955f806be1cdcb15262bc471d1bd634502cf8bf6cebcae8652b34be48444c7bfbeb08d7130a9bfa5782b4ebdbbd
|
data/README.md
CHANGED
@@ -12,10 +12,15 @@
|
|
12
12
|
* Set HTTP redirects for your website
|
13
13
|
* (for other features, see the documentation below)
|
14
14
|
|
15
|
+
`s3_website` automatically supports [Jekyll](http://jekyllrb.com) and
|
16
|
+
[Nanoc](http://nanoc.ws) by recognising their output directories (*_site* for
|
17
|
+
Jekyll and *public/output* for Nanoc). If your website resides in some other
|
18
|
+
directory, you can point the directory to `s3_website` with a parameter. See
|
19
|
+
`s3_website help push` for more info.
|
20
|
+
|
15
21
|
## Install
|
16
22
|
|
17
|
-
|
18
|
-
incompatible changes.</span>
|
23
|
+
This project is still on beta level. Expect backward incompatible changes.
|
19
24
|
|
20
25
|
gem install s3_website
|
21
26
|
|
@@ -26,9 +31,8 @@ Here's how you can get started:
|
|
26
31
|
* Go to your website directory
|
27
32
|
* Run `s3_website cfg create`. It generates a configuration file called `s3_website.yml`
|
28
33
|
* Edit it with your details (you can use [ERB](http://ruby-doc.org/stdlib-1.9.3/libdoc/erb/rdoc/ERB.html) in the file)
|
29
|
-
* Run `s3_website cfg apply
|
30
|
-
|
31
|
-
`s3_website cfg apply` will create it for you.
|
34
|
+
* Run `s3_website cfg apply`. This will configure your bucket to function as an
|
35
|
+
S3 website. If the bucket does not exist, the command will create it for you.
|
32
36
|
* Run `s3_website push` to push your website to S3. Congratulations! You are live.
|
33
37
|
|
34
38
|
`s3_website` attempts to be a command-line interface tool that is easy to
|
@@ -165,7 +169,7 @@ S3 bucket, just add the following line into the file `s3_website.yml`:
|
|
165
169
|
|
166
170
|
cloudfront_distribution_id: your-dist-id
|
167
171
|
|
168
|
-
Next time you run `s3_website`, it will invalidate the items on CloudFront and
|
172
|
+
Next time you run `s3_website push`, it will invalidate the items on CloudFront and
|
169
173
|
thus force the CDN system to reload the changes from your website S3 bucket.
|
170
174
|
|
171
175
|
#### Specifying custom settings for your CloudFront distribution
|
@@ -250,7 +254,7 @@ it programmatically by calling the same API as the executable `s3_website` does:
|
|
250
254
|
````ruby
|
251
255
|
require 's3_website'
|
252
256
|
is_headless = true
|
253
|
-
S3Website::Tasks.push('/path/to/your/website/_site/', is_headless)
|
257
|
+
S3Website::Tasks.push('/website/root', '/path/to/your/website/_site/', is_headless)
|
254
258
|
````
|
255
259
|
|
256
260
|
You can also use a basic `Hash` instead of a `s3_website.yml` file:
|
data/Rakefile
CHANGED
@@ -16,3 +16,9 @@ task "cucumber:wip" do
|
|
16
16
|
ENV['disable_parallel_processing'] = 'true'
|
17
17
|
sh "bundle exec cucumber --tags @wip"
|
18
18
|
end
|
19
|
+
|
20
|
+
desc 'Run fast tests'
|
21
|
+
task "cucumber:fast" do
|
22
|
+
ENV['disable_parallel_processing'] = 'true'
|
23
|
+
sh "bundle exec cucumber --tags ~@network-io --tags ~@starts-new-os-process"
|
24
|
+
end
|
data/bin/s3_website
CHANGED
@@ -27,8 +27,8 @@ class Cli < Thor
|
|
27
27
|
option(
|
28
28
|
:site,
|
29
29
|
:type => :string,
|
30
|
-
:default => '
|
31
|
-
:desc =>
|
30
|
+
:default => 'infer automatically',
|
31
|
+
:desc => "The directory where your website files are. When not defined, s3_website will look for the site in #{S3Website::Paths.site_paths.join(' or ')}."
|
32
32
|
)
|
33
33
|
option(
|
34
34
|
:headless,
|
@@ -42,7 +42,8 @@ class Cli < Thor
|
|
42
42
|
also delete from S3 the files that you no longer have locally.
|
43
43
|
LONGDESC
|
44
44
|
def push
|
45
|
-
S3Website::
|
45
|
+
site_path = S3Website::Paths.infer_site_path options[:site]
|
46
|
+
S3Website::Tasks.push(Dir.pwd, site_path, options[:headless])
|
46
47
|
end
|
47
48
|
|
48
49
|
desc 'cfg SUBCOMMAND ...ARGS', 'Operate on the config file'
|
data/changelog.md
CHANGED
data/features/cloudfront.feature
CHANGED
@@ -23,7 +23,7 @@ Feature: Invalidate the Cloudfront distribution
|
|
23
23
|
Then s3_website will push my blog to S3 and invalidate the Cloudfront distribution
|
24
24
|
And the output should equal
|
25
25
|
"""
|
26
|
-
Deploying _site/* to s3-website-test.net
|
26
|
+
Deploying features/support/test_site_dirs/cdn-powered.with-one-change.blog.fi/_site/* to s3-website-test.net
|
27
27
|
Uploading 1 changed file(s)
|
28
28
|
Upload index.html: Success!
|
29
29
|
Done! Go visit: http://s3-website-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
data/features/delete.feature
CHANGED
@@ -10,7 +10,7 @@ Feature: remove an S3 website page from S3
|
|
10
10
|
Then s3_website will push my blog to S3
|
11
11
|
And the output should equal
|
12
12
|
"""
|
13
|
-
Deploying _site/* to s3-website-test.net
|
13
|
+
Deploying features/support/test_site_dirs/unpublish-a-post.com/_site/* to s3-website-test.net
|
14
14
|
No new or changed files to upload
|
15
15
|
Delete index.html: Success!
|
16
16
|
Done! Go visit: http://s3-website-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
@@ -4,13 +4,15 @@ Feature: Instructions for a new user
|
|
4
4
|
I would like to get helpful feedback when running `s3_website`
|
5
5
|
So that I can upload my S3 website to S3 without headache
|
6
6
|
|
7
|
+
@starts-new-os-process
|
7
8
|
Scenario: Run s3_website in the wrong directory
|
8
9
|
When I run `s3_website push`
|
9
10
|
Then the output should contain:
|
10
11
|
"""
|
11
|
-
I can't find any
|
12
|
+
I can't find a website in any of the following directories: public/output, _site. Please specify the location of the website with the --site option.
|
12
13
|
"""
|
13
14
|
|
15
|
+
@starts-new-os-process
|
14
16
|
Scenario: Create placeholder config file
|
15
17
|
Given a directory named "_site"
|
16
18
|
When I run `s3_website cfg create`
|
@@ -25,6 +27,7 @@ Feature: Instructions for a new user
|
|
25
27
|
s3_bucket: your.blog.bucket.com
|
26
28
|
"""
|
27
29
|
|
30
|
+
@starts-new-os-process
|
28
31
|
Scenario: Run s3_website push for the first time
|
29
32
|
Given a directory named "_site"
|
30
33
|
When I run `s3_website push`
|
@@ -39,6 +42,7 @@ Feature: Instructions for a new user
|
|
39
42
|
s3_bucket: your.blog.bucket.com
|
40
43
|
"""
|
41
44
|
|
45
|
+
@starts-new-os-process
|
42
46
|
Scenario: Run s3_website with an empty configuration file
|
43
47
|
Given a directory named "_site"
|
44
48
|
And an empty file named "s3_website.yml"
|
@@ -51,6 +55,7 @@ Feature: Instructions for a new user
|
|
51
55
|
s3_bucket: your.blog.bucket.com
|
52
56
|
"""
|
53
57
|
|
58
|
+
@starts-new-os-process
|
54
59
|
Scenario: Run s3_website with a malformed configuration file
|
55
60
|
Given a directory named "_site"
|
56
61
|
And a file named "s3_website.yml" with:
|
@@ -67,6 +72,7 @@ Feature: Instructions for a new user
|
|
67
72
|
s3_bucket: your.blog.bucket.com
|
68
73
|
"""
|
69
74
|
|
75
|
+
@starts-new-os-process
|
70
76
|
Scenario: Run s3_website with a configuration file that does not contain a bucket
|
71
77
|
Given a directory named "_site"
|
72
78
|
And a file named "s3_website.yml" with:
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Feature: upload a Jekyll site
|
2
|
+
|
3
|
+
@new-files
|
4
|
+
Scenario: Push a Jekyll site to S3
|
5
|
+
When my S3 website is in "features/support/test_site_dirs/jekyllrb.com"
|
6
|
+
Then s3_website will push my blog to S3
|
7
|
+
And the output should contain
|
8
|
+
"""
|
9
|
+
Deploying features/support/test_site_dirs/jekyllrb.com/_site/* to s3-website-test.net
|
10
|
+
Uploading 2 new file(s)
|
11
|
+
Upload css/styles.css: Success!
|
12
|
+
Upload index.html: Success!
|
13
|
+
"""
|
@@ -0,0 +1,13 @@
|
|
1
|
+
Feature: upload a Nanoc site
|
2
|
+
|
3
|
+
@new-files
|
4
|
+
Scenario: Push a Nanoc site to S3
|
5
|
+
When my S3 website is in "features/support/test_site_dirs/nanoc.ws"
|
6
|
+
Then s3_website will push my blog to S3
|
7
|
+
And the output should contain
|
8
|
+
"""
|
9
|
+
Deploying features/support/test_site_dirs/nanoc.ws/public/output/* to s3-website-test.net
|
10
|
+
Uploading 2 new file(s)
|
11
|
+
Upload css/styles.css: Success!
|
12
|
+
Upload index.html: Success!
|
13
|
+
"""
|
@@ -10,16 +10,27 @@ Feature: upload S3 website to S3
|
|
10
10
|
Then s3_website will push my blog to S3
|
11
11
|
And the output should contain
|
12
12
|
"""
|
13
|
-
Deploying _site/* to s3-website-test.net
|
13
|
+
Deploying features/support/test_site_dirs/my.blog.com/_site/* to s3-website-test.net
|
14
14
|
Uploading 2 new file(s)
|
15
|
+
Upload css/styles.css: Success!
|
16
|
+
Upload index.html: Success!
|
15
17
|
"""
|
16
|
-
|
18
|
+
|
19
|
+
@new-files
|
20
|
+
@network-io
|
21
|
+
@starts-new-os-process
|
22
|
+
Scenario: The website resides in a non-standard directory
|
23
|
+
Given a directory named "this-is-a-non-standard-website-dir"
|
24
|
+
And a file named "s3_website.yml" with:
|
17
25
|
"""
|
18
|
-
|
26
|
+
s3_id: id
|
27
|
+
s3_secret: secret
|
28
|
+
s3_bucket: website.net
|
19
29
|
"""
|
20
|
-
And
|
30
|
+
And I run `s3_website push --site this-is-a-non-standard-website-dir`
|
31
|
+
Then the output should contain:
|
21
32
|
"""
|
22
|
-
|
33
|
+
Deploying this-is-a-non-standard-website-dir/* to website.net
|
23
34
|
"""
|
24
35
|
|
25
36
|
@new-files-for-sydney
|
@@ -37,7 +48,7 @@ Feature: upload S3 website to S3
|
|
37
48
|
Then s3_website will push my blog to S3
|
38
49
|
And the output should contain
|
39
50
|
"""
|
40
|
-
Deploying _site/* to s3-website-test.net
|
51
|
+
Deploying features/support/test_site_dirs/new-and-changed-files.com/_site/* to s3-website-test.net
|
41
52
|
Uploading 1 new and 1 changed file(s)
|
42
53
|
"""
|
43
54
|
And the output should contain
|
@@ -60,7 +71,7 @@ Feature: upload S3 website to S3
|
|
60
71
|
Then s3_website will push my blog to S3
|
61
72
|
And the output should equal
|
62
73
|
"""
|
63
|
-
Deploying _site/* to s3-website-test.net
|
74
|
+
Deploying features/support/test_site_dirs/only-changed-files.com/_site/* to s3-website-test.net
|
64
75
|
Uploading 1 changed file(s)
|
65
76
|
Upload index.html: Success!
|
66
77
|
Done! Go visit: http://s3-website-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
@@ -73,7 +84,7 @@ Feature: upload S3 website to S3
|
|
73
84
|
Then s3_website will push my blog to S3
|
74
85
|
And the output should equal
|
75
86
|
"""
|
76
|
-
Deploying _site/* to s3-website-test.net
|
87
|
+
Deploying features/support/test_site_dirs/no-new-or-changed-files.com/_site/* to s3-website-test.net
|
77
88
|
No new or changed files to upload
|
78
89
|
Done! Go visit: http://s3-website-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
79
90
|
|
data/features/redirects.feature
CHANGED
@@ -4,10 +4,8 @@ Feature: configure redirects
|
|
4
4
|
Scenario: The user wants to configure new redirects for HTTP resources
|
5
5
|
When my S3 website is in "features/support/test_site_dirs/create-redirects"
|
6
6
|
Then s3_website will push my blog to S3
|
7
|
-
And the output should
|
7
|
+
And the output should contain
|
8
8
|
"""
|
9
|
-
Deploying _site/* to s3-website-test.net
|
10
|
-
No new or changed files to upload
|
11
9
|
Creating new redirects ...
|
12
10
|
Redirect welcome.php to /welcome: Success!
|
13
11
|
Redirect pets/dogs to /cats-and-dogs/wuf: Success!
|
@@ -41,8 +41,13 @@ end
|
|
41
41
|
def push_files
|
42
42
|
@console_output = capture_stdout {
|
43
43
|
in_headless_mode = true
|
44
|
+
site_path = S3Website::Paths.infer_site_path(
|
45
|
+
'infer automatically',
|
46
|
+
@blog_dir
|
47
|
+
)
|
44
48
|
result = S3Website::Tasks.push(
|
45
|
-
|
49
|
+
@blog_dir,
|
50
|
+
site_path,
|
46
51
|
in_headless_mode
|
47
52
|
)
|
48
53
|
@amount_of_new_files = result[:new_files_count]
|
data/lib/s3_website.rb
CHANGED
@@ -11,7 +11,21 @@ module S3Website
|
|
11
11
|
DEFAULT_GZIP_EXTENSIONS = %w(.html .css .js .svg .txt)
|
12
12
|
end
|
13
13
|
|
14
|
-
%w{
|
14
|
+
%w{
|
15
|
+
errors
|
16
|
+
upload
|
17
|
+
uploader
|
18
|
+
tasks
|
19
|
+
config_loader
|
20
|
+
retry
|
21
|
+
keyboard
|
22
|
+
diff_helper
|
23
|
+
endpoint
|
24
|
+
parallelism
|
25
|
+
jekyll
|
26
|
+
nanoc
|
27
|
+
paths
|
28
|
+
}.each do |file|
|
15
29
|
require File.dirname(__FILE__) + "/s3_website/#{file}"
|
16
30
|
end
|
17
31
|
|
@@ -8,7 +8,7 @@ s3_bucket: your.blog.bucket.com
|
|
8
8
|
EOF
|
9
9
|
|
10
10
|
def self.check_project(site_dir)
|
11
|
-
raise
|
11
|
+
raise NoWebsiteDirectoryFound unless File.directory?(site_dir)
|
12
12
|
end
|
13
13
|
|
14
14
|
# Raise NoConfigurationFileError if the configuration file does not exists
|
@@ -20,16 +20,12 @@ s3_bucket: your.blog.bucket.com
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
-
def self.get_configuration_file(site_dir)
|
24
|
-
"#{site_dir}/../#{CONFIGURATION_FILE}"
|
25
|
-
end
|
26
|
-
|
27
23
|
private
|
28
24
|
|
29
25
|
# Load configuration from s3_website.yml
|
30
26
|
# Raise MalformedConfigurationFileError if the configuration file does not contain the keys we expect
|
31
|
-
def self.load_configuration(
|
32
|
-
config = load_yaml_file_and_validate
|
27
|
+
def self.load_configuration(config_file_dir)
|
28
|
+
config = load_yaml_file_and_validate config_file_dir
|
33
29
|
return config
|
34
30
|
end
|
35
31
|
|
@@ -39,9 +35,11 @@ s3_bucket: your.blog.bucket.com
|
|
39
35
|
}
|
40
36
|
end
|
41
37
|
|
42
|
-
def self.load_yaml_file_and_validate(
|
38
|
+
def self.load_yaml_file_and_validate(config_file_dir)
|
43
39
|
begin
|
44
|
-
config = YAML.load(Erubis::Eruby.new(
|
40
|
+
config = YAML.load(Erubis::Eruby.new(
|
41
|
+
File.read(config_file_dir + '/' + CONFIGURATION_FILE)
|
42
|
+
).result)
|
45
43
|
rescue Exception
|
46
44
|
raise MalformedConfigurationFileError
|
47
45
|
end
|
data/lib/s3_website/errors.rb
CHANGED
@@ -2,8 +2,14 @@ module S3Website
|
|
2
2
|
class S3WebsiteError < StandardError
|
3
3
|
end
|
4
4
|
|
5
|
-
class
|
6
|
-
def initialize(message = "I can't find any
|
5
|
+
class NoWebsiteDirectoryFound < S3WebsiteError
|
6
|
+
def initialize(message = "I can't find any website. Are you in the right directory?")
|
7
|
+
super(message)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
class NoPredefinedWebsiteDirectoryFound < NoWebsiteDirectoryFound
|
12
|
+
def initialize(message = "I can't find a website in any of the following directories: #{Paths.site_paths.join(', ')}. Please specify the location of the website with the --site option.")
|
7
13
|
super(message)
|
8
14
|
end
|
9
15
|
end
|
data/lib/s3_website/keyboard.rb
CHANGED
@@ -7,7 +7,7 @@ module S3Website
|
|
7
7
|
delete = false
|
8
8
|
keep = false
|
9
9
|
until delete || delete_all || keep || keep_all
|
10
|
-
puts "#{f} is on S3 but not in your
|
10
|
+
puts "#{f} is on S3 but not in your website directory anymore. Do you want to [d]elete, [D]elete all, [k]eep, [K]eep all?"
|
11
11
|
case standard_input.gets.chomp
|
12
12
|
when 'd' then delete = true
|
13
13
|
when 'D' then delete_all = true
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module S3Website
|
2
|
+
class Paths
|
3
|
+
def self.site_paths
|
4
|
+
[Nanoc::SITE_PATH, Jekyll::SITE_PATH]
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.infer_site_path(candidate_path, pwd = Dir.pwd)
|
8
|
+
if candidate_path == 'infer automatically'
|
9
|
+
site_path = site_paths.
|
10
|
+
map do |site_path|
|
11
|
+
pwd + '/' + site_path
|
12
|
+
end.
|
13
|
+
find do |site_path|
|
14
|
+
File.exists? site_path
|
15
|
+
end
|
16
|
+
if site_path
|
17
|
+
site_path
|
18
|
+
else
|
19
|
+
raise NoPredefinedWebsiteDirectoryFound
|
20
|
+
end
|
21
|
+
else
|
22
|
+
raise NoWebsiteDirectoryFound.new(
|
23
|
+
"Can't find a website in " + candidate_path
|
24
|
+
) unless File.exists? candidate_path
|
25
|
+
candidate_path
|
26
|
+
end
|
27
|
+
rescue NoWebsiteDirectoryFound => e
|
28
|
+
puts e.message
|
29
|
+
exit 1
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/s3_website/tasks.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module S3Website
|
2
2
|
class Tasks
|
3
|
-
def self.push(site_dir, in_headless_mode = false)
|
3
|
+
def self.push(config_file_dir, site_dir, in_headless_mode = false)
|
4
4
|
ConfigLoader.check_project site_dir
|
5
|
-
ConfigLoader.check_s3_configuration
|
6
|
-
config = S3Website::ConfigLoader.load_configuration
|
5
|
+
ConfigLoader.check_s3_configuration config_file_dir
|
6
|
+
config = S3Website::ConfigLoader.load_configuration config_file_dir
|
7
7
|
new_files_count, changed_files_count, deleted_files_count, changed_files, changed_redirects =
|
8
8
|
Uploader.run(site_dir, config, in_headless_mode)
|
9
9
|
invalidated_items_count =
|
data/lib/s3_website/uploader.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module S3Website
|
2
2
|
class Uploader
|
3
3
|
def self.run(site_dir, config, in_headless_mode = false)
|
4
|
-
puts "Deploying
|
4
|
+
puts "Deploying #{site_dir.sub(Dir.pwd + '/', '')}/* to #{config['s3_bucket']}"
|
5
5
|
|
6
6
|
s3_config = { :s3_endpoint => Endpoint.new(config['s3_endpoint']).hostname }
|
7
7
|
s3_id, s3_secret = config['s3_id'], config['s3_secret']
|
data/s3_website.gemspec
CHANGED
@@ -2,19 +2,19 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe S3Website::ConfigLoader do
|
4
4
|
it 'supports eRuby syntax in s3_website.yml' do
|
5
|
-
config = S3Website::ConfigLoader.load_configuration('spec/sample_files/hyde_site/
|
5
|
+
config = S3Website::ConfigLoader.load_configuration('spec/sample_files/hyde_site/')
|
6
6
|
config['s3_id'].should eq('hello')
|
7
7
|
config['s3_secret'].should eq('world')
|
8
8
|
config['s3_bucket'].should eq('galaxy')
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'does not define default endpoint' do
|
12
|
-
config = S3Website::ConfigLoader.load_configuration('spec/sample_files/hyde_site/
|
12
|
+
config = S3Website::ConfigLoader.load_configuration('spec/sample_files/hyde_site/')
|
13
13
|
config['s3_endpoint'].should be_nil
|
14
14
|
end
|
15
15
|
|
16
16
|
it 'reads the S3 endpoint setting from s3_website.yml' do
|
17
|
-
config = S3Website::ConfigLoader.load_configuration('spec/sample_files/tokyo_site
|
17
|
+
config = S3Website::ConfigLoader.load_configuration('spec/sample_files/tokyo_site')
|
18
18
|
config['s3_endpoint'].should eq('ap-northeast-1')
|
19
19
|
end
|
20
20
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3_website
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lauri Lehmijoki
|
@@ -237,6 +237,9 @@ files:
|
|
237
237
|
- features/cloudfront.feature
|
238
238
|
- features/delete.feature
|
239
239
|
- features/instructions-for-new-user.feature
|
240
|
+
- features/jekyll-support.feature
|
241
|
+
- features/nanoc-support.feature
|
242
|
+
- features/push.feature
|
240
243
|
- features/redirects.feature
|
241
244
|
- features/step_definitions/steps.rb
|
242
245
|
- features/support/env.rb
|
@@ -252,12 +255,18 @@ files:
|
|
252
255
|
- features/support/test_site_dirs/index-and-assets.blog.fi/_site/css/styles.css
|
253
256
|
- features/support/test_site_dirs/index-and-assets.blog.fi/_site/index.html
|
254
257
|
- features/support/test_site_dirs/index-and-assets.blog.fi/s3_website.yml
|
258
|
+
- features/support/test_site_dirs/jekyllrb.com/_site/css/styles.css
|
259
|
+
- features/support/test_site_dirs/jekyllrb.com/_site/index.html
|
260
|
+
- features/support/test_site_dirs/jekyllrb.com/s3_website.yml
|
255
261
|
- features/support/test_site_dirs/my.blog.com/_site/css/styles.css
|
256
262
|
- features/support/test_site_dirs/my.blog.com/_site/index.html
|
257
263
|
- features/support/test_site_dirs/my.blog.com/s3_website.yml
|
258
264
|
- features/support/test_site_dirs/my.sydney.blog.au/_site/css/styles.css
|
259
265
|
- features/support/test_site_dirs/my.sydney.blog.au/_site/index.html
|
260
266
|
- features/support/test_site_dirs/my.sydney.blog.au/s3_website.yml
|
267
|
+
- features/support/test_site_dirs/nanoc.ws/public/output/css/styles.css
|
268
|
+
- features/support/test_site_dirs/nanoc.ws/public/output/index.html
|
269
|
+
- features/support/test_site_dirs/nanoc.ws/s3_website.yml
|
261
270
|
- features/support/test_site_dirs/new-and-changed-files.com/_site/css/styles.css
|
262
271
|
- features/support/test_site_dirs/new-and-changed-files.com/_site/index.html
|
263
272
|
- features/support/test_site_dirs/new-and-changed-files.com/s3_website.yml
|
@@ -282,7 +291,6 @@ files:
|
|
282
291
|
- features/support/test_site_dirs/unpublish-a-post.com/_site/css/styles.css
|
283
292
|
- features/support/test_site_dirs/unpublish-a-post.com/s3_website.yml
|
284
293
|
- features/support/vcr.rb
|
285
|
-
- features/sync.feature
|
286
294
|
- features/website-performance.feature
|
287
295
|
- lib/cloudfront/invalidator.rb
|
288
296
|
- lib/s3_website.rb
|
@@ -290,8 +298,11 @@ files:
|
|
290
298
|
- lib/s3_website/diff_helper.rb
|
291
299
|
- lib/s3_website/endpoint.rb
|
292
300
|
- lib/s3_website/errors.rb
|
301
|
+
- lib/s3_website/jekyll.rb
|
293
302
|
- lib/s3_website/keyboard.rb
|
303
|
+
- lib/s3_website/nanoc.rb
|
294
304
|
- lib/s3_website/parallelism.rb
|
305
|
+
- lib/s3_website/paths.rb
|
295
306
|
- lib/s3_website/retry.rb
|
296
307
|
- lib/s3_website/tasks.rb
|
297
308
|
- lib/s3_website/upload.rb
|
@@ -301,6 +312,7 @@ files:
|
|
301
312
|
- spec/lib/endpoint_spec.rb
|
302
313
|
- spec/lib/keyboard_spec.rb
|
303
314
|
- spec/lib/parallelism_spec.rb
|
315
|
+
- spec/lib/paths_spec.rb
|
304
316
|
- spec/lib/retry_spec.rb
|
305
317
|
- spec/lib/upload_spec.rb
|
306
318
|
- spec/lib/uploader_spec.rb
|
@@ -350,6 +362,9 @@ test_files:
|
|
350
362
|
- features/cloudfront.feature
|
351
363
|
- features/delete.feature
|
352
364
|
- features/instructions-for-new-user.feature
|
365
|
+
- features/jekyll-support.feature
|
366
|
+
- features/nanoc-support.feature
|
367
|
+
- features/push.feature
|
353
368
|
- features/redirects.feature
|
354
369
|
- features/step_definitions/steps.rb
|
355
370
|
- features/support/env.rb
|
@@ -365,12 +380,18 @@ test_files:
|
|
365
380
|
- features/support/test_site_dirs/index-and-assets.blog.fi/_site/css/styles.css
|
366
381
|
- features/support/test_site_dirs/index-and-assets.blog.fi/_site/index.html
|
367
382
|
- features/support/test_site_dirs/index-and-assets.blog.fi/s3_website.yml
|
383
|
+
- features/support/test_site_dirs/jekyllrb.com/_site/css/styles.css
|
384
|
+
- features/support/test_site_dirs/jekyllrb.com/_site/index.html
|
385
|
+
- features/support/test_site_dirs/jekyllrb.com/s3_website.yml
|
368
386
|
- features/support/test_site_dirs/my.blog.com/_site/css/styles.css
|
369
387
|
- features/support/test_site_dirs/my.blog.com/_site/index.html
|
370
388
|
- features/support/test_site_dirs/my.blog.com/s3_website.yml
|
371
389
|
- features/support/test_site_dirs/my.sydney.blog.au/_site/css/styles.css
|
372
390
|
- features/support/test_site_dirs/my.sydney.blog.au/_site/index.html
|
373
391
|
- features/support/test_site_dirs/my.sydney.blog.au/s3_website.yml
|
392
|
+
- features/support/test_site_dirs/nanoc.ws/public/output/css/styles.css
|
393
|
+
- features/support/test_site_dirs/nanoc.ws/public/output/index.html
|
394
|
+
- features/support/test_site_dirs/nanoc.ws/s3_website.yml
|
374
395
|
- features/support/test_site_dirs/new-and-changed-files.com/_site/css/styles.css
|
375
396
|
- features/support/test_site_dirs/new-and-changed-files.com/_site/index.html
|
376
397
|
- features/support/test_site_dirs/new-and-changed-files.com/s3_website.yml
|
@@ -395,12 +416,12 @@ test_files:
|
|
395
416
|
- features/support/test_site_dirs/unpublish-a-post.com/_site/css/styles.css
|
396
417
|
- features/support/test_site_dirs/unpublish-a-post.com/s3_website.yml
|
397
418
|
- features/support/vcr.rb
|
398
|
-
- features/sync.feature
|
399
419
|
- features/website-performance.feature
|
400
420
|
- spec/lib/config_loader_spec.rb
|
401
421
|
- spec/lib/endpoint_spec.rb
|
402
422
|
- spec/lib/keyboard_spec.rb
|
403
423
|
- spec/lib/parallelism_spec.rb
|
424
|
+
- spec/lib/paths_spec.rb
|
404
425
|
- spec/lib/retry_spec.rb
|
405
426
|
- spec/lib/upload_spec.rb
|
406
427
|
- spec/lib/uploader_spec.rb
|