docmago_client 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/{README.rdoc → README.md} +0 -0
  3. data/lib/docmago_client/exception.rb +3 -3
  4. data/lib/docmago_client/html_resource_archiver.rb +50 -29
  5. data/lib/docmago_client/railtie.rb +15 -14
  6. data/lib/docmago_client/version.rb +1 -1
  7. data/lib/docmago_client.rb +34 -33
  8. metadata +29 -162
  9. data/MIT-LICENSE +0 -20
  10. data/Rakefile +0 -34
  11. data/lib/tasks/docmago_client_tasks.rake +0 -4
  12. data/test/docmago_client_test.rb +0 -7
  13. data/test/dummy/README.rdoc +0 -261
  14. data/test/dummy/Rakefile +0 -7
  15. data/test/dummy/app/assets/javascripts/application.js +0 -15
  16. data/test/dummy/app/assets/stylesheets/application.css +0 -13
  17. data/test/dummy/app/controllers/application_controller.rb +0 -3
  18. data/test/dummy/app/controllers/home_controller.rb +0 -15
  19. data/test/dummy/app/helpers/application_helper.rb +0 -2
  20. data/test/dummy/app/views/home/index.html.erb +0 -3
  21. data/test/dummy/app/views/home/index.pdf.erb +0 -1
  22. data/test/dummy/app/views/home/pdf/subdir_template.pdf.erb +0 -1
  23. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  24. data/test/dummy/config/application.rb +0 -53
  25. data/test/dummy/config/boot.rb +0 -10
  26. data/test/dummy/config/database.yml +0 -25
  27. data/test/dummy/config/environment.rb +0 -5
  28. data/test/dummy/config/environments/development.rb +0 -31
  29. data/test/dummy/config/environments/production.rb +0 -75
  30. data/test/dummy/config/environments/test.rb +0 -36
  31. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  32. data/test/dummy/config/initializers/docmago.rb +0 -2
  33. data/test/dummy/config/initializers/inflections.rb +0 -15
  34. data/test/dummy/config/initializers/mime_types.rb +0 -5
  35. data/test/dummy/config/initializers/secret_token.rb +0 -7
  36. data/test/dummy/config/initializers/session_store.rb +0 -8
  37. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  38. data/test/dummy/config/locales/en.yml +0 -5
  39. data/test/dummy/config/routes.rb +0 -4
  40. data/test/dummy/config.ru +0 -4
  41. data/test/dummy/db/development.sqlite3 +0 -0
  42. data/test/dummy/db/test.sqlite3 +0 -0
  43. data/test/dummy/log/development.log +0 -266
  44. data/test/dummy/log/test.log +0 -2416
  45. data/test/dummy/public/404.html +0 -26
  46. data/test/dummy/public/422.html +0 -26
  47. data/test/dummy/public/500.html +0 -25
  48. data/test/dummy/public/favicon.ico +0 -0
  49. data/test/dummy/script/rails +0 -6
  50. data/test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  51. data/test/dummy/tmp/cache/assets/CF0/DC0/sprockets%2Fc7df72c44e5cf6295507448c4726d47b +0 -0
  52. data/test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  53. data/test/dummy/tmp/cache/assets/D3C/0C0/sprockets%2F984da4677de1065bf04bbd8a505d0e90 +0 -0
  54. data/test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  55. data/test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  56. data/test/dummy/tmp/cache/assets/D71/8C0/sprockets%2F07e1f1387073a8829a9b7edfdaa771aa +0 -0
  57. data/test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  58. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  59. data/test/dummy/tmp/cache/assets/E5E/0C0/sprockets%2Fb7fae3fe0c7bca77de72b8e8800aad9a +0 -0
  60. data/test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  61. data/test/dummy/tmp/cache/assets/test/sprockets/27db960e9aa643c0bb6a5c816ff0131e +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  63. data/test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/6f6310c1b5407da50f031143deb91c34 +0 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/70bf67ab6d61f1c95b28741e6ab01ef2 +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/79ad5cdd007a17eafa73d743b6755cb8 +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/a939d785b831a27f85d9ac24def8836e +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/b10fc2c45b5b421a2c9968a44b2b09af +0 -0
  69. data/test/dummy/tmp/cache/assets/test/sprockets/cc469c18b214c2fb0b7807c4e3c640f7 +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/d5571dc03eff8cbafd90bc2c8e499122 +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  73. data/test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  74. data/test/integration/navigation_test.rb +0 -31
  75. data/test/support/integration_case.rb +0 -5
  76. data/test/test_helper.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8123f9ccf4a64c4d99fb6c552d0ecaaf6c3bcc3d
