summaryrefslogtreecommitdiffstats
path: root/test_pdf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test_pdf.rb')
-rw-r--r--test_pdf.rb45
1 files changed, 45 insertions, 0 deletions
diff --git a/test_pdf.rb b/test_pdf.rb
new file mode 100644
index 0000000..625926a
--- /dev/null
+++ b/test_pdf.rb
@@ -0,0 +1,45 @@
+require_relative 'lib/registration'
+require 'prawn'
+
+params = {
+ 'name' => 'Imbalance',
+ 'city' => 'Oslo',
+ 'website' => 'http://imbalance.no',
+ 'label' => 'Calculated Imperfection',
+ 'shortbio' => 'Thrash metal from Norway',
+ 'contact' => {
+ 'name' => 'Harald Eilertsen',
+ 'addr' => "Gamleveien 13\n1289 Snufstad",
+ 'phone' => '98765432',
+ 'email' => 'mail@imbalance.no'
+ },
+ 'members' => {
+ '1' => {
+ 'name' => 'Harald Eilertsen',
+ 'instrument' => 'Bass/Vocals',
+ 'age' => ''
+ },
+ '2' => {
+ 'name' => 'Welle',
+ 'instrument' => 'Drums',
+ 'age' => ''
+ },
+ '3' => {
+ 'name' => 'Thormodr',
+ 'instrument' => 'Guitar',
+ 'age' => ''
+ }
+ },
+ 'songs' => {
+ '1' => {
+ 'title' => 'Bestial by Nature',
+ 'time' => '02:80',
+ 'isrc' => '',
+ 'performers' => "Harald Eilertsen\nThormod Steinert\nLars Welle",
+ 'composers' => "Harald Eilertsen\nThormod Steinert",
+ 'notes' => 'Rævrukkje rum kjurr!'
+ }
+ }
+}
+
+generate_pdf_for Band.new(params)