rack-refresher 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rack/refresher.rb +3 -1
  3. metadata +44 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c7b0c54d1a4a1d0c3dfdbdc0a77d6546ac1f9b4
4
- data.tar.gz: '017769e685a8f654e21c95fcd0244bf34980fd3e'
3
+ metadata.gz: 8b5af6cb3f0afb937b3a52bfb2fd995f503fcb2d
4
+ data.tar.gz: e8f7761510b73c82eef8c5df9e417c0b4d270d2a
5
5
  SHA512:
6
- metadata.gz: eb2d1dda17d368af7ff510177797dad133c48e34a69e91fb89708dae895e6f779667d4d0c6e3941d68c729d9a30e72fd75ac71bda966462b40ef0577958f4b4a
7
- data.tar.gz: 66627756191b8b7926eff4cd2f2c79a81c99959e065147cad3ec9bceae7857290c7a983e52f8cac766e2a9b0b2a252f96f2b2cd3a9ba82704bc8bd786117e320
6
+ metadata.gz: 1ef8733a7f126ccbbc9992be05ae7781a142aaa844352291adbe7a5c41effb2d57e4dad5fc4502a32715e654473917b909aeac29aa9881fc06b85ff2e44206a1
7
+ data.tar.gz: 1b18adfe42c8134279b777124dfff3b25f5926d15768e22e4305ab8dfce31911bef5c0449112ee6ad51989bbde982ee1013e419835254968e76055ae2bcf0762
@@ -2,6 +2,8 @@ module Rack
2
2
  class Refresher
3
3
  class Config
4
4
  attr_accessor :interval, :ajax
5
+ alias delay interval
6
+ alias delay= interval=
5
7
 
6
8
  def initialize
7
9
  @interval = 5000
@@ -25,7 +27,7 @@ module Rack
25
27
 
26
28
  def inject(body)
27
29
  body = body.join("\n")
28
- [body.gsub!(/<\/body>/, render_template)]
30
+ [body.gsub(/<\/body>/i, render_template)]
29
31
  end
30
32
 
31
33
  def render_template
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-refresher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Zinovyev
@@ -9,7 +9,49 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2018-05-30 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rack
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '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.7'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.7'
13
55
  description: Refresh the content of your page with a given interval
14
56
  email: ivan@zinovyev.net
15
57
  executables: []