4
- data.tar.gz: 77b078dde969839ac1d7bbc41b5c14d4a951f5b9
3
+ metadata.gz: d2308c38c2bfb7f9a422b466fbd27c8f3300ca80
4
+ data.tar.gz: 5b1220655d1841d6799c93e0bdc59382d3974063
5
5
  SHA512:
6
- metadata.gz: c0177f4f896ab61d1286a1e48c3b1704338dedc98b7afa8d98be6dcaf4fa6025c8d83b20dda71e942c7aace71fc514c31f347210a93368f5ee608324c660da3a
7
- data.tar.gz: 9bcc6be0d9e74b6482fa4109e48b0b8c015ebf1bdafb1a667a8c020fd19c89376f2c9582e093612784b3ba66185f612b8139b1314f160c8fb79af31fefac31b5
6
+ metadata.gz: 959eccaf1983557fe771b3567fd4f758322177a1b21c6ec65856086eb2e35b4b7f97676a06ad616b723f05af7988dc6dfda62a48f9328672ebf686e441dbfc7c
7
+ data.tar.gz: 1997cc150945eec1e6712cb698c788a6e244efb9b20dff1c09b74c0ee8fc5750256c54fefff77d8f18a58e26979b3c494fd2fb315616f5e0146d8a7e78f85d67
File without changes
@@ -3,11 +3,11 @@ module DocmagoClient
3
3
  class RequestException < StandardError
4
4
  attr_accessor :status_code
5
5
  attr_accessor :message
6
-
6
+
7
7
  def initialize(message, status_code)
8
8
  self.message = message
9
9
  self.status_code = status_code
10
-
10
+
11
11
  super message
12
12
  end
13
13
 
@@ -16,7 +16,7 @@ module DocmagoClient
16
16
  end
17
17
 
18
18
  def inspect
19
- self.to_s
19
+ to_s
20
20
  end
21
21
  end
22
22
  class DocumentCreationFailure < DocmagoClient::Exception::RequestException; end
@@ -5,51 +5,72 @@ require 'nokogiri'
5
5
  require 'zip'
6
6
 
7
7
  class URI::Parser
8
- def split url
9
- a = Addressable::URI::parse url
8
+ def split(url)
9
+ a = Addressable::URI.parse url
10
10
  [a.scheme, a.userinfo, a.host, a.port, nil, a.path, nil, a.query, a.fragment]
11
11
  end
12
12
  end
13
13
 
14
14
  module DocmagoClient
15
15
  class HTMLResourceArchiver
16
- def initialize(html, base_path='.')
17
- @html = html
18
- @base_path = base_path
16
+ SPROCKETS_RX = %r{^/assets/}
17
+ URI_RX = /url\(("([^"]*)"|'([^']*)'|([^)]*))\)/im
18
+
19
+ def initialize(options = {})
20
+ @html = options[:content]
21
+ @base_path = options[:resource_path]
22
+ @assets = options[:assets]
23
+
19
24
  @doc = Nokogiri::HTML(@html)
20
25
  end
21
-
26
+
22
27
  def create_zip(file_path)
23
28
  Zip::File.open(file_path, Zip::File::CREATE) do |zipfile|
24
- zipfile.get_output_stream("document.html") { |f| f.write @html }
25
-
29
+ zipfile.get_output_stream('document.html') { |f| f.write @html }
30
+
26
31
  fetch_uris.each do |uri|
27
32
  uri = Addressable::URI.parse uri.to_s.strip
