middleman-sitemap 0.0.2 → 0.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 71085010a75a76e5b94a5e3faa214a7ce61e7905
4
- data.tar.gz: 99df595f0f730f7936ffe3b3d87284bb2fa196c3
3
+ metadata.gz: 763758cd3346ca11ea4022254b31a5741c17fa27
4
+ data.tar.gz: a0b3869a78c044b13597cb7e2a58633bb96cc848
5
5
  SHA512:
6
- metadata.gz: 5918c077ce457d1be354da508ae036f8aa6c658bd5f2c0faaa94a58a56a025572035df4367abb745e026f4a76064d92ffb12bbbc11654d7d21c51a8f39825901
7
- data.tar.gz: a9004424fe92cf0ab93a01ef28b35787757b78c7a2412877e13f90b63e91d3b4bd7837fbbade109469ca2f4ea17a8d122acfe5f473094201e6c37cf0a9827e92
6
+ metadata.gz: 47a0df96dc84e4e6e7e8c56ca820b51f43c8b68da0ad3904cf4c557821e5870efebd8f82900ecac0ce988e7b20fcf0661c0dbd03e03c49cd29211a4b32c5d577
7
+ data.tar.gz: 8c96178a348b4dab24943b3b16bf6aeab97f27a3531fff092e09e45c344fd37331934cc9f201755d37ebfdd0aa0a61273c50efd9a98ea333e2b6ebda10de5979
@@ -17,12 +17,23 @@ Feature: GZIP sitemap build
17
17
  Then the following files should not exist:
18
18
  | build/sitemap.xml.gz |
19
19
 
20
- Scenario: Sitemap should not be gzipped when option set to false
21
- Given a fixture app "gzip-app"
22
- And a file named "config.rb" with:
20
+ Scenario: Sitemap should not be gzipped when option set to false
21
+ Given a fixture app "gzip-app"
22
+ And a file named "config.rb" with:
23
+ """
24
+ activate :sitemap, :hostname => "http://www.apple.com"
25
+ """
26
+ And a successfully built app at "gzip-app"
27
+ When I cd to "build"
28
+ Then the file "sitemap.xml" should contain "http://www.apple.com"
29
+
30
+ Scenario: Site that has been gzipped
31
+ Given a fixture app "gzip-app"
32
+ And a file named "config.rb" with:
23
33
  """
34
+ activate :gzip
24
35
  activate :sitemap, :hostname => "http://www.apple.com"
25
36
  """
26
- And a successfully built app at "gzip-app"
27
- When I cd to "build"
28
- Then the file "sitemap.xml" should contain "http://www.apple.com"
37
+ And a successfully built app at "gzip-app"
38
+ When I cd to "build"
39
+ Then the file "sitemap.xml" should contain "http://www.apple.com"
@@ -17,7 +17,7 @@ class Sitemap < ::Middleman::Extension
17
17
  # puts options.my_option
18
18
  end
19
19
 
20
- def after_build
20
+ def after_build(builder)
21
21
  require 'erb'
22
22
  @pages = app.sitemap.resources.find_all{ |p| p.source_file.match(/\.html/) }
23
23
  @hostname = options.hostname
@@ -25,8 +25,10 @@ class Sitemap < ::Middleman::Extension
25
25
  sitemap = template.render(self)
26
26
  outfile = File.join(app.build_dir, "sitemap.xml")
27
27
  File.open(outfile, 'w') {|f| f.write(sitemap) }
28
+ builder.say_status :create, "build/sitemap.xml"
28
29
  if options.gzip
29
30
  gzip_file(File.read(outfile))
31
+ builder.say_status :create, "build/sitemap.xml.gz"
30
32
  end
31
33
  end
32
34
 
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "middleman-sitemap"
6
- s.version = "0.0.2"
6
+ s.version = "0.0.3"
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.authors = ["Larry Staton Jr."]
9
9
  s.email = ["larry@larrystaton.com"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-sitemap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Larry Staton Jr.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-18 00:00:00.000000000 Z
11
+ date: 2014-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core