kablam 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89f51c6495e7df1d684d6b6274a16381f4e93d94b5dc8bddb5450bccb923f793
|
4
|
+
data.tar.gz: 13e591e33c2d7f003a03ba9e7f1ceb9e28ed07ef6f766261c61a7a0f24a140f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eadcfa689fb77e3c99173e02469ff4e44b104f3f705d2668333650f8fb0805ab1b7e9a9c52984a8eb7f0370e1bac3cc727980956bbd1d23d9ea818c2b9b026df
|
7
|
+
data.tar.gz: f35dd3b95a438843bc176951810201c3a39881d31a75fedcb6a6fade0bbf64a794a98d639c2420fcb169442333ebdf15b8655891544440536346f8d4940df2d4
|
@@ -1,6 +1,3 @@
|
|
1
|
-
var scrollPosition;
|
2
|
-
document.addEventListener('turbolinks:load', refreshScroll());
|
3
|
-
|
4
1
|
function refreshScroll(){
|
5
2
|
if (scrollPosition) {
|
6
3
|
window.scrollTo.apply(window, scrollPosition);
|
@@ -93,3 +90,6 @@ function HtmlNode(data, options={}){
|
|
93
90
|
<div class="${options.messageDivClass}"><p class="${options.messageClass}">${content}</p></div>`;
|
94
91
|
chatdiv.insertAdjacentElement('afterbegin', new_message);
|
95
92
|
}
|
93
|
+
|
94
|
+
var scrollPosition;
|
95
|
+
document.addEventListener('turbolinks:load', refreshScroll());
|
data/kablam.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'kablam'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.9'
|
4
4
|
s.date = '2018-09-14'
|
5
5
|
s.summary = "Kablam! All the things you hate. But Faster."
|
6
6
|
s.description = "Gem to make development of everything in rails faster. Form creation & styling, all the resource routes, even actioncable messaging!\n {NOTE: In Development. NOT READY FOR TESTING.}"
|
@@ -16,24 +16,14 @@ module Kablam
|
|
16
16
|
end
|
17
17
|
def setup_routes
|
18
18
|
inject_into_file 'config/routes.rb', before: "end" do
|
19
|
-
" # KABLAM! form/create/update/destroy/undo for all models"
|
20
|
-
" # Note: Make sure Kablam engine is at the BOTTOM of routes"
|
21
|
-
" # helpers to use KABLAM! [examples w/ 'posts' model)"
|
22
|
-
" # ---> kablam.form_path('posts')"
|
23
|
-
" # (if edit form, must add '?id=\#\{@post.id\}' at end of path)"
|
24
|
-
" # ---> kablam.create_path('posts')"
|
25
|
-
" # ---> kablam.delete_path('posts', @post)"
|
26
|
-
" # ---> kablam.update_path('posts', @post)"
|
27
|
-
" # ---> kablam.undo_path('posts', @post)"
|
28
|
-
" mount Kablam::Engine => '/kablam', as: 'kablam'\n"
|
19
|
+
" # KABLAM! form/create/update/destroy/undo for all models\n # Note: Make sure Kablam engine is at the BOTTOM of routes\n # helpers to use KABLAM! [examples w/ 'posts' model)\n # ---> kablam.form_path('posts')\n # (if edit form, must add '?id=\#\{@post.id\}' at end of path)\n # ---> kablam.create_path('posts')\n # ---> kablam.delete_path('posts', @post)\n # ---> kablam.update_path('posts', @post)\n # ---> kablam.undo_path('posts', @post)\n mount Kablam::Engine => '/kablam', as: 'kablam'\n"
|
29
20
|
end
|
30
21
|
|
31
22
|
end
|
32
23
|
|
33
24
|
def setup_assets
|
34
25
|
inject_into_file 'app/assets/javascripts/application.js', before: "//= require_tree ." do
|
35
|
-
"//=require kablam/ajax"
|
36
|
-
"//=require kablam/forms\n"
|
26
|
+
"//= require kablam/ajax \n//= require kablam/forms\n"
|
37
27
|
end
|
38
28
|
prepend_file 'app/assets/stylesheets/application.css.scss', "@import 'kablam';\n"
|
39
29
|
end
|
@@ -7,8 +7,8 @@ module Kablam
|
|
7
7
|
source_root File.expand_path('../templates', __FILE__)
|
8
8
|
|
9
9
|
def setup_action_cable
|
10
|
-
inject_into_file 'app/assets/javascripts/application.js', after: "//=require_tree
|
11
|
-
"//=require cable"
|
10
|
+
inject_into_file 'app/assets/javascripts/application.js', after: "//= require_tree ." do
|
11
|
+
"\n//= require cable"
|
12
12
|
end
|
13
13
|
inject_into_file 'config/routes.rb', before: 'end' do
|
14
14
|
" mount ActionCable.server => '/cable'\n"
|
@@ -30,8 +30,8 @@ module Kablam
|
|
30
30
|
rake "db:migrate"
|
31
31
|
end
|
32
32
|
def setup_assets
|
33
|
-
inject_into_file 'app/assets/javascripts/application.js', before: "//=require_tree
|
34
|
-
"//=require kablam/messaging"
|
33
|
+
inject_into_file 'app/assets/javascripts/application.js', before: "//= require_tree ." do
|
34
|
+
"//= require kablam/messaging"
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|