28
- path_digest = Digest::MD5.hexdigest(normalize_uri(uri))
29
-
30
- file_data = open(uri).read if uri.absolute?
31
- file_data ||= File.read(resolve_uri(uri)) if File.exists?(resolve_uri(uri))
32
-
33
+ path_digest = Digest::MD5.hexdigest(uri.to_s)
34
+
35
+ file_data = open(uri).read if uri.absolute?
36
+ file_data ||= File.read(resolve_uri(uri)) if File.exist?(resolve_uri(uri))
37
+ file_data ||= @assets[normalize_uri(uri).gsub(SPROCKETS_RX, '')].to_s
38
+
39
+ if File.extname(normalize_uri(uri)) == '.css'
40
+ # embed resources within css
41
+ file_data.scan(URI_RX).flatten.compact.uniq.each do |resource|
42
+ resource_uri = Addressable::URI.parse resource.to_s.strip
43
+ resource_path_digest = Digest::MD5.hexdigest(resource_uri.to_s)
44
+
45
+ resource_file = open(resource_uri).read if resource_uri.absolute?
46
+ resource_file = File.read(resolve_uri(resource_uri)) if File.exist?(resolve_uri(resource_uri))
47
+ resource_file ||= @assets[normalize_uri(resource_uri).gsub(SPROCKETS_RX, '')].to_s
48
+
49
+ zipfile.get_output_stream(resource_path_digest) { |f| f.write resource_file } if resource_file
50
+ end
51
+ end
52
+
33
53
  zipfile.get_output_stream(path_digest) { |f| f.write file_data } if file_data
34
54
  end
35
55
  end
36
-
56
+
37
57
  file_path
38
58
  end
39
-
59
+
40
60
  private
41
- def fetch_uris
42
- @doc.xpath("//link[@rel='stylesheet']/@href", "//img/@src")
43
- end
44
-
45
- def normalize_uri(uri)
46
- uri = Addressable::URI.parse uri.to_s.strip
47
- uri.query = nil
48
- uri.to_s
49
- end
50
-
51
- def resolve_uri(uri)
52
- File.join File.expand_path(@base_path), normalize_uri(uri)
53
- end
61
+
62
+ def fetch_uris
63
+ @doc.xpath("//link[@rel='stylesheet']/@href", '//img/@src')
64
+ end
65
+
66
+ def normalize_uri(uri)
67
+ uri = Addressable::URI.parse uri.to_s.strip
68
+ uri.query = nil
69
+ uri.to_s
70
+ end
71
+
72
+ def resolve_uri(uri)
73
+ File.join File.expand_path(@base_path), normalize_uri(uri)
74
+ end
54
75
  end
55
- end
76
+ end
@@ -1,42 +1,43 @@
1
1
  module DocmagoClient
2
2
  class Railtie < Rails::Railtie
3
- initializer "docmago_client" do |app|
3
+ initializer 'docmago_client' do |_app|
4
4
  ActiveSupport.on_load :action_controller do
5
5
  DocmagoClient::Railtie.setup_actioncontroller
6
6
  end
7
7
  end
8
-
8
+
9
9
  def self.setup_actioncontroller
10
- unless Mime::Type.lookup_by_extension("pdf")
11
- Mime::Type.register "application/pdf", :pdf
10
+ unless Mime::Type.lookup_by_extension('pdf')
11
+ Mime::Type.register 'application/pdf', :pdf
12
12
  end
13
13
 
14
14
  ActionController::Renderers.add :pdf do |filename, options|
15
15
  # Allow PDFs to be resolved in app/views/examples/pdf/
16
16
  append_view_path ActionView::FileSystemResolver.new(
17
- Rails.root.join("app/views"),
18
- ":prefix/{:formats/,}:action{.:locale,}{.:formats,}{.:handlers,}"
17
+ Rails.root.join('app/views'),
18
+ ':prefix/{:formats/,}:action{.:locale,}{.:formats,}{.:handlers,}'
19
19
  )
20
-
20
+
21
21
  default_options = {
22
- name: filename||controller_name,
23
- test_mode: !Rails.env.production?,
22
+ name: filename || controller_name,
23
+ test_mode: Rails.env.development?,
24
24
  base_uri: url_for(only_path: false),
25
25
  resource_path: Rails.root.join('public').to_s,
26
+ assets: Rails.application.assets,
26
27
  zip_resources: true
27
28
  }
28
-
29
+
29
30
  options = default_options.merge(options)
30
31
  options[:content] ||= render_to_string(options)
