kilt-cms 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +8 -8
  3. data/Rakefile +1 -0
  4. data/app/assets/images/kilt/logo.png +0 -0
  5. data/app/assets/images/kilt/tartan.png +0 -0
  6. data/app/assets/stylesheets/kilt/screen.css +1962 -4
  7. data/app/controllers/kilt/kilt_controller.rb +14 -6
  8. data/app/views/kilt/kilt/_field_setup.html.erb +6 -0
  9. data/app/views/kilt/kilt/_form.html.erb +9 -5
  10. data/app/views/kilt/kilt/index.html.erb +0 -2
  11. data/app/views/kilt/kilt/list.html.erb +3 -3
  12. data/app/views/layouts/kilt/cms.html.erb +12 -1
  13. data/app/views/layouts/kilt/cms/_default_creds_warning.html.erb +4 -0
  14. data/app/views/layouts/kilt/cms/_menu.html.erb +1 -7
  15. data/lib/generators/kilt/backend_generator.rb +0 -1
  16. data/lib/generators/kilt/templates/backend/creds.yml.example +6 -2
  17. data/lib/kilt.rb +17 -25
  18. data/lib/kilt/base.rb +3 -1
  19. data/lib/kilt/engine.rb +1 -2
  20. data/lib/kilt/object.rb +1 -1
  21. data/lib/kilt/slugger.rb +55 -0
  22. data/lib/kilt/upload.rb +18 -46
  23. data/lib/kilt/upload/local.rb +17 -0
  24. data/lib/kilt/upload/s3.rb +24 -0
  25. data/lib/kilt/utils.rb +1 -5
  26. data/lib/kilt_object.rb +7 -2
  27. data/lib/kilt_view_model.rb +44 -0
  28. data/test/dummy/config/kilt/config.yml +11 -2
  29. data/test/dummy/config/kilt/creds.yml.example +6 -2
  30. data/test/generators/kilt/backend_generator_spec.rb +0 -7
  31. data/test/kilt/upload_spec.rb +309 -0
  32. data/test/kilt/utils_spec.rb +4 -12
  33. data/test/kilt_spec.rb +132 -26
  34. data/test/kilt_view_model_spec.rb +128 -0
  35. data/test/minitest_helper.rb +6 -5
  36. metadata +47 -231
  37. data/lib/generators/kilt/frontend_generator.rb +0 -37
  38. data/lib/generators/kilt/templates/backend/creds.yml.rethinkdb.example +0 -22
  39. data/lib/generators/kilt/templates/frontend/application.html.erb +0 -24
  40. data/lib/generators/kilt/templates/frontend/assets/javascripts/application.js +0 -14
  41. data/lib/generators/kilt/templates/frontend/assets/javascripts/html5shiv.js +0 -2
  42. data/lib/generators/kilt/templates/frontend/assets/javascripts/mediaqueries.js +0 -1
  43. data/lib/generators/kilt/templates/frontend/assets/stylesheets/application.css +0 -13
  44. data/lib/generators/kilt/templates/frontend/assets/stylesheets/screen.css +0 -160
  45. data/lib/generators/kilt/templates/frontend/dummy.js.erb +0 -11
  46. data/lib/generators/kilt/templates/frontend/home_controller.rb.erb +0 -4
  47. data/lib/generators/kilt/templates/frontend/index.html.erb +0 -5
  48. data/lib/kilt/db/rethink_db.rb +0 -108
  49. data/test/dummy/config/kilt/creds.yml +0 -16
  50. data/test/dummy/log/development.log +0 -84143
  51. data/test/dummy/log/test.log +0 -36
  52. data/test/dummy/public/uploads/image/photo.JPG +0 -0
  53. data/test/dummy/public/uploads/image/timbo.jpg +0 -0
  54. data/test/dummy/tmp/cache/assets/development/sprockets/03cdc43618f8bef3dfc725a1886c40ed +0 -0
  55. data/test/dummy/tmp/cache/assets/development/sprockets/0d8e5c7178ebdb79e5b9cc4ef439eae8 +0 -0
  56. data/test/dummy/tmp/cache/assets/development/sprockets/13a3d23d13c1459a86283c4fe577a775 +0 -0
  57. data/test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  58. data/test/dummy/tmp/cache/assets/development/sprockets/18837248cb3274df9b7c6b0a5dcd56a5 +0 -0
  59. data/test/dummy/tmp/cache/assets/development/sprockets/1c198a7e1d4ae808a6adf4c4809061eb +0 -0
  60. data/test/dummy/tmp/cache/assets/development/sprockets/20dffc9385ea740ceca470ee4e4b2197 +0 -0
  61. data/test/dummy/tmp/cache/assets/development/sprockets/23733156ea27da67211ba7ff763d76f0 +0 -0
  62. data/test/dummy/tmp/cache/assets/development/sprockets/2e57def2c82ce30227eefea2360d5f50 +0 -0
  63. data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  64. data/test/dummy/tmp/cache/assets/development/sprockets/3148655edeef1c319d57d0f9570acfd5 +0 -0
  65. data/test/dummy/tmp/cache/assets/development/sprockets/32ab48c63ad3bb6ddc1f419e51adb5db +0 -0
  66. data/test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  67. data/test/dummy/tmp/cache/assets/development/sprockets/36715e644093cfcb33ac795f3c9d66fe +0 -0
  68. data/test/dummy/tmp/cache/assets/development/sprockets/36f9a7f6f43adb582ac6eec43b58eb30 +0 -0
  69. data/test/dummy/tmp/cache/assets/development/sprockets/36fff19076c588427464432f563a8d2d +0 -0
  70. data/test/dummy/tmp/cache/assets/development/sprockets/3878e0f19bbd21176b1bcc46160a3df3 +0 -0
  71. data/test/dummy/tmp/cache/assets/development/sprockets/3cee919b5b764629fbb01de361ad1b99 +0 -0
  72. data/test/dummy/tmp/cache/assets/development/sprockets/3d69f4783ceef2f5455635de03e6c62a +0 -0
  73. data/test/dummy/tmp/cache/assets/development/sprockets/3d8ca1585ee95c5efb388645d66cf377 +0 -0
  74. data/test/dummy/tmp/cache/assets/development/sprockets/3e0acde4cdc501f590a21ede6fac0b97 +0 -0
  75. data/test/dummy/tmp/cache/assets/development/sprockets/413be9c73d25c7febe933f4619da7cf8 +0 -0
  76. data/test/dummy/tmp/cache/assets/development/sprockets/4a935342c0113b534ad7622234965544 +0 -0
  77. data/test/dummy/tmp/cache/assets/development/sprockets/4b5c4a1edd3823a6a6c39e06b6eb230a +0 -0
  78. data/test/dummy/tmp/cache/assets/development/sprockets/4c5736bf0bd429296d1a32930364897e +0 -0
  79. data/test/dummy/tmp/cache/assets/development/sprockets/4f26158b7a804a3e3c47ce0ceff2798c +0 -0
  80. data/test/dummy/tmp/cache/assets/development/sprockets/542fc810f9cd36e7bed9a3e5e9670995 +0 -0
  81. data/test/dummy/tmp/cache/assets/development/sprockets/56f1e7d57d31bf3315e1e33732d57faa +0 -0
  82. data/test/dummy/tmp/cache/assets/development/sprockets/5bea4c2d87ec725262213ed51575b485 +0 -0
  83. data/test/dummy/tmp/cache/assets/development/sprockets/5eb5178b706a9b8bd0362b7ed487339a +0 -0
  84. data/test/dummy/tmp/cache/assets/development/sprockets/5fa6492da1cba5232b9e9799b5e2bf8f +0 -0
  85. data/test/dummy/tmp/cache/assets/development/sprockets/5fe3d26a30497da82978c9f7ee53068b +0 -0
  86. data/test/dummy/tmp/cache/assets/development/sprockets/66f697b8e4167ad9ebefbd8b5fc65b23 +0 -0
  87. data/test/dummy/tmp/cache/assets/development/sprockets/6b6e86e81f5e8f80bb2b3d1e8f7ed7f3 +0 -0
  88. data/test/dummy/tmp/cache/assets/development/sprockets/6c2ddc22c04321c269de383e37cb519b +0 -0
  89. data/test/dummy/tmp/cache/assets/development/sprockets/6caab0d3b759107ab41492546763aaf0 +0 -0
  90. data/test/dummy/tmp/cache/assets/development/sprockets/6d83c6efd2bf1080ba1dead9fcfdd0db +0 -0
  91. data/test/dummy/tmp/cache/assets/development/sprockets/7035e5c60f5da3b7fc12c472677483d0 +0 -0
  92. data/test/dummy/tmp/cache/assets/development/sprockets/704c682957c2beb38a1927ddb66cc557 +0 -0
  93. data/test/dummy/tmp/cache/assets/development/sprockets/70d4b3b9e59d0e01e90eebf94dbc2c47 +0 -0
  94. data/test/dummy/tmp/cache/assets/development/sprockets/74b6c3e00222b8bf31b0ecf50fcb0d38 +0 -0
  95. data/test/dummy/tmp/cache/assets/development/sprockets/8127282074e6ffd457b72c228a69f0c0 +0 -0
  96. data/test/dummy/tmp/cache/assets/development/sprockets/8ffacb4ba6e6ca3da12ac1100f664b30 +0 -0
  97. data/test/dummy/tmp/cache/assets/development/sprockets/91021bdb7ebb3d4f6fdf4e49909d4c07 +0 -0
  98. data/test/dummy/tmp/cache/assets/development/sprockets/914095efd3b33401a7f29f9fb05d72d6 +0 -0
  99. data/test/dummy/tmp/cache/assets/development/sprockets/9dd98bca318fb820a8451cafce020588 +0 -0
  100. data/test/dummy/tmp/cache/assets/development/sprockets/9f2c00a36b5b8c713a797b508c778a65 +0 -0
  101. data/test/dummy/tmp/cache/assets/development/sprockets/a88ab4e49bb7203b8e0586c38efdd2b0 +0 -0
  102. data/test/dummy/tmp/cache/assets/development/sprockets/acfc15d25fde8b933b06c91324755751 +0 -0
  103. data/test/dummy/tmp/cache/assets/development/sprockets/b259805c84c81064f20700498328f109 +0 -0
  104. data/test/dummy/tmp/cache/assets/development/sprockets/b7e1f059a53a1e79df01a336fb1f50f0 +0 -0
  105. data/test/dummy/tmp/cache/assets/development/sprockets/c0671678b70011547b80da0669d031cc +0 -0
  106. data/test/dummy/tmp/cache/assets/development/sprockets/c1006115f345f87cc152b851154e9e34 +0 -0
  107. data/test/dummy/tmp/cache/assets/development/sprockets/cf0d5ad037fbf541c6b982abf73b9938 +0 -0
  108. data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  109. data/test/dummy/tmp/cache/assets/development/sprockets/d6973c1d43f8ca41b98a6b640fda2616 +0 -0
  110. data/test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  111. data/test/dummy/tmp/cache/assets/development/sprockets/da31523b2e8cf32dd8db9f304d5b7395 +0 -0
  112. data/test/dummy/tmp/cache/assets/development/sprockets/dc676330961fd22be77c48cb77ec065f +0 -0
  113. data/test/dummy/tmp/cache/assets/development/sprockets/ddc29f2c13cd99d017fd526b61dcb951 +0 -0
  114. data/test/dummy/tmp/cache/assets/development/sprockets/de45247cb814cafe20e9e46c79e470fe +0 -0
  115. data/test/dummy/tmp/cache/assets/development/sprockets/df0b7c3ac590a286561806e813c2974f +0 -0
  116. data/test/dummy/tmp/cache/assets/development/sprockets/dfa8b85e3c1273b7e69839e4e607c3e1 +0 -0
  117. data/test/dummy/tmp/cache/assets/development/sprockets/e22d705d0c889ec4837f183a9beec0f3 +0 -0
  118. data/test/dummy/tmp/cache/assets/development/sprockets/e3a4ad3549e1e57d03698a36daeff406 +0 -0
  119. data/test/dummy/tmp/cache/assets/development/sprockets/e7ba95a61b1b9381906a88610dceb6dd +0 -0
  120. data/test/dummy/tmp/cache/assets/development/sprockets/ef7c8ce46dfc9e9087ce84dbdfdd0011 +0 -0
  121. data/test/dummy/tmp/cache/assets/development/sprockets/f3e1a8ba304f70dccefd77356c900ebc +0 -0
  122. data/test/dummy/tmp/cache/assets/development/sprockets/f4b5dd06a6113950c0f481cbc5a31a66 +0 -0
  123. data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  124. data/test/dummy/tmp/data/meta_request/1c3d4a4b-d7e1-4126-8bfc-572acbc2f675.json +0 -1
  125. data/test/dummy/tmp/data/meta_request/449ff78e-30d2-4cc5-bbb7-3397d04a4c46.json +0 -1
  126. data/test/dummy/tmp/data/meta_request/5974cfb9-99bd-4d5c-a4e1-6e352ecd2dd8.json +0 -1
  127. data/test/dummy/tmp/data/meta_request/960de12b-b1c5-4d44-937b-e3d8c00d682c.json +0 -1
  128. data/test/dummy/tmp/data/meta_request/9df9ad77-1b70-4fb7-ad18-f31f28c60c6c.json +0 -1
  129. data/test/dummy/tmp/data/meta_request/a5374758-4e16-487a-ab11-9a69a1abed2e.json +0 -1
  130. data/test/dummy/tmp/data/meta_request/a65d97b2-df1f-445e-99d5-615c4db5c4e1.json +0 -1
  131. data/test/dummy/tmp/data/meta_request/b3693c6f-23cd-4afe-ae82-38078eaa643a.json +0 -1
  132. data/test/dummy/tmp/data/meta_request/daa1c80a-bad3-4bc1-8f67-d586979cbedc.json +0 -1
  133. data/test/dummy/tmp/data/meta_request/e2e7621f-08e5-46dd-83c2-b87eb6d5fd45.json +0 -1
