kilt-cms 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +28 -0
- data/Rakefile +7 -0
- data/app/assets/images/kilt/animated-overlay.gif +0 -0
- data/app/assets/images/kilt/ui-bg_flat_0_000_40x100.png +0 -0
- data/app/assets/images/kilt/ui-bg_flat_0_fff_40x100.png +0 -0
- data/app/assets/images/kilt/ui-bg_flat_100_fff_40x100.png +0 -0
- data/app/assets/images/kilt/ui-bg_flat_100_ffffff_40x100.png +0 -0
- data/app/assets/images/kilt/ui-bg_glass_100_fff_1x400.png +0 -0
- data/app/assets/images/kilt/ui-bg_glass_100_ffffff_1x400.png +0 -0
- data/app/assets/images/kilt/ui-bg_highlight-soft_100_fff_1x100.png +0 -0
- data/app/assets/images/kilt/ui-icons_404040_256x240.png +0 -0
- data/app/assets/images/kilt/ui-icons_e74c3c_256x240.png +0 -0
- data/app/assets/javascripts/kilt/application.js +17 -0
- data/app/assets/javascripts/kilt/kilt.js +39 -0
- data/app/assets/stylesheets/kilt/application.scss +1 -0
- data/app/assets/stylesheets/kilt/config.rb +10 -0
- data/app/assets/stylesheets/kilt/sass/_base.scss +25 -0
- data/app/assets/stylesheets/kilt/sass/_buttons.scss +58 -0
- data/app/assets/stylesheets/kilt/sass/_form.scss +73 -0
- data/app/assets/stylesheets/kilt/sass/_layout.scss +85 -0
- data/app/assets/stylesheets/kilt/sass/_mixins.scss +6 -0
- data/app/assets/stylesheets/kilt/sass/_tables.scss +65 -0
- data/app/assets/stylesheets/kilt/sass/_typography.scss +79 -0
- data/app/assets/stylesheets/kilt/sass/modules/_codemirror.scss +262 -0
- data/app/assets/stylesheets/kilt/sass/modules/_jquery_ui.scss +659 -0
- data/app/assets/stylesheets/kilt/sass/screen.scss +1 -0
- data/app/assets/stylesheets/kilt/stylesheets/modules/codemirror.css +1 -0
- data/app/assets/stylesheets/kilt/stylesheets/modules/jquery-ui.css +5 -0
- data/app/assets/stylesheets/kilt/stylesheets/print.css +0 -0
- data/app/assets/stylesheets/kilt/stylesheets/screen.css +5 -0
- data/app/controllers/kilt/kilt_controller.rb +122 -0
- data/app/views/kilt/form/_default.html.erb +4 -0
- data/app/views/kilt/form/boolean.html.erb +4 -0
- data/app/views/kilt/form/datetime.html.erb +4 -0
- data/app/views/kilt/form/file.html.erb +59 -0
- data/app/views/kilt/form/html.html.erb +4 -0
- data/app/views/kilt/form/image.html.erb +72 -0
- data/app/views/kilt/form/longtext.html.erb +4 -0
- data/app/views/kilt/form/number.html.erb +23 -0
- data/app/views/kilt/form/text.html.erb +4 -0
- data/app/views/kilt/form/vimeo.html.erb +100 -0
- data/app/views/kilt/form/youtube.html.erb +98 -0
- data/app/views/kilt/kilt/_form.html.erb +30 -0
- data/app/views/kilt/kilt/edit.html.erb +2 -0
- data/app/views/kilt/kilt/index.html.erb +9 -0
- data/app/views/kilt/kilt/list.html.erb +67 -0
- data/app/views/kilt/kilt/new.html.erb +2 -0
- data/app/views/layouts/kilt/cms.html.erb +41 -0
- data/config/routes.rb +13 -0
- data/lib/generators/kilt/backend_generator.rb +19 -0
- data/lib/generators/kilt/frontend_generator.rb +33 -0
- data/lib/generators/kilt/install_generator.rb +13 -0
- data/lib/generators/kilt/object_generator.rb +23 -0
- data/lib/generators/kilt/templates/backend/config.yml.erb +16 -0
- data/lib/generators/kilt/templates/backend/creds.yml.example +8 -0
- data/lib/generators/kilt/templates/backend/kilt.rb +11 -0
- data/lib/generators/kilt/templates/frontend/application.html.erb +24 -0
- data/lib/generators/kilt/templates/frontend/assets/images/sprite/empty +0 -0
- data/lib/generators/kilt/templates/frontend/assets/images/sprite/retina/empty +0 -0
- data/lib/generators/kilt/templates/frontend/assets/javascripts/application.js +14 -0
- data/lib/generators/kilt/templates/frontend/assets/javascripts/html5shiv.js +2 -0
- data/lib/generators/kilt/templates/frontend/assets/javascripts/mediaqueries.js +1 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/config.rb +24 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/sass/modules/_mixins.scss +81 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/sass/modules/_reset_custom.scss +31 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/sass/modules/_typography.scss +35 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/sass/screen.scss +13 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/sass/views/_layout.scss +7 -0
- data/lib/generators/kilt/templates/frontend/assets/stylesheets/stylesheets/screen.css +160 -0
- data/lib/generators/kilt/templates/frontend/dummy.js.erb +11 -0
- data/lib/generators/kilt/templates/frontend/home_controller.rb.erb +4 -0
- data/lib/generators/kilt/templates/frontend/index.html.erb +5 -0
- data/lib/kilt/base.rb +12 -0
- data/lib/kilt/engine.rb +17 -0
- data/lib/kilt/exceptions.rb +10 -0
- data/lib/kilt/form.rb +28 -0
- data/lib/kilt/object.rb +66 -0
- data/lib/kilt/object_collection.rb +52 -0
- data/lib/kilt/upload.rb +54 -0
- data/lib/kilt/utils.rb +166 -0
- data/lib/kilt.rb +125 -0
- data/lib/tasks/kilt_tasks.rake +6 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/app/assets/images/sprite/empty +0 -0
- data/test/dummy/app/assets/images/sprite/retina/empty +0 -0
- data/test/dummy/app/assets/javascripts/application.js +14 -0
- data/test/dummy/app/assets/javascripts/dummy.js +11 -0
- data/test/dummy/app/assets/javascripts/html5shiv.js +2 -0
- data/test/dummy/app/assets/javascripts/mediaqueries.js +1 -0
- data/test/dummy/app/assets/stylesheets/config.rb +24 -0
- data/test/dummy/app/assets/stylesheets/sass/modules/_mixins.scss +81 -0
- data/test/dummy/app/assets/stylesheets/sass/modules/_reset_custom.scss +31 -0
- data/test/dummy/app/assets/stylesheets/sass/modules/_typography.scss +35 -0
- data/test/dummy/app/assets/stylesheets/sass/screen.scss +13 -0
- data/test/dummy/app/assets/stylesheets/sass/views/_layout.scss +7 -0
- data/test/dummy/app/assets/stylesheets/stylesheets/screen.css +160 -0
- data/test/dummy/app/controllers/application_controller.rb +5 -0
- data/test/dummy/app/controllers/dummy_controller.rb +4 -0
- data/test/dummy/app/views/dummy/index.html.erb +5 -0
- data/test/dummy/app/views/layouts/application.html.erb +24 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config/application.rb +27 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +23 -0
- data/test/dummy/config/environments/test.rb +23 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/kilt.rb +14 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +12 -0
- data/test/dummy/config/initializers/session_store.rb +3 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/kilt/config.yml +40 -0
- data/test/dummy/config/kilt/creds.yml +8 -0
- data/test/dummy/config/routes.rb +7 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/log/development.log +68163 -0
- data/test/dummy/log/test.log +36 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/public/uploads/file/Gemfile +3 -0
- data/test/dummy/public/uploads/file/Gemfile.lock +139 -0
- data/test/dummy/public/uploads/file/README.rdoc +28 -0
- data/test/dummy/public/uploads/file/Rakefile +6 -0
- data/test/dummy/public/uploads/file/barcelona.jpg +0 -0
- data/test/dummy/public/uploads/file/dodgerstadiumpix.jpg +0 -0
- data/test/dummy/public/uploads/file/field.jpg +0 -0
- data/test/dummy/public/uploads/file/fob-elton-john-08.jpg +0 -0
- data/test/dummy/public/uploads/file/kilt.gemspec +32 -0
- data/test/dummy/public/uploads/file/kilt.rb +100 -0
- data/test/dummy/public/uploads/image/2960116125_1158ba3c59_o.jpg +0 -0
- data/test/dummy/public/uploads/image/JT.jpg +0 -0
- data/test/dummy/public/uploads/image/barcelona.jpg +0 -0
- data/test/dummy/public/uploads/image/dodgerstadiumpix.jpg +0 -0
- data/test/dummy/public/uploads/image/field.jpg +0 -0
- data/test/dummy/spec/kilt_spec.rb +31 -0
- data/test/dummy/spec/spec_helper.rb +12 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/03cdc43618f8bef3dfc725a1886c40ed +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/0d8e5c7178ebdb79e5b9cc4ef439eae8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/13a3d23d13c1459a86283c4fe577a775 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/18837248cb3274df9b7c6b0a5dcd56a5 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/1c198a7e1d4ae808a6adf4c4809061eb +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2e57def2c82ce30227eefea2360d5f50 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/36f9a7f6f43adb582ac6eec43b58eb30 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/36fff19076c588427464432f563a8d2d +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3878e0f19bbd21176b1bcc46160a3df3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3cee919b5b764629fbb01de361ad1b99 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3d69f4783ceef2f5455635de03e6c62a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3d8ca1585ee95c5efb388645d66cf377 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/3e0acde4cdc501f590a21ede6fac0b97 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/413be9c73d25c7febe933f4619da7cf8 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4b5c4a1edd3823a6a6c39e06b6eb230a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/4c5736bf0bd429296d1a32930364897e +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/542fc810f9cd36e7bed9a3e5e9670995 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/56f1e7d57d31bf3315e1e33732d57faa +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5bea4c2d87ec725262213ed51575b485 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5eb5178b706a9b8bd0362b7ed487339a +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5fa6492da1cba5232b9e9799b5e2bf8f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/5fe3d26a30497da82978c9f7ee53068b +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/66f697b8e4167ad9ebefbd8b5fc65b23 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6b6e86e81f5e8f80bb2b3d1e8f7ed7f3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6caab0d3b759107ab41492546763aaf0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/6d83c6efd2bf1080ba1dead9fcfdd0db +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/70d4b3b9e59d0e01e90eebf94dbc2c47 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8127282074e6ffd457b72c228a69f0c0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/8ffacb4ba6e6ca3da12ac1100f664b30 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/9dd98bca318fb820a8451cafce020588 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b259805c84c81064f20700498328f109 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/b7e1f059a53a1e79df01a336fb1f50f0 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c0671678b70011547b80da0669d031cc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/c1006115f345f87cc152b851154e9e34 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cf0d5ad037fbf541c6b982abf73b9938 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/da31523b2e8cf32dd8db9f304d5b7395 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/dc676330961fd22be77c48cb77ec065f +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ddc29f2c13cd99d017fd526b61dcb951 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/de45247cb814cafe20e9e46c79e470fe +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e22d705d0c889ec4837f183a9beec0f3 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/e7ba95a61b1b9381906a88610dceb6dd +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/ef7c8ce46dfc9e9087ce84dbdfdd0011 +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f3e1a8ba304f70dccefd77356c900ebc +0 -0
- data/test/dummy/tmp/cache/assets/development/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/dummy/tmp/data/meta_request/2ff92b3b-2e2c-438e-a687-d2900c8722e3.json +1 -0
- data/test/dummy/tmp/data/meta_request/4a2f197b-3f28-4ade-962e-0337d56878b1.json +1 -0
- data/test/dummy/tmp/data/meta_request/7eb04de5-6edf-4ea2-a4cf-994e6173b529.json +1 -0
- data/test/dummy/tmp/data/meta_request/96ec6abc-1da4-45e1-a397-79e849741501.json +1 -0
- data/test/dummy/tmp/data/meta_request/a9566f73-bde1-4346-b254-011381243ddc.json +1 -0
- data/test/dummy/tmp/data/meta_request/a9eb2875-930e-49ed-ab2f-40aba11bb132.json +1 -0
- data/test/dummy/tmp/data/meta_request/bcd27bed-9cac-4c32-8030-2699415e91a1.json +1 -0
- data/test/dummy/tmp/data/meta_request/e6152727-3e54-4858-ad8f-6e57e247a8a5.json +1 -0
- data/test/dummy/tmp/data/meta_request/e7db6149-e316-4ad1-a3a8-c014d0e7092b.json +1 -0
- data/test/dummy/tmp/data/meta_request/fc793f84-b287-4459-b902-705b1d2b1141.json +1 -0
- metadata +536 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
--------------------
|
2
|
+
KiltTest: test_truth
|
3
|
+
--------------------
|
4
|
+
--------------------
|
5
|
+
KiltTest: test_truth
|
6
|
+
--------------------
|
7
|
+
--------------------
|
8
|
+
KiltTest: test_truth
|
9
|
+
--------------------
|
10
|
+
--------------------
|
11
|
+
KiltTest: test_truth
|
12
|
+
--------------------
|
13
|
+
--------------------
|
14
|
+
KiltTest: test_truth
|
15
|
+
--------------------
|
16
|
+
---------------------
|
17
|
+
KiltTest: test_truth2
|
18
|
+
---------------------
|
19
|
+
--------------------
|
20
|
+
KiltTest: test_truth
|
21
|
+
--------------------
|
22
|
+
---------------------
|
23
|
+
KiltTest: test_truth2
|
24
|
+
---------------------
|
25
|
+
--------------------
|
26
|
+
KiltTest: test_truth
|
27
|
+
--------------------
|
28
|
+
---------------------
|
29
|
+
KiltTest: test_truth2
|
30
|
+
---------------------
|
31
|
+
------------------------------------
|
32
|
+
KiltTest: test_Module_is_called_Kilt
|
33
|
+
------------------------------------
|
34
|
+
--------------------
|
35
|
+
KiltTest: test_truth
|
36
|
+
--------------------
|
File without changes
|
@@ -0,0 +1,139 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
kilt (0.0.1)
|
5
|
+
compass-rails
|
6
|
+
jquery-rails
|
7
|
+
jquery-ui-rails
|
8
|
+
rails (= 4.0.1)
|
9
|
+
rails_config
|
10
|
+
rethinkdb
|
11
|
+
sass-rails
|
12
|
+
uglifier
|
13
|
+
|
14
|
+
GEM
|
15
|
+
remote: http://rubygems.org/
|
16
|
+
specs:
|
17
|
+
actionmailer (4.0.1)
|
18
|
+
actionpack (= 4.0.1)
|
19
|
+
mail (~> 2.5.4)
|
20
|
+
actionpack (4.0.1)
|
21
|
+
activesupport (= 4.0.1)
|
22
|
+
builder (~> 3.1.0)
|
23
|
+
erubis (~> 2.7.0)
|
24
|
+
rack (~> 1.5.2)
|
25
|
+
rack-test (~> 0.6.2)
|
26
|
+
activemodel (4.0.1)
|
27
|
+
activesupport (= 4.0.1)
|
28
|
+
builder (~> 3.1.0)
|
29
|
+
activerecord (4.0.1)
|
30
|
+
activemodel (= 4.0.1)
|
31
|
+
activerecord-deprecated_finders (~> 1.0.2)
|
32
|
+
activesupport (= 4.0.1)
|
33
|
+
arel (~> 4.0.0)
|
34
|
+
activerecord-deprecated_finders (1.0.3)
|
35
|
+
activesupport (4.0.1)
|
36
|
+
i18n (~> 0.6, >= 0.6.4)
|
37
|
+
minitest (~> 4.2)
|
38
|
+
multi_json (~> 1.3)
|
39
|
+
thread_safe (~> 0.1)
|
40
|
+
tzinfo (~> 0.3.37)
|
41
|
+
arel (4.0.1)
|
42
|
+
atomic (1.1.14)
|
43
|
+
better_errors (1.0.1)
|
44
|
+
coderay (>= 1.0.0)
|
45
|
+
erubis (>= 2.6.6)
|
46
|
+
binding_of_caller (0.7.2)
|
47
|
+
debug_inspector (>= 0.0.1)
|
48
|
+
builder (3.1.4)
|
49
|
+
callsite (0.0.11)
|
50
|
+
chunky_png (1.2.9)
|
51
|
+
coderay (1.1.0)
|
52
|
+
compass (0.12.2)
|
53
|
+
chunky_png (~> 1.2)
|
54
|
+
fssm (>= 0.2.7)
|
55
|
+
sass (~> 3.1)
|
56
|
+
compass-rails (1.1.2)
|
57
|
+
compass (>= 0.12.2)
|
58
|
+
debug_inspector (0.0.2)
|
59
|
+
erubis (2.7.0)
|
60
|
+
execjs (2.0.2)
|
61
|
+
fssm (0.2.10)
|
62
|
+
hike (1.2.3)
|
63
|
+
i18n (0.6.9)
|
64
|
+
jquery-rails (3.0.4)
|
65
|
+
railties (>= 3.0, < 5.0)
|
66
|
+
thor (>= 0.14, < 2.0)
|
67
|
+
jquery-ui-rails (4.1.1)
|
68
|
+
railties (>= 3.1.0)
|
69
|
+
json (1.8.1)
|
70
|
+
mail (2.5.4)
|
71
|
+
mime-types (~> 1.16)
|
72
|
+
treetop (~> 1.4.8)
|
73
|
+
meta_request (0.2.8)
|
74
|
+
callsite
|
75
|
+
rack-contrib
|
76
|
+
railties
|
77
|
+
mime-types (1.25.1)
|
78
|
+
minitest (4.7.5)
|
79
|
+
multi_json (1.8.2)
|
80
|
+
polyglot (0.3.3)
|
81
|
+
rack (1.5.2)
|
82
|
+
rack-contrib (1.1.0)
|
83
|
+
rack (>= 0.9.1)
|
84
|
+
rack-test (0.6.2)
|
85
|
+
rack (>= 1.0)
|
86
|
+
rails (4.0.1)
|
87
|
+
actionmailer (= 4.0.1)
|
88
|
+
actionpack (= 4.0.1)
|
89
|
+
activerecord (= 4.0.1)
|
90
|
+
activesupport (= 4.0.1)
|
91
|
+
bundler (>= 1.3.0, < 2.0)
|
92
|
+
railties (= 4.0.1)
|
93
|
+
sprockets-rails (~> 2.0.0)
|
94
|
+
rails_config (0.3.3)
|
95
|
+
activesupport (>= 3.0)
|
96
|
+
railties (4.0.1)
|
97
|
+
actionpack (= 4.0.1)
|
98
|
+
activesupport (= 4.0.1)
|
99
|
+
rake (>= 0.8.7)
|
100
|
+
thor (>= 0.18.1, < 2.0)
|
101
|
+
rake (10.1.0)
|
102
|
+
rethinkdb (1.11.0.1)
|
103
|
+
json
|
104
|
+
ruby-protocol-buffers
|
105
|
+
ruby-protocol-buffers (1.5.1)
|
106
|
+
sass (3.2.12)
|
107
|
+
sass-rails (4.0.1)
|
108
|
+
railties (>= 4.0.0, < 5.0)
|
109
|
+
sass (>= 3.1.10)
|
110
|
+
sprockets-rails (~> 2.0.0)
|
111
|
+
sprockets (2.10.1)
|
112
|
+
hike (~> 1.2)
|
113
|
+
multi_json (~> 1.0)
|
114
|
+
rack (~> 1.0)
|
115
|
+
tilt (~> 1.1, != 1.3.0)
|
116
|
+
sprockets-rails (2.0.1)
|
117
|
+
actionpack (>= 3.0)
|
118
|
+
activesupport (>= 3.0)
|
119
|
+
sprockets (~> 2.8)
|
120
|
+
thor (0.18.1)
|
121
|
+
thread_safe (0.1.3)
|
122
|
+
atomic
|
123
|
+
tilt (1.4.1)
|
124
|
+
treetop (1.4.15)
|
125
|
+
polyglot
|
126
|
+
polyglot (>= 0.3.1)
|
127
|
+
tzinfo (0.3.38)
|
128
|
+
uglifier (2.3.3)
|
129
|
+
execjs (>= 0.3.0)
|
130
|
+
json (>= 1.8.0)
|
131
|
+
|
132
|
+
PLATFORMS
|
133
|
+
ruby
|
134
|
+
|
135
|
+
DEPENDENCIES
|
136
|
+
better_errors
|
137
|
+
binding_of_caller
|
138
|
+
kilt!
|
139
|
+
meta_request
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,32 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
# Describe your gem and declare its dependencies:
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "kilt"
|
6
|
+
s.version = "0.0.1"
|
7
|
+
s.authors = ["Ashe Avenue"]
|
8
|
+
s.email = ["community@asheavenue.com"]
|
9
|
+
s.homepage = "http://www.asheavenue.com"
|
10
|
+
s.summary = "Microsite Platform"
|
11
|
+
s.description = "Microsite Platform"
|
12
|
+
|
13
|
+
s.files = Dir["{app,config,lib}/**/*"] + ["Rakefile", "README.rdoc"]
|
14
|
+
s.test_files = Dir["test/**/*"]
|
15
|
+
|
16
|
+
s.add_dependency 'rails', '4.0.1'
|
17
|
+
s.add_dependency 'rethinkdb'
|
18
|
+
s.add_dependency 'rails_config'
|
19
|
+
s.add_dependency 'jquery-rails'
|
20
|
+
s.add_dependency 'jquery-ui-rails'
|
21
|
+
s.add_dependency 'sass-rails'
|
22
|
+
s.add_dependency 'compass-rails'
|
23
|
+
s.add_dependency 'uglifier'
|
24
|
+
|
25
|
+
s.add_development_dependency 'better_errors'
|
26
|
+
s.add_development_dependency 'binding_of_caller'
|
27
|
+
s.add_development_dependency 'meta_request'
|
28
|
+
|
29
|
+
s.required_ruby_version = '>= 2.0.0'
|
30
|
+
|
31
|
+
|
32
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
require "kilt/base"
|
2
|
+
|
3
|
+
# Include the Rethink shortcut module, which will among other things instantiate a new
|
4
|
+
# Rethink object (as "r") if needed
|
5
|
+
include RethinkDB::Shortcuts
|
6
|
+
|
7
|
+
module Kilt
|
8
|
+
|
9
|
+
# Hold the config object
|
10
|
+
mattr_accessor :config
|
11
|
+
|
12
|
+
# Auto-generated endpoints
|
13
|
+
def self.method_missing(method, *args)
|
14
|
+
begin
|
15
|
+
|
16
|
+
if Utils.is_singular? method.to_s
|
17
|
+
# Get the configuration for a type
|
18
|
+
# Example: Kilt.event
|
19
|
+
Kilt.config.objects[method]
|
20
|
+
else
|
21
|
+
# Get a list of objects
|
22
|
+
# Example: Kilt.events
|
23
|
+
Kilt.get_collection method.to_s
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
# Get the list of types
|
29
|
+
# Returns: array of type names
|
30
|
+
# Example: Kilt.types
|
31
|
+
def self.types
|
32
|
+
Kilt.config.objects.map { |key, value| key.to_s }
|
33
|
+
end
|
34
|
+
|
35
|
+
|
36
|
+
# Create an object
|
37
|
+
# Returns: boolean
|
38
|
+
# Example: Kilt.create(object)
|
39
|
+
def self.create(object)
|
40
|
+
object['created_at'] = object['updated_at'] = Time.now
|
41
|
+
result = Utils.db do
|
42
|
+
r.db(Kilt.config.db.db).table('objects').insert(object.values).run
|
43
|
+
end
|
44
|
+
(result['errors'] == 0)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Update an object
|
48
|
+
# Returns: boolean
|
49
|
+
# Example: Kilt.update(object)
|
50
|
+
def self.update(slug, object)
|
51
|
+
object['updated_at'] = Time.now
|
52
|
+
result = Utils.db do
|
53
|
+
r.db(Kilt.config.db.db).table('objects').filter({'slug' => "#{slug}"}).update(object.values).run
|
54
|
+
end
|
55
|
+
(result['errors'] == 0)
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
# Delete an object
|
60
|
+
# Returns: boolean
|
61
|
+
# Example: Kilt.delete('some-object')
|
62
|
+
def self.delete(slug)
|
63
|
+
result = Utils.db do
|
64
|
+
r.db(Kilt.config.db.db).table('objects').filter({'slug' => "#{slug}"}).delete().run
|
65
|
+
end
|
66
|
+
(result['errors'] == 0)
|
67
|
+
end
|
68
|
+
|
69
|
+
# Get the content for a specific object
|
70
|
+
# Returns: Kilt::Object instance
|
71
|
+
# Example: Kilt.object('big-event')
|
72
|
+
def self.get(slug)
|
73
|
+
# connect to the db, get the object, close the connection, return the object
|
74
|
+
results = Utils.db do
|
75
|
+
r.db(Kilt.config.db.db).table('objects').filter({'slug' => slug}).limit(1).run
|
76
|
+
end
|
77
|
+
|
78
|
+
# Get the values
|
79
|
+
values = results.to_a.first
|
80
|
+
|
81
|
+
# create an object and return it
|
82
|
+
Kilt::Object.new(values['type'], values)
|
83
|
+
end
|
84
|
+
|
85
|
+
# Get a list of objects
|
86
|
+
# Returns: array of hashes
|
87
|
+
# Example: Kilt.objects('events')
|
88
|
+
# Used directly or via method_missing
|
89
|
+
def self.get_collection(object_type)
|
90
|
+
# connect to the db, get the date, close the connection, return the array
|
91
|
+
results = Utils.db do
|
92
|
+
r.db(Kilt.config.db.db).table('objects').filter({'type' => "#{object_type.singularize.to_s}"}).run
|
93
|
+
end
|
94
|
+
|
95
|
+
# create an object collection
|
96
|
+
Kilt::ObjectCollection.new(results.to_a)
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Kilt do
|
4
|
+
it "should exist" do
|
5
|
+
Kilt.should be
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
describe Kilt.config do
|
10
|
+
it "should be found" do
|
11
|
+
Kilt.config.should be
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
describe Kilt.types do
|
16
|
+
it "should exist" do
|
17
|
+
Kilt.types.should be
|
18
|
+
end
|
19
|
+
it "should have at least one object" do
|
20
|
+
Kilt.types.count.should be > 0
|
21
|
+
end
|
22
|
+
it "should have the same number of types as found in the config" do
|
23
|
+
Kilt.types.count.should eq(Kilt.config.objects.count)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe Kilt.slkjfklsjdflksjdf do
|
28
|
+
it "should return nil if non-existent method called" do
|
29
|
+
Kilt.slkjfklsjdflksjdf.should be_nil
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
+
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
require File.expand_path("../../config/environment", __FILE__)
|
4
|
+
require 'rspec/rails'
|
5
|
+
require 'rspec/autorun'
|
6
|
+
|
7
|
+
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
|
8
|
+
|
9
|
+
RSpec.configure do |config|
|
10
|
+
config.infer_base_class_for_anonymous_controllers = false
|
11
|
+
config.order = "random"
|
12
|
+
end
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|