31
-
32
+
32
33
  response = DocmagoClient.create(options)
33
-
34
+
34
35
  if response.code == 200
35
- send_data response, filename: "#{options[:name]}.pdf", type: "application/pdf", disposition: "attachment"
36
+ send_data response, filename: "#{options[:name]}.pdf", type: 'application/pdf', disposition: 'attachment'
36
37
  else
37
38
  render inline: response.body, status: response.code
38
39
  end
39
40
  end
40
41
  end
41
42
  end
42
- end
43
+ end
@@ -1,3 +1,3 @@
1
1
  module DocmagoClient
2
- VERSION = "0.3.2"
2
+ VERSION = '0.4.0'
3
3
  end
@@ -1,5 +1,5 @@
1
- require "httmultiparty"
2
- require "tempfile"
1
+ require 'httmultiparty'
2
+ require 'tempfile'
3
3
 
4
4
  require 'docmago_client/version'
5
5
  require 'docmago_client/exception'
@@ -10,61 +10,62 @@ if defined?(Rails)
10
10
  if Rails.respond_to?(:version) && Rails.version =~ /^(3|4)/
11
11
  require 'docmago_client/railtie'
12
12
  else
13
- raise "docmago_client #{DocmagoClient::VERSION} is not compatible with Rails 2.3 or older"
13
+ raise "docmago_client #{DocmagoClient::VERSION} is only compatible with Rails 3 or 4"
14
14
  end
15
15
  end
16
16
 
17
17
  module DocmagoClient
18
18
  include HTTMultiParty
19
-
20
- base_uri ENV["DOCMAGO_URL"] || "https://docmago.com/api"
21
-
22
- def self.base_uri(uri=nil)
23
- default_options[:base_uri] = uri ? uri : default_options[:base_uri] || ENV["DOCMAGO_URL"]
19
+
20
+ base_uri ENV['DOCMAGO_URL'] || 'https://docmago.com/api'
21
+
22
+ def self.base_uri(uri = nil)
23
+ default_options[:base_uri] = uri ? uri : default_options[:base_uri] || ENV['DOCMAGO_URL']
24
24
  default_options[:base_uri]
25
25
  end
26
-
27
- def self.api_key(key=nil)
28
- default_options[:api_key] = key ? key : default_options[:api_key] || ENV["DOCMAGO_API_KEY"]
29
- default_options[:api_key] || raise(DocmagoClient::Error::NoApiKeyProvidedError.new("No API key provided"))
26
+
27
+ def self.api_key(key = nil)
28
+ default_options[:api_key] = key ? key : default_options[:api_key] || ENV['DOCMAGO_API_KEY']
29
+ default_options[:api_key] || raise(DocmagoClient::Error::NoApiKeyProvidedError.new('No API key provided'))
30
30
  end
31
31
 
32
- def self.create!(options={})
33
- raise ArgumentError.new "please pass in an options hash" unless options.is_a? Hash
34
- self.create options.merge(raise_exception_on_failure: true)
32
+ def self.create!(options = {})
33
+ raise ArgumentError.new 'please pass in an options hash' unless options.is_a? Hash
34
+ create options.merge(raise_exception_on_failure: true)
35
35
  end
36
36
 
37
37
  # when given a block, hands the block a TempFile of the resulting document
38
38
  # otherwise, just returns the response
39
- def self.create(options={})
40
- raise ArgumentError.new "please pass in an options hash" unless options.is_a? Hash
39
+ def self.create(options = {})
40
+ raise ArgumentError.new 'please pass in an options hash' unless options.is_a? Hash
41
41
  if options[:content].nil? || options[:content].empty?
42
- raise DocmagoClient::Error::NoContentError.new("must supply :content")
42
+ raise DocmagoClient::Error::NoContentError.new('must supply :content')
43
43
  end
44
44
 
45
45
  default_options = {
46
- name: "default",
47
- type: "pdf",
46
+ name: 'default',
47
+ type: 'pdf',
48
48
  test_mode: false,
49
49
  raise_exception_on_failure: false
50
50
  }
51
-
51
+
52
52
  options = default_options.merge(options)
53
53
  raise_exception_on_failure = options[:raise_exception_on_failure]
