alephant-renderer 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/alephant/renderer/response.rb +11 -0
- data/lib/alephant/renderer/version.rb +1 -1
- data/spec/response_spec.rb +15 -0
- data/spec/spec_helper.rb +2 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad4f4e0d04e590adb1c3a2c5be57aa71dc61f8ba
|
4
|
+
data.tar.gz: 863a7c8383bd228eeadbf70f2267b1539135bca7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c0b3f0df66da551e058e2a7b50cd1318ad63c33f4d36cc78f15dc3689965b8adf16e20d925854ee5309912416f895156208f71228f0f2e68e4d96d54d0f59a3
|
7
|
+
data.tar.gz: 0514d2fa6fe42f5c92d5fe7c70f3a4f928ae0cbc04a5521923800a4e00f0fe338529eb82d06ab8bbf29120c795779d462c3e0bcb6dd7e4d8d2c2424e21170cd0
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Alephant::Renderer::Response do
|
4
|
+
subject { described_class.new content }
|
5
|
+
let(:content) { "<h1>foo</h1>" }
|
6
|
+
|
7
|
+
describe "#to_json" do
|
8
|
+
let(:expected_structure) { "content" => content }
|
9
|
+
|
10
|
+
specify do
|
11
|
+
expect(JSON.parse subject.to_json).to eq expected_structure
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,12 @@
|
|
1
1
|
$: << File.join(File.dirname(__FILE__),"..", "lib")
|
2
2
|
|
3
3
|
require 'pry'
|
4
|
+
require "json"
|
4
5
|
|
5
6
|
require 'alephant/renderer'
|
6
7
|
require 'alephant/renderer/views'
|
7
8
|
require 'alephant/renderer/views/json'
|
8
9
|
require 'alephant/renderer/views/html'
|
9
10
|
require 'alephant/renderer/view_mapper'
|
11
|
+
require "alephant/renderer/response"
|
10
12
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alephant-renderer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Kenny
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- Rakefile
|
224
224
|
- alephant-renderer.gemspec
|
225
225
|
- lib/alephant/renderer.rb
|
226
|
+
- lib/alephant/renderer/response.rb
|
226
227
|
- lib/alephant/renderer/version.rb
|
227
228
|
- lib/alephant/renderer/view_mapper.rb
|
228
229
|
- lib/alephant/renderer/views.rb
|
@@ -234,6 +235,7 @@ files:
|
|
234
235
|
- spec/fixtures/components/foo/models/json.rb
|
235
236
|
- spec/integration/spec_helper.rb
|
236
237
|
- spec/renderer_spec.rb
|
238
|
+
- spec/response_spec.rb
|
237
239
|
- spec/spec_helper.rb
|
238
240
|
- spec/view_mapper_spec.rb
|
239
241
|
- spec/views_json_spec.rb
|
@@ -268,6 +270,7 @@ test_files:
|
|
268
270
|
- spec/fixtures/components/foo/models/json.rb
|
269
271
|
- spec/integration/spec_helper.rb
|
270
272
|
- spec/renderer_spec.rb
|
273
|
+
- spec/response_spec.rb
|
271
274
|
- spec/spec_helper.rb
|
272
275
|
- spec/view_mapper_spec.rb
|
273
276
|
- spec/views_json_spec.rb
|