@@ -36,9 +36,7 @@ describe Kilt::Utils do
36
36
  Kilt.config.stubs(:[]).with(environment.to_sym).returns Object.new
37
37
  Kilt.config[environment.to_sym].stubs(:[]).with(:db).returns Object.new
38
38
 
39
- Kilt::DB::RethinkDb.stubs(:new)
40
- .with(Kilt.config[environment.to_sym][:db])
41
- .returns database
39
+ Kilt::DB::ActiveRecord.stubs(:new).returns database
42
40
 
43
41
  Kilt::Utils.database.must_be_same_as database
44
42
 
@@ -52,9 +50,7 @@ describe Kilt::Utils do
52
50
  Kilt.config.stubs(:[]).with(environment.to_sym).returns Object.new
53
51
  Kilt.config[environment.to_sym].stubs(:[]).with(:db).returns Object.new
54
52
 
55
- Kilt::DB::RethinkDb.expects(:new)
56
- .with(Kilt.config[environment.to_sym][:db])
57
- .returns database
53
+ Kilt::DB::ActiveRecord.stubs(:new).returns database
58
54
 
59
55
  Kilt::Utils.database.must_be_same_as Kilt::Utils.database
60
56
 
@@ -70,9 +66,7 @@ describe Kilt::Utils do
70
66
  Kilt.config.stubs(:[]).returns nil
