remote_partial 0.1.0 → 0.1.1

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/README.rdoc CHANGED
@@ -80,9 +80,4 @@ Remote partials are held in:
80
80
 
81
81
  Rails.root + '/app/veiws/remote_partials'
82
82
 
83
- To use an alternative location add this to an initializer (before the first
84
- define statement):
85
-
86
- RemotePartial.partial_location = /path/to/folder
87
-
88
83
  This project wobbles and uses MIT-LICENSE.
@@ -4,12 +4,7 @@ module RemotePartial
4
4
  module HostAppHelper
5
5
 
6
6
  def render_remote_partial(name)
7
- partial = RemotePartial::Partial.find_by_name(name)
8
- if partial
9
- render template: partial.output_file_name
10
- else
11
- render partial: "remote_partials/#{name}"
12
- end
7
+ render partial: "remote_partials/#{name}"
13
8
  end
14
9
 
15
10
  end
@@ -1,5 +1,5 @@
1
1
  module RemotePartial
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
4
4
 
5
5
  # History
@@ -13,3 +13,7 @@ end
13
13
  # ------------------------
14
14
  # Updated following tests using a separate host app
15
15
  #
16
+ # 0.1.1 Remove option to alter remote_partials destination folder
17
+ # ---------------------------------------------------------------
18
+ # The functionality was not working and just added extra complication
19
+ #
@@ -14,17 +14,7 @@ module RemotePartial
14
14
  end
15
15
 
16
16
  def self.partial_location
17
- path = @partial_location || File.expand_path('app/views/remote_partials', Rails.root)
18
- path.gsub(tailing_slash_pattern, "")
19
- end
20
-
21
- def self.partial_location=(path)
22
- @partial_location = path
23
- end
24
-
25
- private
26
- def self.tailing_slash_pattern
27
- /\/$/
17
+ File.expand_path('app/views/remote_partials', Rails.root)
28
18
  end
29
19
 
30
20
  end
@@ -1 +1 @@
1
- <strong id="ct" class="big">Friday, July 5, 2013 at 2:00:37 PM</strong>
1
+ <strong id="ct" class="big">Friday, July 5, 2013 at 2:36:18 PM</strong>
Binary file
@@ -6220,3 +6220,359 @@ Unable to retrieve remote partial at http://www.warwickshire.gov.uk: #<Net::HTTP
6220
6220
   (0.0ms) rollback transaction
6221
6221
   (0.0ms) begin transaction
6222
6222
   (0.0ms) rollback transaction
