lurker 0.6.11 → 0.6.12

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: c0fd268ff0bdbb9d0e95c346543ef5e7e2c2ac75
4
- data.tar.gz: 43cdca9e5e49843119600323a1c1bc963a610d3f
3
+ metadata.gz: 8710a38d2b594c7b8815088eafb1ff6fc1c6a6e1
4
+ data.tar.gz: 2268040574bef1e336e18ae8b02b53547bb47762
5
5
  SHA512:
6
- metadata.gz: 7a77dbbdc606e50d0c4bed6ca6eb57a663dfd530d91b5d1107f2d80fe04f9a1dd0e62fb4f80f5913c4847a01c803ea993a57c96f14c7494edab9217399f1aca4
7
- data.tar.gz: 7bd1469436f9ddac2ec837f2db81af61ee6b86ce5a5c7fb60a90838b6c6a7fe110ac02e124cb5c8d5dd8416b3535fe666812732f2fa8e3ddb135b45258feecb1
6
+ metadata.gz: 95492962813614aa5a269f44332428c0ff2246e7fc4485816090c91607a6c6960ed11db798c3e5b65d5ed9ccd0c4f54ca49c00c01dbb29b96129ba7b6a9c08cb
7
+ data.tar.gz: 1f9428ffafb6f5bab56b4795956fb021614d192498652e87a3655158d23c7dbf486f5b1f81cdd1f3e5774754dce2920765b80b9082b52f22c48ae487f90bbca3
Binary file
data.tar.gz.sig CHANGED
Binary file
data/README.md CHANGED
@@ -45,6 +45,11 @@ but add `:lurker` mark (like documented [controller example][controler_spec_exam
45
45
  get "/api/v1/users.json"
46
46
  end
47
47
 
48
+ NOTE: If you use `rspec-rails`, it should be required first
49
+
50
+ require 'rspec/rails'
51
+ require 'lurker/spec_helper'
52
+
48
53
  ## Minitest usage
49
54
 
50
55
  You can use [minitest-around][minitest_around] to wrap your test classes like this:
@@ -80,7 +80,10 @@ module Lurker
80
80
  no_tasks do
81
81
  def convert_to_pdf
82
82
  Lurker.safe_require('pdfkit')
83
- kit = PDFKit.new(service_presenter.to_print)
83
+ print_html = service_presenter.to_print
84
+ create_file "#{service_presenter.url_name}_print.html", print_html, force: true
85
+
86
+ kit = PDFKit.new(print_html)
84
87
  kit.stylesheets << assets['application.css']
85
88
  create_file "#{service_presenter.url_name}.pdf", kit.to_pdf, force: true
86
89
  end
@@ -7,12 +7,12 @@ class Lurker::Service
7
7
  attr_accessor :opened_endpoints
8
8
  SUFFIX = '.service.yml'
9
9
  DEFAULT_SCHEMA = {
10
- name: '',
11
- basePath: '',
12
- description: '',
13
- domains: {},
14
- consumes: %w(application/x-www-form-urlencode application/json),
15
- produces: %w(application/json)
10
+ 'name' => '',
11
+ 'basePath' => '',
12
+ 'description' => '',
13
+ 'domains' => {},
14
+ 'consumes' => %w(application/x-www-form-urlencode application/json),
15
+ 'produces' => %w(application/json)
16
16
  }
17
17
 
18
18
  def self.default_service
@@ -24,9 +24,9 @@ class Lurker::Service
24
24
  @service_dir = File.expand_path(service_dir)
25
25
  @service_filename = service_name
26
26
  @schema = if persisted? && (schema = YAML.load_file(service_path)).is_a?(Hash)
27
- Lurker::Json::Schema.new(schema, uri: service_path)
27
+ Lurker::Json::Schema.new(schema.stringify_keys, uri: service_path)
28
28
  else
29
- Lurker::Json::Schema.new(DEFAULT_SCHEMA.merge(name: service_filename), uri: service_path)
29
+ Lurker::Json::Schema.new(DEFAULT_SCHEMA.merge('name' => service_filename), uri: service_path)
30
30
  end
31
31
  end
32
32
 
@@ -8,18 +8,20 @@
8
8
 
9
9
  <title><%= title %></title>
10
10
 
11
- <meta name="pdfkit-page-size" content="A4"/>
11
+ <meta name="pdfkit-page-size" content="A4">
12
12
 
13
- <meta name="pdfkit-margin-left" content="20"/>
14
- <meta name="pdfkit-margin-top" content="20"/>
15
- <meta name="pdfkit-margin-bottom" content="25"/>
16
- <meta name="pdfkit-margin-right" content="20"/>
13
+ <meta name="pdfkit-margin-left" content="20">
14
+ <meta name="pdfkit-margin-top" content="20">
15
+ <meta name="pdfkit-margin-bottom" content="25">
16
+ <meta name="pdfkit-margin-right" content="20">
17
17
 
18
- <meta name="pdfkit-footer-spacing" content="10"/>
19
- <meta name="pdfkit-footer-line" content="true"/>
20
- <meta name="pdfkit-footer-left" content="[title]"/>
21
- <meta name="pdfkit-footer-center" content="[page] of [toPage]"/>
22
- <meta name="pdfkit-footer-right" content="[section]"/>
18
+ <meta name="pdfkit-footer-spacing" content="10">
19
+ <meta name="pdfkit-footer-line" content="true">
20
+ <meta name="pdfkit-footer-left" content="[title]">
21
+ <meta name="pdfkit-footer-center" content="[page] of [toPage]">
22
+ <meta name="pdfkit-footer-right" content="[section]">
23
+
24
+ <link href="<%= @service_presenter.asset_path('application.css') %>" media="all" rel="stylesheet">
23
25
  </head>
24
26
  <body>
25
27
  <div class="container bs-docs-container">
@@ -1,3 +1,3 @@
1
1
  module Lurker
2
- VERSION = "0.6.11"
2
+ VERSION = "0.6.12"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lurker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.11
4
+ version: 0.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlad Bokov
@@ -31,7 +31,7 @@ cert_chain:
31
31
  JdwBPWa9Za/2/KSE24mz/LFUt23JVKNsiG9FElkSaMqFAv8jsF/XCf2y3DHOPKFw
32
32
  BoiF9TIMncU9b0hPO8kwUPZYxHv4NzsRi06DVg==
33
33
  -----END CERTIFICATE-----
34
- date: 2015-12-02 00:00:00.000000000 Z
34
+ date: 2015-12-04 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: json
metadata.gz.sig CHANGED
Binary file