thecore_download_documents 0.1.1 → 2.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
  SHA256:
3
- metadata.gz: 28d389557c5cd4da202a5e339e81b0cc8c42179e26fc2060ff8137b13e0c89e4
4
- data.tar.gz: c6d53c387de2ced00905b313a6f84586d51e4ea0d0a4d0138439a6572cf86c4e
3
+ metadata.gz: a4eecb36121272d878633dbd2117e60425b6dbd657dc5ba616f4b40455175e63
4
+ data.tar.gz: 8dbc901e30b61ec60d2f1e373c4bb48d6555e6985bcacd8a4f4a0adc030381c4
5
5
  SHA512:
6
- metadata.gz: 5a830eb7aa71f63e43c697e4e464ed99aa444010e8aeb1c8c0a51a3686d1d8dac47f3325d036b725a347fab48b92ad75e23e077c593ed0472aad9f281b80c9ef
7
- data.tar.gz: bf69ef9473ae3096821b0bfeb40286224e0f5c278e278b36f3937524920ec949ee700ad770847b8e79545770a056924b67791e608b15cd179a308fb85dcc6f2b
6
+ metadata.gz: aaa70a53308467f33ae2f033bb64eb8d950a10721c1ccd44d4c47199bc613e7164656d7a4224dedf19d579c1e634cdc03ace4cfd648d25114597948e3c4db4ea
7
+ data.tar.gz: 6e00830657c00bd4a5079f2105562e547753f552b4d4388d0d47ac5d1d3d96e936dc567f07c20748d7178c65be1d7185cf970d35af5a29fbf7914605812cab2f
@@ -1,9 +1,9 @@
1
- require "thecore_download_documents/railtie"
2
-
3
- require 'thecore'
1
+ require 'thecore_ui_rails_admin'
4
2
  require "prawn"
5
3
  require "prawn/table"
6
4
  require 'csv'
5
+ require "thecore_download_documents/railtie"
6
+
7
7
  module ThecoreDownloadDocuments
8
8
  # Your code goes here...
9
9
  def self.pdf_table header, footer, rows, table_headers, filename
@@ -42,10 +42,8 @@ module ThecoreDownloadDocuments
42
42
 
43
43
  def self.csv_table rows, table_headers, filename
44
44
  csv = CSV.generate do |row|
45
- row << table_headers
46
- row << ["another", "row"]
47
- rows.each do |r|
48
- row << r.values
45
+ rows.unshift(table_headers).each do |data|
46
+ row << data
49
47
  end
50
48
  end
51
49
 
@@ -1,3 +1,3 @@
1
1
  module ThecoreDownloadDocuments
2
- VERSION = '0.1.1'
2
+ VERSION = "#{`git describe --tags $(git rev-list --tags --max-count=1)`}"
3
3
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_download_documents
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-25 00:00:00.000000000 Z
11
+ date: 2020-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: thecore_ui_commons
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: prawn
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
86
  - !ruby/object:Gem::Version
73
87
  version: '0'
74
88
  requirements: []
75
- rubygems_version: 3.0.6
89
+ rubygems_version: 3.0.3
76
90
  signing_key:
77
91
  specification_version: 4
78
92
  summary: Common methods to help exporting to csv, pdf documents.