6223
+ Connecting to database specified by database.yml
6224
+ RemotePartial::Partial Load (0.3ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'clock' LIMIT 1
6225
+  (0.1ms) begin transaction
6226
+ SQL (25.5ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:35:14 UTC +00:00], ["criteria", "#ct"], ["name", "clock"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:35:14 UTC +00:00], ["url", "http://www.timeanddate.com/worldclock/city.html?n=136"]]
6227
+  (203.6ms) commit transaction
6228
+ RemotePartial::Partial Load (1.0ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'ruby' LIMIT 1
6229
+  (0.1ms) begin transaction
6230
+ SQL (0.6ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:35:14 UTC +00:00], ["criteria", "#intro"], ["name", "ruby"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:35:14 UTC +00:00], ["url", "http://www.ruby-lang.org/en/"]]
6231
+  (150.9ms) commit transaction
6232
+  (0.3ms) begin transaction
6233
+ Fixture Delete (4.4ms) DELETE FROM "remote_partial_partials"
6234
+ Fixture Insert (0.6ms) INSERT INTO "remote_partial_partials" ("id", "name", "url", "criteria", "repeat_period", "created_at", "updated_at") VALUES (1, 'simple', 'http://www.warwickshire.gov.uk', 'p:first-child', 600, '2013-07-05 13:35:18', '2013-07-05 13:35:18')
6235
+  (176.0ms) commit transaction
6236
+  (0.2ms) begin transaction
6237
+ Processing by DemosController#index as HTML
6238
+ Rendered demos/index.html.erb within layouts/application (3.8ms)
6239
+ Completed 200 OK in 52ms (Views: 51.7ms | ActiveRecord: 0.0ms)
6240
+  (0.1ms) rollback transaction
6241
+  (0.1ms) begin transaction
6242
+ Processing by DemosController#show as HTML
6243
+ Parameters: {"id"=>"fixed"}
6244
+ Rendered remote_partials/_fixed.html.erb (0.3ms)
6245
+ Rendered demos/_fixed.html.erb (1.9ms)
6246
+ Completed 200 OK in 12ms (Views: 11.5ms | ActiveRecord: 0.0ms)
6247
+  (0.1ms) rollback transaction
6248
+  (0.1ms) begin transaction
6249
+  (0.1ms) rollback transaction
6250
+  (0.1ms) begin transaction
6251
+ RemotePartial::Partial Load (0.3ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6252
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6253
+ RemotePartial::Partial Load (0.4ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6254
+  (0.1ms) SAVEPOINT active_record_1
6255
+ SQL (3.1ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:35:18 UTC +00:00], ["criteria", nil], ["name", "foo"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:35:18 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6256
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6257
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6258
+ RemotePartial::Partial Load (1.3ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6259
+  (0.5ms) rollback transaction
6260
+  (0.1ms) begin transaction
6261
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6262
+  (0.1ms) SAVEPOINT active_record_1
6263
+  (2.8ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:45:18.795577', "updated_at" = '2013-07-05 13:35:18.796616' WHERE "remote_partial_partials"."id" = 1
6264
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6265
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6266
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6267
+  (0.0ms) SAVEPOINT active_record_1
6268
+  (0.3ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:35:18.807588' WHERE "remote_partial_partials"."id" = 1
6269
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6270
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6271
+  (1.0ms) rollback transaction
6272
+  (0.0ms) begin transaction
6273
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6274
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6275
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6276
+  (0.0ms) SAVEPOINT active_record_1
6277
+  (3.1ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:35:18.819115' WHERE "remote_partial_partials"."id" = 1
6278
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6279
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6280
+  (3.4ms) rollback transaction
6281
+  (0.1ms) begin transaction
6282
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6283
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6284
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6285
+  (0.1ms) SAVEPOINT active_record_1
6286
+  (2.4ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:35:18.838868' WHERE "remote_partial_partials"."id" = 1
6287
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6288
+ Unable to retrieve remote partial at http://www.warwickshire.gov.uk: #<Net::HTTPBadRequest 400 readbody=true>
6289
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6290
+  (0.5ms) rollback transaction
6291
+  (0.0ms) begin transaction
6292
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6293
+  (0.2ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6294
+ RemotePartial::Partial Load (0.3ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6295
+  (3.3ms) SAVEPOINT active_record_1
6296
+ SQL (0.4ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:35:18 UTC +00:00], ["criteria", nil], ["name", "foo"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:35:18 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6297
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6298
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6299
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6300
+  (0.2ms) rollback transaction
6301
+  (0.1ms) begin transaction
6302
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6303
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6304
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6305
+  (0.0ms) SAVEPOINT active_record_1
6306
+ SQL (0.4ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:35:18 UTC +00:00], ["criteria", nil], ["name", "foo"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:35:18 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6307
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6308
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6309
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6310
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6311
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6312
+  (0.1ms) SAVEPOINT active_record_1
6313
+  (0.1ms) UPDATE "remote_partial_partials" SET "url" = 'other', "updated_at" = '2013-07-05 13:35:18.890350' WHERE "remote_partial_partials"."id" = 221
6314
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6315
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6316
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6317
+  (0.3ms) rollback transaction
6318
+  (0.1ms) begin transaction
6319
+ RemotePartial::Partial Load (0.3ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6320
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6321
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6322
+  (0.0ms) SAVEPOINT active_record_1
6323
+  (0.2ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:35:18.915239' WHERE "remote_partial_partials"."id" = 1
6324
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6325
+ Unable to retrieve remote partial at http://www.warwickshire.gov.uk: #<Net::HTTPBadRequest 400 readbody=true>
6326
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6327
+ RemotePartial::Partial Load (9.9ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6328
+  (0.3ms) rollback transaction
6329
+  (0.1ms) begin transaction
6330
+  (0.2ms) rollback transaction
6331
+  (0.1ms) begin transaction
6332
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6333
+  (0.1ms) rollback transaction
6334
+  (0.1ms) begin transaction
6335
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6336
+  (0.1ms) SAVEPOINT active_record_1
6337
+  (0.3ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:45:18.954239', "updated_at" = '2013-07-05 13:35:18.954905' WHERE "remote_partial_partials"."id" = 1
6338
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6339
+  (0.1ms) rollback transaction
6340
+  (0.1ms) begin transaction
6341
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6342
+  (0.1ms) SAVEPOINT active_record_1
6343
+  (0.2ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:45:18.969939', "updated_at" = '2013-07-05 13:35:18.970648' WHERE "remote_partial_partials"."id" = 1
6344
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6345
+  (0.1ms) rollback transaction
6346
+  (0.1ms) begin transaction
6347
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6348
+  (0.1ms) rollback transaction
6349
+  (0.1ms) begin transaction
6350
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6351
+  (0.1ms) SAVEPOINT active_record_1
6352
+  (1.0ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:45:18.994666', "updated_at" = '2013-07-05 13:35:18.995330' WHERE "remote_partial_partials"."id" = 1
6353
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6354
+  (0.3ms) rollback transaction
6355
+  (0.0ms) begin transaction
6356
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6357
+  (0.1ms) SAVEPOINT active_record_1
6358
+  (1.0ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:45:19.008252', "updated_at" = '2013-07-05 13:35:19.009214' WHERE "remote_partial_partials"."id" = 1
6359
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6360
+  (1.6ms) rollback transaction
6361
+  (0.0ms) begin transaction
6362
+ RemotePartial::Partial Load (1.6ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6363
+  (0.1ms) rollback transaction
6364
+  (0.0ms) begin transaction
6365
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6366
+  (0.1ms) SAVEPOINT active_record_1
6367
+  (1.0ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:45:19.031374', "updated_at" = '2013-07-05 13:35:19.032226' WHERE "remote_partial_partials"."id" = 1
6368
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6369
+  (0.6ms) rollback transaction
6370
+  (0.1ms) begin transaction
6371
+  (0.1ms) rollback transaction
6372
+  (0.0ms) begin transaction
6373
+  (0.1ms) rollback transaction
6374
+  (0.1ms) begin transaction
6375
+  (0.1ms) rollback transaction
6376
+  (0.1ms) begin transaction
6377
+  (0.1ms) rollback transaction
6378
+  (0.1ms) begin transaction
6379
+  (0.1ms) rollback transaction
6380
+  (0.1ms) begin transaction
6381
+  (0.1ms) rollback transaction
6382
+  (0.2ms) begin transaction
6383
+  (0.1ms) rollback transaction
6384
+  (0.1ms) begin transaction
6385
+  (0.1ms) rollback transaction
6386
+  (0.0ms) begin transaction
6387
+  (0.1ms) rollback transaction
6388
+  (0.1ms) begin transaction
6389
+  (0.2ms) SELECT COUNT(*) FROM "remote_partial_partials"
6390
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'wcc' LIMIT 1
6391
+  (0.1ms) SAVEPOINT active_record_1
6392
+ SQL (0.4ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:35:19 UTC +00:00], ["criteria", nil], ["name", "wcc"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:35:19 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6393
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6394
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6395
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6396
+  (0.5ms) rollback transaction
6397
+  (0.0ms) begin transaction
6398
+  (0.0ms) rollback transaction
6399
+  (0.0ms) begin transaction
6400
+  (0.0ms) rollback transaction
6401
+  (0.0ms) begin transaction
6402
+  (0.0ms) rollback transaction
6403
+ Connecting to database specified by database.yml
6404
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'clock' LIMIT 1
6405
+  (0.1ms) begin transaction
6406
+ SQL (26.7ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:36:18 UTC +00:00], ["criteria", "#ct"], ["name", "clock"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:36:18 UTC +00:00], ["url", "http://www.timeanddate.com/worldclock/city.html?n=136"]]
6407
+  (147.2ms) commit transaction
6408
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'ruby' LIMIT 1
6409
+  (0.1ms) begin transaction
6410
+ SQL (2.0ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:36:19 UTC +00:00], ["criteria", "#intro"], ["name", "ruby"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:36:19 UTC +00:00], ["url", "http://www.ruby-lang.org/en/"]]
6411
+  (158.1ms) commit transaction
6412
+  (0.2ms) begin transaction
6413
+ Fixture Delete (1.1ms) DELETE FROM "remote_partial_partials"
6414
+ Fixture Insert (0.6ms) INSERT INTO "remote_partial_partials" ("id", "name", "url", "criteria", "repeat_period", "created_at", "updated_at") VALUES (1, 'simple', 'http://www.warwickshire.gov.uk', 'p:first-child', 600, '2013-07-05 13:36:20', '2013-07-05 13:36:20')
6415
+  (145.4ms) commit transaction
6416
+  (0.2ms) begin transaction
6417
+ Processing by DemosController#index as HTML
6418
+ Rendered demos/index.html.erb within layouts/application (3.5ms)
6419
+ Completed 200 OK in 48ms (Views: 46.8ms | ActiveRecord: 0.0ms)
6420
+  (0.1ms) rollback transaction
6421
+  (0.1ms) begin transaction
6422
+ Processing by DemosController#show as HTML
6423
+ Parameters: {"id"=>"fixed"}
6424
+ Rendered remote_partials/_fixed.html.erb (0.4ms)
6425
+ Rendered demos/_fixed.html.erb (2.0ms)
6426
+ Completed 200 OK in 10ms (Views: 9.9ms | ActiveRecord: 0.0ms)
6427
+  (0.1ms) rollback transaction
6428
+  (0.1ms) begin transaction
6429
+  (0.0ms) rollback transaction
6430
+  (0.1ms) begin transaction
6431
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6432
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6433
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6434
+  (0.1ms) SAVEPOINT active_record_1
6435
+ SQL (1.8ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["criteria", nil], ["name", "foo"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6436
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6437
+  (0.2ms) SELECT COUNT(*) FROM "remote_partial_partials"
6438
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6439
+  (0.4ms) rollback transaction
6440
+  (0.1ms) begin transaction
6441
+ RemotePartial::Partial Load (0.7ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6442
+  (5.7ms) SAVEPOINT active_record_1
6443
+  (0.2ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:46:21.048846', "updated_at" = '2013-07-05 13:36:21.055328' WHERE "remote_partial_partials"."id" = 1
6444
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6445
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6446
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6447
+  (0.0ms) SAVEPOINT active_record_1
6448
+  (0.4ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:36:21.059089' WHERE "remote_partial_partials"."id" = 1
6449
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6450
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6451
+  (0.3ms) rollback transaction
6452
+  (0.1ms) begin transaction
6453
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6454
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6455
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6456
+  (0.1ms) SAVEPOINT active_record_1
6457
+  (0.2ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:36:21.084181' WHERE "remote_partial_partials"."id" = 1
6458
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6459
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6460
+  (0.2ms) rollback transaction
6461
+  (0.1ms) begin transaction
6462
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6463
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6464
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6465
+  (0.1ms) SAVEPOINT active_record_1
6466
+  (0.7ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:36:21.106569' WHERE "remote_partial_partials"."id" = 1
6467
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6468
+ Unable to retrieve remote partial at http://www.warwickshire.gov.uk: #<Net::HTTPBadRequest 400 readbody=true>
6469
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6470
+  (0.2ms) rollback transaction
6471
+  (0.1ms) begin transaction
6472
+ RemotePartial::Partial Load (0.4ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6473
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6474
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6475
+  (0.1ms) SAVEPOINT active_record_1
6476
+ SQL (6.4ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["criteria", nil], ["name", "foo"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6477
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6478
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6479
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6480
+  (0.2ms) rollback transaction
6481
+  (0.1ms) begin transaction
6482
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6483
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6484
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6485
+  (0.1ms) SAVEPOINT active_record_1
6486
+ SQL (0.4ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["criteria", nil], ["name", "foo"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6487
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6488
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6489
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6490
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6491
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'foo' LIMIT 1
6492
+  (10.5ms) SAVEPOINT active_record_1
6493
+  (0.3ms) UPDATE "remote_partial_partials" SET "url" = 'other', "updated_at" = '2013-07-05 13:36:21.178269' WHERE "remote_partial_partials"."id" = 223
6494
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6495
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6496
+ RemotePartial::Partial Load (2.7ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6497
+  (0.3ms) rollback transaction
6498
+  (0.1ms) begin transaction
6499
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6500
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials"
6501
+ RemotePartial::Partial Load (5.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'simple' LIMIT 1
6502
+  (0.1ms) SAVEPOINT active_record_1
6503
+  (0.2ms) UPDATE "remote_partial_partials" SET "criteria" = NULL, "repeat_period" = 43200.0, "updated_at" = '2013-07-05 13:36:21.204009' WHERE "remote_partial_partials"."id" = 1
6504
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6505
+ Unable to retrieve remote partial at http://www.warwickshire.gov.uk: #<Net::HTTPBadRequest 400 readbody=true>
6506
+  (0.1ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6507
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6508
+  (0.2ms) rollback transaction
6509
+  (0.1ms) begin transaction
6510
+  (0.1ms) rollback transaction
6511
+  (0.1ms) begin transaction
6512
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6513
+  (0.1ms) rollback transaction
6514
+  (0.0ms) begin transaction
6515
+ RemotePartial::Partial Load (0.7ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6516
+  (0.1ms) SAVEPOINT active_record_1
6517
+  (0.9ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:46:21.249295', "updated_at" = '2013-07-05 13:36:21.250115' WHERE "remote_partial_partials"."id" = 1
6518
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6519
+  (0.5ms) rollback transaction
6520
+  (0.1ms) begin transaction
6521
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6522
+  (0.1ms) SAVEPOINT active_record_1
6523
+  (2.3ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:46:21.261753', "updated_at" = '2013-07-05 13:36:21.262402' WHERE "remote_partial_partials"."id" = 1
6524
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6525
+  (0.4ms) rollback transaction
6526
+  (0.1ms) begin transaction
6527
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6528
+  (0.1ms) rollback transaction
6529
+  (0.0ms) begin transaction
6530
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6531
+  (0.1ms) SAVEPOINT active_record_1
6532
+  (1.8ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:46:21.284214', "updated_at" = '2013-07-05 13:36:21.285130' WHERE "remote_partial_partials"."id" = 1
6533
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6534
+  (0.4ms) rollback transaction
6535
+  (0.0ms) begin transaction
6536
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6537
+  (0.1ms) SAVEPOINT active_record_1
6538
+  (2.9ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:46:21.300090', "updated_at" = '2013-07-05 13:36:21.300973' WHERE "remote_partial_partials"."id" = 1
6539
+  (0.1ms) RELEASE SAVEPOINT active_record_1
6540
+  (0.6ms) rollback transaction
6541
+  (0.0ms) begin transaction
6542
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6543
+  (0.1ms) rollback transaction
6544
+  (0.0ms) begin transaction
6545
+ RemotePartial::Partial Load (0.2ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."id" = ? LIMIT 1 [["id", 1]]
6546
+  (0.1ms) SAVEPOINT active_record_1
6547
+  (0.9ms) UPDATE "remote_partial_partials" SET "stale_at" = '2013-07-05 13:46:21.320036', "updated_at" = '2013-07-05 13:36:21.321483' WHERE "remote_partial_partials"."id" = 1
6548
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6549
+  (0.4ms) rollback transaction
6550
+  (0.1ms) begin transaction
6551
+  (0.1ms) rollback transaction
6552
+  (0.3ms) begin transaction
6553
+  (0.1ms) rollback transaction
6554
+  (0.0ms) begin transaction
6555
+  (1.1ms) rollback transaction
6556
+  (0.1ms) begin transaction
6557
+  (0.1ms) rollback transaction
6558
+  (0.0ms) begin transaction
6559
+  (0.1ms) rollback transaction
6560
+  (0.1ms) begin transaction
6561
+  (1.0ms) rollback transaction
6562
+  (0.0ms) begin transaction
6563
+  (0.1ms) rollback transaction
6564
+  (0.0ms) begin transaction
6565
+  (0.1ms) rollback transaction
6566
+  (0.0ms) begin transaction
6567
+  (0.1ms) rollback transaction
6568
+  (0.1ms) begin transaction
6569
+  (0.2ms) SELECT COUNT(*) FROM "remote_partial_partials"
6570
+ RemotePartial::Partial Load (1.4ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" WHERE "remote_partial_partials"."name" = 'wcc' LIMIT 1
6571
+  (0.1ms) SAVEPOINT active_record_1
6572
+ SQL (1.6ms) INSERT INTO "remote_partial_partials" ("created_at", "criteria", "name", "repeat_period", "stale_at", "updated_at", "url") VALUES (?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["criteria", nil], ["name", "wcc"], ["repeat_period", 43200.0], ["stale_at", nil], ["updated_at", Fri, 05 Jul 2013 13:36:21 UTC +00:00], ["url", "http://www.warwickshire.gov.uk"]]
6573
+  (0.0ms) RELEASE SAVEPOINT active_record_1
6574
+  (0.2ms) SELECT COUNT(*) FROM "remote_partial_partials" 
6575
+ RemotePartial::Partial Load (0.1ms) SELECT "remote_partial_partials".* FROM "remote_partial_partials" ORDER BY "remote_partial_partials"."id" DESC LIMIT 1
6576
+  (0.5ms) rollback transaction
6577
+  (0.0ms) begin transaction
6578
+  (0.1ms) rollback transaction
@@ -11,16 +11,4 @@ class RemotePartialTest < ActiveSupport::TestCase
11
11
  assert_equal('wcc', RemotePartial::Partial.last.name)
12
12
  end
13
13
 
14
- def test_partial_location
15
- expected = File.expand_path('../../dummy/app/views/remote_partials', __FILE__)
16
- assert_equal expected, RemotePartial.partial_location
17
- end
18
-
19
- def test_set_partial_location
20
- location = '/tmp'
21
- RemotePartial.partial_location = location
22
- assert_equal location, RemotePartial.partial_location
23
- RemotePartial.partial_location = nil
24
- test_partial_location
25
- end
26
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_partial
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: