hotloader 1.0.0
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 +7 -0
- data/README.md +50 -0
- data/Rakefile +6 -0
- data/app/assets/javascripts/hotloader.js +10 -0
- data/app/channels/refresh_channel.rb +6 -0
- data/app/config/refresh.yaml +12 -0
- data/config/routes.rb +3 -0
- data/lib/hotloader/version.rb +3 -0
- data/lib/hotloader.rb +24 -0
- metadata +135 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c913a93fa874db1609ada73e28773b7e80fe696dabea5d477d8fc804f1368988
|
4
|
+
data.tar.gz: 6f7051e408bc71991c61feff9eca328456f79f2ce5e318f1b9b9570381762be7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cb108bf7a625d1de50db4c0241a9ddb08e0672c3b8f6b5d128ebe7924ee6088dd746c8a4c980c7751ccf15d0efcd33767965c25af4a741144d64c4585fa5710c
|
7
|
+
data.tar.gz: f5a864de867ece742dca5bb2a4942e349389f038aa46f8a30d67cc74e335516f36a401a330e558c6981372d452b96e7dfc787a215bff413d34a2b43d3a77adbf
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# Hotloader by Voxoff
|
2
|
+
Hate refreshing every time you edit your views? Start Hotloading.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'hotloader'
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install hotloader
|
19
|
+
|
20
|
+
|
21
|
+
``` javascript
|
22
|
+
//= require hotloader
|
23
|
+
```
|
24
|
+
|
25
|
+
While we wait on Rubygems
|
26
|
+
```ruby
|
27
|
+
gem "hotloader", :git => "git://github.com/Voxoff/hotloader.git"
|
28
|
+
```
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
Do the above. Everytime you save a a file in your rails app folder, your page will automatically refresh.
|
33
|
+
|
34
|
+
## Development
|
35
|
+
|
36
|
+
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.
|
37
|
+
|
38
|
+
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).
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
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.
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
47
|
+
|
48
|
+
## Code of Conduct
|
49
|
+
|
50
|
+
Everyone interacting in the Hotloader project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hotloader/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
development:
|
2
|
+
adapter: redis
|
3
|
+
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
|
4
|
+
|
5
|
+
|
6
|
+
test:
|
7
|
+
adapter: async
|
8
|
+
|
9
|
+
production:
|
10
|
+
adapter: redis
|
11
|
+
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
|
12
|
+
channel_prefix: hotloader_production
|
data/config/routes.rb
ADDED
data/lib/hotloader.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require "hotloader/version"
|
2
|
+
module Hotloader
|
3
|
+
class Engine < ::Rails::Engine
|
4
|
+
isolate_namespace Hotloader
|
5
|
+
|
6
|
+
initializer "refresh", before: :load_config_initializers do |app|
|
7
|
+
Rails.application.routes.append do
|
8
|
+
mount ActionCable.server => '/cable'
|
9
|
+
end
|
10
|
+
|
11
|
+
Rails.application.configure do
|
12
|
+
ActionCable.server.config.logger = Logger.new(nil)
|
13
|
+
end
|
14
|
+
# app.paths.add "config/cable", with: "config/refesh.yml"
|
15
|
+
|
16
|
+
listener = Listen.to("app") do
|
17
|
+
ActionCable.server.broadcast "refresh_channel", {title: "refresh"}
|
18
|
+
end
|
19
|
+
listener.start
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
|
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hotloader
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Voxoff
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-10-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: listen
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 3.0.5
|
65
|
+
type: :runtime
|
66
|
+
prerelease: false
|
67
|
+
version_requirements: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - "~>"
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '3.0'
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: 3.0.5
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: rails
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '5.2'
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: 5.1.0
|
85
|
+
type: :runtime
|
86
|
+
prerelease: false
|
87
|
+
version_requirements: !ruby/object:Gem::Requirement
|
88
|
+
requirements:
|
89
|
+
- - "~>"
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: '5.2'
|
92
|
+
- - ">="
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: 5.1.0
|
95
|
+
description: Hotloader uses ActionCable to server your page every time you save a
|
96
|
+
file in your app dir. That's your views, css etc.
|
97
|
+
email:
|
98
|
+
- guybennettjones@hotmail.co.uk
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- README.md
|
104
|
+
- Rakefile
|
105
|
+
- app/assets/javascripts/hotloader.js
|
106
|
+
- app/channels/refresh_channel.rb
|
107
|
+
- app/config/refresh.yaml
|
108
|
+
- config/routes.rb
|
109
|
+
- lib/hotloader.rb
|
110
|
+
- lib/hotloader/version.rb
|
111
|
+
homepage: https://www.github.com/Voxoff
|
112
|
+
licenses:
|
113
|
+
- MIT
|
114
|
+
metadata: {}
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options: []
|
117
|
+
require_paths:
|
118
|
+
- lib
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
requirements: []
|
130
|
+
rubyforge_project:
|
131
|
+
rubygems_version: 2.7.6
|
132
|
+
signing_key:
|
133
|
+
specification_version: 4
|
134
|
+
summary: Hate refreshing every time you edit your views? Start Hotloading.
|
135
|
+
test_files: []
|