71
67
  Kilt.config.stubs(:[]).with(:db).returns Object.new
72
68
 
73
- Kilt::DB::RethinkDb.stubs(:new)
74
- .with(Kilt.config[:db])
75
- .returns database
69
+ Kilt::DB::ActiveRecord.stubs(:new).returns database
76
70
 
77
71
  Kilt::Utils.database.must_be_same_as database
78
72
 
@@ -103,9 +97,7 @@ describe Kilt::Utils do
103
97
  Kilt.config.stubs(:[]).with(:development).returns Object.new
104
98
  Kilt.config[:development].stubs(:[]).with(:db).returns Object.new
105
99
 
106
- Kilt::DB::RethinkDb.stubs(:new)
107
- .with(Kilt.config[:development][:db])
108
- .returns database
100
+ Kilt::DB::ActiveRecord.stubs(:new).returns database
109
101
 
110
102
  Kilt::Utils.database.must_be_same_as database
111
103
 
@@ -15,12 +15,7 @@ describe Kilt do
15
15
 
16
16
  end
17
17
 
18
- persistence_models_to_test = [['using active record for persistence', :active_record]]
19
- unless ENV['TRAVIS']
20
- persistence_models_to_test << ['using rethinkdb for persistence', :rethinkdb]
21
- end
22
-
23
- persistence_models_to_test.map { |args| Struct.new(:description, :db_type).new(*args) }.each do |persistence|
18
+ persistence_models_to_test.each do |persistence|
24
19
 
25
20
  describe persistence.description do
26
21
 
@@ -119,18 +114,10 @@ describe Kilt do
119
114
  [1, 2, 3, 4].each do |error_count|
120
115
 
121
116
  describe "when creating a record fails" do
122
- if persistence.db_type == :active_record
123
- it "should return false" do
124
- KiltObject.stubs(:create!).raises 'error'
125
- object = Kilt::Object.new('dog', { 'name' => 'A name.' } )
126
- Kilt.create(object).must_equal false
127
- end
128
- else
129
- it "should return false" do
130
- Kilt::DB::RethinkDb.any_instance.stubs(:execute).returns( { 'errors' => error_count } )
131
- object = Kilt::Object.new('dog', { 'name' => 'A name.' } )
132
- Kilt.create(object).must_equal false
133
- end
117
+ it "should return false" do
118
+ KiltObject.stubs(:create!).raises 'error'
119
+ object = Kilt::Object.new('dog', { 'name' => 'A name.' } )
120
+ Kilt.create(object).must_equal false
134
121
  end
135
122
  end
136
123
 
@@ -401,16 +388,125 @@ describe Kilt do
401
388
  Kilt.delete(object['slug']).must_equal true
402
389
  end
403
390
 
404
- if persistence.db_type == :active_record
405
- it "should return false if the delete returned errors" do
406
- KiltObject.any_instance.stubs(:delete).raises 'error'
407
- Kilt.delete(object['slug']).must_equal false
391
+ it "should return false if the delete returned errors" do
392
+ KiltObject.any_instance.stubs(:delete).raises 'error'
393
+ Kilt.delete(object['slug']).must_equal false
394
+ end
395
+
396
+ end
397
+
398
+ end
399
+
400
+ end
401
+
402
+ persistence_models_to_test.each do |persistence|
403
+
404
+ before do
405
+ Kilt::Utils.use_db persistence.db_type
406
+ clear_out_the_database
407
+ end
408
+
409
+ describe "slug prefixes #{persistence.db_type}" do
410
+
411
+ [
412
+ ['prefix_holder', :prefix_holders, 'Happy Camper', 'a-prefix-happy-camper', 'a-prefix'],
413
+ ['another_prefix', :another_prefixes, 'Happy Camper', 'another-happy-camper', 'another'],
414
+ ['prefix_holder', :prefix_holders, 'Sad Camper', 'a-prefix-sad-camper', 'a-prefix'],
415
+ ['another_prefix', :another_prefixes, 'Amused Camper', 'another-amused-camper', 'another'],
416
+ ].map { |x| Struct.new(:type, :plural_type, :name, :expected_slug, :the_prefix).new(*x) }.each do |scenario|
417
+
418
+ describe "creating an object with a slug prefix" do
419
+
420
+ it "should prepend the slug prefix to the slug" do
421
+ object = Kilt::Object.new(scenario.type, { 'name' => scenario.name } )
422
+ Kilt.create object
423
+
424
+ object['slug'].must_equal scenario.expected_slug
408
425
  end
409
- else
410
- it "should return false if the delete returned errors" do
411
- Kilt::DB::RethinkDb.any_instance.stubs(:execute).returns( { 'errors' => 1 } )
412
- Kilt.delete(object['slug']).must_equal false
426
+
427
+ describe "when creating a record that naturally will conflict with a prefix" do
428
+ it "should still append the appropriate slug" do
429
+ object = Kilt::Object.new(scenario.type, { 'name' => scenario.the_prefix } )
430
+
431
+ Kilt.create object
432
+
433
+ object['slug'].must_equal "#{scenario.the_prefix}-#{scenario.the_prefix}"
434
+
435
+ end
413
436
  end
437
+
438
+ end
439
+
440
+ describe "updating the object later" do
441
+
442
+ it "should only have one prefix" do
443
+ object = Kilt::Object.new(scenario.type, { 'name' => scenario.name } )
444
+ Kilt.create object
445
+
446
+ created_record = Kilt.get(object['slug'])
447
+ first_slug = created_record['slug']
448
+
449
+ Kilt.update created_record['slug'], created_record
450
+
451
+ updated_record = Kilt.get(created_record['slug'])
452
+ updated_record['slug'].must_equal first_slug
453
+
454
+ end
455
+
456
+ end
457
+
458
+ describe "setting the slug manually" do
459
+
460
+ describe "creating the record" do
461
+ it "should not prepend the prefix to the slug" do
462
+ object = Kilt::Object.new(scenario.type, { 'name' => scenario.name, 'slug' => 'something hardcoded' } )
463
+ Kilt.create object
464
+
465
+ created_record = Kilt.get(object['slug'])
466
+ created_record['slug'].must_equal 'something hardcoded'
467
+ end
468
+ end
469
+
470
+ describe "updating the record" do
471
+
472
+ it "should not prepend the prefix to the slug" do
473
+ object = Kilt::Object.new(scenario.type, { 'name' => scenario.name, 'slug' => 'hardcoded value' } )
474
+ Kilt.create object
475
+
476
+ created_record = Kilt.get(object['slug'])
477
+ Kilt.update created_record['slug'], created_record
478
+
479
+ updated_record = Kilt.get(created_record['slug'])
480
+ created_record['slug'].must_equal 'hardcoded value'
481
+ end
482
+
483
+ end
484
+
485
+ end
486
+
487
+ end
488
+
489
+ describe "slug conflicts when applying a prefix" do
490
+
491
+ describe "when conflicting with the same type on record creation" do
492
+
493
+ it "should use the timestamped suffix" do
494
+
495
+ Timecop.freeze Time.parse('1/1/2001')
496
+
497
+ object = Kilt::Object.new('another_prefix', { 'name' => 'Apple' } )
498
+ Kilt.create object
499
+
500
+ Timecop.freeze Time.now + 1
501
+ timestamp = (Time.now.to_f * 1000).to_i
502
+
503
+ object = Kilt::Object.new('another_prefix', { 'name' => 'Apple' } )
504
+ Kilt.create object
505
+
506
+ object['slug'].must_equal "another-apple-#{timestamp}"
507
+
508
+ end
509
+
414
510
  end
415
511
 
416
512
  end
@@ -419,4 +515,14 @@ describe Kilt do
419
515
 
