features/build.feature in middleman-robots-1.3.2 vs features/build.feature in middleman-robots-1.3.3
- old
+ new
@@ -16,13 +16,11 @@
Scenario: Rules option with user_agent
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
- {:user_agent => '*'}
- ]
+ activate :robots, rules: [ { user_agent: '*'} ]
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then the file "robots.txt" should contain exactly:
"""
@@ -32,13 +30,11 @@
Scenario: Rules option with user_agent using block
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
activate :robots do |r|
- r.rules = [
- {:user_agent => '*'}
- ]
+ r.rules = [ { user_agent: '*'} ]
end
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then the file "robots.txt" should contain exactly:
@@ -48,13 +44,11 @@
Scenario: Rules option with user_agent
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
- {:user_agent => '*'}
- ]
+ activate :robots, rules: [ { user_agent: '*'} ]
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then the file "robots.txt" should contain exactly:
"""
@@ -63,13 +57,11 @@
Scenario: Rules option with user-agent
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
- {'user-agent' => '*'}
- ]
+ activate :robots, rules: [ { 'user-agent': '*' } ]
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then the file "robots.txt" should contain exactly:
"""
@@ -78,14 +70,14 @@
Scenario: Rules option with Disallow
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
+ activate :robots, rules: [
{
- :user_agent => '*',
- :disallow => %w(tmp/* /something/dir/file_disallow.html)
+ user_agent: '*',
+ disallow: %w[tmp/* /something/dir/file_disallow.html]
}
]
"""
And a successfully built app at "basic-app"
When I cd to "build"
@@ -98,14 +90,14 @@
Scenario: Rules option with Allow
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
+ activate :robots, rules: [
{
- :user_agent => '*',
- :allow => %w(allow/* /something/dir/file_allow.html)
+ user_agent: '*',
+ allow: %w[allow/* /something/dir/file_allow.html]
}
]
"""
And a successfully built app at "basic-app"
When I cd to "build"
@@ -118,15 +110,15 @@
Scenario: All Rules
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
+ activate :robots, rules: [
{
- :user_agent => '*',
- :disallow => %w(tmp/* /something/dir/file_disallow.html),
- :allow => %w(allow/* /something/dir/file_allow.html)
+ user_agent: '*',
+ disallow: %w[tmp/* /something/dir/file_disallow.html],
+ allow: %w[allow/* /something/dir/file_allow.html]
}
]
"""
And a successfully built app at "basic-app"
When I cd to "build"
@@ -141,20 +133,20 @@
Scenario: Multiple Rules
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :rules => [
+ activate :robots, rules: [
{
- :user_agent => 'Googlebot',
- :disallow => %w(tmp/* /something/dir/file_disallow.html),
- :allow => %w(allow/* /something/dir/file_allow.html)
+ user_agent: 'Googlebot',
+ disallow: %w[tmp/* /something/dir/file_disallow.html],
+ allow: %w[allow/* /something/dir/file_allow.html]
},
{
- :user_agent => 'Googlebot-Image',
- :disallow => %w(tmp/* /something/dir/file_disallow.html),
- :allow => %w(allow/* /something/dir/file_allow.html)
+ user_agent: 'Googlebot-Image',
+ disallow: %w[tmp/* /something/dir/file_disallow.html],
+ allow: %w[allow/* /something/dir/file_allow.html]
}
]
"""
And a successfully built app at "basic-app"
When I cd to "build"
@@ -175,11 +167,11 @@
Scenario: Sitemap option
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
- activate :robots, :sitemap => "http://example.com/sitemap.xml"
+ activate :robots, sitemap: 'http://example.com/sitemap.xml'
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then the file "robots.txt" should contain exactly:
"""
@@ -189,22 +181,22 @@
Scenario: All options
Given a fixture app "basic-app"
And a file named "config.rb" with:
"""
activate :robots,
- :rules => [
+ rules: [
{
- :user_agent => 'Googlebot',
- :disallow => %w(tmp/* /something/dir/file_disallow.html),
- :allow => %w(allow/* /something/dir/file_allow.html)
+ user_agent:'Googlebot',
+ disallow: %w[tmp/* /something/dir/file_disallow.html],
+ allow: %w[allow/* /something/dir/file_allow.html]
},
{
- :user_agent => 'Googlebot-Image',
- :disallow => %w(tmp/* /something/dir/file_disallow.html),
- :allow => %w(allow/* /something/dir/file_allow.html)
+ user_agent:'Googlebot-Image',
+ disallow: %w[tmp/* /something/dir/file_disallow.html],
+ allow: %w[allow/* /something/dir/file_allow.html]
}
],
- :sitemap => "http://example.com/sitemap.xml"
+ sitemap: 'http://example.com/sitemap.xml'
"""
And a successfully built app at "basic-app"
When I cd to "build"
Then the file "robots.txt" should contain exactly:
"""