simple_decorator 0.0.4 → 0.0.5
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 +4 -4
- data/README.md +5 -1
- data/lib/simple_decorator/fetcher.rb +2 -1
- data/lib/simple_decorator/filter/decorator.rb +1 -1
- data/lib/simple_decorator/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d14cd635404f5b004e53735bb5c9073a9aaefed1
|
|
4
|
+
data.tar.gz: 4d98cd997fdb519a38b44460b671dd4f76e2f322
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6fa0a0e7faaa7458bbdff68bd7296499c756fdd2e0a6a18edaf954bf68d74e44710efee20dbc0607f305996435b80c6e623c2d73c20785d017618f65bb500093
|
|
7
|
+
data.tar.gz: c044556b994fa7162ea0e12561fe0a2f3320c5924ed4c48494c23d2ab47f782cc4520763c56176e1fc3bda6e840628e956cc4495bd9b19e2f6b465e9038096d1
|
data/README.md
CHANGED
|
@@ -58,4 +58,8 @@ The response will now have the layout of your decorator, but display dynamic con
|
|
|
58
58
|
<h1>My apps dynamic response</h1>
|
|
59
59
|
</div>
|
|
60
60
|
</body>
|
|
61
|
-
</html>
|
|
61
|
+
</html>
|
|
62
|
+
|
|
63
|
+
## Code status
|
|
64
|
+
|
|
65
|
+
[](https://codeclimate.com/github/bring/kp-simple-decorator)
|
|
@@ -9,7 +9,8 @@ class Fetcher
|
|
|
9
9
|
def fetch(url)
|
|
10
10
|
uri = URI.parse(url)
|
|
11
11
|
http = Net::HTTP.new(uri.host, uri.port, @opts[:proxy])
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
http.request(Net::HTTP::Get.new(uri.request_uri)).body.force_encoding('utf-8').encode('utf-8')
|
|
13
14
|
end
|
|
14
15
|
|
|
15
16
|
|
|
@@ -4,7 +4,7 @@ module SimpleDecorator
|
|
|
4
4
|
module Filter
|
|
5
5
|
class Decorator < Rack::Plastic
|
|
6
6
|
def change_html_string(html)
|
|
7
|
-
return html unless request.env["simple_decorator.layout.url"]
|
|
7
|
+
return html unless request.env["simple_decorator.layout.url"]
|
|
8
8
|
return html if request.xhr?
|
|
9
9
|
|
|
10
10
|
layout_url = request.env["simple_decorator.layout.url"]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simple_decorator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eirik Lied
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-01-
|
|
11
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rspec
|