420
516
  end
421
517
 
518
+ describe "all_used_fields" do
519
+ it "should return a list of all of the used fields" do
520
+ fields = Kilt.all_used_fields
521
+ fields.count.must_equal 3
522
+ fields.include?("file").must_equal true
523
+ fields.include?("text").must_equal true
524
+ fields.include?("image").must_equal true
525
+ end
526
+ end
527
+
422
528
  end
@@ -0,0 +1,128 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/minitest_helper')
2
+
3
+ class ElephantViewModel < KiltViewModel
4
+ end
5
+
6
+ class TigerViewModel < KiltViewModel
7
+ end
8
+
9
+ describe KiltViewModel do
10
+
11
+ describe "basic features" do
12
+
13
+ it "should serve as a wrapper over a hash" do
14
+
15
+ hash = { 'first_name' => 'John', 'last_name' => 'Galt' }
16
+
17
+ view_model = KiltViewModel.new hash
18
+
19
+ view_model.first_name.must_equal 'John'
20
+ view_model.last_name.must_equal 'Galt'
21
+
22
+ end
23
+
24
+ it "should work with symbols as well as strings" do
25
+
26
+ hash = { city: 'Olathe', 'state' => 'KS' }
27
+
28
+ view_model = KiltViewModel.new hash
29
+
30
+ view_model.city.must_equal 'Olathe'
31
+ view_model.state.must_equal 'KS'
32
+
33
+ end
34
+
35
+ end
36
+
37
+ describe "building view models" do
38
+
39
+ [
40
+ ['elephant', ElephantViewModel],
41
+ ['tiger', TigerViewModel]
42
+ ].map { |x| Struct.new(:the_type, :the_class).new(*x) }.each do |example|
43
+
44
+ describe "building single view models" do
45
+
46
+ it "should use the type to build a view model with a matching name" do
47
+
48
+ data = { 'type' => example.the_type }
49
+
50
+ view_model = KiltViewModel.build data
51
+
52
+ view_model.is_a?(example.the_class).must_equal true
53
+
54
+ end
55
+
56
+ end
57
+
58
+ end
59
+
60
+ describe "building arrays of view models" do
61
+
62
+ it "should return an array with each item as the proper type, for arrays" do
63
+
64
+ records = [ { 'type' => 'elephant' },
65
+ { 'type' => 'tiger' } ]
66
+
67
+ view_models = KiltViewModel.build records
68
+
69
+ view_models.count.must_equal 2
70
+
71
+ view_models[0].is_a?(ElephantViewModel).must_equal true
72
+ view_models[1].is_a?(TigerViewModel).must_equal true
73
+
74
+ end
75
+
76
+ it "should return an array with each item as the proper type, for KiltCollection" do
77
+
78
+ records = Kilt::ObjectCollection.new([ { 'type' => 'elephant'},
79
+ { 'type' => 'tiger' } ])
80
+
81
+ view_models = KiltViewModel.build records
82
+
83
+ view_models.count.must_equal 2
84
+ view_models[0].is_a?(ElephantViewModel).must_equal true
85
+ view_models[1].is_a?(TigerViewModel).must_equal true
86
+
87
+ end
88
+
89
+ it "should sort items by a sequence field, if sequence exists" do
90
+
91
+ records = [ { 'name' => 'A', 'sequence' => '3' },
92
+ { 'name' => 'B', 'sequence' => '2' },
93
+ { 'name' => 'C', 'sequence' => '1' },
94
+ { 'name' => 'D', 'sequence' => nil },
95
+ { 'name' => 'E', 'sequence' => 'A' }]
96
+
97
+ view_models = KiltViewModel.build records
98
+
99
+ view_models.count.must_equal 5
100
+
101
+ view_models[0].name.must_equal 'C'
102
+ view_models[1].name.must_equal 'B'
103
+ view_models[2].name.must_equal 'A'
104
+ view_models[3].name.must_equal 'D'
105
+ view_models[4].name.must_equal 'E'
106
+
107
+ end
108
+
109
+
110
+ end
111
+
112
+ describe "building a view model when none exists" do
113
+
114
+ it "should return a KiltViewModel instead" do
115
+
116
+ data = { 'type' => 'monkey' }
117
+
118
+ view_model = KiltViewModel.build data
119
+
120
+ view_model.is_a?(KiltViewModel).must_equal true
121
+
122
+ end
123
+
124
+ end
125
+
126
+ end
127
+
128
+ end
@@ -23,6 +23,8 @@ def default_test_config
23
23
  config.objects = Hashie::Mash.new(cat: Hashie::Mash.new(fields: { name: 'text', size: 'text', headshot: 'image', resume: 'file' } ),
24
24
  dog: Hashie::Mash.new(fields: { name: 'text', size: 'text', headshot: 'image', resume: 'file' } ),
25
25
  no_namey: Hashie::Mash.new(fields: { } ),
26
+ prefix_holder: Hashie::Mash.new(slug_prefix: 'a-prefix', fields: { name: 'text' } ),
27
+ another_prefix: Hashie::Mash.new(slug_prefix: 'another', fields: { name: 'text' } ),
26
28
  horse: Hashie::Mash.new(fields: { name: 'text' } ),
27
29
  big_green_alligator: Hashie::Mash.new(fields: { name: 'text' } ),
28
30
  apple: Hashie::Mash.new(name: 'Orange', fields: { name: 'text' } ))
@@ -35,13 +37,12 @@ end
35
37
 
36
38
  def setup_the_database_with config
37
39
  Kilt.config = config
38
- Kilt::Utils.use_db(:active_record) if ENV['TRAVIS']
40
+ Kilt::Utils.use_db(:active_record) # default the tests to AR
39
41
  Kilt::Utils.setup_db
40
42
  end
41
43
 
42
44
  def clear_out_the_database
43
45
  clear_out_active_record
44
- clear_out_rethinkdb
45
46
  end
46
47
 
47
48
  def clear_out_active_record
@@ -59,9 +60,9 @@ def clear_out_active_record
59
60
  ActiveRecord::Base.establish_connection options
60
61
  end
61
62
 
62
- def clear_out_rethinkdb
63
- Kilt::Utils.database.delete_all
64
- rescue
63
+ def persistence_models_to_test
64
+ models = [['using active record for persistence', :active_record]]
65
+ models.map { |args| Struct.new(:description, :db_type).new(*args) }
65
66
  end
66
67
 
67
68
  setup_the_database
metadata CHANGED
@@ -1,223 +1,209 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kilt-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ashe Avenue
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-13 00:00:00.000000000 Z
11
+ date: 2014-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.1
27
- - !ruby/object:Gem::Dependency
28
- name: rethinkdb
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rails_config
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - ">="
31
+ - - '>='
46
32
  - !ruby/object:Gem::Version
47
33
  version: '0'
48
34
  type: :runtime
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ">="
38
+ - - '>='
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: jquery-rails
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - ">="
45
+ - - '>='
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
48
  type: :runtime
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - ">="
52
+ - - '>='
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: jquery-ui-rails
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - ">="
59
+ - - '='
74
60
  - !ruby/object:Gem::Version
75
- version: '0'
61
+ version: 4.2.1
76
62
  type: :runtime
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - ">="
66
+ - - '='
81
67
  - !ruby/object:Gem::Version
82
- version: '0'
68
+ version: 4.2.1
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: uglifier
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - ">="
73
+ - - '>='
88
74
  - !ruby/object:Gem::Version
89
75
  version: '0'
90
76
  type: :runtime
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - ">="
80
+ - - '>='
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: aws-sdk
99
85
  requirement: !ruby/object:Gem::Requirement
100
86
  requirements:
101
- - - ">="
87
+ - - '>='
102
88
  - !ruby/object:Gem::Version
