middleman-robots 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97d9d45c323aae119360e18dec88b74ac8a9910f
4
- data.tar.gz: bb1d2d9d1f53c28fbc586b2b422114a92ff353f5
3
+ metadata.gz: c7fe8c7c18e4b99c7a53f13c46b307bbaa9ba9c2
4
+ data.tar.gz: 10db367365abdc793d320d016a813e38b0138374
5
5
  SHA512:
6
- metadata.gz: b6a9c788ca4935a38d55587baf339f880446b08c259553af7548393a99c8c4e20f0171d1beec422bbcf5b8ed1ff808b1ef41dabd5e4b20cac3357e13713a60c2
7
- data.tar.gz: ffb9d1fc8254ccdb09cf1ced8e4b47ddeaba2de8f07b80aacac73e52f7d9400c4ad974bcbc1fe7809de4bc4d4d5f3c5c9fc6333ae6fc8fe069ca2a85660ede3f
6
+ metadata.gz: 9abfe16e709d8011b319419a88cd4a269fa41c7dfd7818cc944abc1f212913ce83d2764a40719718da3d39309c70aac7502672e3b2e381aa72c99498c4c0a9fc
7
+ data.tar.gz: cb625f0c79cc12a438c10f3b8030bcb4effe242c39eb1e45f092d41c364f314ee5c0d85611a42dbd9efc1591a1989cee4f4876c7943cc6a22d29435d9443a1da
data/.gitignore CHANGED
@@ -6,7 +6,9 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
9
+ /tmp/*
10
+ !/tmp/robots/
11
+ /tmp/robots/*
10
12
  /vendor
11
13
  *.bundle
12
14
  *.so
@@ -9,15 +9,16 @@ module Middleman
9
9
  option :sitemap, false, 'URI of sitemap.xml'
10
10
 
11
11
  def manipulate_resource_list(resources)
12
- tf = Tempfile.open('middleman-robots')
13
- tf.puts(Generator.new(options.rules, options.sitemap).process)
12
+ tmp_path = File.expand_path('../../../tmp/robots/robots.txt', __FILE__)
13
+ File.open(tmp_path, 'w+') do |f|
14
+ f.puts(Generator.new(options.rules, options.sitemap).process)
15
+ end
14
16
 
15
17
  robots = Middleman::Sitemap::Resource.new(
16
18
  app.sitemap,
17
19
  'robots.txt',
18
- tf.path
20
+ tmp_path
19
21
  )
20
- tf.close
21
22
 
22
23
  logger.info '== middleman-robots: robots.txt added to resources =='
23
24
  resources << robots
@@ -1,6 +1,6 @@
1
1
  module Middleman
2
2
  # Middleman robots module
3
3
  module Robots
4
- VERSION = '1.3.1'
4
+ VERSION = '1.3.2'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-robots
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuya Matsushima
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-01 00:00:00.000000000 Z
11
+ date: 2017-05-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman
@@ -125,6 +125,7 @@ files:
125
125
  - middleman-robots.gemspec
126
126
  - tests/test_generator.rb
127
127
  - tests/test_group.rb
128
+ - tmp/robots/.gitkeep
128
129
  homepage: https://github.com/yterajima/middleman-robots
129
130
  licenses:
130
131
  - MIT