54
54
  options.delete :raise_exception_on_failure
55
-
55
+
56
56
  if options[:zip_resources]
57
57
  tmp_dir = Dir.mktmpdir
58
58
  begin
59
- resource_archiver = HTMLResourceArchiver.new(options[:content], options[:resource_path])
59
+ resource_archiver = HTMLResourceArchiver.new(options)
60
60
  options[:content] = File.new(resource_archiver.create_zip("#{tmp_dir}/document.zip"))
61
-
62
- response = post("/documents", body: { document: options }, basic_auth: { username: api_key })
61
+ options.delete :assets
62
+
63
+ response = post('/documents', body: { document: options }, basic_auth: { username: api_key })
63
64
  ensure
64
65
  FileUtils.remove_entry_secure tmp_dir
65
66
  end
66
67
  else
67
- response = post("/documents", body: { document: options }, basic_auth: { username: api_key })
68
+ response = post('/documents', body: { document: options }, basic_auth: { username: api_key })
68
69
  end
69
70
 
70
71
  if raise_exception_on_failure && !response.success?
@@ -73,7 +74,7 @@ module DocmagoClient
73
74
 
74
75
  if block_given?
75
76
  ret_val = nil
76
- Tempfile.open("docmago") do |f|
77
+ Tempfile.open('docmago') do |f|
77
78
  f.sync = true
78
79
  f.write(response.body)
79
80
  f.rewind
@@ -86,13 +87,13 @@ module DocmagoClient
86
87
  end
87
88
  end
88
89
 
89
- def self.list_docs!(options={})
90
- raise ArgumentError.new "please pass in an options hash" unless options.is_a? Hash
91
- self.list_docs options.merge(raise_exception_on_failure: true)
90
+ def self.list_docs!(options = {})
91
+ raise ArgumentError.new 'please pass in an options hash' unless options.is_a? Hash
92
+ list_docs options.merge(raise_exception_on_failure: true)
92
93
  end
93
94
 