103
89
  version: '0'
104
90
  type: :runtime
105
91
  prerelease: false
106
92
  version_requirements: !ruby/object:Gem::Requirement
107
93
  requirements:
108
- - - ">="
94
+ - - '>='
109
95
  - !ruby/object:Gem::Version
110
96
  version: '0'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: sqlite3
113
99
  requirement: !ruby/object:Gem::Requirement
114
100
  requirements:
115
- - - ">="
101
+ - - '>='
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
107
  requirements:
122
- - - ">="
108
+ - - '>='
123
109
  - !ruby/object:Gem::Version
124
110
  version: '0'
125
111
  - !ruby/object:Gem::Dependency
126
112
  name: better_errors
127
113
  requirement: !ruby/object:Gem::Requirement
128
114
  requirements:
129
- - - ">="
115
+ - - '>='
130
116
  - !ruby/object:Gem::Version
131
117
  version: '0'
132
118
  type: :development
133
119
  prerelease: false
134
120
  version_requirements: !ruby/object:Gem::Requirement
135
121
  requirements:
136
- - - ">="
122
+ - - '>='
137
123
  - !ruby/object:Gem::Version
138
124
  version: '0'
139
125
  - !ruby/object:Gem::Dependency
140
126
  name: binding_of_caller
141
127
  requirement: !ruby/object:Gem::Requirement
142
128
  requirements:
143
- - - ">="
129
+ - - '>='
144
130
  - !ruby/object:Gem::Version
145
131
  version: '0'
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
- - - ">="
136
+ - - '>='
151
137
  - !ruby/object:Gem::Version
152
138
  version: '0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: meta_request
155
141
  requirement: !ruby/object:Gem::Requirement
156
142
  requirements:
157
- - - ">="
143
+ - - '>='
158
144
  - !ruby/object:Gem::Version
159
145
  version: '0'
160
146
  type: :development
161
147
  prerelease: false
162
148
  version_requirements: !ruby/object:Gem::Requirement
163
149
  requirements:
164
- - - ">="
150
+ - - '>='
165
151
  - !ruby/object:Gem::Version
166
152
  version: '0'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: rspec-rails
169
155
  requirement: !ruby/object:Gem::Requirement
170
156
  requirements:
171
- - - ">="
157
+ - - '>='
172
158
  - !ruby/object:Gem::Version
173
159
  version: '0'
174
160
  type: :development
175
161
  prerelease: false
176
162
  version_requirements: !ruby/object:Gem::Requirement
177
163
  requirements:
178
- - - ">="
164
+ - - '>='
179
165
  - !ruby/object:Gem::Version
180
166
  version: '0'
181
167
  - !ruby/object:Gem::Dependency
182
168
  name: mocha
183
169
  requirement: !ruby/object:Gem::Requirement
184
170
  requirements:
185
- - - ">="
171
+ - - '>='
186
172
  - !ruby/object:Gem::Version
187
173
  version: '0'
188
174
  type: :development
189
175
  prerelease: false
190
176
  version_requirements: !ruby/object:Gem::Requirement
191
177
  requirements:
192
- - - ">="
178
+ - - '>='
193
179
  - !ruby/object:Gem::Version
194
180
  version: '0'
195
181
  - !ruby/object:Gem::Dependency
196
182
  name: hashie
197
183
  requirement: !ruby/object:Gem::Requirement
198
184
  requirements:
199
- - - ">="
185
+ - - '>='
200
186
  - !ruby/object:Gem::Version
201
187
  version: '0'
202
188
  type: :development
203
189
  prerelease: false
204
190
  version_requirements: !ruby/object:Gem::Requirement
205
191
  requirements:
206
- - - ">="
192
+ - - '>='
207
193
  - !ruby/object:Gem::Version
208
194
  version: '0'
209
195
  - !ruby/object:Gem::Dependency
210
196
  name: timecop
211
197
  requirement: !ruby/object:Gem::Requirement
212
198
  requirements:
213
- - - ">="
199
+ - - '>='
214
200
  - !ruby/object:Gem::Version
215
201
  version: '0'
216
202
  type: :development
217
203
  prerelease: false
218
204
  version_requirements: !ruby/object:Gem::Requirement
219
205
  requirements:
220
- - - ">="
206
+ - - '>='
221
207
  - !ruby/object:Gem::Version
222
208
  version: '0'
223
209
  - !ruby/object:Gem::Dependency
@@ -234,7 +220,7 @@ dependencies:
234
220
  - - '='
235
221
  - !ruby/object:Gem::Version
236
222
  version: 4.7.5
237
- description: Microsite Platform for Rails 4 built with RethinkDB
223
+ description: Microsite Platform for Rails 4
238
224
  email:
239
225
  - community@asheavenue.com
240
226
  executables: []
@@ -244,6 +230,8 @@ files:
244
230
  - README.rdoc
245
231
  - Rakefile
246
232
  - app/assets/images/kilt/animated-overlay.gif
233
+ - app/assets/images/kilt/logo.png
234
+ - app/assets/images/kilt/tartan.png
247
235
  - app/assets/images/kilt/ui-bg_flat_0_000_40x100.png
248
236
  - app/assets/images/kilt/ui-bg_flat_0_fff_40x100.png
249
237
  - app/assets/images/kilt/ui-bg_flat_100_fff_40x100.png
@@ -270,45 +258,39 @@ files:
270
258
  - app/views/kilt/form/_text.html.erb
271
259
  - app/views/kilt/form/_vimeo.html.erb
272
260
  - app/views/kilt/form/_youtube.html.erb
261
+ - app/views/kilt/kilt/_field_setup.html.erb
273
262
  - app/views/kilt/kilt/_form.html.erb
274
263
  - app/views/kilt/kilt/edit.html.erb
275
264
  - app/views/kilt/kilt/index.html.erb
276
265
  - app/views/kilt/kilt/list.html.erb
277
266
  - app/views/kilt/kilt/new.html.erb
278
267
  - app/views/layouts/kilt/cms.html.erb
268
+ - app/views/layouts/kilt/cms/_default_creds_warning.html.erb
279
269
  - app/views/layouts/kilt/cms/_menu.html.erb
280
270
  - config/routes.rb
281
271
  - lib/generators/kilt/backend_generator.rb
282
- - lib/generators/kilt/frontend_generator.rb
283
272
  - lib/generators/kilt/install_generator.rb
284
273
  - lib/generators/kilt/object_generator.rb
285
274
  - lib/generators/kilt/templates/backend/config.yml.erb
286
275
  - lib/generators/kilt/templates/backend/create_kilt_objects.rb
287
276
  - lib/generators/kilt/templates/backend/creds.yml.example
288
- - lib/generators/kilt/templates/backend/creds.yml.rethinkdb.example
289
277
  - lib/generators/kilt/templates/backend/kilt.rb
290
- - lib/generators/kilt/templates/frontend/application.html.erb
291
- - lib/generators/kilt/templates/frontend/assets/javascripts/application.js
292
- - lib/generators/kilt/templates/frontend/assets/javascripts/html5shiv.js
293
- - lib/generators/kilt/templates/frontend/assets/javascripts/mediaqueries.js
294
- - lib/generators/kilt/templates/frontend/assets/stylesheets/application.css
295
- - lib/generators/kilt/templates/frontend/assets/stylesheets/screen.css
296
- - lib/generators/kilt/templates/frontend/dummy.js.erb
297
- - lib/generators/kilt/templates/frontend/home_controller.rb.erb
298
- - lib/generators/kilt/templates/frontend/index.html.erb
299
278
  - lib/kilt.rb
300
279
  - lib/kilt/base.rb
301
280
  - lib/kilt/db/active_record.rb
