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: 1fa5a3d9c4ce4f8e361eba49ab2849f2d46e38304c6757e9b3b0f0faec5e700e
4
- data.tar.gz: d0d710320c02a28314a7084285f413030a00190cb78564720c37061cc1b35958
3
+ metadata.gz: 89f51c6495e7df1d684d6b6274a16381f4e93d94b5dc8bddb5450bccb923f793
4
+ data.tar.gz: 13e591e33c2d7f003a03ba9e7f1ceb9e28ed07ef6f766261c61a7a0f24a140f4
5
5
  SHA512:
6
- metadata.gz: 82081bc1a3ca1f92e6ad8ef0eb9a568e3cfc1076d154796cc4bc7276fc113d026e25735e6d9415c1c34dbc151e09c3bde97d112039dce00607115f76fdf3fb33
7
- data.tar.gz: fe825602f623322bdc165e232b25343c832bc65f6f5ffec33505c5c447c022bbdd9e7bd4a5714666305cd77af00de832b0768baf6249e35367b0a70642c457e1
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());
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'kablam'
3
- s.version = '0.1.8'
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 .\n" do
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 .\n" do
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kablam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergio Rivas