94
- def self.list_docs(options={})
95
- raise ArgumentError.new "please pass in an options hash" unless options.is_a? Hash
95
+ def self.list_docs(options = {})
96
+ raise ArgumentError.new 'please pass in an options hash' unless options.is_a? Hash
96
97
  default_options = {
97
98
  page: 1,
98
99
  per_page: 100,
@@ -102,7 +103,7 @@ module DocmagoClient
102
103
  raise_exception_on_failure = options[:raise_exception_on_failure]
103
104
  options.delete :raise_exception_on_failure
104
105
 
105
- response = get("/documents", query: options, basic_auth: { username: api_key })
106
+ response = get('/documents', query: options, basic_auth: { username: api_key })
106
107
  if raise_exception_on_failure && !response.success?
107
108
  raise DocmagoClient::Exception::DocumentListingFailure.new response.body, response.code
108
109
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docmago_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Habermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-13 00:00:00.000000000 Z
11
+ date: 2014-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.11.0
19
+ version: 0.13.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.11.0
26
+ version: 0.13.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: httmultiparty
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,86 +42,86 @@ dependencies:
42
42
  name: nokogiri
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.6.0
47
+ version: '1.6'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.6.0
54
+ version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rubyzip
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 1.0.0
61
+ version: '1.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 1.0.0
68
+ version: '1.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: addressable
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 2.3.5
75
+ version: '2.3'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 2.3.5
82
+ version: '2.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 4.1.4
89
+ version: '4.1'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 4.1.4
96
+ version: '4.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '1.3'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '1.3'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: capybara
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '0'
117
+ version: '2.4'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '0'
124
+ version: '2.4'
125
125
  description: Makes it easy to create PDF documents through the Docmago API.
126
126
  email:
127
127
  - jan@habermann24.com
@@ -129,81 +129,13 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - MIT-LICENSE
133
- - README.rdoc
134
- - Rakefile
132
+ - README.md
135
133
  - lib/docmago_client.rb
136
134
  - lib/docmago_client/error.rb
137
135
  - lib/docmago_client/exception.rb
138
136
  - lib/docmago_client/html_resource_archiver.rb
139
137
  - lib/docmago_client/railtie.rb
140
138
  - lib/docmago_client/version.rb
141
- - lib/tasks/docmago_client_tasks.rake
142
- - test/docmago_client_test.rb
143
- - test/dummy/README.rdoc
144
- - test/dummy/Rakefile
145
- - test/dummy/app/assets/javascripts/application.js
146
- - test/dummy/app/assets/stylesheets/application.css
147
- - test/dummy/app/controllers/application_controller.rb
148
- - test/dummy/app/controllers/home_controller.rb
149
- - test/dummy/app/helpers/application_helper.rb
150
- - test/dummy/app/views/home/index.html.erb
151
- - test/dummy/app/views/home/index.pdf.erb
152
- - test/dummy/app/views/home/pdf/subdir_template.pdf.erb
153
- - test/dummy/app/views/layouts/application.html.erb
154
- - test/dummy/config.ru
155
- - test/dummy/config/application.rb
156
- - test/dummy/config/boot.rb
157
- - test/dummy/config/database.yml
158
- - test/dummy/config/environment.rb
159
- - test/dummy/config/environments/development.rb
160
- - test/dummy/config/environments/production.rb
161
- - test/dummy/config/environments/test.rb
162
- - test/dummy/config/initializers/backtrace_silencers.rb
163
- - test/dummy/config/initializers/docmago.rb
164
- - test/dummy/config/initializers/inflections.rb
165
- - test/dummy/config/initializers/mime_types.rb
166
- - test/dummy/config/initializers/secret_token.rb
167
- - test/dummy/config/initializers/session_store.rb
168
- - test/dummy/config/initializers/wrap_parameters.rb
169
- - test/dummy/config/locales/en.yml
170
- - test/dummy/config/routes.rb
171
- - test/dummy/db/development.sqlite3
172
- - test/dummy/db/test.sqlite3
173
- - test/dummy/log/development.log
174
- - test/dummy/log/test.log
175
- - test/dummy/public/404.html
176
- - test/dummy/public/422.html
177
- - test/dummy/public/500.html
178
- - test/dummy/public/favicon.ico
179
- - test/dummy/script/rails
180
- - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
181
- - test/dummy/tmp/cache/assets/CF0/DC0/sprockets%2Fc7df72c44e5cf6295507448c4726d47b
182
- - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
183
- - test/dummy/tmp/cache/assets/D3C/0C0/sprockets%2F984da4677de1065bf04bbd8a505d0e90
184
- - test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
185
- - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
186
- - test/dummy/tmp/cache/assets/D71/8C0/sprockets%2F07e1f1387073a8829a9b7edfdaa771aa
187
- - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
188
- - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
189
- - test/dummy/tmp/cache/assets/E5E/0C0/sprockets%2Fb7fae3fe0c7bca77de72b8e8800aad9a
190
- - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
191
- - test/dummy/tmp/cache/assets/test/sprockets/27db960e9aa643c0bb6a5c816ff0131e
192
- - test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
193
- - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
194
- - test/dummy/tmp/cache/assets/test/sprockets/6f6310c1b5407da50f031143deb91c34
195
- - test/dummy/tmp/cache/assets/test/sprockets/70bf67ab6d61f1c95b28741e6ab01ef2
196
- - test/dummy/tmp/cache/assets/test/sprockets/79ad5cdd007a17eafa73d743b6755cb8
197
- - test/dummy/tmp/cache/assets/test/sprockets/a939d785b831a27f85d9ac24def8836e
198
- - test/dummy/tmp/cache/assets/test/sprockets/b10fc2c45b5b421a2c9968a44b2b09af
199
- - test/dummy/tmp/cache/assets/test/sprockets/cc469c18b214c2fb0b7807c4e3c640f7
200
- - test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
201
- - test/dummy/tmp/cache/assets/test/sprockets/d5571dc03eff8cbafd90bc2c8e499122
202
- - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
203
- - test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
204
- - test/integration/navigation_test.rb
205
- - test/support/integration_case.rb
206
- - test/test_helper.rb
207
139
  homepage: http://github.com/docmago/docmago_client
208
140
  licenses:
209
141
  - MIT
@@ -224,73 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
156
  version: '0'
225
157
  requirements: []
226
158
  rubyforge_project:
227
- rubygems_version: 2.2.2
159
+ rubygems_version: 2.4.2
228
160
  signing_key:
229
161
  specification_version: 4
230
162
  summary: Client for the Docmago API (www.docmago.com)
231
- test_files:
232
- - test/docmago_client_test.rb
233
- - test/dummy/app/assets/javascripts/application.js
234
- - test/dummy/app/assets/stylesheets/application.css
235
- - test/dummy/app/controllers/application_controller.rb
236
- - test/dummy/app/controllers/home_controller.rb
237
- - test/dummy/app/helpers/application_helper.rb
238
- - test/dummy/app/views/home/index.html.erb
239
- - test/dummy/app/views/home/index.pdf.erb
240
- - test/dummy/app/views/home/pdf/subdir_template.pdf.erb
241
- - test/dummy/app/views/layouts/application.html.erb
242
- - test/dummy/config/application.rb
243
- - test/dummy/config/boot.rb
244
- - test/dummy/config/database.yml
245
- - test/dummy/config/environment.rb
246
- - test/dummy/config/environments/development.rb
247
- - test/dummy/config/environments/production.rb
248
- - test/dummy/config/environments/test.rb
249
- - test/dummy/config/initializers/backtrace_silencers.rb
250
- - test/dummy/config/initializers/docmago.rb
251
- - test/dummy/config/initializers/inflections.rb
252
- - test/dummy/config/initializers/mime_types.rb
253
- - test/dummy/config/initializers/secret_token.rb
254
- - test/dummy/config/initializers/session_store.rb
255
- - test/dummy/config/initializers/wrap_parameters.rb
256
- - test/dummy/config/locales/en.yml
257
- - test/dummy/config/routes.rb
258
- - test/dummy/config.ru
259
- - test/dummy/db/development.sqlite3
260
- - test/dummy/db/test.sqlite3
261
- - test/dummy/log/development.log
262
- - test/dummy/log/test.log
263
- - test/dummy/public/404.html
264
- - test/dummy/public/422.html
265
- - test/dummy/public/500.html
266
- - test/dummy/public/favicon.ico
267
- - test/dummy/Rakefile
268
- - test/dummy/README.rdoc
269
- - test/dummy/script/rails
270
- - test/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953
271
- - test/dummy/tmp/cache/assets/CF0/DC0/sprockets%2Fc7df72c44e5cf6295507448c4726d47b
272
- - test/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705
273
- - test/dummy/tmp/cache/assets/D3C/0C0/sprockets%2F984da4677de1065bf04bbd8a505d0e90
274
- - test/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655
275
- - test/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6
276
- - test/dummy/tmp/cache/assets/D71/8C0/sprockets%2F07e1f1387073a8829a9b7edfdaa771aa
277
- - test/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994
278
- - test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af
279
- - test/dummy/tmp/cache/assets/E5E/0C0/sprockets%2Fb7fae3fe0c7bca77de72b8e8800aad9a
280
- - test/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705
281
- - test/dummy/tmp/cache/assets/test/sprockets/27db960e9aa643c0bb6a5c816ff0131e
282
- - test/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af
283
- - test/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953
284
- - test/dummy/tmp/cache/assets/test/sprockets/6f6310c1b5407da50f031143deb91c34
285
- - test/dummy/tmp/cache/assets/test/sprockets/70bf67ab6d61f1c95b28741e6ab01ef2
286
- - test/dummy/tmp/cache/assets/test/sprockets/79ad5cdd007a17eafa73d743b6755cb8
287
- - test/dummy/tmp/cache/assets/test/sprockets/a939d785b831a27f85d9ac24def8836e
288
- - test/dummy/tmp/cache/assets/test/sprockets/b10fc2c45b5b421a2c9968a44b2b09af
289
- - test/dummy/tmp/cache/assets/test/sprockets/cc469c18b214c2fb0b7807c4e3c640f7
290
- - test/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994
291
- - test/dummy/tmp/cache/assets/test/sprockets/d5571dc03eff8cbafd90bc2c8e499122
292
- - test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
293
- - test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
294
- - test/integration/navigation_test.rb
295
- - test/support/integration_case.rb
296
- - test/test_helper.rb
163
+ test_files: []
data/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright 2013 Jan Habermann
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.