302
- - lib/kilt/db/rethink_db.rb
303
281
  - lib/kilt/engine.rb
304
282
  - lib/kilt/exceptions.rb
305
283
  - lib/kilt/form.rb
306
284
  - lib/kilt/formatting.rb
307
285
  - lib/kilt/object.rb
308
286
  - lib/kilt/object_collection.rb
287
+ - lib/kilt/slugger.rb
309
288
  - lib/kilt/upload.rb
289
+ - lib/kilt/upload/local.rb
290
+ - lib/kilt/upload/s3.rb
310
291
  - lib/kilt/utils.rb
311
292
  - lib/kilt_object.rb
293
+ - lib/kilt_view_model.rb
312
294
  - lib/tasks/kilt_tasks.rake
313
295
  - test/dummy/Rakefile
314
296
  - test/dummy/app/assets/javascripts/application.js
@@ -340,104 +322,21 @@ files:
340
322
  - test/dummy/config/initializers/session_store.rb
341
323
  - test/dummy/config/initializers/wrap_parameters.rb
342
324
  - test/dummy/config/kilt/config.yml
343
- - test/dummy/config/kilt/creds.yml
344
325
  - test/dummy/config/kilt/creds.yml.example
345
326
  - test/dummy/config/kilt/creds.yml.rethinkdb.example
346
327
  - test/dummy/config/routes.rb
347
328
  - test/dummy/db/migrate/20140519110428_create_kilt_objects.rb
348
329
  - test/dummy/db/schema.rb
349
- - test/dummy/log/development.log
350
- - test/dummy/log/test.log
351
- - test/dummy/public/uploads/image/photo.JPG
352
- - test/dummy/public/uploads/image/timbo.jpg
353
- - test/dummy/tmp/cache/assets/development/sprockets/03cdc43618f8bef3dfc725a1886c40ed
354
- - test/dummy/tmp/cache/assets/development/sprockets/0d8e5c7178ebdb79e5b9cc4ef439eae8
355
- - test/dummy/tmp/cache/assets/development/sprockets/13a3d23d13c1459a86283c4fe577a775
356
- - test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
357
- - test/dummy/tmp/cache/assets/development/sprockets/18837248cb3274df9b7c6b0a5dcd56a5
358
- - test/dummy/tmp/cache/assets/development/sprockets/1c198a7e1d4ae808a6adf4c4809061eb
359
- - test/dummy/tmp/cache/assets/development/sprockets/20dffc9385ea740ceca470ee4e4b2197
360
- - test/dummy/tmp/cache/assets/development/sprockets/23733156ea27da67211ba7ff763d76f0
361
- - test/dummy/tmp/cache/assets/development/sprockets/2e57def2c82ce30227eefea2360d5f50
362
- - test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
363
- - test/dummy/tmp/cache/assets/development/sprockets/3148655edeef1c319d57d0f9570acfd5
364
- - test/dummy/tmp/cache/assets/development/sprockets/32ab48c63ad3bb6ddc1f419e51adb5db
365
- - test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
366
- - test/dummy/tmp/cache/assets/development/sprockets/36715e644093cfcb33ac795f3c9d66fe
367
- - test/dummy/tmp/cache/assets/development/sprockets/36f9a7f6f43adb582ac6eec43b58eb30
368
- - test/dummy/tmp/cache/assets/development/sprockets/36fff19076c588427464432f563a8d2d
369
- - test/dummy/tmp/cache/assets/development/sprockets/3878e0f19bbd21176b1bcc46160a3df3
370
- - test/dummy/tmp/cache/assets/development/sprockets/3cee919b5b764629fbb01de361ad1b99
371
- - test/dummy/tmp/cache/assets/development/sprockets/3d69f4783ceef2f5455635de03e6c62a
372
- - test/dummy/tmp/cache/assets/development/sprockets/3d8ca1585ee95c5efb388645d66cf377
373
- - test/dummy/tmp/cache/assets/development/sprockets/3e0acde4cdc501f590a21ede6fac0b97
374
- - test/dummy/tmp/cache/assets/development/sprockets/413be9c73d25c7febe933f4619da7cf8
375
- - test/dummy/tmp/cache/assets/development/sprockets/4a935342c0113b534ad7622234965544
376
- - test/dummy/tmp/cache/assets/development/sprockets/4b5c4a1edd3823a6a6c39e06b6eb230a
377
- - test/dummy/tmp/cache/assets/development/sprockets/4c5736bf0bd429296d1a32930364897e
378
- - test/dummy/tmp/cache/assets/development/sprockets/4f26158b7a804a3e3c47ce0ceff2798c
379
- - test/dummy/tmp/cache/assets/development/sprockets/542fc810f9cd36e7bed9a3e5e9670995
380
- - test/dummy/tmp/cache/assets/development/sprockets/56f1e7d57d31bf3315e1e33732d57faa
381
- - test/dummy/tmp/cache/assets/development/sprockets/5bea4c2d87ec725262213ed51575b485
382
- - test/dummy/tmp/cache/assets/development/sprockets/5eb5178b706a9b8bd0362b7ed487339a
383
- - test/dummy/tmp/cache/assets/development/sprockets/5fa6492da1cba5232b9e9799b5e2bf8f
384
- - test/dummy/tmp/cache/assets/development/sprockets/5fe3d26a30497da82978c9f7ee53068b
385
- - test/dummy/tmp/cache/assets/development/sprockets/66f697b8e4167ad9ebefbd8b5fc65b23
386
- - test/dummy/tmp/cache/assets/development/sprockets/6b6e86e81f5e8f80bb2b3d1e8f7ed7f3
387
- - test/dummy/tmp/cache/assets/development/sprockets/6c2ddc22c04321c269de383e37cb519b
388
- - test/dummy/tmp/cache/assets/development/sprockets/6caab0d3b759107ab41492546763aaf0
389
- - test/dummy/tmp/cache/assets/development/sprockets/6d83c6efd2bf1080ba1dead9fcfdd0db
390
- - test/dummy/tmp/cache/assets/development/sprockets/7035e5c60f5da3b7fc12c472677483d0
391
- - test/dummy/tmp/cache/assets/development/sprockets/704c682957c2beb38a1927ddb66cc557
392
- - test/dummy/tmp/cache/assets/development/sprockets/70d4b3b9e59d0e01e90eebf94dbc2c47
393
- - test/dummy/tmp/cache/assets/development/sprockets/74b6c3e00222b8bf31b0ecf50fcb0d38
394
- - test/dummy/tmp/cache/assets/development/sprockets/8127282074e6ffd457b72c228a69f0c0
395
- - test/dummy/tmp/cache/assets/development/sprockets/8ffacb4ba6e6ca3da12ac1100f664b30
396
- - test/dummy/tmp/cache/assets/development/sprockets/91021bdb7ebb3d4f6fdf4e49909d4c07
397
- - test/dummy/tmp/cache/assets/development/sprockets/914095efd3b33401a7f29f9fb05d72d6
398
- - test/dummy/tmp/cache/assets/development/sprockets/9dd98bca318fb820a8451cafce020588
399
- - test/dummy/tmp/cache/assets/development/sprockets/9f2c00a36b5b8c713a797b508c778a65
400
- - test/dummy/tmp/cache/assets/development/sprockets/a88ab4e49bb7203b8e0586c38efdd2b0
401
- - test/dummy/tmp/cache/assets/development/sprockets/acfc15d25fde8b933b06c91324755751
402
- - test/dummy/tmp/cache/assets/development/sprockets/b259805c84c81064f20700498328f109
403
- - test/dummy/tmp/cache/assets/development/sprockets/b7e1f059a53a1e79df01a336fb1f50f0
404
- - test/dummy/tmp/cache/assets/development/sprockets/c0671678b70011547b80da0669d031cc
405
- - test/dummy/tmp/cache/assets/development/sprockets/c1006115f345f87cc152b851154e9e34
406
- - test/dummy/tmp/cache/assets/development/sprockets/cf0d5ad037fbf541c6b982abf73b9938
407
- - test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
408
- - test/dummy/tmp/cache/assets/development/sprockets/d6973c1d43f8ca41b98a6b640fda2616
409
- - test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
410
- - test/dummy/tmp/cache/assets/development/sprockets/da31523b2e8cf32dd8db9f304d5b7395
411
- - test/dummy/tmp/cache/assets/development/sprockets/dc676330961fd22be77c48cb77ec065f
412
- - test/dummy/tmp/cache/assets/development/sprockets/ddc29f2c13cd99d017fd526b61dcb951
413
- - test/dummy/tmp/cache/assets/development/sprockets/de45247cb814cafe20e9e46c79e470fe
414
- - test/dummy/tmp/cache/assets/development/sprockets/df0b7c3ac590a286561806e813c2974f
415
- - test/dummy/tmp/cache/assets/development/sprockets/dfa8b85e3c1273b7e69839e4e607c3e1
416
- - test/dummy/tmp/cache/assets/development/sprockets/e22d705d0c889ec4837f183a9beec0f3
417
- - test/dummy/tmp/cache/assets/development/sprockets/e3a4ad3549e1e57d03698a36daeff406
418
- - test/dummy/tmp/cache/assets/development/sprockets/e7ba95a61b1b9381906a88610dceb6dd
419
- - test/dummy/tmp/cache/assets/development/sprockets/ef7c8ce46dfc9e9087ce84dbdfdd0011
420
- - test/dummy/tmp/cache/assets/development/sprockets/f3e1a8ba304f70dccefd77356c900ebc
421
- - test/dummy/tmp/cache/assets/development/sprockets/f4b5dd06a6113950c0f481cbc5a31a66
422
- - test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
423
- - test/dummy/tmp/data/meta_request/1c3d4a4b-d7e1-4126-8bfc-572acbc2f675.json
424
- - test/dummy/tmp/data/meta_request/449ff78e-30d2-4cc5-bbb7-3397d04a4c46.json
425
- - test/dummy/tmp/data/meta_request/5974cfb9-99bd-4d5c-a4e1-6e352ecd2dd8.json
426
- - test/dummy/tmp/data/meta_request/960de12b-b1c5-4d44-937b-e3d8c00d682c.json
427
- - test/dummy/tmp/data/meta_request/9df9ad77-1b70-4fb7-ad18-f31f28c60c6c.json
428
- - test/dummy/tmp/data/meta_request/a5374758-4e16-487a-ab11-9a69a1abed2e.json
429
- - test/dummy/tmp/data/meta_request/a65d97b2-df1f-445e-99d5-615c4db5c4e1.json
430
- - test/dummy/tmp/data/meta_request/b3693c6f-23cd-4afe-ae82-38078eaa643a.json
431
- - test/dummy/tmp/data/meta_request/daa1c80a-bad3-4bc1-8f67-d586979cbedc.json
432
- - test/dummy/tmp/data/meta_request/e2e7621f-08e5-46dd-83c2-b87eb6d5fd45.json
433
330
  - test/empty.sqlite3
