jekyll-s3 2.2.3 → 2.2.4

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.
data/changelog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.4
4
+
5
+ * Print the web site URL instead of the bucket URL
6
+ ([#22](https://github.com/laurilehmijoki/jekyll-s3/issues/22)).
7
+
3
8
  ## 2.2.3
4
9
 
5
10
  * Allow bugfixes for transitive dependencies *filey-diff*,
@@ -1,5 +1,9 @@
1
1
  Feature: Instructions for a new user
2
2
 
3
+ As a new Jekyll-s3 user
4
+ I would like to get helpful feedback when running `jekyll-s3`
5
+ So that I can upload my Jekyll site to S3 without headache
6
+
3
7
  Scenario: Run jekyll-s3 in the wrong directory
4
8
  When I run `jekyll-s3`
5
9
  Then the output should contain:
@@ -65,3 +69,12 @@ Feature: Instructions for a new user
65
69
  s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
66
70
  s3_bucket: your.blog.bucket.com
67
71
  """
72
+
73
+ @new-files
74
+ Scenario: Print the URL of the site to the user
75
+ When my Jekyll site is in "features/support/test_site_dirs/my.blog.com"
76
+ Then jekyll-s3 will push my blog to S3
77
+ And the output should contain
78
+ """
79
+ Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
80
+ """
@@ -16,7 +16,7 @@ Feature: Invalidate the Cloudfront distribution
16
16
  Uploading 2 new file(s)
17
17
  Upload css/styles.css: Success!
18
18
  Upload index.html: Success!
19
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
19
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
20
20
  Invalidating Cloudfront items...
21
21
  /
22
22
  succeeded
@@ -32,7 +32,7 @@ Feature: Invalidate the Cloudfront distribution
32
32
  Deploying _site/* to jekyll-s3-test.net
33
33
  Uploading 1 changed file(s)
34
34
  Upload index.html: Success!
35
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
35
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
36
36
  Invalidating Cloudfront items...
37
37
  /index.html
38
38
  /
@@ -13,6 +13,6 @@ Feature: remove a Jekyll blog post from S3
13
13
  Deploying _site/* to jekyll-s3-test.net
14
14
  No new or changed files to upload
15
15
  Delete index.html: Success!
16
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
16
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
17
17
 
18
18
  """
@@ -14,7 +14,7 @@ Feature: upload Jekyll site to S3
14
14
  Uploading 2 new file(s)
15
15
  Upload css/styles.css: Success!
16
16
  Upload index.html: Success!
17
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
17
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
18
18
 
19
19
  """
20
20
 
@@ -28,7 +28,7 @@ Feature: upload Jekyll site to S3
28
28
  Uploading 1 new and 1 changed file(s)
29
29
  Upload css/styles.css: Success!
30
30
  Upload index.html: Success!
31
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
31
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
32
32
 
33
33
  """
34
34
 
@@ -41,7 +41,7 @@ Feature: upload Jekyll site to S3
41
41
  Deploying _site/* to jekyll-s3-test.net
42
42
  Uploading 1 changed file(s)
43
43
  Upload index.html: Success!
44
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
44
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
45
45
 
46
46
  """
47
47
 
@@ -53,6 +53,6 @@ Feature: upload Jekyll site to S3
53
53
  """
54
54
  Deploying _site/* to jekyll-s3-test.net
55
55
  No new or changed files to upload
56
- Done! Go visit: http://jekyll-s3-test.net.s3.amazonaws.com/index.html
56
+ Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
57
57
 
58
58
  """
@@ -17,6 +17,10 @@ Then /^the output should equal$/ do |expected_console_output|
17
17
  @console_output.should eq(expected_console_output)
18
18
  end
19
19
 
20
+ Then /^the output should contain$/ do |expected_console_output|
21
+ @console_output.should include(expected_console_output)
22
+ end
23
+
20
24
  Then /^report that it uploaded (\d+) new and (\d+) changed files into S3$/ do
21
25
  |new_count, changed_count|
22
26
  @amount_of_new_files.should == new_count.to_i
data/jekyll-s3.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "jekyll-s3"
6
- s.version = "2.2.3"
6
+ s.version = "2.2.4"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Philippe Creux", "Lauri Lehmijoki"]
9
9
  s.email = ["pcreux@gmail.com", "lauri.lehmijoki@iki.fi"]
@@ -14,12 +14,21 @@ module Jekyll
14
14
  deleted_files_count = remove_superfluous_files(
15
15
  s3, config['s3_bucket'], site_dir, in_headless_mode)
16
16
 
17
- puts "Done! Go visit: http://#{config['s3_bucket']}.s3.amazonaws.com/index.html"
17
+ print_done_report config
18
+
18
19
  [new_files_count, changed_files_count, deleted_files_count, changed_files]
19
20
  end
20
21
 
21
22
  private
22
23
 
24
+ def self.print_done_report(config)
25
+ bucket_name = config['s3_bucket']
26
+ s3_end_point = "us-east-1"
27
+ web_site_host_name =
28
+ "%s.s3-website-%s.amazonaws.com" % [bucket_name, s3_end_point]
29
+ puts "Done! Go visit: http://#{web_site_host_name}/index.html"
30
+ end
31
+
23
32
  def self.upload_files(s3, config, site_dir)
24
33
  changed_files, new_files = DiffHelper.resolve_files_to_upload(
25
34
  s3.buckets[config['s3_bucket']], site_dir)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-s3
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.3
4
+ version: 2.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-01-03 00:00:00.000000000 Z
13
+ date: 2013-01-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws-sdk