rails_sitemap 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/rails_sitemap/sitemap_controller.rb +10 -4
- data/app/models/rails_sitemap/sitemap_entry.rb +13 -0
- data/app/views/rails_sitemap/sitemap/index.xml.erb +7 -7
- data/lib/rails_sitemap/engine.rb +10 -1
- data/lib/rails_sitemap/version.rb +1 -1
- data/test/dummy/config/initializers/rails_sitemap.rb +4 -0
- data/test/dummy/log/test.log +561 -0
- data/test/integration/sitemap_controller_test.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce924d7fa6e619f5570ed629e27e5d46ff1e5793
|
4
|
+
data.tar.gz: 9909d3e927aa6478318e367e4eada3c2c2e00920
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 405b06ecf03b291ff42941376ad53b770f8257ebc242ef5d282e7e759a91ffe87ed34f8d1e986addb8f08604723f48067543c1d07d4254e9f55deb2c2c8cfad8
|
7
|
+
data.tar.gz: a50aa5c5e7baf91e2627c1bc84aad5dd5c28062fcf28014a1f861b654eb1568f8a03593bb4cd7ce19581f067b509b811baa20792e60463e81c81af3dc89d31c6
|
@@ -36,8 +36,8 @@ module RailsSitemap
|
|
36
36
|
EXCLUDED_PATHS.include?(route[:path])
|
37
37
|
end
|
38
38
|
|
39
|
-
@
|
40
|
-
route[:path][0..-11]
|
39
|
+
@sitemap_entries = @routes.map do|route|
|
40
|
+
SitemapEntry.new(route[:path][0..-11])
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
@@ -54,11 +54,17 @@ module RailsSitemap
|
|
54
54
|
|
55
55
|
model_class.all.each do |object|
|
56
56
|
id = object.try(:slug) || object.id
|
57
|
-
|
57
|
+
|
58
|
+
object_path = "/#{model_sitemap.pluralize.downcase}/#{id}"
|
59
|
+
last_modification = object.updated_at.to_datetime.to_s
|
60
|
+
object_priority = RailsSitemap.priority
|
61
|
+
|
62
|
+
@sitemap_entries <<
|
63
|
+
SitemapEntry.new(object_path, object_priority, last_modification)
|
58
64
|
end
|
59
65
|
end
|
60
66
|
|
61
|
-
@
|
67
|
+
@sitemap_entries.uniq
|
62
68
|
end
|
63
69
|
end
|
64
70
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module RailsSitemap
|
2
|
+
class SitemapEntry
|
3
|
+
attr :path, :priority, :updated_at
|
4
|
+
|
5
|
+
def initialize(path,
|
6
|
+
priority = RailsSitemap.priority,
|
7
|
+
updated_at = RailsSitemap.updated_at)
|
8
|
+
@path = path
|
9
|
+
@priority = priority
|
10
|
+
@updated_at = updated_at
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -2,17 +2,17 @@
|
|
2
2
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:geo="http://www.google.com/geo/schemas/sitemap/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:pagemap="http://www.google.com/schemas/sitemap-pagemap/1.0" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
|
3
3
|
<url>
|
4
4
|
<loc><%= @current_domain %></loc>
|
5
|
-
<lastmod
|
6
|
-
<changefreq
|
5
|
+
<lastmod><%= RailsSitemap.updated_at %></lastmod>
|
6
|
+
<changefreq><%= RailsSitemap.update_frequency_for_app %></changefreq>
|
7
7
|
<priority>1.0</priority>
|
8
8
|
</url>
|
9
9
|
|
10
|
-
<% @
|
10
|
+
<% @sitemap_entries.each do |sitemap_entry| %>
|
11
11
|
<url>
|
12
|
-
<loc><%= @current_domain +
|
13
|
-
<lastmod
|
14
|
-
<changefreq
|
15
|
-
<priority
|
12
|
+
<loc><%= @current_domain + sitemap_entry.path %></loc>
|
13
|
+
<lastmod><%= sitemap_entry.updated_at%></lastmod>
|
14
|
+
<changefreq><%=RailsSitemap.update_frequency_for_models%></changefreq>
|
15
|
+
<priority><%= sitemap_entry.priority%></priority>
|
16
16
|
</url>
|
17
17
|
<% end %>
|
18
18
|
</urlset>
|
data/lib/rails_sitemap/engine.rb
CHANGED
@@ -10,8 +10,17 @@ module RailsSitemap
|
|
10
10
|
end
|
11
11
|
|
12
12
|
class << self
|
13
|
-
mattr_accessor :models_for_sitemap
|
13
|
+
mattr_accessor :models_for_sitemap,
|
14
|
+
:updated_at,
|
15
|
+
:priority,
|
16
|
+
:update_frequency_for_app,
|
17
|
+
:update_frequency_for_models
|
18
|
+
|
14
19
|
self.models_for_sitemap = []
|
20
|
+
self.updated_at = DateTime.now.to_s
|
21
|
+
self.priority = 0.5
|
22
|
+
self.update_frequency_for_app = 'always'
|
23
|
+
self.update_frequency_for_models = 'weekly'
|
15
24
|
end
|
16
25
|
|
17
26
|
def self.setup(&block)
|
data/test/dummy/log/test.log
CHANGED
@@ -2079,5 +2079,566 @@ Completed 200 OK in 6ms (Views: 4.0ms | ActiveRecord: 0.1ms)
|
|
2079
2079
|
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2080
2080
|
----------------------------
|
2081
2081
|
RailsSitemapTest: test_truth
|
2082
|
+
----------------------------
|
2083
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2084
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2085
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2086
|
+
----------------------------
|
2087
|
+
RailsSitemapTest: test_truth
|
2088
|
+
----------------------------
|
2089
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2090
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2091
|
+
--------------------------------------------------------
|
2092
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2093
|
+
--------------------------------------------------------
|
2094
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:40:30 -0300
|
2095
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2096
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2097
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2098
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (11.5ms)
|
2099
|
+
Completed 500 Internal Server Error in 23ms (ActiveRecord: 0.2ms)
|
2100
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2101
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2102
|
+
-----------------------------------------------------------------
|
2103
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2104
|
+
-----------------------------------------------------------------
|
2105
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2106
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2107
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:40:30 UTC], ["updated_at", 2016-09-26 17:40:30 UTC]]
|
2108
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2109
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:40:30 -0300
|
2110
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2111
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2112
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2113
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (3.0ms)
|
2114
|
+
Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.1ms)
|
2115
|
+
[1m[35m (2.3ms)[0m [1m[31mrollback transaction[0m
|
2116
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2117
|
+
-------------------------------------------------------
|
2118
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2119
|
+
-------------------------------------------------------
|
2120
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:40:30 -0300
|
2121
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2122
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2123
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2124
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (3.7ms)
|
2125
|
+
Completed 500 Internal Server Error in 9ms (ActiveRecord: 0.1ms)
|
2126
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2127
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2128
|
+
[1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
|
2129
|
+
----------------------------
|
2130
|
+
RailsSitemapTest: test_truth
|
2131
|
+
----------------------------
|
2132
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2133
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2134
|
+
--------------------------------------------------------
|
2135
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2136
|
+
--------------------------------------------------------
|
2137
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:45:18 -0300
|
2138
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2139
|
+
[1m[36mArticle Load (0.2ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2140
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2141
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (25.2ms)
|
2142
|
+
Completed 500 Internal Server Error in 43ms (ActiveRecord: 0.3ms)
|
2143
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2144
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2145
|
+
-------------------------------------------------------
|
2146
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2147
|
+
-------------------------------------------------------
|
2148
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:45:18 -0300
|
2149
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2150
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2151
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2152
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (27.7ms)
|
2153
|
+
Completed 500 Internal Server Error in 34ms (ActiveRecord: 0.1ms)
|
2154
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2155
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2156
|
+
-----------------------------------------------------------------
|
2157
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2158
|
+
-----------------------------------------------------------------
|
2159
|
+
[1m[36mArticle Load (0.2ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2160
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2161
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:45:18 UTC], ["updated_at", 2016-09-26 17:45:18 UTC]]
|
2162
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2163
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:45:18 -0300
|
2164
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2165
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2166
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2167
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (34.3ms)
|
2168
|
+
Completed 500 Internal Server Error in 41ms (ActiveRecord: 0.1ms)
|
2169
|
+
[1m[35m (2.2ms)[0m [1m[31mrollback transaction[0m
|
2170
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.5ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2171
|
+
[1m[35m (0.2ms)[0m [1m[36mbegin transaction[0m
|
2172
|
+
----------------------------
|
2173
|
+
RailsSitemapTest: test_truth
|
2174
|
+
----------------------------
|
2175
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2176
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2177
|
+
-----------------------------------------------------------------
|
2178
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2179
|
+
-----------------------------------------------------------------
|
2180
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2181
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2182
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:45:47 UTC], ["updated_at", 2016-09-26 17:45:47 UTC]]
|
2183
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2184
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:45:47 -0300
|
2185
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2186
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2187
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2188
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2189
|
+
Completed 200 OK in 11ms (Views: 7.0ms | ActiveRecord: 0.1ms)
|
2190
|
+
[1m[35m (1.7ms)[0m [1m[31mrollback transaction[0m
|
2191
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2192
|
+
--------------------------------------------------------
|
2193
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2194
|
+
--------------------------------------------------------
|
2195
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:45:47 -0300
|
2196
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2197
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2198
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2199
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2200
|
+
Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.1ms)
|
2201
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2202
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2203
|
+
-------------------------------------------------------
|
2204
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2205
|
+
-------------------------------------------------------
|
2206
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:45:47 -0300
|
2207
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2208
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2209
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2210
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2211
|
+
Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.1ms)
|
2212
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2213
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2214
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2215
|
+
--------------------------------------------------------
|
2216
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2217
|
+
--------------------------------------------------------
|
2218
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:46:56 -0300
|
2219
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2220
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2221
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2222
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.2ms)
|
2223
|
+
Completed 200 OK in 12ms (Views: 7.3ms | ActiveRecord: 0.2ms)
|
2224
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2225
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2226
|
+
-------------------------------------------------------
|
2227
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2228
|
+
-------------------------------------------------------
|
2229
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:46:56 -0300
|
2230
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2231
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2232
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2233
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2234
|
+
Completed 200 OK in 6ms (Views: 4.2ms | ActiveRecord: 0.1ms)
|
2235
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2236
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2237
|
+
-----------------------------------------------------------------
|
2238
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2239
|
+
-----------------------------------------------------------------
|
2240
|
+
[1m[36mArticle Load (0.2ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2241
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2242
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:46:56 UTC], ["updated_at", 2016-09-26 17:46:56 UTC]]
|
2243
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2244
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:46:56 -0300
|
2245
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2246
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2247
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2248
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.7ms)
|
2249
|
+
Completed 200 OK in 8ms (Views: 5.1ms | ActiveRecord: 0.1ms)
|
2250
|
+
[1m[35m (1.7ms)[0m [1m[31mrollback transaction[0m
|
2251
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2252
|
+
----------------------------
|
2253
|
+
RailsSitemapTest: test_truth
|
2254
|
+
----------------------------
|
2255
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2256
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2257
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2258
|
+
-------------------------------------------------------
|
2259
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2260
|
+
-------------------------------------------------------
|
2261
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:48:20 -0300
|
2262
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2263
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2264
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2265
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.0ms)
|
2266
|
+
Completed 200 OK in 11ms (Views: 6.7ms | ActiveRecord: 0.2ms)
|
2267
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2268
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2269
|
+
--------------------------------------------------------
|
2270
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2271
|
+
--------------------------------------------------------
|
2272
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:48:21 -0300
|
2273
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2274
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2275
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2276
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2277
|
+
Completed 200 OK in 11ms (Views: 8.4ms | ActiveRecord: 0.1ms)
|
2278
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2279
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2280
|
+
-----------------------------------------------------------------
|
2281
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2282
|
+
-----------------------------------------------------------------
|
2283
|
+
[1m[36mArticle Load (0.2ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2284
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2285
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:48:21 UTC], ["updated_at", 2016-09-26 17:48:21 UTC]]
|
2286
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2287
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:48:21 -0300
|
2288
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2289
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2290
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2291
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2292
|
+
Completed 200 OK in 8ms (Views: 4.4ms | ActiveRecord: 0.1ms)
|
2293
|
+
[1m[35m (1.9ms)[0m [1m[31mrollback transaction[0m
|
2294
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2295
|
+
----------------------------
|
2296
|
+
RailsSitemapTest: test_truth
|
2297
|
+
----------------------------
|
2298
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2299
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.3ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2300
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2301
|
+
----------------------------
|
2302
|
+
RailsSitemapTest: test_truth
|
2303
|
+
----------------------------
|
2304
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2305
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2306
|
+
-------------------------------------------------------
|
2307
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2308
|
+
-------------------------------------------------------
|
2309
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:48:35 -0300
|
2310
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2311
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2312
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2313
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2314
|
+
Completed 200 OK in 13ms (Views: 8.2ms | ActiveRecord: 0.3ms)
|
2315
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
2316
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2317
|
+
--------------------------------------------------------
|
2318
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2319
|
+
--------------------------------------------------------
|
2320
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:48:35 -0300
|
2321
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2322
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2323
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2324
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.7ms)
|
2325
|
+
Completed 200 OK in 10ms (Views: 7.9ms | ActiveRecord: 0.1ms)
|
2326
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2327
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2328
|
+
-----------------------------------------------------------------
|
2329
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2330
|
+
-----------------------------------------------------------------
|
2331
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2332
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2333
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:48:35 UTC], ["updated_at", 2016-09-26 17:48:35 UTC]]
|
2334
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2335
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:48:35 -0300
|
2336
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2337
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2338
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2339
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.7ms)
|
2340
|
+
Completed 200 OK in 11ms (Views: 5.1ms | ActiveRecord: 0.1ms)
|
2341
|
+
[1m[35m (1.9ms)[0m [1m[31mrollback transaction[0m
|
2342
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.2ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2343
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2344
|
+
----------------------------
|
2345
|
+
RailsSitemapTest: test_truth
|
2346
|
+
----------------------------
|
2347
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2348
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2349
|
+
-------------------------------------------------------
|
2350
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2351
|
+
-------------------------------------------------------
|
2352
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:50:04 -0300
|
2353
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2354
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2355
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2356
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2357
|
+
Completed 200 OK in 12ms (Views: 7.0ms | ActiveRecord: 0.3ms)
|
2358
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
2359
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2360
|
+
--------------------------------------------------------
|
2361
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2362
|
+
--------------------------------------------------------
|
2363
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:50:04 -0300
|
2364
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2365
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2366
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2367
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.6ms)
|
2368
|
+
Completed 200 OK in 8ms (Views: 5.3ms | ActiveRecord: 0.1ms)
|
2369
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2370
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2371
|
+
-----------------------------------------------------------------
|
2372
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2373
|
+
-----------------------------------------------------------------
|
2374
|
+
[1m[36mArticle Load (0.3ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2375
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2376
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:50:04 UTC], ["updated_at", 2016-09-26 17:50:04 UTC]]
|
2377
|
+
[1m[35m (0.1ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2378
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:50:04 -0300
|
2379
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2380
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2381
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2382
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.6ms)
|
2383
|
+
Completed 200 OK in 8ms (Views: 4.5ms | ActiveRecord: 0.1ms)
|
2384
|
+
[1m[35m (1.6ms)[0m [1m[31mrollback transaction[0m
|
2385
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2386
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2387
|
+
----------------------------
|
2388
|
+
RailsSitemapTest: test_truth
|
2389
|
+
----------------------------
|
2390
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2391
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2392
|
+
-------------------------------------------------------
|
2393
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2394
|
+
-------------------------------------------------------
|
2395
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:50:34 -0300
|
2396
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2397
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2398
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2399
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2400
|
+
Completed 200 OK in 12ms (Views: 7.5ms | ActiveRecord: 0.2ms)
|
2401
|
+
[1m[35m (0.2ms)[0m [1m[31mrollback transaction[0m
|
2402
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2403
|
+
--------------------------------------------------------
|
2404
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2405
|
+
--------------------------------------------------------
|
2406
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:50:34 -0300
|
2407
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2408
|
+
[1m[36mArticle Load (0.2ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2409
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2410
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.7ms)
|
2411
|
+
Completed 200 OK in 12ms (Views: 9.3ms | ActiveRecord: 0.2ms)
|
2412
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2413
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2414
|
+
-----------------------------------------------------------------
|
2415
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2416
|
+
-----------------------------------------------------------------
|
2417
|
+
[1m[36mArticle Load (0.3ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2418
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2419
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:50:34 UTC], ["updated_at", 2016-09-26 17:50:34 UTC]]
|
2420
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2421
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:50:34 -0300
|
2422
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2423
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2424
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2425
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.6ms)
|
2426
|
+
Completed 200 OK in 8ms (Views: 4.9ms | ActiveRecord: 0.1ms)
|
2427
|
+
[1m[35m (1.8ms)[0m [1m[31mrollback transaction[0m
|
2428
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2429
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2430
|
+
--------------------------------------------------------
|
2431
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2432
|
+
--------------------------------------------------------
|
2433
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:51:08 -0300
|
2434
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2435
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2436
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2437
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.4ms)
|
2438
|
+
Completed 200 OK in 20ms (Views: 8.8ms | ActiveRecord: 0.2ms)
|
2439
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2440
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2441
|
+
-----------------------------------------------------------------
|
2442
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2443
|
+
-----------------------------------------------------------------
|
2444
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2445
|
+
[1m[35m (0.1ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2446
|
+
[1m[35mSQL (0.3ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:51:08 UTC], ["updated_at", 2016-09-26 17:51:08 UTC]]
|
2447
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2448
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:51:08 -0300
|
2449
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2450
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2451
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2452
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2453
|
+
Completed 200 OK in 7ms (Views: 4.5ms | ActiveRecord: 0.1ms)
|
2454
|
+
[1m[35m (1.6ms)[0m [1m[31mrollback transaction[0m
|
2455
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2456
|
+
-------------------------------------------------------
|
2457
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2458
|
+
-------------------------------------------------------
|
2459
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:51:08 -0300
|
2460
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2461
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2462
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2463
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.2ms)
|
2464
|
+
Completed 200 OK in 10ms (Views: 7.5ms | ActiveRecord: 0.1ms)
|
2465
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2466
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2467
|
+
----------------------------
|
2468
|
+
RailsSitemapTest: test_truth
|
2469
|
+
----------------------------
|
2470
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2471
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2472
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2473
|
+
----------------------------
|
2474
|
+
RailsSitemapTest: test_truth
|
2475
|
+
----------------------------
|
2476
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2477
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2478
|
+
--------------------------------------------------------
|
2479
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2480
|
+
--------------------------------------------------------
|
2481
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:52:32 -0300
|
2482
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2483
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2484
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2485
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2486
|
+
Completed 200 OK in 18ms (Views: 6.7ms | ActiveRecord: 0.3ms)
|
2487
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2488
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2489
|
+
-----------------------------------------------------------------
|
2490
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2491
|
+
-----------------------------------------------------------------
|
2492
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2493
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2494
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:52:32 UTC], ["updated_at", 2016-09-26 17:52:32 UTC]]
|
2495
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2496
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:52:32 -0300
|
2497
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2498
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2499
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2500
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.7ms)
|
2501
|
+
Completed 200 OK in 8ms (Views: 5.0ms | ActiveRecord: 0.1ms)
|
2502
|
+
[1m[35m (1.7ms)[0m [1m[31mrollback transaction[0m
|
2503
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2504
|
+
-------------------------------------------------------
|
2505
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2506
|
+
-------------------------------------------------------
|
2507
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:52:32 -0300
|
2508
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2509
|
+
[1m[36mArticle Load (0.2ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2510
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2511
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.6ms)
|
2512
|
+
Completed 200 OK in 8ms (Views: 5.2ms | ActiveRecord: 0.2ms)
|
2513
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2514
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2515
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2516
|
+
-----------------------------------------------------------------
|
2517
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2518
|
+
-----------------------------------------------------------------
|
2519
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2520
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2521
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:54:55 UTC], ["updated_at", 2016-09-26 17:54:55 UTC]]
|
2522
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2523
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:54:55 -0300
|
2524
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2525
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2526
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2527
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2528
|
+
Completed 200 OK in 10ms (Views: 7.0ms | ActiveRecord: 0.1ms)
|
2529
|
+
[1m[35m (1.7ms)[0m [1m[31mrollback transaction[0m
|
2530
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2531
|
+
-------------------------------------------------------
|
2532
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2533
|
+
-------------------------------------------------------
|
2534
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:54:55 -0300
|
2535
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2536
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2537
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2538
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.8ms)
|
2539
|
+
Completed 200 OK in 8ms (Views: 5.6ms | ActiveRecord: 0.1ms)
|
2540
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2541
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2542
|
+
--------------------------------------------------------
|
2543
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2544
|
+
--------------------------------------------------------
|
2545
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:54:55 -0300
|
2546
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2547
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2548
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2549
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2550
|
+
Completed 200 OK in 7ms (Views: 4.9ms | ActiveRecord: 0.1ms)
|
2551
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2552
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2553
|
+
----------------------------
|
2554
|
+
RailsSitemapTest: test_truth
|
2555
|
+
----------------------------
|
2556
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2557
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2558
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2559
|
+
----------------------------
|
2560
|
+
RailsSitemapTest: test_truth
|
2561
|
+
----------------------------
|
2562
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2563
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2564
|
+
--------------------------------------------------------
|
2565
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2566
|
+
--------------------------------------------------------
|
2567
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:56:28 -0300
|
2568
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2569
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2570
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2571
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2572
|
+
Completed 200 OK in 12ms (Views: 7.3ms | ActiveRecord: 0.3ms)
|
2573
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2574
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2575
|
+
-------------------------------------------------------
|
2576
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2577
|
+
-------------------------------------------------------
|
2578
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:56:28 -0300
|
2579
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2580
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2581
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2582
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2583
|
+
Completed 200 OK in 6ms (Views: 4.4ms | ActiveRecord: 0.1ms)
|
2584
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2585
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2586
|
+
-----------------------------------------------------------------
|
2587
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2588
|
+
-----------------------------------------------------------------
|
2589
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2590
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2591
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:56:28 UTC], ["updated_at", 2016-09-26 17:56:28 UTC]]
|
2592
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2593
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:56:28 -0300
|
2594
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2595
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2596
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2597
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2598
|
+
Completed 200 OK in 7ms (Views: 4.2ms | ActiveRecord: 0.1ms)
|
2599
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" ORDER BY "articles"."id" DESC LIMIT ?[0m [["LIMIT", 1]]
|
2600
|
+
[1m[35m (2.1ms)[0m [1m[31mrollback transaction[0m
|
2601
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1m[34mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
2602
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2603
|
+
--------------------------------------------------------
|
2604
|
+
SitemapControllerTest: test_should_return_a_success_code
|
2605
|
+
--------------------------------------------------------
|
2606
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:56:33 -0300
|
2607
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2608
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2609
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2610
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (1.1ms)
|
2611
|
+
Completed 200 OK in 11ms (Views: 7.0ms | ActiveRecord: 0.2ms)
|
2612
|
+
[1m[35m (0.1ms)[0m [1m[31mrollback transaction[0m
|
2613
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2614
|
+
-----------------------------------------------------------------
|
2615
|
+
SitemapControllerTest: test_should_return_the_articles_on_sitemap
|
2616
|
+
-----------------------------------------------------------------
|
2617
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" WHERE "articles"."name" = ? LIMIT ?[0m [["name", "My first article"], ["LIMIT", 1]]
|
2618
|
+
[1m[35m (0.0ms)[0m [1m[35mSAVEPOINT active_record_1[0m
|
2619
|
+
[1m[35mSQL (0.2ms)[0m [1m[32mINSERT INTO "articles" ("name", "created_at", "updated_at") VALUES (?, ?, ?)[0m [["name", "My first article"], ["created_at", 2016-09-26 17:56:33 UTC], ["updated_at", 2016-09-26 17:56:33 UTC]]
|
2620
|
+
[1m[35m (0.0ms)[0m [1m[35mRELEASE SAVEPOINT active_record_1[0m
|
2621
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:56:33 -0300
|
2622
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2623
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2624
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2625
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.5ms)
|
2626
|
+
Completed 200 OK in 7ms (Views: 4.3ms | ActiveRecord: 0.1ms)
|
2627
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles" ORDER BY "articles"."id" DESC LIMIT ?[0m [["LIMIT", 1]]
|
2628
|
+
[1m[35m (2.0ms)[0m [1m[31mrollback transaction[0m
|
2629
|
+
[1m[35m (0.1ms)[0m [1m[36mbegin transaction[0m
|
2630
|
+
-------------------------------------------------------
|
2631
|
+
SitemapControllerTest: test_should_return_the_right_xml
|
2632
|
+
-------------------------------------------------------
|
2633
|
+
Started GET "/sitemap.xml" for 127.0.0.1 at 2016-09-26 14:56:33 -0300
|
2634
|
+
Processing by RailsSitemap::SitemapController#index as XML
|
2635
|
+
[1m[36mArticle Load (0.1ms)[0m [1m[34mSELECT "articles".* FROM "articles"[0m
|
2636
|
+
Rendering /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb
|
2637
|
+
Rendered /Users/pgonzaga/repositories/rails_sitemap/app/views/rails_sitemap/sitemap/index.xml.erb (0.4ms)
|
2638
|
+
Completed 200 OK in 6ms (Views: 4.1ms | ActiveRecord: 0.1ms)
|
2639
|
+
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
2640
|
+
[1m[35m (0.0ms)[0m [1m[36mbegin transaction[0m
|
2641
|
+
----------------------------
|
2642
|
+
RailsSitemapTest: test_truth
|
2082
2643
|
----------------------------
|
2083
2644
|
[1m[35m (0.0ms)[0m [1m[31mrollback transaction[0m
|
@@ -14,6 +14,6 @@ class SitemapControllerTest < ActionDispatch::IntegrationTest
|
|
14
14
|
test 'should return the articles on sitemap' do
|
15
15
|
Article.find_or_create_by(name: 'My first article')
|
16
16
|
get '/sitemap.xml'
|
17
|
-
assert_equal response.body, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:geo=\"http://www.google.com/geo/schemas/sitemap/1.0\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\" xmlns:mobile=\"http://www.google.com/schemas/sitemap-mobile/1.0\" xmlns:news=\"http://www.google.com/schemas/sitemap-news/0.9\" xmlns:pagemap=\"http://www.google.com/schemas/sitemap-pagemap/1.0\" xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">\n <url>\n <loc>http://www.example.com</loc>\n <lastmod>2016-09-22T18:11:05-03:00</lastmod>\n <changefreq>always</changefreq>\n <priority>1.0</priority>\n </url>\n\n <url>\n <loc>http://www.example.com/articles</loc>\n <lastmod>2016-09-22T18:11:05-03:00</lastmod>\n <changefreq>weekly</changefreq>\n <priority>0.5</priority>\n </url>\n <url>\n <loc>http://www.example.com/articles/1</loc>\n <lastmod>
|
17
|
+
assert_equal response.body, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:geo=\"http://www.google.com/geo/schemas/sitemap/1.0\" xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\" xmlns:mobile=\"http://www.google.com/schemas/sitemap-mobile/1.0\" xmlns:news=\"http://www.google.com/schemas/sitemap-news/0.9\" xmlns:pagemap=\"http://www.google.com/schemas/sitemap-pagemap/1.0\" xmlns:video=\"http://www.google.com/schemas/sitemap-video/1.1\" xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">\n <url>\n <loc>http://www.example.com</loc>\n <lastmod>2016-09-22T18:11:05-03:00</lastmod>\n <changefreq>always</changefreq>\n <priority>1.0</priority>\n </url>\n\n <url>\n <loc>http://www.example.com/articles</loc>\n <lastmod>2016-09-22T18:11:05-03:00</lastmod>\n <changefreq>weekly</changefreq>\n <priority>0.5</priority>\n </url>\n <url>\n <loc>http://www.example.com/articles/1</loc>\n <lastmod>" + Article.last.updated_at.to_datetime.to_s + "</lastmod>\n <changefreq>weekly</changefreq>\n <priority>0.5</priority>\n </url>\n</urlset>\n"
|
18
18
|
end
|
19
19
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_sitemap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Gonzaga
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- app/controllers/rails_sitemap/application_controller.rb
|
53
53
|
- app/controllers/rails_sitemap/sitemap_controller.rb
|
54
54
|
- app/helpers/rails_sitemap/application_helper.rb
|
55
|
+
- app/models/rails_sitemap/sitemap_entry.rb
|
55
56
|
- app/views/layouts/rails_sitemap/application.html.erb
|
56
57
|
- app/views/rails_sitemap/sitemap/index.xml.erb
|
57
58
|
- config/routes.rb
|