434
331
  - test/generators/kilt/backend_generator_spec.rb
435
332
  - test/kilt/form_spec.rb
436
333
  - test/kilt/formatting_spec.rb
437
334
  - test/kilt/object_spec.rb
335
+ - test/kilt/upload_spec.rb
438
336
  - test/kilt/utils_spec.rb
439
337
  - test/kilt_object_spec.rb
440
338
  - test/kilt_spec.rb
339
+ - test/kilt_view_model_spec.rb
441
340
  - test/minitest_helper.rb
442
341
  homepage: http://community.asheavenue.com
443
342
  licenses:
@@ -449,12 +348,12 @@ require_paths:
449
348
  - lib
450
349
  required_ruby_version: !ruby/object:Gem::Requirement
451
350
  requirements:
452
- - - ">="
351
+ - - '>='
453
352
  - !ruby/object:Gem::Version
454
353
  version: 2.0.0
455
354
  required_rubygems_version: !ruby/object:Gem::Requirement
456
355
  requirements:
457
- - - ">="
356
+ - - '>='
458
357
  - !ruby/object:Gem::Version
459
358
  version: '0'
460
359
  requirements: []
@@ -492,104 +391,21 @@ test_files:
492
391
  - test/dummy/config/initializers/session_store.rb
493
392
  - test/dummy/config/initializers/wrap_parameters.rb
494
393
  - test/dummy/config/kilt/config.yml
495
- - test/dummy/config/kilt/creds.yml
496
394
  - test/dummy/config/kilt/creds.yml.example
497
395
  - test/dummy/config/kilt/creds.yml.rethinkdb.example
498
396
  - test/dummy/config/routes.rb
499
397
  - test/dummy/config.ru
500
398
  - test/dummy/db/migrate/20140519110428_create_kilt_objects.rb
501
399
  - test/dummy/db/schema.rb
502
- - test/dummy/log/development.log
503
- - test/dummy/log/test.log
504
- - test/dummy/public/uploads/image/photo.JPG
505
- - test/dummy/public/uploads/image/timbo.jpg
506
400
  - test/dummy/Rakefile
