embed-an-inkpad 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: 3ad530c368adbbf8cc11326ca65fc035347b4cf6
4
- data.tar.gz: 2f4ae7e617581a32208cb163f0eb5537613b66b6
3
+ metadata.gz: a601d67169a1dc7cbce96c8a9980d8aa2fd56576
4
+ data.tar.gz: 7307b4dd674b810a071ae8765c68bc4fb52c3c57
5
5
  SHA512:
6
- metadata.gz: 464136609e56cf32dff27a42d749d5c5ee531ef5d1a53def9939460dd7fd374f894f004d0a3122bae28e8e21adcd0c846385c32034f3600860c8487184a8efa8
7
- data.tar.gz: 35d3181ff5808cd6e92fda0cef6d131c0b1f9182cc8ed524814eb8eee52f3cb940a970c9598e12a7b3756f5b8c10a1445b6124cf0c80c223035f0c1a6b5b88e7
6
+ metadata.gz: b0ce2d31fb517584aef4bc5c1cea361073e47a587c4c9ced39c1d904c566f0c6d94b2b82687e3a4dee288e64b8c49e7463b5273bbd21c1ad05c258c5ec4b8b1c
7
+ data.tar.gz: cd6e3751495e8320f44c9da05e5c6d0bd681ad8be9c5fe6d533d77c0d323553754be33e9d6a77f36ee31a2a75b411e6076088d73ddcfc1e01c3c09b92e5b059e
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'embed-an-inkpad'
3
- s.version = '0.0.1'
3
+ s.version = '0.0.2'
4
4
  s.date = '2015-05-14'
5
5
  s.summary = 'Embed an Inkpad document'
6
6
  s.description = 'Embed an Inkpad document into your Rails app. Stop bothering engineers to update the Terms of Service and other boring semi-static pages. Manage content through inkpad.io.'
@@ -1,20 +1,18 @@
1
1
  module EmbedAnInkpad
2
2
  module ViewHelpers
3
- def embed_an_inkpad inkpad_id
4
-
5
3
 
6
- uri = URI("https://www.inkpad.io/#{inkpad_id}.md")
4
+ def embed_an_inkpad inkpad_id
5
+ uri = URI("https://www.inkpad.io/#{inkpad_id}")
7
6
 
8
7
  Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == 'https') do |http|
9
8
  request = Net::HTTP::Get.new uri
9
+ request['Accept'] = 'text/html;vanilla'
10
10
 
11
- response = http.request request # Net::HTTPResponse object
12
-
13
- content_tag :pre do
14
- response.body
15
- end
11
+ response = http.request request
12
+ response.body.html_safe
16
13
  end
17
14
  end
15
+
18
16
  end
19
17
  end
20
18
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embed-an-inkpad
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lars Kluge