hotloader 1.0.6 → 1.0.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82996ddec83f4812df629a5576fc8f03d0dc92994e36bd108fe874a1cc8b2fd4
4
- data.tar.gz: 87a7b6103133d8a1cccce291455a6e479962b33148febd12301269154659a847
3
+ metadata.gz: a673a1d22853218f0aa0a072438d91c37f9bd13006f4375a47537e19451bbad3
4
+ data.tar.gz: e4ef452b3beb541e31bd1c699500b7381fd5197195be37d4f14909f76eb8cb33
5
5
  SHA512:
6
- metadata.gz: 59f3e4451033f6d10cc4573ce926852c0a568000a5ebe6e1f2c8f9240e6c504ce749ff7f23056135514d734dc9d15a4083bbba1cf3f947953dded46262d4ce45
7
- data.tar.gz: bd9852193b5f1f9e931381645fd9547ed70e0669d86ad3ba6d3c4c85cc744bd1cf9fddbfd7898d05a52c70de98ba430347fa5a548197190b7ed059103245ad69
6
+ metadata.gz: 7740cc2959b2d35f092131e6ab020a85b47a6fdad0e777984b00b072dd42c937361c6b1e9454afabffb156d8fcc39a73d1f88ef225b6d78ace255774232dd317
7
+ data.tar.gz: bf19adcf780a5e0f4f3e5ca0bf8c16e6ab9aa23feb72af3083f50551f1f7e4d82abe16926bcb1457fbdb104632d92902baf96043d0b5c4e332bf80c837a0effb
data/README.md CHANGED
@@ -1,5 +1,16 @@
1
- # Hotloader by Voxoff
2
- Hate refreshing every time you edit your views? Start Hotloading. Give it 10 secs on boot to load ActionCable and give some logs.
1
+ # Hotloader
2
+ Ya know that :expressionless: face when you're waiting for your views to load. _Every_ time you change a 'lil bit of CSS. Well Hotloader auto refreshes :open_mouth: :smirk:
3
+
4
+
5
+ Hate faffing with Guard, Guardfiles, GuardLiveReload, bundle exec guard blah blah blah? :unamused: A problem no longer! :smirk:
6
+
7
+ Everytime you save a file in your rails app folder, your browser will automatically refresh. Save a view, a controller, a css component, your browser will auto refresh.
8
+
9
+ Give ActionCable time to boot on launch of server and voila.
10
+
11
+ [![Gem Version](https://badge.fury.io/rb/hotloader.svg)](https://badge.fury.io/rb/hotloader)
12
+
13
+ https://rubygems.org/gems/hotloader
3
14
 
4
15
  ## Installation
5
16
 
@@ -9,29 +20,17 @@ Add this line to your application's Gemfile:
9
20
  gem 'hotloader'
10
21
  ```
11
22
 
12
- And then execute:
13
-
14
- $ bundle
15
-
16
23
  Or install it yourself as:
17
24
 
18
25
  $ gem install hotloader
19
- Do this please
26
+
27
+
28
+ Dont' forget the javascript in application.js
20
29
 
21
30
  ``` javascript
22
31
  //= require hotloader
23
32
  ```
24
33
 
25
- ## Usage
26
-
27
- Do the above. Everytime you save a a file in your rails app folder, your page will automatically refresh.
28
-
29
- ## Development
30
-
31
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
32
-
33
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
34
-
35
34
  ## Contributing
36
35
 
37
36
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hotloader. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
@@ -1,33 +1,33 @@
1
- require "hotloader/version"
1
+ require 'hotloader/version'
2
2
  module Hotloader
3
3
  class Engine < ::Rails::Engine
4
4
  isolate_namespace Hotloader
5
+ if Rails.env.development?
6
+ initializer 'refresh', before: :load_config_initializers do |app|
7
+ Rails.application.routes.append do
8
+ mount ActionCable.server => '/cable'
9
+ end
5
10
 
6
- initializer "refresh", before: :load_config_initializers do |app|
7
- Rails.application.routes.append do
8
- mount ActionCable.server => '/cable'
9
- end
10
- Rails.application.configure do
11
+ Rails.application.configure do
11
12
  ActionCable.server.config.logger = Logger.new(nil)
12
- end
13
+ end
13
14
 
14
- Hotloader.load_files.each do |file|
15
- require_relative File.join("../", file)
16
- end
15
+ Hotloader.load_files.each do |file|
16
+ require_relative File.join('../', file)
17
+ end
17
18
 
18
- app.config.assets.precompile << "hotloader.js"
19
+ app.config.assets.precompile << 'hotloader.js'
19
20
 
20
- listener = Listen.to("app") do
21
- ActionCable.server.broadcast "refresh_channel", {title: "refresh"}
21
+ listener = Listen.to('app') do
22
+ ActionCable.server.broadcast 'refresh_channel', { title: "refresh" }
23
+ end
24
+ listener.start
22
25
  end
23
- listener.start
24
26
  end
25
27
  end
26
28
  def self.load_files
27
29
  [
28
- "app/channels/refresh_channel.rb"
30
+ 'app/channels/refresh_channel.rb'
29
31
  ]
30
- end
32
+ end
31
33
  end
32
-
33
-
@@ -1,3 +1,3 @@
1
1
  module Hotloader
2
- VERSION = "1.0.6"
2
+ VERSION = '1.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hotloader
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Voxoff
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-27 00:00:00.000000000 Z
11
+ date: 2019-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,22 +76,22 @@ dependencies:
76
76
  name: rails
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - "~>"
80
- - !ruby/object:Gem::Version
81
- version: '5.2'
82
79
  - - ">="
83
80
  - !ruby/object:Gem::Version
84
81
  version: 5.1.0
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '5.2'
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
- - - "~>"
90
- - !ruby/object:Gem::Version
91
- version: '5.2'
92
89
  - - ">="
93
90
  - !ruby/object:Gem::Version
94
91
  version: 5.1.0
92
+ - - "~>"
93
+ - !ruby/object:Gem::Version
94
+ version: '5.2'
95
95
  description: Hotloader uses ActionCable to serve your page every time you save a file
96
96
  in your app dir. That's your views, css, controllers etc.
97
97
  email:
@@ -126,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.7.6
129
+ rubygems_version: 2.7.8
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Hate refreshing every time you edit your views? Start Hotloading.