507
- - test/dummy/tmp/cache/assets/development/sprockets/03cdc43618f8bef3dfc725a1886c40ed
508
- - test/dummy/tmp/cache/assets/development/sprockets/0d8e5c7178ebdb79e5b9cc4ef439eae8
509
- - test/dummy/tmp/cache/assets/development/sprockets/13a3d23d13c1459a86283c4fe577a775
510
- - test/dummy/tmp/cache/assets/development/sprockets/13fe41fee1fe35b49d145bcc06610705
511
- - test/dummy/tmp/cache/assets/development/sprockets/18837248cb3274df9b7c6b0a5dcd56a5
512
- - test/dummy/tmp/cache/assets/development/sprockets/1c198a7e1d4ae808a6adf4c4809061eb
513
- - test/dummy/tmp/cache/assets/development/sprockets/20dffc9385ea740ceca470ee4e4b2197
514
- - test/dummy/tmp/cache/assets/development/sprockets/23733156ea27da67211ba7ff763d76f0
515
- - test/dummy/tmp/cache/assets/development/sprockets/2e57def2c82ce30227eefea2360d5f50
516
- - test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af
517
- - test/dummy/tmp/cache/assets/development/sprockets/3148655edeef1c319d57d0f9570acfd5
518
- - test/dummy/tmp/cache/assets/development/sprockets/32ab48c63ad3bb6ddc1f419e51adb5db
519
- - test/dummy/tmp/cache/assets/development/sprockets/357970feca3ac29060c1e3861e2c0953
520
- - test/dummy/tmp/cache/assets/development/sprockets/36715e644093cfcb33ac795f3c9d66fe
521
- - test/dummy/tmp/cache/assets/development/sprockets/36f9a7f6f43adb582ac6eec43b58eb30
522
- - test/dummy/tmp/cache/assets/development/sprockets/36fff19076c588427464432f563a8d2d
523
- - test/dummy/tmp/cache/assets/development/sprockets/3878e0f19bbd21176b1bcc46160a3df3
524
- - test/dummy/tmp/cache/assets/development/sprockets/3cee919b5b764629fbb01de361ad1b99
525
- - test/dummy/tmp/cache/assets/development/sprockets/3d69f4783ceef2f5455635de03e6c62a
526
- - test/dummy/tmp/cache/assets/development/sprockets/3d8ca1585ee95c5efb388645d66cf377
527
- - test/dummy/tmp/cache/assets/development/sprockets/3e0acde4cdc501f590a21ede6fac0b97
528
- - test/dummy/tmp/cache/assets/development/sprockets/413be9c73d25c7febe933f4619da7cf8
529
- - test/dummy/tmp/cache/assets/development/sprockets/4a935342c0113b534ad7622234965544
530
- - test/dummy/tmp/cache/assets/development/sprockets/4b5c4a1edd3823a6a6c39e06b6eb230a
531
- - test/dummy/tmp/cache/assets/development/sprockets/4c5736bf0bd429296d1a32930364897e
532
- - test/dummy/tmp/cache/assets/development/sprockets/4f26158b7a804a3e3c47ce0ceff2798c
533
- - test/dummy/tmp/cache/assets/development/sprockets/542fc810f9cd36e7bed9a3e5e9670995
534
- - test/dummy/tmp/cache/assets/development/sprockets/56f1e7d57d31bf3315e1e33732d57faa
535
- - test/dummy/tmp/cache/assets/development/sprockets/5bea4c2d87ec725262213ed51575b485
536
- - test/dummy/tmp/cache/assets/development/sprockets/5eb5178b706a9b8bd0362b7ed487339a
537
- - test/dummy/tmp/cache/assets/development/sprockets/5fa6492da1cba5232b9e9799b5e2bf8f
538
- - test/dummy/tmp/cache/assets/development/sprockets/5fe3d26a30497da82978c9f7ee53068b
539
- - test/dummy/tmp/cache/assets/development/sprockets/66f697b8e4167ad9ebefbd8b5fc65b23
540
- - test/dummy/tmp/cache/assets/development/sprockets/6b6e86e81f5e8f80bb2b3d1e8f7ed7f3
541
- - test/dummy/tmp/cache/assets/development/sprockets/6c2ddc22c04321c269de383e37cb519b
542
- - test/dummy/tmp/cache/assets/development/sprockets/6caab0d3b759107ab41492546763aaf0
543
- - test/dummy/tmp/cache/assets/development/sprockets/6d83c6efd2bf1080ba1dead9fcfdd0db
544
- - test/dummy/tmp/cache/assets/development/sprockets/7035e5c60f5da3b7fc12c472677483d0
545
- - test/dummy/tmp/cache/assets/development/sprockets/704c682957c2beb38a1927ddb66cc557
546
- - test/dummy/tmp/cache/assets/development/sprockets/70d4b3b9e59d0e01e90eebf94dbc2c47
547
- - test/dummy/tmp/cache/assets/development/sprockets/74b6c3e00222b8bf31b0ecf50fcb0d38
548
- - test/dummy/tmp/cache/assets/development/sprockets/8127282074e6ffd457b72c228a69f0c0
549
- - test/dummy/tmp/cache/assets/development/sprockets/8ffacb4ba6e6ca3da12ac1100f664b30
550
- - test/dummy/tmp/cache/assets/development/sprockets/91021bdb7ebb3d4f6fdf4e49909d4c07
551
- - test/dummy/tmp/cache/assets/development/sprockets/914095efd3b33401a7f29f9fb05d72d6
552
- - test/dummy/tmp/cache/assets/development/sprockets/9dd98bca318fb820a8451cafce020588
553
- - test/dummy/tmp/cache/assets/development/sprockets/9f2c00a36b5b8c713a797b508c778a65
554
- - test/dummy/tmp/cache/assets/development/sprockets/a88ab4e49bb7203b8e0586c38efdd2b0
555
- - test/dummy/tmp/cache/assets/development/sprockets/acfc15d25fde8b933b06c91324755751
556
- - test/dummy/tmp/cache/assets/development/sprockets/b259805c84c81064f20700498328f109
557
- - test/dummy/tmp/cache/assets/development/sprockets/b7e1f059a53a1e79df01a336fb1f50f0
558
- - test/dummy/tmp/cache/assets/development/sprockets/c0671678b70011547b80da0669d031cc
559
- - test/dummy/tmp/cache/assets/development/sprockets/c1006115f345f87cc152b851154e9e34
560
- - test/dummy/tmp/cache/assets/development/sprockets/cf0d5ad037fbf541c6b982abf73b9938
561
- - test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994
562
- - test/dummy/tmp/cache/assets/development/sprockets/d6973c1d43f8ca41b98a6b640fda2616
563
- - test/dummy/tmp/cache/assets/development/sprockets/d771ace226fc8215a3572e0aa35bb0d6
564
- - test/dummy/tmp/cache/assets/development/sprockets/da31523b2e8cf32dd8db9f304d5b7395
565
- - test/dummy/tmp/cache/assets/development/sprockets/dc676330961fd22be77c48cb77ec065f
566
- - test/dummy/tmp/cache/assets/development/sprockets/ddc29f2c13cd99d017fd526b61dcb951
567
- - test/dummy/tmp/cache/assets/development/sprockets/de45247cb814cafe20e9e46c79e470fe
568
- - test/dummy/tmp/cache/assets/development/sprockets/df0b7c3ac590a286561806e813c2974f
569
- - test/dummy/tmp/cache/assets/development/sprockets/dfa8b85e3c1273b7e69839e4e607c3e1
570
- - test/dummy/tmp/cache/assets/development/sprockets/e22d705d0c889ec4837f183a9beec0f3
571
- - test/dummy/tmp/cache/assets/development/sprockets/e3a4ad3549e1e57d03698a36daeff406
572
- - test/dummy/tmp/cache/assets/development/sprockets/e7ba95a61b1b9381906a88610dceb6dd
573
- - test/dummy/tmp/cache/assets/development/sprockets/ef7c8ce46dfc9e9087ce84dbdfdd0011
574
- - test/dummy/tmp/cache/assets/development/sprockets/f3e1a8ba304f70dccefd77356c900ebc
575
- - test/dummy/tmp/cache/assets/development/sprockets/f4b5dd06a6113950c0f481cbc5a31a66
576
- - test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655
577
- - test/dummy/tmp/data/meta_request/1c3d4a4b-d7e1-4126-8bfc-572acbc2f675.json
578
- - test/dummy/tmp/data/meta_request/449ff78e-30d2-4cc5-bbb7-3397d04a4c46.json
579
- - test/dummy/tmp/data/meta_request/5974cfb9-99bd-4d5c-a4e1-6e352ecd2dd8.json
580
- - test/dummy/tmp/data/meta_request/960de12b-b1c5-4d44-937b-e3d8c00d682c.json
581
- - test/dummy/tmp/data/meta_request/9df9ad77-1b70-4fb7-ad18-f31f28c60c6c.json
582
- - test/dummy/tmp/data/meta_request/a5374758-4e16-487a-ab11-9a69a1abed2e.json
583
- - test/dummy/tmp/data/meta_request/a65d97b2-df1f-445e-99d5-615c4db5c4e1.json
584
- - test/dummy/tmp/data/meta_request/b3693c6f-23cd-4afe-ae82-38078eaa643a.json
585
- - test/dummy/tmp/data/meta_request/daa1c80a-bad3-4bc1-8f67-d586979cbedc.json
586
- - test/dummy/tmp/data/meta_request/e2e7621f-08e5-46dd-83c2-b87eb6d5fd45.json
587
401
  - test/empty.sqlite3
588
402
  - test/generators/kilt/backend_generator_spec.rb
589
403
  - test/kilt/form_spec.rb
590
404
  - test/kilt/formatting_spec.rb
591
405
  - test/kilt/object_spec.rb
406
+ - test/kilt/upload_spec.rb
592
407
  - test/kilt/utils_spec.rb
593
408
  - test/kilt_object_spec.rb
594
409
  - test/kilt_spec.rb
410
+ - test/kilt_view_model_spec.rb
595
411
  - test/minitest_helper.rb