response_mate-nanoc 0.0.7
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 +15 -0
- data/.gitignore +1 -0
- data/Gemfile +4 -0
- data/Rakefile +13 -0
- data/lib/response_mate/nanoc.rb +4 -0
- data/lib/response_mate/nanoc/formatter.rb +152 -0
- data/lib/response_mate/nanoc/version.rb +5 -0
- data/response_mate-nanoc.gemspec +25 -0
- data/spec/fixtures/recordings/invalid_yml.yml +2 -0
- data/spec/fixtures/recordings/skus_index.yml +31 -0
- data/spec/fixtures/recordings/skus_index_with_string_body.yml +28 -0
- data/spec/lib/response_mate/nanoc/formatter_spec.rb +119 -0
- data/spec/lib/response_mate/nanoc_spec.rb +7 -0
- data/spec/spec_helper.rb +17 -0
- metadata +156 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MGQzNGFkYTMyZjUzMzY0NDAwNGU3ZWFjNjI1MjAyOGQ0YjJjMTEyYw==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZWE1M2Y2NTBiNzViMDA5NzhiNmE3M2NkMzY1MzU2YTM1ZGVlOTA0Ng==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjEyNzliNWM3MjIwODA0YjdhYjk1M2RiNDYwNjg3NDY4N2ZjYzA3OTE5NzZh
|
10
|
+
MDM5NGY5YmUyMmZkMGI1NGJiOTFjNjU3ODU5MzY4NWI4YjNlNmU4NjAyZjg2
|
11
|
+
MjQzZmFiYmJkNzZhOGQyNTg4ZmZhM2NmMTQ0YmM5YTk1N2Q1NTE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZjdhZTIxOGJlYTRiMTA2NTA4MmFjOGQyN2Y3OGVhOTEwMmNkZmJhNTNiZTM5
|
14
|
+
YzEyMGZlNjJmMDZjMDhkZGU2NWQ3NTQzNzFlZjY2YWE0YzQ5NGFiZGRhYmNj
|
15
|
+
NzFiMjQzZWQxZGEyZDY5ZDYzMDFkZWYxYWJhMjYyMGU5YzI1YjU=
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.lock
|
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rake/testtask'
|
5
|
+
require 'rspec/core/rake_task'
|
6
|
+
|
7
|
+
desc 'Run RSpec'
|
8
|
+
RSpec::Core::RakeTask.new(:test) do |spec|
|
9
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
10
|
+
spec.rspec_opts = ['--color', '--format nested']
|
11
|
+
end
|
12
|
+
|
13
|
+
task :default => :test
|
@@ -0,0 +1,152 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
module ResponseMate
|
4
|
+
module Nanoc
|
5
|
+
module Formatter
|
6
|
+
FILTERED_PARAMS = [:oauth_token]
|
7
|
+
|
8
|
+
def recordings_path
|
9
|
+
ResponseMate.configuration.output_dir
|
10
|
+
end
|
11
|
+
|
12
|
+
# @param recording_key <String, Symbol> the key matching a recording in
|
13
|
+
# recordings
|
14
|
+
# @param options [Hash] options for rendering
|
15
|
+
# @option options [Array] :only defines which elements should be created
|
16
|
+
# The possible values are:
|
17
|
+
# :request -> creates html with request verb, path and params used
|
18
|
+
# :description -> creates html with description specified in recordings
|
19
|
+
# file (under :meta => :description key)
|
20
|
+
# :status -> The response status code (200, 400 etc)
|
21
|
+
# :body -> The actual response body
|
22
|
+
#
|
23
|
+
# @return html for the specified recording
|
24
|
+
def render_recording(recording_key, options = {})
|
25
|
+
recording = load_recording(recording_key)
|
26
|
+
|
27
|
+
if !options[:only]
|
28
|
+
options[:only] = [:request, :description, :status, :body]
|
29
|
+
end
|
30
|
+
|
31
|
+
result = '<div class="example">'
|
32
|
+
result << format_request(recording) if options[:only].include?(:request)
|
33
|
+
result << add_toggler
|
34
|
+
result << format_description(recording) if options[:only].include?(:description)
|
35
|
+
result << format_response(recording, options)
|
36
|
+
result << '</div>'
|
37
|
+
|
38
|
+
result
|
39
|
+
end
|
40
|
+
|
41
|
+
def load_recording(key)
|
42
|
+
filename = File.join(recordings_path, "#{key}.yml")
|
43
|
+
|
44
|
+
if !File.exists?(filename)
|
45
|
+
raise "#{key} key was not found. Try Running `response_mate record`."\
|
46
|
+
"Use `response_mate list recordings` to view available keys"
|
47
|
+
end
|
48
|
+
|
49
|
+
recording = YAML.load_file(filename)
|
50
|
+
|
51
|
+
recording.symbolize_keys
|
52
|
+
end
|
53
|
+
|
54
|
+
def json(key)
|
55
|
+
hash = case key
|
56
|
+
when Hash
|
57
|
+
h = {}
|
58
|
+
key.each { |k, v| h[k.to_s] = v }
|
59
|
+
h
|
60
|
+
when Array
|
61
|
+
key
|
62
|
+
else Resources.const_get(key.to_s.upcase)
|
63
|
+
end
|
64
|
+
|
65
|
+
hash = yield hash if block_given?
|
66
|
+
|
67
|
+
%(<pre class="highlight"><code class="language-javascript">) +
|
68
|
+
JSON.pretty_generate(hash) + "</code></pre>"
|
69
|
+
end
|
70
|
+
|
71
|
+
def prepared_response(key)
|
72
|
+
response = YAML.load_file("./output/responses/#{key}.yml")
|
73
|
+
headers_output = headers(response[:status])
|
74
|
+
body_content = JSON.pretty_generate(JSON.parse(response[:body]))
|
75
|
+
body_output = %(<pre class="highlight"><code class="language-javascript">) +
|
76
|
+
body_content + "</code></pre>"
|
77
|
+
|
78
|
+
headers_output + body_output
|
79
|
+
end
|
80
|
+
|
81
|
+
def text_html(response, status, head = {})
|
82
|
+
hs = headers(status, head.merge('Content-Type' => 'text/html'))
|
83
|
+
res = CGI.escapeHTML(response)
|
84
|
+
hs + %(<pre class="highlight"><code>) + res + "</code></pre>"
|
85
|
+
end
|
86
|
+
|
87
|
+
def headers(status, head = {})
|
88
|
+
css_class = (status == 204 || status == 404) ? 'headers no-response' : 'headers'
|
89
|
+
lines = ["Status: #{ResponseMate::Http::STATUS_CODES[status]}"]
|
90
|
+
%(<pre class="#{css_class}"><code>#{lines * "\n"}</code></pre>\n)
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
def format_request(recording)
|
96
|
+
<<-OUT
|
97
|
+
<p class="request">
|
98
|
+
<span class="verb">#{recording[:request][:verb]}</span>
|
99
|
+
<span class="path">#{recording[:request][:path]}</span>
|
100
|
+
</p>
|
101
|
+
OUT
|
102
|
+
end
|
103
|
+
|
104
|
+
def add_toggler
|
105
|
+
'<a href="javascript:void(0)" class="toggler" data-target="js-response">view response</a>'
|
106
|
+
end
|
107
|
+
|
108
|
+
def format_response(recording, options)
|
109
|
+
out = '<div class="response">'
|
110
|
+
out << format_status(recording) if options[:only].include?(:status)
|
111
|
+
out << format_body(recording) if options[:only].include?(:body)
|
112
|
+
out << '</div>'
|
113
|
+
end
|
114
|
+
|
115
|
+
def format_params(hash)
|
116
|
+
output = '<ul class="request-params">'
|
117
|
+
|
118
|
+
output << hash.map { |k, v|
|
119
|
+
val = v.is_a?(Hash) ? format_params(v) : v
|
120
|
+
val = '[FILTERED]' if FILTERED_PARAMS.include? k.to_sym
|
121
|
+
|
122
|
+
"<li><span class=\"label\">#{k}</span>: #{val}</li>"
|
123
|
+
}.join()
|
124
|
+
output << "</ul>"
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
def format_status(recording)
|
129
|
+
%(<pre class="headers"><code>Status: #{recording[:status]}</code></pre>\n)
|
130
|
+
end
|
131
|
+
|
132
|
+
def format_body(recording)
|
133
|
+
begin
|
134
|
+
content = JSON.pretty_generate(JSON.parse(recording[:body]))
|
135
|
+
rescue JSON::ParserError
|
136
|
+
content = recording[:body]
|
137
|
+
end
|
138
|
+
%(<pre class="highlight body"><code class="language-javascript">%s</code></pre>) %
|
139
|
+
content
|
140
|
+
end
|
141
|
+
|
142
|
+
def format_description(recording)
|
143
|
+
return '' if !recording[:meta] || !recording[:meta][:description]
|
144
|
+
|
145
|
+
description = recording[:meta][:description]
|
146
|
+
|
147
|
+
"<div class='request-description'> Description: #{description}</div>"
|
148
|
+
end
|
149
|
+
end end
|
150
|
+
end
|
151
|
+
|
152
|
+
include ResponseMate::Nanoc::Formatter
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require File.expand_path('../lib/response_mate/nanoc/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = 'response_mate-nanoc'
|
6
|
+
s.version = ResponseMate::Nanoc::VERSION
|
7
|
+
s.date = '2012-12-20'
|
8
|
+
s.summary = %{ResponseMate for nanoc}
|
9
|
+
s.description = %{Helpers and formatters for displaying ResponseMate output in nanoc}
|
10
|
+
s.authors = ['Dimitris Karakasilis', 'Dimitris Zorbas']
|
11
|
+
s.email = 'jimmykarily@gmail.com'
|
12
|
+
s.files = `git ls-files`.split($\)
|
13
|
+
s.homepage = ''
|
14
|
+
s.license = 'MIT'
|
15
|
+
|
16
|
+
s.add_runtime_dependency 'activesupport'
|
17
|
+
|
18
|
+
s.add_development_dependency 'rake'
|
19
|
+
s.add_development_dependency 'bundler'
|
20
|
+
s.add_development_dependency 'pry'
|
21
|
+
s.add_development_dependency 'pry-nav'
|
22
|
+
s.add_development_dependency 'rspec', '~> 2.14'
|
23
|
+
|
24
|
+
s.add_dependency 'response_mate', '~> 0.1.6'
|
25
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
:request:
|
2
|
+
:verb: GET
|
3
|
+
:path: /skus
|
4
|
+
:params:
|
5
|
+
page: '1'
|
6
|
+
per: '3'
|
7
|
+
oauth_token: Vr/AzbfQt3ywQlKUonZk25VqRg2ILFAFV/voi69FD9xlJl5Yp9DmDWb6PAEsVwuI1KckH3aa1/vxRaj/Mbwg==
|
8
|
+
:status: 200
|
9
|
+
:headers:
|
10
|
+
link: <http://localhost:3000/api/skus?oauth_token=Vr%2FAzbfQt3ywQlKUonZk25VqRg2ILFAFV%2Fvoi69FD9xlJl5Yp9DmDWb6PAEsVwuI1KckH3aa1%2FvxRaj%2FMbwg%3D%3D&page=474564&per=3>;
|
11
|
+
rel="last", <http://localhost:3000/api/skus?oauth_token=Vr%2FAzbfQt3ywQlKUonZk25VqRg2ILFAFV%2Fvoi69FD9xlJl5Yp9DmDWb6PAEsVwuI1KckH3aa1%2FvxRaj%2FMbwg%3D%3D&page=2&per=3>;
|
12
|
+
rel="next"
|
13
|
+
content-type: application/json; charset=utf-8
|
14
|
+
x-meta-request-version: 0.2.1
|
15
|
+
x-ua-compatible: IE=Edge,chrome=1
|
16
|
+
etag: ! '"168c0d9677583c8305fb51b0543f1dda"'
|
17
|
+
cache-control: max-age=0, private, must-revalidate
|
18
|
+
x-request-id: c217576d97a588517f360dd1790e6e4b
|
19
|
+
x-runtime: '0.834211'
|
20
|
+
server: WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
|
21
|
+
date: Fri, 20 Dec 2013 10:53:52 GMT
|
22
|
+
content-length: '2281'
|
23
|
+
connection: close
|
24
|
+
set-cookie: locale=el_GR; path=/, _helmet_couch=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWFmM2E1MjE1ZGVkYzNiNjIyYTZiMWMzNjQ5YTMyNmEzBjsAVEkiC2xvY2FsZQY7AFRJIgplbF9HUgY7AEY%3D--c4ff9c59b2235dba4ecb1e94450af6d37846d791;
|
25
|
+
path=/; expires=Thu, 20-Feb-2014 10:53:52 GMT; HttpOnly
|
26
|
+
:body: ! '{"skus":[{"id":224,"ean":"","pn":"","name":"H 500","display_name":"Motorola
|
27
|
+
H 500","category_id":435,"first_product_shop_info":"870|Media-ram","click_url":null,"price_max":47.71,"price_min":32.63,"reviewscore":0.0,"shop_count":1,"plain_spec_summary":null,"active_products_count":1,"main_picture":{"small_url":"http://d.scdn.gr/images/sku_main_images/000000/224/small_Motorola-H-500.jpeg","original_url":"http://b.scdn.gr/images/sku_main_images/000000/224/medium_Motorola-H-500.jpeg","tiny_url":"http://a.scdn.gr/images/sku_main_images/000000/224/tiny_Motorola-H-500.jpeg","medium_url":"http://b.scdn.gr/images/sku_main_images/000000/224/medium_Motorola-H-500.jpeg","datamart_url":"http://b.scdn.gr/images/sku_main_images/000000/224/Motorola-H-500.jpeg"},"manufacturer_id":27},{"id":403,"ean":null,"pn":null,"name":"T-104","display_name":"Brother
|
28
|
+
T-104","category_id":66,"first_product_shop_info":null,"click_url":null,"price_max":73.9,"price_min":69.9,"reviewscore":0.0,"shop_count":3,"plain_spec_summary":null,"active_products_count":3,"main_picture":{"small_url":"http://d.scdn.gr/images/sku_main_images/000000/403/small_Brother-T-104.jpeg","original_url":"http://c.scdn.gr/images/sku_main_images/000000/403/medium_Brother-T-104.jpeg","tiny_url":"http://b.scdn.gr/images/sku_main_images/000000/403/tiny_Brother-T-104.jpeg","medium_url":"http://c.scdn.gr/images/sku_main_images/000000/403/medium_Brother-T-104.jpeg","datamart_url":"http://c.scdn.gr/images/sku_main_images/000000/403/Brother-T-104.jpeg"},"manufacturer_id":46},{"id":404,"ean":null,"pn":null,"name":"T-106","display_name":"Brother
|
29
|
+
T-106","category_id":66,"first_product_shop_info":null,"click_url":null,"price_max":122.9,"price_min":122.0,"reviewscore":0.0,"shop_count":2,"plain_spec_summary":null,"active_products_count":2,"main_picture":{"small_url":"http://c.scdn.gr/images/sku_main_images/000000/404/small_Brother-T-106.jpeg","original_url":"http://d.scdn.gr/images/sku_main_images/000000/404/medium_Brother-T-106.jpeg","tiny_url":"http://c.scdn.gr/images/sku_main_images/000000/404/tiny_Brother-T-106.jpeg","medium_url":"http://d.scdn.gr/images/sku_main_images/000000/404/medium_Brother-T-106.jpeg","datamart_url":"http://c.scdn.gr/images/sku_main_images/000000/404/Brother-T-106.jpeg"},"manufacturer_id":46}]}'
|
30
|
+
:meta:
|
31
|
+
:description: This is the description
|
@@ -0,0 +1,28 @@
|
|
1
|
+
:request:
|
2
|
+
:verb: GET
|
3
|
+
:path: /skus
|
4
|
+
:params:
|
5
|
+
page: '1'
|
6
|
+
per: '3'
|
7
|
+
oauth_token: Vr/AzbfQt3ywQlKUonZk25VqRg2ILFAFV/voi69FD9xlJl5Yp9DmDWb6PAEsVwuI1KckH3aa1/vxRaj/Mbwg==
|
8
|
+
:status: 200
|
9
|
+
:headers:
|
10
|
+
link: <http://localhost:3000/api/skus?oauth_token=Vr%2FAzbfQt3ywQlKUonZk25VqRg2ILFAFV%2Fvoi69FD9xlJl5Yp9DmDWb6PAEsVwuI1KckH3aa1%2FvxRaj%2FMbwg%3D%3D&page=474564&per=3>;
|
11
|
+
rel="last", <http://localhost:3000/api/skus?oauth_token=Vr%2FAzbfQt3ywQlKUonZk25VqRg2ILFAFV%2Fvoi69FD9xlJl5Yp9DmDWb6PAEsVwuI1KckH3aa1%2FvxRaj%2FMbwg%3D%3D&page=2&per=3>;
|
12
|
+
rel="next"
|
13
|
+
content-type: application/json; charset=utf-8
|
14
|
+
x-meta-request-version: 0.2.1
|
15
|
+
x-ua-compatible: IE=Edge,chrome=1
|
16
|
+
etag: ! '"168c0d9677583c8305fb51b0543f1dda"'
|
17
|
+
cache-control: max-age=0, private, must-revalidate
|
18
|
+
x-request-id: c217576d97a588517f360dd1790e6e4b
|
19
|
+
x-runtime: '0.834211'
|
20
|
+
server: WEBrick/1.3.1 (Ruby/1.9.3/2012-11-10)
|
21
|
+
date: Fri, 20 Dec 2013 10:53:52 GMT
|
22
|
+
content-length: '2281'
|
23
|
+
connection: close
|
24
|
+
set-cookie: locale=el_GR; path=/, _helmet_couch=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJWFmM2E1MjE1ZGVkYzNiNjIyYTZiMWMzNjQ5YTMyNmEzBjsAVEkiC2xvY2FsZQY7AFRJIgplbF9HUgY7AEY%3D--c4ff9c59b2235dba4ecb1e94450af6d37846d791;
|
25
|
+
path=/; expires=Thu, 20-Feb-2014 10:53:52 GMT; HttpOnly
|
26
|
+
:body: This is a string body
|
27
|
+
:meta:
|
28
|
+
:description: This is the description
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ResponseMate::Nanoc::Formatter do
|
4
|
+
let(:recordings_path) do
|
5
|
+
File.join(fixtures_path, 'recordings')
|
6
|
+
end
|
7
|
+
|
8
|
+
before do
|
9
|
+
ResponseMate::Configuration.any_instance.stub(:output_dir).
|
10
|
+
and_return(recordings_path)
|
11
|
+
end
|
12
|
+
|
13
|
+
describe "#load_recording" do
|
14
|
+
context "when the requested key does not exist" do
|
15
|
+
let(:key) { :non_existent_recording }
|
16
|
+
|
17
|
+
it "raises error" do
|
18
|
+
expect {
|
19
|
+
load_recording(key)
|
20
|
+
}.to raise_error(/key was not found/)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
context "when the requested key exists" do
|
25
|
+
context "when it does not match a valid yml file" do
|
26
|
+
let(:key) { :invalid_yml }
|
27
|
+
|
28
|
+
it "raises error" do
|
29
|
+
expect {
|
30
|
+
load_recording(key)
|
31
|
+
}.to raise_error(/invalid_yml\.yml/)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
context "when it matches a valid yml file" do
|
36
|
+
let(:key) { :skus_index }
|
37
|
+
|
38
|
+
it "doesn't raise error" do
|
39
|
+
expect {
|
40
|
+
load_recording(key)
|
41
|
+
}.to_not raise_error
|
42
|
+
end
|
43
|
+
|
44
|
+
it "returns the file parsed" do
|
45
|
+
expect(load_recording(key)).to eq(
|
46
|
+
YAML.load_file(
|
47
|
+
File.join(recordings_path, "#{key}.yml")
|
48
|
+
).symbolize_keys
|
49
|
+
)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "#render_recording" do
|
56
|
+
let(:key) { :skus_index }
|
57
|
+
|
58
|
+
it "calls load_recording with the same key" do
|
59
|
+
should_receive(:load_recording).with(:skus_index).and_call_original
|
60
|
+
|
61
|
+
render_recording(:skus_index)
|
62
|
+
end
|
63
|
+
|
64
|
+
context "when :request exists in options[:only]" do
|
65
|
+
let(:options) { { only: [:request] } }
|
66
|
+
|
67
|
+
it "renders request from yaml file" do
|
68
|
+
render_recording(key, options).should match(/verb.*path.*params/)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
|
72
|
+
context "when :status exists in options[:only]" do
|
73
|
+
let(:options) { { only: [:status] } }
|
74
|
+
|
75
|
+
it "renders status from yaml file" do
|
76
|
+
render_recording(key, options).should match(/Status: 200/)
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
context "when :description exists in options[:only]" do
|
81
|
+
let(:options) { { only: [:description] } }
|
82
|
+
|
83
|
+
it "renders description from yaml file" do
|
84
|
+
render_recording(key, options).should match(/This is the description/)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
context "when :body exists in options[:only]" do
|
89
|
+
let(:options) { { only: [:body] } }
|
90
|
+
|
91
|
+
context "when body is a string" do
|
92
|
+
let(:key) { :skus_index_with_string_body }
|
93
|
+
|
94
|
+
it "renders body" do
|
95
|
+
subject.render_recording(key, options).should match(/This is a string body/)
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
context "when body is JSON" do
|
100
|
+
it "renders body prettyfied" do
|
101
|
+
expected_string =
|
102
|
+
JSON.pretty_generate(
|
103
|
+
JSON.parse(subject.load_recording(key)[:body]))
|
104
|
+
|
105
|
+
subject.render_recording(key, options).should match(
|
106
|
+
/#{Regexp.escape(expected_string)}/)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
context "more that one key exist in options[:only]" do
|
112
|
+
let(:options) { { only: [:request, :status] } }
|
113
|
+
|
114
|
+
it "renders all keys" do
|
115
|
+
subject.render_recording(key, options).should match(/verb.*path.*params.*Status: 200/)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'response_mate'
|
2
|
+
require 'response_mate/nanoc'
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Use color in STDOUT
|
6
|
+
config.color_enabled = true
|
7
|
+
|
8
|
+
# Use color not only in STDOUT but also in pagers and files
|
9
|
+
config.tty = true
|
10
|
+
|
11
|
+
# Use the specified formatter
|
12
|
+
config.formatter = :documentation # :progress, :html, :textmate
|
13
|
+
end
|
14
|
+
|
15
|
+
def fixtures_path
|
16
|
+
File.expand_path('spec/fixtures')
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: response_mate-nanoc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.7
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dimitris Karakasilis
|
8
|
+
- Dimitris Zorbas
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-12-20 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
type: :runtime
|
16
|
+
prerelease: false
|
17
|
+
name: activesupport
|
18
|
+
requirement: !ruby/object:Gem::Requirement
|
19
|
+
requirements:
|
20
|
+
- - ! '>='
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '0'
|
23
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
|
+
requirements:
|
25
|
+
- - ! '>='
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
version: '0'
|
28
|
+
- !ruby/object:Gem::Dependency
|
29
|
+
type: :development
|
30
|
+
prerelease: false
|
31
|
+
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
requirements:
|
34
|
+
- - ! '>='
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '0'
|
37
|
+
version_requirements: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - ! '>='
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: '0'
|
42
|
+
- !ruby/object:Gem::Dependency
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
name: bundler
|
46
|
+
requirement: !ruby/object:Gem::Requirement
|
47
|
+
requirements:
|
48
|
+
- - ! '>='
|
49
|
+
- !ruby/object:Gem::Version
|
50
|
+
version: '0'
|
51
|
+
version_requirements: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ! '>='
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '0'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
type: :development
|
58
|
+
prerelease: false
|
59
|
+
name: pry
|
60
|
+
requirement: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ! '>='
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: '0'
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
type: :development
|
72
|
+
prerelease: false
|
73
|
+
name: pry-nav
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ! '>='
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
type: :development
|
86
|
+
prerelease: false
|
87
|
+
name: rspec
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ~>
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '2.14'
|
93
|
+
version_requirements: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ~>
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '2.14'
|
98
|
+
- !ruby/object:Gem::Dependency
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
name: response_mate
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ~>
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: 0.1.6
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
108
|
+
requirements:
|
109
|
+
- - ~>
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: 0.1.6
|
112
|
+
description: Helpers and formatters for displaying ResponseMate output in nanoc
|
113
|
+
email: jimmykarily@gmail.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- .gitignore
|
119
|
+
- Gemfile
|
120
|
+
- Rakefile
|
121
|
+
- lib/response_mate/nanoc.rb
|
122
|
+
- lib/response_mate/nanoc/formatter.rb
|
123
|
+
- lib/response_mate/nanoc/version.rb
|
124
|
+
- response_mate-nanoc.gemspec
|
125
|
+
- spec/fixtures/recordings/invalid_yml.yml
|
126
|
+
- spec/fixtures/recordings/skus_index.yml
|
127
|
+
- spec/fixtures/recordings/skus_index_with_string_body.yml
|
128
|
+
- spec/lib/response_mate/nanoc/formatter_spec.rb
|
129
|
+
- spec/lib/response_mate/nanoc_spec.rb
|
130
|
+
- spec/spec_helper.rb
|
131
|
+
homepage: ''
|
132
|
+
licenses:
|
133
|
+
- MIT
|
134
|
+
metadata: {}
|
135
|
+
post_install_message:
|
136
|
+
rdoc_options: []
|
137
|
+
require_paths:
|
138
|
+
- lib
|
139
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ! '>='
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '0'
|
144
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
145
|
+
requirements:
|
146
|
+
- - ! '>='
|
147
|
+
- !ruby/object:Gem::Version
|
148
|
+
version: '0'
|
149
|
+
requirements: []
|
150
|
+
rubyforge_project:
|
151
|
+
rubygems_version: 2.1.9
|
152
|
+
signing_key:
|
153
|
+
specification_version: 4
|
154
|
+
summary: ResponseMate for nanoc
|
155
|
+
test_files: []
|
156
|
+
has_rdoc:
|