pdf-report-generator 0.1.0

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 13e508fb81740aa7e976067f5890c1f3820646b0
4
+ data.tar.gz: c2bd67289f4484146e1fd9b94adc4aab1c991793
5
+ SHA512:
6
+ metadata.gz: cd7e10b2169ce702b4ac845c49c6abdad80909d9085a39260fc5cfa1e847dcc069cd4015671908b1a1e52321c6b9d6cd347d1bc341b0cdafc46ccaae4a5f4288
7
+ data.tar.gz: b37739b488387983fe1a6e39a054082a2faf177de562d440f1dc1438a491bb1e3620d8c4a5c26d4441bc96aa55f4f86eeb01bf2a710080ebeb5d707dcb4e822f
@@ -0,0 +1,12 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
12
+ *.gem
@@ -0,0 +1,72 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="MarkdownProjectSettings">
4
+ <PreviewSettings splitEditorLayout="SPLIT" splitEditorPreview="PREVIEW" useGrayscaleRendering="false" zoomFactor="1.25" maxImageWidth="0" showGitHubPageIfSynced="false" allowBrowsingInPreview="false" synchronizePreviewPosition="true" highlightPreviewType="NONE" highlightFadeOut="5" highlightOnTyping="true" synchronizeSourcePosition="true" verticallyAlignSourceAndPreviewSyncPosition="true" showSearchHighlightsInPreview="false" showSelectionInPreview="true">
5
+ <PanelProvider>
6
+ <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.panel" providerName="Default - Swing" />
7
+ </PanelProvider>
8
+ </PreviewSettings>
9
+ <ParserSettings gitHubSyntaxChange="false">
10
+ <PegdownExtensions>
11
+ <option name="ABBREVIATIONS" value="false" />
12
+ <option name="ANCHORLINKS" value="true" />
13
+ <option name="ASIDE" value="false" />
14
+ <option name="ATXHEADERSPACE" value="true" />
15
+ <option name="AUTOLINKS" value="true" />
16
+ <option name="DEFINITIONS" value="false" />
17
+ <option name="DEFINITION_BREAK_DOUBLE_BLANK_LINE" value="false" />
18
+ <option name="FENCED_CODE_BLOCKS" value="true" />
19
+ <option name="FOOTNOTES" value="false" />
20
+ <option name="HARDWRAPS" value="false" />
21
+ <option name="HTML_DEEP_PARSER" value="false" />
22
+ <option name="INSERTED" value="false" />
23
+ <option name="QUOTES" value="false" />
24
+ <option name="RELAXEDHRULES" value="true" />
25
+ <option name="SMARTS" value="false" />
26
+ <option name="STRIKETHROUGH" value="true" />
27
+ <option name="SUBSCRIPT" value="false" />
28
+ <option name="SUPERSCRIPT" value="false" />
29
+ <option name="SUPPRESS_HTML_BLOCKS" value="false" />
30
+ <option name="SUPPRESS_INLINE_HTML" value="false" />
31
+ <option name="TABLES" value="true" />
32
+ <option name="TASKLISTITEMS" value="true" />
33
+ <option name="TOC" value="false" />
34
+ <option name="WIKILINKS" value="true" />
35
+ </PegdownExtensions>
36
+ <ParserOptions>
37
+ <option name="COMMONMARK_LISTS" value="true" />
38
+ <option name="DUMMY" value="false" />
39
+ <option name="EMOJI_SHORTCUTS" value="true" />
40
+ <option name="FLEXMARK_FRONT_MATTER" value="false" />
41
+ <option name="GFM_LOOSE_BLANK_LINE_AFTER_ITEM_PARA" value="false" />
42
+ <option name="GFM_TABLE_RENDERING" value="true" />
43
+ <option name="GITBOOK_URL_ENCODING" value="false" />
44
+ <option name="GITHUB_EMOJI_URL" value="false" />
45
+ <option name="GITHUB_LISTS" value="false" />
46
+ <option name="GITHUB_WIKI_LINKS" value="true" />
47
+ <option name="JEKYLL_FRONT_MATTER" value="false" />
48
+ <option name="SIM_TOC_BLANK_LINE_SPACER" value="true" />
49
+ </ParserOptions>
50
+ </ParserSettings>
51
+ <HtmlSettings headerTopEnabled="false" headerBottomEnabled="false" bodyTopEnabled="false" bodyBottomEnabled="false" embedUrlContent="false" addPageHeader="true">
52
+ <GeneratorProvider>
53
+ <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.generator" providerName="Default Swing HTML Generator" />
54
+ </GeneratorProvider>
55
+ <headerTop />
56
+ <headerBottom />
57
+ <bodyTop />
58
+ <bodyBottom />
59
+ </HtmlSettings>
60
+ <CssSettings previewScheme="UI_SCHEME" cssUri="" isCssUriEnabled="false" isCssTextEnabled="false" isDynamicPageWidth="true">
61
+ <StylesheetProvider>
62
+ <provider providerId="com.vladsch.idea.multimarkdown.editor.swing.html.css" providerName="Default Swing Stylesheet" />
63
+ </StylesheetProvider>
64
+ <ScriptProviders />
65
+ <cssText />
66
+ </CssSettings>
67
+ <HtmlExportSettings updateOnSave="false" parentDir="$ProjectFileDir$" targetDir="$ProjectFileDir$" cssDir="" scriptDir="" plainHtml="false" imageDir="" copyLinkedImages="false" imageUniquifyType="0" targetExt="" useTargetExt="false" noCssNoScripts="false" linkToExportedHtml="true" exportOnSettingsChange="true" regenerateOnProjectOpen="false" />
68
+ <LinkMapSettings>
69
+ <textMaps />
70
+ </LinkMapSettings>
71
+ </component>
72
+ </project>
@@ -0,0 +1,3 @@
1
+ <component name="MarkdownNavigator.ProfileManager">
2
+ <settings default="" pdf-export="" />
3
+ </component>
@@ -0,0 +1,4 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-2.3.1" project-jdk-type="RUBY_SDK" />
4
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/pdf-report-generator.iml" filepath="$PROJECT_DIR$/.idea/pdf-report-generator.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="ModuleRunConfigurationManager">
4
+ <shared />
5
+ </component>
6
+ <component name="NewModuleRootManager">
7
+ <content url="file://$MODULE_DIR$" />
8
+ <orderEntry type="inheritedJdk" />
9
+ <orderEntry type="sourceFolder" forTests="false" />
10
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.16.0.pre.2, RVM: ruby-2.3.1) [gem]" level="application" />
11
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.3, RVM: ruby-2.3.1) [gem]" level="application" />
12
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.5.0, RVM: ruby-2.3.1) [gem]" level="application" />
13
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v3.6.0, RVM: ruby-2.3.1) [gem]" level="application" />
14
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v3.6.0, RVM: ruby-2.3.1) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v3.6.0, RVM: ruby-2.3.1) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v3.6.0, RVM: ruby-2.3.1) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.6.0, RVM: ruby-2.3.1) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="yard (v0.9.9, RVM: ruby-2.3.1) [gem]" level="application" />
19
+ </component>
20
+ </module>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,275 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ChangeListManager">
4
+ <list default="true" id="579bbf34-a847-40ae-b0a3-877c4e3dba24" name="Default" comment="">
5
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pdf-report-generator.gemspec" afterPath="$PROJECT_DIR$/pdf-report-generator.gemspec" />
6
+ </list>
7
+ <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
8
+ <option name="TRACKING_ENABLED" value="true" />
9
+ <option name="SHOW_DIALOG" value="false" />
10
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
11
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
12
+ <option name="LAST_RESOLUTION" value="IGNORE" />
13
+ </component>
14
+ <component name="FileEditorManager">
15
+ <leaf>
16
+ <file leaf-file-name="pdf-report-generator.gemspec" pinned="false" current-in-tab="true">
17
+ <entry file="file://$PROJECT_DIR$/pdf-report-generator.gemspec">
18
+ <provider selected="true" editor-type-id="text-editor">
19
+ <state relative-caret-position="285">
20
+ <caret line="15" column="2" lean-forward="false" selection-start-line="15" selection-start-column="2" selection-end-line="15" selection-end-column="2" />
21
+ <folding />
22
+ </state>
23
+ </provider>
24
+ </entry>
25
+ </file>
26
+ <file leaf-file-name="version.rb" pinned="false" current-in-tab="false">
27
+ <entry file="file://$PROJECT_DIR$/lib/pdf/report/generator/version.rb">
28
+ <provider selected="true" editor-type-id="text-editor">
29
+ <state relative-caret-position="38">
30
+ <caret line="2" column="20" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="2" selection-end-column="20" />
31
+ <folding />
32
+ </state>
33
+ </provider>
34
+ </entry>
35
+ </file>
36
+ </leaf>
37
+ </component>
38
+ <component name="FileTemplateManagerImpl">
39
+ <option name="RECENT_TEMPLATES">
40
+ <list>
41
+ <option value="Ruby Empty" />
42
+ </list>
43
+ </option>
44
+ </component>
45
+ <component name="Git.Settings">
46
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
47
+ </component>
48
+ <component name="IdeDocumentHistory">
49
+ <option name="CHANGED_PATHS">
50
+ <list>
51
+ <option value="$PROJECT_DIR$/.gitignore" />
52
+ <option value="$PROJECT_DIR$/lib/pdf/report/generator/version.rb" />
53
+ <option value="$PROJECT_DIR$/lib/reports.rb" />
54
+ <option value="$PROJECT_DIR$/lib/pdf/report/generator.rb" />
55
+ <option value="$PROJECT_DIR$/lib/pdf/report/generator/engine.rb" />
56
+ <option value="$PROJECT_DIR$/Gemfile" />
57
+ <option value="$PROJECT_DIR$/lib/pdf/report/generator/cdisc_changes_report.rb" />
58
+ <option value="$PROJECT_DIR$/lib/pdf/report/generator/wicked_core.rb" />
59
+ <option value="$PROJECT_DIR$/pdf-report-generator.gemspec" />
60
+ </list>
61
+ </option>
62
+ </component>
63
+ <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
64
+ <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
65
+ <component name="JsGulpfileManager">
66
+ <detection-done>true</detection-done>
67
+ <sorting>DEFINITION_ORDER</sorting>
68
+ </component>
69
+ <component name="ProjectFrameBounds" extendedState="6">
70
+ <option name="x" value="1" />
71
+ <option name="y" value="22" />
72
+ <option name="width" value="1920" />
73
+ <option name="height" value="1054" />
74
+ </component>
75
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
76
+ <component name="ProjectView">
77
+ <navigator currentView="ProjectPane" proportions="" version="1">
78
+ <flattenPackages />
79
+ <showMembers />
80
+ <showModules />
81
+ <showLibraryContents />
82
+ <hideEmptyPackages />
83
+ <abbreviatePackageNames />
84
+ <autoscrollToSource />
85
+ <autoscrollFromSource />
86
+ <sortByType />
87
+ <manualOrder />
88
+ <foldersAlwaysOnTop value="true" />
89
+ </navigator>
90
+ <panes>
91
+ <pane id="Scope" />
92
+ <pane id="Scratches" />
93
+ <pane id="ProjectPane">
94
+ <subPane>
95
+ <expand>
96
+ <path>
97
+ <item name="pdf-report-generator" type="b2602c69:ProjectViewProjectNode" />
98
+ <item name="pdf-report-generator" type="462c0819:PsiDirectoryNode" />
99
+ </path>
100
+ <path>
101
+ <item name="pdf-report-generator" type="b2602c69:ProjectViewProjectNode" />
102
+ <item name="pdf-report-generator" type="462c0819:PsiDirectoryNode" />
103
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
104
+ </path>
105
+ <path>
106
+ <item name="pdf-report-generator" type="b2602c69:ProjectViewProjectNode" />
107
+ <item name="pdf-report-generator" type="462c0819:PsiDirectoryNode" />
108
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
109
+ <item name="pdf" type="462c0819:PsiDirectoryNode" />
110
+ </path>
111
+ <path>
112
+ <item name="pdf-report-generator" type="b2602c69:ProjectViewProjectNode" />
113
+ <item name="pdf-report-generator" type="462c0819:PsiDirectoryNode" />
114
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
115
+ <item name="pdf" type="462c0819:PsiDirectoryNode" />
116
+ <item name="report" type="462c0819:PsiDirectoryNode" />
117
+ </path>
118
+ <path>
119
+ <item name="pdf-report-generator" type="b2602c69:ProjectViewProjectNode" />
120
+ <item name="pdf-report-generator" type="462c0819:PsiDirectoryNode" />
121
+ <item name="lib" type="462c0819:PsiDirectoryNode" />
122
+ <item name="pdf" type="462c0819:PsiDirectoryNode" />
123
+ <item name="report" type="462c0819:PsiDirectoryNode" />
124
+ <item name="generator" type="462c0819:PsiDirectoryNode" />
125
+ </path>
126
+ </expand>
127
+ <select />
128
+ </subPane>
129
+ </pane>
130
+ </panes>
131
+ </component>
132
+ <component name="PropertiesComponent">
133
+ <property name="WebServerToolWindowFactoryState" value="false" />
134
+ </component>
135
+ <component name="RunDashboard">
136
+ <option name="ruleStates">
137
+ <list>
138
+ <RuleState>
139
+ <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
140
+ </RuleState>
141
+ <RuleState>
142
+ <option name="name" value="StatusDashboardGroupingRule" />
143
+ </RuleState>
144
+ </list>
145
+ </option>
146
+ </component>
147
+ <component name="ShelveChangesManager" show_recycled="false">
148
+ <option name="remove_strategy" value="false" />
149
+ </component>
150
+ <component name="SpringUtil" SPRING_PRE_LOADER_OPTION="true" />
151
+ <component name="SvnConfiguration">
152
+ <configuration />
153
+ </component>
154
+ <component name="TaskManager">
155
+ <task active="true" id="Default" summary="Default task">
156
+ <changelist id="579bbf34-a847-40ae-b0a3-877c4e3dba24" name="Default" comment="" />
157
+ <created>1508403626679</created>
158
+ <option name="number" value="Default" />
159
+ <option name="presentableId" value="Default" />
160
+ <updated>1508403626679</updated>
161
+ <workItem from="1508403628413" duration="2072000" />
162
+ </task>
163
+ <servers />
164
+ </component>
165
+ <component name="TimeTrackingManager">
166
+ <option name="totallyTimeSpent" value="2072000" />
167
+ </component>
168
+ <component name="ToolWindowManager">
169
+ <frame x="1" y="22" width="1920" height="1054" extended-state="6" />
170
+ <editor active="true" />
171
+ <layout>
172
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.21788009" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
173
+ <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
174
+ <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31938776" sideWeight="0.50214136" order="-1" side_tool="true" content_ui="tabs" />
175
+ <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
176
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.31938776" sideWeight="0.49785867" order="2" side_tool="false" content_ui="tabs" />
177
+ <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
178
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
179
+ <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32959184" sideWeight="0.49785867" order="-1" side_tool="false" content_ui="tabs" />
180
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
181
+ <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="-1" side_tool="true" content_ui="tabs" />
182
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
183
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
184
+ <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
185
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
186
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
187
+ <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
188
+ <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
189
+ </layout>
190
+ </component>
191
+ <component name="TypeScriptGeneratedFilesManager">
192
+ <option name="version" value="1" />
193
+ </component>
194
+ <component name="VcsContentAnnotationSettings">
195
+ <option name="myLimit" value="2678400000" />
196
+ </component>
197
+ <component name="XDebuggerManager">
198
+ <breakpoint-manager />
199
+ <watches-manager />
200
+ </component>
201
+ <component name="editorHistoryManager">
202
+ <entry file="file://$PROJECT_DIR$/lib/reports.rb">
203
+ <provider selected="true" editor-type-id="text-editor">
204
+ <state relative-caret-position="38">
205
+ <caret line="2" column="0" lean-forward="false" selection-start-line="2" selection-start-column="0" selection-end-line="2" selection-end-column="0" />
206
+ <folding />
207
+ </state>
208
+ </provider>
209
+ </entry>
210
+ <entry file="file://$PROJECT_DIR$/lib/pdf/report/generator/wicked_core.rb">
211
+ <provider selected="true" editor-type-id="text-editor">
212
+ <state relative-caret-position="5377">
213
+ <caret line="283" column="0" lean-forward="true" selection-start-line="283" selection-start-column="0" selection-end-line="283" selection-end-column="0" />
214
+ <folding />
215
+ </state>
216
+ </provider>
217
+ </entry>
218
+ <entry file="file://$PROJECT_DIR$/lib/pdf/report/generator.rb">
219
+ <provider selected="true" editor-type-id="text-editor">
220
+ <state relative-caret-position="76">
221
+ <caret line="4" column="66" lean-forward="false" selection-start-line="4" selection-start-column="66" selection-end-line="4" selection-end-column="66" />
222
+ <folding />
223
+ </state>
224
+ </provider>
225
+ </entry>
226
+ <entry file="file://$PROJECT_DIR$/lib/pdf/report/generator/engine.rb">
227
+ <provider selected="true" editor-type-id="text-editor">
228
+ <state relative-caret-position="133">
229
+ <caret line="7" column="3" lean-forward="false" selection-start-line="7" selection-start-column="3" selection-end-line="7" selection-end-column="3" />
230
+ <folding />
231
+ </state>
232
+ </provider>
233
+ </entry>
234
+ <entry file="file://$PROJECT_DIR$/Gemfile">
235
+ <provider selected="true" editor-type-id="text-editor">
236
+ <state relative-caret-position="114">
237
+ <caret line="6" column="0" lean-forward="false" selection-start-line="6" selection-start-column="0" selection-end-line="6" selection-end-column="0" />
238
+ <folding />
239
+ </state>
240
+ </provider>
241
+ </entry>
242
+ <entry file="file://$PROJECT_DIR$/.gitignore">
243
+ <provider selected="true" editor-type-id="text-editor">
244
+ <state relative-caret-position="209">
245
+ <caret line="11" column="5" lean-forward="false" selection-start-line="11" selection-start-column="5" selection-end-line="11" selection-end-column="5" />
246
+ <folding />
247
+ </state>
248
+ </provider>
249
+ </entry>
250
+ <entry file="file://$PROJECT_DIR$/lib/pdf/report/generator/cdisc_changes_report.rb">
251
+ <provider selected="true" editor-type-id="text-editor">
252
+ <state relative-caret-position="895">
253
+ <caret line="66" column="31" lean-forward="true" selection-start-line="66" selection-start-column="31" selection-end-line="66" selection-end-column="31" />
254
+ <folding />
255
+ </state>
256
+ </provider>
257
+ </entry>
258
+ <entry file="file://$PROJECT_DIR$/lib/pdf/report/generator/version.rb">
259
+ <provider selected="true" editor-type-id="text-editor">
260
+ <state relative-caret-position="38">
261
+ <caret line="2" column="20" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="2" selection-end-column="20" />
262
+ <folding />
263
+ </state>
264
+ </provider>
265
+ </entry>
266
+ <entry file="file://$PROJECT_DIR$/pdf-report-generator.gemspec">
267
+ <provider selected="true" editor-type-id="text-editor">
268
+ <state relative-caret-position="285">
269
+ <caret line="15" column="2" lean-forward="false" selection-start-line="15" selection-start-column="2" selection-end-line="15" selection-end-column="2" />
270
+ <folding />
271
+ </state>
272
+ </provider>
273
+ </entry>
274
+ </component>
275
+ </project>
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,5 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.1
5
+ before_install: gem install bundler -v 1.16.0.pre.2
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at lemiszewski@gmx.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [http://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: http://contributor-covenant.org
74
+ [version]: http://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in pdf-report-generator.gemspec
6
+ gemspec
@@ -0,0 +1,37 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ pdf-report-generator (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.3)
10
+ rake (10.5.0)
11
+ rspec (3.6.0)
12
+ rspec-core (~> 3.6.0)
13
+ rspec-expectations (~> 3.6.0)
14
+ rspec-mocks (~> 3.6.0)
15
+ rspec-core (3.6.0)
16
+ rspec-support (~> 3.6.0)
17
+ rspec-expectations (3.6.0)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.6.0)
20
+ rspec-mocks (3.6.0)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.6.0)
23
+ rspec-support (3.6.0)
24
+ yard (0.9.9)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ bundler (~> 1.16.a)
31
+ pdf-report-generator!
32
+ rake (~> 10.0)
33
+ rspec (~> 3.0)
34
+ yard
35
+
36
+ BUNDLED WITH
37
+ 1.16.0.pre.2
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Jakub41
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # Pdf::Report::Generator
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/pdf/report/generator`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Add this line to your application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'pdf-report-generator'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+ Or install it yourself as:
20
+
21
+ $ gem install pdf-report-generator
22
+
23
+ ## Usage
24
+
25
+ TODO: Write usage instructions here
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/pdf-report-generator. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
40
+
41
+ ## Code of Conduct
42
+
43
+ Everyone interacting in the Pdf::Report::Generator project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pdf-report-generator/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "pdf/report/generator"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,5 @@
1
+ require 'fileutils'
2
+ require 'rails'
3
+ require 'pdf/report/generator/version'
4
+ require File.dirname(__FILE__) + '/generator/wicked_core'
5
+ require File.dirname(__FILE__) + '/generator/cdisc_changes_report'
@@ -0,0 +1,91 @@
1
+ class CdiscChangesReport
2
+
3
+ C_CLASS_NAME = "CdiscChangesReport"
4
+ C_FIRST_PAGE = 5
5
+ C_PER_PAGE = 9
6
+
7
+ # Create the CDISC changes report
8
+ #
9
+ # @param results [Hash] the results hash
10
+ # @param cls [Hash] the code lists
11
+ # @param user [User] the user
12
+ # @return [String] the HTML
13
+ def create(results, cls, user, custom_body=nil)
14
+ @report = WickedCore.new
15
+ @report.open(results, cls, "CDISC Terminology Change Report", "", [], user, custom_body)
16
+ @report.close
17
+ return @report.html
18
+ end
19
+
20
+ if Rails.env == "test"
21
+ # Return the current HTML. Only available for testing.
22
+ #
23
+ # @return [String] The HTML
24
+ def html
25
+ return @report.html
26
+ end
27
+ end
28
+
29
+ # private
30
+
31
+ def body(results, cls)
32
+ @report = WickedCore.new
33
+ html = ""
34
+ html += '<div class="sk-cube-grid"> <div class="sk-cube sk-cube1"></div> <div class="sk-cube sk-cube2"></div> <div class="sk-cube sk-cube3"></div> <div class="sk-cube sk-cube4"></div> <div class="sk-cube sk-cube5"></div> <div class="sk-cube sk-cube6"></div> <div class="sk-cube sk-cube7"></div> <div class="sk-cube sk-cube8"></div> <div class="sk-cube sk-cube9"></div> </div>'
35
+ html += "<h3>Conventions</h3>"
36
+ html += "<p>In the following table for a code list entry:<ul><li><p>C = Code List was created in the CDISC Terminology</p></li>"
37
+ html += "<li><p>U = Code List was updated in some way</p></li>"
38
+ html += "<li><p>'-' = There was no change to the Code List</p></li>"
39
+ html += "<li><p>X = The Code List was deleted from teh CDISC Terminology</p></li></ul></p>"
40
+ index = 0
41
+ page_count = C_FIRST_PAGE
42
+ cls.each do |cl, key|
43
+ if index % page_count == 0
44
+ if index == 0
45
+ html += "<h3>Changes</h3>"
46
+ else
47
+ html += "</tbody></table>"
48
+ @report.add_to_body(html)
49
+ @report.add_page_break
50
+ page_count = C_PER_PAGE
51
+ html = ""
52
+ index = 1
53
+ end
54
+ html += "<table class=\"table table-striped table-bordered table-condensed\"><thead>"
55
+ html += "<th>Identifier</th>"
56
+ html += "<th>Label</th>"
57
+ html += "<th>Submission Value</th>"
58
+ results.each do |result|
59
+ # r = result[:results]
60
+
61
+ html += "<th>" + result[:date] + "</th>"
62
+ end
63
+ html += "</tr></thead><tbody>"
64
+ end
65
+ s = cl[:status]
66
+ html += "<tr>"
67
+ html += "<td>#{key}</td>"
68
+ html += "<td>#{cl[:preferred_term]}</td>"
69
+ html += "<td>#{cl[:notation]}</td>"
70
+ s.each do |status|
71
+ if status == :created
72
+ html += "<td>C</td>"
73
+ elsif status == :no_change
74
+ html += "<td>-</td>"
75
+ elsif status == :updated
76
+ html += "<td>U</td>"
77
+ elsif status == :deleted
78
+ html += "<td>X</td>"
79
+ elsif status == :not_present
80
+ html += "<td>&nbsp;</td>"
81
+ else
82
+ html += "<td>[#{status}]></td>"
83
+ end
84
+ end
85
+ html += "</tr>"
86
+ index += 1
87
+ end
88
+ @report.add_to_body(html)
89
+ end
90
+
91
+ end
@@ -0,0 +1,8 @@
1
+ module Pdf
2
+ module Report
3
+ module Generator
4
+ class Engine < Rails::Engine
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module Pdf
2
+ module Report
3
+ module Generator
4
+ VERSION = "0.1.0"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,283 @@
1
+ require 'nokogiri'
2
+ class WickedCore
3
+ include ActionView::Helpers::TagHelper
4
+
5
+ C_CLASS_NAME = "WickedCore"
6
+ C_FIRST_PAGE = 5
7
+ C_PER_PAGE = 9
8
+
9
+ def initialize
10
+ @html = ""
11
+ @paper_size = ""
12
+ end
13
+
14
+ def self.root_path
15
+ String === Rails.root ? Pathname.new(Rails.root) : Rails.root
16
+ end
17
+
18
+ def self.add_extension(filename, extension)
19
+ filename.to_s.split('.').include?(extension) ? filename : "#{filename}.#{extension}"
20
+ end
21
+
22
+ # Open the document
23
+ #
24
+ # @param doc_type [String] The document type, a title string
25
+ # @param managed_item [Hash] Managed item. Can be empty
26
+ # @param user [Object] The user creating the report
27
+ # @return [Null]
28
+ def open(results, cls,doc_type, title, history, user, custom_body=nil)
29
+ @paper_size = 5 #user.paper_size
30
+ @html = page_header
31
+ if custom_body.present?
32
+ @html += WickedCore.custom_body_html(results, custom_body)
33
+ else
34
+ @html += WickedCore.new.title_page(doc_type, title, user)
35
+ @html += WickedCore.custom_body_html(results)
36
+ end
37
+ # raise @html.inspect
38
+ @html += WickedCore.new.history_page(history) if !history.empty?
39
+ end
40
+
41
+ # Add to the body
42
+ #
43
+ # @return [Null]
44
+ def add_to_body(html)
45
+ @html += html
46
+ end
47
+
48
+ # Insert page break
49
+ #
50
+ # @return [Null]
51
+ def add_page_break
52
+ @html += page_break
53
+ end
54
+
55
+ # Close up the HTML
56
+ #
57
+ # @return [Null]
58
+ def close
59
+ @html += page_footer
60
+ end
61
+
62
+ # Get the PDF
63
+ #
64
+ # @return [Object] The PDF document
65
+ def pdf
66
+ footer =
67
+ {
68
+ :font_size => "8",
69
+ :font_name => "Arial, \"Helvetica Neue\", Helvetica, sans-serif",
70
+ :left => "",
71
+ :center => "",
72
+ :right => "[page] of [topage]"
73
+ }
74
+ pdf = WickedPdf.new.pdf_from_string(@html, :page_size => @paper_size, :footer => footer )
75
+ return pdf
76
+ end
77
+
78
+ # Return the current HTML.
79
+ #
80
+ # @return [String] The HTML
81
+ def html
82
+ return @html
83
+ end
84
+
85
+ def body(results, cls)
86
+ # raise cls.inspect
87
+ # @report = WickedCore.new
88
+ @html = ""
89
+ @html += '<div class="sk-circle"> <div class="sk-circle1 sk-child"></div> <div class="sk-circle2 sk-child"></div> <div class="sk-circle3 sk-child"></div> <div class="sk-circle4 sk-child"></div> <div class="sk-circle5 sk-child"></div> <div class="sk-circle6 sk-child"></div> <div class="sk-circle7 sk-child"></div> <div class="sk-circle8 sk-child"></div> <div class="sk-circle9 sk-child"></div> <div class="sk-circle10 sk-child"></div> <div class="sk-circle11 sk-child"></div> <div class="sk-circle12 sk-child"></div> </div>'
90
+ @html += "<h3>Conventions</h3>"
91
+ @html += "<p>In the following table for a code list entry:<ul><li><p>C = Code List was created in the CDISC Terminology</p></li>"
92
+ @html += "<li><p>U = Code List was updated in some way</p></li>"
93
+ @html += "<li><p>'-' = There was no change to the Code List</p></li>"
94
+ @html += "<li><p>X = The Code List was deleted from teh CDISC Terminology</p></li></ul></p>"
95
+ index = 0
96
+ page_count = C_FIRST_PAGE
97
+ @html += '<div class="table-responsive">'
98
+ @html += '<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">'
99
+ @html += '<thead><tr><th>Email</th><th>Status</th><th>Name</th></tr></thead>'
100
+ @html += '<tbody>'
101
+ results.each do |user|
102
+ @html += '<tr>'
103
+ @html += "<td>#{user.email}</td>"
104
+ @html += "<td>#{user.first_name}</td>"
105
+ @html += '</tr>'
106
+ end
107
+ @html
108
+ # @report.add_to_body(html)
109
+ end
110
+
111
+ def self.custom_body_html(results, cust = nil)
112
+ html = ''
113
+ results.each do |result|
114
+ result.each do |key,value|
115
+ html = '<table class="table table-striped table-bordered table-condensed">
116
+ <tr>
117
+ <td colspan="2">
118
+ <h4>BC Demonstration</h4>
119
+ </td>
120
+ <td class="bg-info text-white"> BC properties</td>
121
+ </tr>
122
+ <tr>
123
+ <td colspan="3">
124
+ <h5>Group</h5>
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <td colspan="3">
129
+ <h5>Common Group</h5>
130
+ </td>
131
+ </tr>
132
+ <tr>
133
+ <td colspan="3">
134
+ <h5>EQ-5D-3L Mobility</h5>
135
+ </td>
136
+ </tr>
137
+ <tr>
138
+ <td>Date & Time</td>
139
+ <td></td>
140
+ <td>
141
+ <table class="crf-input-field">
142
+ <tr>'
143
+ if result[key].present?
144
+ html += result[key]["MOBILITY.DATE"].present? ? result[:bc_demo]["MOBILITY.DATE"] : "<td class='bg-success text-white'> Not submitted</td><td>D</td> <td>D</td> <td>/</td> <td>M</td> <td>M</td> <td>M</td> <td>/</td> <td>Y</td> <td>Y</td> <td>Y</td> <td>Y</td> <td></td> <td>H</td> <td>H</td> <td>:</td> <td>M</td> <td>M</td>"
145
+ end
146
+ html += '</tr>
147
+ </table>
148
+ </td>
149
+ </tr>
150
+ <tr>
151
+ <td>Mobility</td>
152
+ <td></td>
153
+ <td>
154
+ <p><input type="radio" name="EQ5D3L.MOBILITY.NONE" value="EQ5D3L.MOBILITY.NONE"></input>No problems</p>
155
+ <p><input type="radio" name="EQ5D3L.MOBILITY.SOME" value="EQ5D3L.MOBILITY.SOME"></input>Some problems</p>
156
+ <p><input type="radio" name="EQ5D3L.MOBILITY.CONFINED" value="EQ5D3L.MOBILITY.CONFINED"></input>Confined to bed</p>
157
+ </td>
158
+ </tr>
159
+ <tr>
160
+ <td colspan="3">
161
+ <h5>EQ-5D-3L Self-Care</h5>
162
+ </td>
163
+ </tr>
164
+ <tr>
165
+ <td>Date & Time</td>
166
+ <td></td>
167
+ <td>
168
+ <table class="crf-input-field">
169
+ <tr>
170
+ <td>D</td>
171
+ <td>D</td>
172
+ <td>/</td>
173
+ <td>M</td>
174
+ <td>M</td>
175
+ <td>M</td>
176
+ <td>/</td>
177
+ <td>Y</td>
178
+ <td>Y</td>
179
+ <td>Y</td>
180
+ <td>Y</td>
181
+ <td></td>
182
+ <td>H</td>
183
+ <td>H</td>
184
+ <td>:</td>
185
+ <td>M</td>
186
+ <td>M</td>
187
+ </tr>
188
+ </table>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <td>Self-Care</td>
193
+ <td></td>
194
+ <td>
195
+ <p><input type="radio" name="EQ5D3L.SELFCARE.NONE" value="EQ5D3L.SELFCARE.NONE"></input>No problems</p>
196
+ <p><input type="radio" name="EQ5D3L.SELFCARE.SOME" value="EQ5D3L.SELFCARE.SOME"></input>Some problems</p>
197
+ <p><input type="radio" name="EQ5D3L.SELFCARE.UNABLE" value="EQ5D3L.SELFCARE.UNABLE"></input>Unable to wash/dress</p>
198
+ </td>
199
+ </tr>
200
+ </table>'
201
+ end
202
+ end
203
+ html += "<div id='foo'></div>"
204
+ if cust.present?
205
+ views_dir = WickedCore.root_path.join('.', 'public')
206
+ views_source = WickedCore.add_extension(cust, 'html')
207
+ html = "#{File.read(views_dir.join(views_source))}"
208
+ end
209
+ html = WickedCore.new.replace_image_assets(html)
210
+ return html
211
+ end
212
+
213
+ def replace_image_assets(html)
214
+ doc = Nokogiri::HTML(html)
215
+ doc.xpath("//img").each do |img|
216
+ img.attributes["src"].value = WickedCore.report_asset_path(img.attributes["src"].value)
217
+ end
218
+ doc.to_html
219
+ end
220
+
221
+ def page_header
222
+ css_dir = WickedCore.root_path.join('app/assets', 'stylesheets')
223
+ html = "<html><head>"
224
+ source = WickedCore.add_extension("bootstrap", 'css')
225
+ html += "<style type='text/css'>#{File.read(css_dir.join(source))}</style>"
226
+ html += "</head><body>"
227
+ return html
228
+ end
229
+
230
+ def page_footer
231
+ html = "</body></html>"
232
+ return html
233
+ end
234
+
235
+ def title_page(doc_type, title, user)
236
+ html = ""
237
+ #title = ""
238
+ #name = APP_CONFIG['organization_title']
239
+ #image_file = APP_CONFIG['organization_image_file']
240
+ name = "BCS file" #ENV['organization_title']
241
+ image_file = "favicon.png" # ENV['organization_image_file']
242
+ dir = Rails.root.join("app", "assets", "images")
243
+ file = File.join(dir, image_file)
244
+ time_generated = Time.now
245
+ # Generate HTML
246
+ html = "<div style=\"vertical-align:middle; text-align:center\"><img height=\"75\" src=\"#{file}\"></div>"
247
+ html += "<h3 class=\"text-center col-md-12\">#{name}</h3>"
248
+ html += "<br>" * 10
249
+ html += "<div class=\"text-center col-md-12\"><h1>#{doc_type}<h1><h3>#{title}</h3></div>"
250
+ html += "<br>" * 5
251
+ html += "<div class=\"text-center col-md-12\"><p>Run at: #{time_generated.strftime("%Y-%b-%d, %H:%M:%S")}</p></div>"
252
+ html += "<div class=\"text-center col-md-12\"><p>Run by: #{user.email}</p></div>"
253
+ html += page_break
254
+ return html
255
+ end
256
+
257
+ def history_page(history)
258
+ html = ""
259
+ if history.length > 0
260
+ html += "<h3>Item History</h3>"
261
+ html += "<table class=\"table table-striped table-bordered table-condensed\">"
262
+ html += "<thead><tr><th>Date</th><th>Change</th><th>Comment</th><th>References</th></tr></thead><tbody>"
263
+ history.each do |item|
264
+ changed_date = Timestamp.new(item[:last_changed_date]).to_date
265
+ description = MarkdownEngine::render(item[:change_description])
266
+ comment = MarkdownEngine::render(item[:explanatory_comment])
267
+ refs = MarkdownEngine::render(item[:origin])
268
+ html += "<tr><td>#{changed_date}</td><td>#{description}</td><td>#{comment}</td><td>#{refs}</td></tr>"
269
+ end
270
+ html += "</tbody></table>"
271
+ html += page_break
272
+ end
273
+ return html
274
+ end
275
+
276
+ def page_break
277
+ return "<div style='page-break-after:always;'></div>"
278
+ end
279
+
280
+ def self.report_asset_path(asset)
281
+ return WickedCore.root_path.join('.', 'public').to_s+asset
282
+ end
283
+ end
@@ -0,0 +1,32 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "pdf/report/generator/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "pdf-report-generator"
8
+ spec.version = Pdf::Report::Generator::VERSION
9
+ spec.authors = ["Jakub41"]
10
+ spec.email = ["lemiszewski@gmx.com"]
11
+
12
+ spec.summary = %q{A PDF Report Generator.}
13
+ spec.description = %q{This generator is based on the binaries of the wkhtmltopdf.org.}
14
+ spec.homepage = "https://github.com/Jakub41/pdf-report-generator"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.has_rdoc = 'yard'
25
+ spec.metadata['yard.run'] = 'yri'
26
+
27
+ spec.add_development_dependency "bundler", "~> 1.16.a"
28
+ spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rspec", "~> 3.0"
30
+
31
+ spec.add_development_dependency "yard"
32
+ end
metadata ADDED
@@ -0,0 +1,125 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pdf-report-generator
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Jakub41
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-10-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.16.a
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.16.a
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: yard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: This generator is based on the binaries of the wkhtmltopdf.org.
70
+ email:
71
+ - lemiszewski@gmx.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".idea/markdown-navigator.xml"
78
+ - ".idea/markdown-navigator/profiles_settings.xml"
79
+ - ".idea/misc.xml"
80
+ - ".idea/modules.xml"
81
+ - ".idea/pdf-report-generator.iml"
82
+ - ".idea/vcs.xml"
83
+ - ".idea/workspace.xml"
84
+ - ".rspec"
85
+ - ".travis.yml"
86
+ - CODE_OF_CONDUCT.md
87
+ - Gemfile
88
+ - Gemfile.lock
89
+ - LICENSE.txt
90
+ - README.md
91
+ - Rakefile
92
+ - bin/console
93
+ - bin/setup
94
+ - lib/pdf/report/generator.rb
95
+ - lib/pdf/report/generator/cdisc_changes_report.rb
96
+ - lib/pdf/report/generator/engine.rb
97
+ - lib/pdf/report/generator/version.rb
98
+ - lib/pdf/report/generator/wicked_core.rb
99
+ - pdf-report-generator.gemspec
100
+ homepage: https://github.com/Jakub41/pdf-report-generator
101
+ licenses:
102
+ - MIT
103
+ metadata:
104
+ yard.run: yri
105
+ post_install_message:
106
+ rdoc_options: []
107
+ require_paths:
108
+ - lib
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: '0'
114
+ required_rubygems_version: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ requirements: []
120
+ rubyforge_project:
121
+ rubygems_version: 2.6.13
122
+ signing_key:
123
+ specification_version: 4
124
+ summary: A PDF Report Generator.
125
+ test_files: []