zizia 3.1.0.alpha.01 → 4.0.0.alpha.01

Sign up to get free protection for your applications and to get access to all the features.
Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +14 -3
  3. data/lib/zizia/engine.rb +8 -0
  4. data/lib/zizia/{hyrax_basic_metadata_mapper.rb → hyrax/hyrax_basic_metadata_mapper.rb} +0 -0
  5. data/lib/zizia/hyrax/hyrax_default_updater.rb +11 -0
  6. data/lib/zizia/hyrax/hyrax_delete_files_updater.rb +16 -0
  7. data/lib/zizia/hyrax/hyrax_metadata_only_updater.rb +58 -0
  8. data/lib/zizia/{hyrax_record_importer.rb → hyrax/hyrax_record_importer.rb} +45 -56
  9. data/lib/zizia/{metadata_only_stack.rb → hyrax/metadata_only_stack.rb} +0 -0
  10. data/lib/zizia/version.rb +1 -1
  11. data/lib/zizia.rb +6 -3
  12. metadata +371 -213
  13. data/.circleci/config.yml +0 -44
  14. data/.gitignore +0 -16
  15. data/.rubocop.yml +0 -81
  16. data/.rubocop_todo.yml +0 -21
  17. data/.solr_wrapper +0 -8
  18. data/.travis.yml +0 -12
  19. data/Gemfile +0 -14
  20. data/Rakefile +0 -38
  21. data/app/assets/config/zizia_manifest.js +0 -2
  22. data/app/assets/images/zizia/.keep +0 -0
  23. data/app/assets/javascripts/zizia/DisplayUploadedFile.es6 +0 -43
  24. data/app/assets/javascripts/zizia/application.js +0 -13
  25. data/app/assets/javascripts/zizia/zizia.js +0 -6
  26. data/app/assets/stylesheets/zizia/_file_upload.scss +0 -17
  27. data/app/assets/stylesheets/zizia/application.css +0 -15
  28. data/app/assets/stylesheets/zizia/zizia.scss +0 -1
  29. data/app/controllers/zizia/application_controller.rb +0 -6
  30. data/app/controllers/zizia/csv_imports_controller.rb +0 -53
  31. data/app/controllers/zizia/importer_documentation_controller.rb +0 -11
  32. data/app/helpers/importer_documentation_helper.rb +0 -13
  33. data/app/helpers/zizia/application_helper.rb +0 -14
  34. data/app/importers/modular_importer.rb +0 -31
  35. data/app/jobs/zizia/application_job.rb +0 -5
  36. data/app/jobs/zizia/start_csv_import_job.rb +0 -14
  37. data/app/models/zizia/application_record.rb +0 -6
  38. data/app/models/zizia/csv_import.rb +0 -21
  39. data/app/models/zizia/csv_import_detail.rb +0 -13
  40. data/app/models/zizia/pre_ingest_file.rb +0 -6
  41. data/app/models/zizia/pre_ingest_work.rb +0 -6
  42. data/app/uploaders/zizia/csv_manifest_uploader.rb +0 -62
  43. data/app/uploaders/zizia/csv_manifest_validator.rb +0 -163
  44. data/app/views/layouts/zizia/application.html.erb +0 -14
  45. data/app/views/zizia/csv_imports/_actions.html.erb +0 -3
  46. data/app/views/zizia/csv_imports/_collection_selection.html.erb +0 -3
  47. data/app/views/zizia/csv_imports/_error.html.erb +0 -10
  48. data/app/views/zizia/csv_imports/_file_upload.html.erb +0 -3
  49. data/app/views/zizia/csv_imports/_form.html.erb +0 -75
  50. data/app/views/zizia/csv_imports/_no_collection.html.erb +0 -7
  51. data/app/views/zizia/csv_imports/_record_count.html.erb +0 -7
  52. data/app/views/zizia/csv_imports/_start_import_form.html.erb +0 -9
  53. data/app/views/zizia/csv_imports/index.html.erb +0 -21
  54. data/app/views/zizia/csv_imports/new.html.erb +0 -2
  55. data/app/views/zizia/csv_imports/preview.html.erb +0 -76
  56. data/app/views/zizia/csv_imports/show.html.erb +0 -31
  57. data/app/views/zizia/importer_documentation/guide.html.erb +0 -1
  58. data/bin/rails +0 -15
  59. data/config/routes.rb +0 -9
  60. data/db/migrate/201901162141281_create_zizia_csv_imports.rb +0 -10
  61. data/db/migrate/201901162203121_add_manifest_to_zizia_csv_imports.rb +0 -6
  62. data/db/migrate/201901241536541_add_fedora_collection_id_to_zizia_csv_imports.rb +0 -5
  63. data/db/migrate/20190911133657_create_zizia_pre_ingest_files.rb +0 -12
  64. data/db/migrate/20190911134002_create_zizia_pre_ingest_works.rb +0 -9
  65. data/db/migrate/20190911142616_create_zizia_csv_import_details.rb +0 -8
  66. data/docs/_config.yml +0 -1
  67. data/docs/customizing_metadata.md +0 -41
  68. data/docs/index.md +0 -113
  69. data/log/.keep +0 -0
  70. data/solr/config/_rest_managed.json +0 -3
  71. data/solr/config/admin-extra.html +0 -31
  72. data/solr/config/elevate.xml +0 -36
  73. data/solr/config/mapping-ISOLatin1Accent.txt +0 -246
  74. data/solr/config/protwords.txt +0 -21
  75. data/solr/config/routes.rb +0 -9
  76. data/solr/config/schema.xml +0 -366
  77. data/solr/config/scripts.conf +0 -24
  78. data/solr/config/solrconfig.xml +0 -322
  79. data/solr/config/spellings.txt +0 -2
  80. data/solr/config/stopwords.txt +0 -58
  81. data/solr/config/stopwords_en.txt +0 -58
  82. data/solr/config/synonyms.txt +0 -31
  83. data/solr/config/xslt/example.xsl +0 -132
  84. data/solr/config/xslt/example_atom.xsl +0 -67
  85. data/solr/config/xslt/example_rss.xsl +0 -66
  86. data/solr/config/xslt/luke.xsl +0 -337
  87. data/spec/controllers/importer_documentation_controller_spec.rb +0 -14
  88. data/spec/dummy/.gitignore +0 -23
  89. data/spec/dummy/Gemfile +0 -57
  90. data/spec/dummy/README.md +0 -24
  91. data/spec/dummy/Rakefile +0 -6
  92. data/spec/dummy/app/assets/config/manifest.js +0 -3
  93. data/spec/dummy/app/assets/csv/import_manifest.csv +0 -1
  94. data/spec/dummy/app/assets/images/.keep +0 -0
  95. data/spec/dummy/app/assets/javascripts/application.js +0 -15
  96. data/spec/dummy/app/assets/javascripts/cable.js +0 -13
  97. data/spec/dummy/app/assets/javascripts/channels/.keep +0 -0
  98. data/spec/dummy/app/assets/markdown/importer_guide.md +0 -256
  99. data/spec/dummy/app/assets/stylesheets/application.css +0 -15
  100. data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
  101. data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
  102. data/spec/dummy/app/controllers/application_controller.rb +0 -3
  103. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  104. data/spec/dummy/app/helpers/application_helper.rb +0 -2
  105. data/spec/dummy/app/jobs/application_job.rb +0 -2
  106. data/spec/dummy/app/mailers/application_mailer.rb +0 -4
  107. data/spec/dummy/app/models/application_record.rb +0 -3
  108. data/spec/dummy/app/models/concerns/.keep +0 -0
  109. data/spec/dummy/app/models/user.rb +0 -2
  110. data/spec/dummy/app/views/layouts/application.html.erb +0 -14
  111. data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
  112. data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
  113. data/spec/dummy/bin/bundle +0 -3
  114. data/spec/dummy/bin/rails +0 -9
  115. data/spec/dummy/bin/rake +0 -9
  116. data/spec/dummy/bin/setup +0 -38
  117. data/spec/dummy/bin/spring +0 -17
  118. data/spec/dummy/bin/update +0 -29
  119. data/spec/dummy/bin/yarn +0 -11
  120. data/spec/dummy/config/application.rb +0 -18
  121. data/spec/dummy/config/boot.rb +0 -3
  122. data/spec/dummy/config/cable.yml +0 -10
  123. data/spec/dummy/config/database.yml +0 -25
  124. data/spec/dummy/config/environment.rb +0 -5
  125. data/spec/dummy/config/environments/development.rb +0 -54
  126. data/spec/dummy/config/environments/production.rb +0 -91
  127. data/spec/dummy/config/environments/test.rb +0 -42
  128. data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
  129. data/spec/dummy/config/initializers/assets.rb +0 -14
  130. data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
  131. data/spec/dummy/config/initializers/cookies_serializer.rb +0 -5
  132. data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  133. data/spec/dummy/config/initializers/inflections.rb +0 -16
  134. data/spec/dummy/config/initializers/mime_types.rb +0 -4
  135. data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
  136. data/spec/dummy/config/locales/en.yml +0 -33
  137. data/spec/dummy/config/puma.rb +0 -56
  138. data/spec/dummy/config/routes.rb +0 -4
  139. data/spec/dummy/config/secrets.yml +0 -32
  140. data/spec/dummy/config/spring.rb +0 -6
  141. data/spec/dummy/config.ru +0 -5
  142. data/spec/dummy/db/migrate/20190911165049_create_users.rb +0 -8
  143. data/spec/dummy/db/schema.rb +0 -55
  144. data/spec/dummy/db/seeds.rb +0 -7
  145. data/spec/dummy/lib/assets/.keep +0 -0
  146. data/spec/dummy/lib/tasks/.keep +0 -0
  147. data/spec/dummy/log/.keep +0 -0
  148. data/spec/dummy/package.json +0 -5
  149. data/spec/dummy/public/404.html +0 -67
  150. data/spec/dummy/public/422.html +0 -67
  151. data/spec/dummy/public/500.html +0 -66
  152. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  153. data/spec/dummy/public/apple-touch-icon.png +0 -0
  154. data/spec/dummy/public/favicon.ico +0 -0
  155. data/spec/dummy/public/robots.txt +0 -1
  156. data/spec/dummy/test/application_system_test_case.rb +0 -5
  157. data/spec/dummy/test/controllers/.keep +0 -0
  158. data/spec/dummy/test/fixtures/.keep +0 -0
  159. data/spec/dummy/test/fixtures/files/.keep +0 -0
  160. data/spec/dummy/test/fixtures/users.yml +0 -11
  161. data/spec/dummy/test/helpers/.keep +0 -0
  162. data/spec/dummy/test/integration/.keep +0 -0
  163. data/spec/dummy/test/mailers/.keep +0 -0
  164. data/spec/dummy/test/models/.keep +0 -0
  165. data/spec/dummy/test/models/user_test.rb +0 -7
  166. data/spec/dummy/test/system/.keep +0 -0
  167. data/spec/dummy/test/test_helper.rb +0 -10
  168. data/spec/dummy/vendor/.keep +0 -0
  169. data/spec/fixtures/bad_example.csv +0 -2
  170. data/spec/fixtures/dog.jpg +0 -0
  171. data/spec/fixtures/example.csv +0 -4
  172. data/spec/fixtures/hyrax/example.csv +0 -3
  173. data/spec/fixtures/images/animals/cat.png +0 -0
  174. data/spec/fixtures/images/zizia.png +0 -0
  175. data/spec/fixtures/zizia.png +0 -0
  176. data/spec/integration/csv_import_detail_spec.rb +0 -48
  177. data/spec/integration/import_csv_spec.rb +0 -27
  178. data/spec/integration/import_hyrax_csv.rb +0 -71
  179. data/spec/models/csv_import_spec.rb +0 -18
  180. data/spec/spec_helper.rb +0 -31
  181. data/spec/support/hyrax/basic_metadata.rb +0 -30
  182. data/spec/support/hyrax/core_metadata.rb +0 -15
  183. data/spec/support/shared_contexts/with_work_type.rb +0 -101
  184. data/spec/uploaders/csv_manifest_uploader_spec.rb +0 -30
  185. data/spec/views/zizia/importer_documentation/guide.html.erb_spec.rb +0 -13
  186. data/spec/zizia/csv_format_validator_spec.rb +0 -38
  187. data/spec/zizia/csv_parser_spec.rb +0 -73
  188. data/spec/zizia/csv_template_spec.rb +0 -15
  189. data/spec/zizia/hash_mapper_spec.rb +0 -8
  190. data/spec/zizia/hyrax_basic_metadata_mapper_spec.rb +0 -190
  191. data/spec/zizia/hyrax_record_importer_spec.rb +0 -176
  192. data/spec/zizia/importer_spec.rb +0 -46
  193. data/spec/zizia/input_record_spec.rb +0 -71
  194. data/spec/zizia/record_importer_spec.rb +0 -53
  195. data/spec/zizia/title_validator_spec.rb +0 -23
  196. data/spec/zizia/validator_spec.rb +0 -9
  197. data/spec/zizia/version_spec.rb +0 -7
  198. data/spec/zizia_spec.rb +0 -20
  199. data/zizia.gemspec +0 -42
@@ -1,256 +0,0 @@
1
- # Title
2
-
3
- A name to aid in identifying a work.
4
-
5
- This field is a string. **This field is required**.
6
-
7
-
8
-
9
- ## Example
10
-
11
- `[Fannie Lou Hamer, Mississippi Freedom Democratic Party delegate, at the Democratic National Convention, Atlantic City, New Jersey, August 1964] / [WKL].`
12
-
13
- If you have multiple titles, separate them with the `|~|` delimiter, like this:
14
-
15
- `[Fannie Lou Hamer, Mississippi Freedom Democratic Party delegate, at the Democratic National Convention, Atlantic City, New Jersey, August 1964] / [WKL].|~|[Fannie Lou Hamer, Mississippi Freedom Democratic Party delegate, at the Democratic National Convention, Atlantic City, New Jersey, August 1964] / [WKL].`
16
-
17
- # Creator
18
-
19
- The person or group responsible for the work. Usually this is the author of the content. Personal names should be entered with the last name first, e.g. "Smith, John.".
20
-
21
- This field is a string. **This field is required**
22
-
23
- ## Example
24
-
25
- `Leffler, Warren K., photographer`
26
-
27
- If you have multiple creators you can enter them like this:
28
-
29
- `Leffler, Warren K., photographer|~|Leffler, Warren L., photographer`
30
-
31
- # Keyword
32
-
33
- Words or phrases you select to describe what the work is about. These are used to search for content.
34
-
35
- This field is a string. **This field is required**.
36
-
37
- ## Example
38
-
39
- `Atlantic City`
40
-
41
- If you have multiple keywords you can enter them like this:
42
-
43
- `Atlantic City|~|Atlantic City, N.J.|~|Democratic National Convention`
44
-
45
- # Rights Statement
46
-
47
- This field is a URI. You can choose rights statements from
48
- this [vocabulary](https://github.com/curationexperts/tenejo/blob/master/config/authorities/rights_statements.yml).
49
-
50
- **This field is required**
51
-
52
- ## Example:
53
-
54
- `http://rightsstatements.org/vocab/UND/1.0/`
55
-
56
- # Contributor
57
-
58
- A person or group you want to recognize for playing a role in the creation of the work, but not the primary role.
59
-
60
- This field is a string. *This field is optional*.
61
-
62
- ## Example
63
-
64
- `Smith, Mary`
65
-
66
- If you have multiple contributors you can enter them like this:
67
-
68
- `Smith, Mary|~|Smith, John`
69
-
70
- # Abstract or Summary
71
-
72
- Free-text notes about the work. Examples include abstracts of a paper or citation information for a journal article.
73
-
74
- This field is a string. *This field is optional*.
75
-
76
- ## Example
77
-
78
- `Photograph shows half-length portrait of Hamer seated at a table.`
79
-
80
- If you have multiple abstracts you can enter them like this:
81
-
82
- `Photograph shows half-length portrait of Hamer seated at a table.
83
- |~|Photograph shows half-length portrait of Hamer seated near a table.`
84
-
85
- # License
86
-
87
- Licensing and distribution information governing access to the work.
88
-
89
- This field is a URI. *This field is optional*.
90
-
91
- You can choose rights statements from
92
- this [vocabulary](https://github.com/curationexperts/tenejo/blob/master/config/authorities/licenses.yml).
93
-
94
- ## Example
95
-
96
- `http://creativecommons.org/licenses/by/3.0/us/`
97
-
98
- If you have multiple rights statements you can enter them like this:
99
-
100
- `http://creativecommons.org/licenses/by/3.0/us/|~|http://creativecommons.org/licenses/by-sa/3.0/us/`
101
-
102
- # Publisher
103
-
104
- The person or group making the work available. Generally this is the institution.
105
-
106
- This field is a string. *This field is optional*.
107
-
108
- ## Example
109
-
110
- `Library of Congress`
111
-
112
- If you have multiple publishers you can enter them like this:
113
-
114
- `Library of Congress|~|National Archives`
115
-
116
- # Date Created
117
-
118
- The date on which the work was created.
119
-
120
- This field is a string. *This field is optional*.
121
-
122
- ## Example
123
-
124
- `1964 Aug. 22.`
125
-
126
- If you have multiple dates you can enter them like this:
127
-
128
- `1964 Aug. 22.|~|1964 Aug. 23.`
129
-
130
- # Subject
131
-
132
- Headings or index terms describing what the work is about; these do need to conform to an existing vocabulary.
133
-
134
- This field is a string. *This field is optional*.
135
-
136
- ## Example
137
-
138
- `Hamer, Fannie Lou--Public appearances--New Jersey--Atlantic City.`
139
-
140
- If you have multiple subjects you can enter them like this:
141
-
142
- `Hamer, Fannie Lou--Public appearances--New Jersey--Atlantic City|~|Mississippi Freedom Democratic Party--People--New Jersey--Atlantic City--1960-1970|~|Democratic National Convention--(1964 :--Atlantic City, N.J.)--People`
143
-
144
- # Language
145
-
146
- The language of the work's content.
147
-
148
- This field is a string. *This field is optional*.
149
-
150
- ## Example
151
-
152
- `English`
153
-
154
- If you have multiple languages you can enter them like this:
155
-
156
- `English|~|French`
157
-
158
- # Identifier
159
-
160
- A unique handle identifying the work. An example would be a DOI for a journal article, or an ISBN or OCLC number for a book.
161
-
162
- This field is a string. *This field is optional*.
163
-
164
- ## Example
165
-
166
- `LC-U9- 12470B-17`
167
-
168
- If you have multiple identifiers you can enter them like this:
169
-
170
- `LC-U9- 12470B-17|~|2003688126`
171
-
172
- # Location
173
-
174
- A place name related to the work, such as its site of publication, or the city, state, or country the work contents are about.
175
-
176
- This field is a URI. *This field is optional*. The URIs should be
177
- GeoNames identifiers. You can look these up at [GeoNames](http://www.geonames.org/).
178
-
179
- ## Example
180
-
181
- `http://www.geonames.org/4500546/`
182
-
183
- If you have multiple locations you can enter them like this:
184
-
185
- `http://www.geonames.org/4500546/|~|http://www.geonames.org/4500547/`
186
-
187
- # Related URL
188
-
189
- A link to a website or other specific content (audio, video, PDF document) related to the work. An example is the URL of a research project from which the work was derived.
190
-
191
- This field is a string or a URI. *This field is optional*.
192
-
193
- ## Example
194
-
195
- `https://www.loc.gov/free-to-use/african-american-women-changemakers/`
196
-
197
- If you have multiple related URLs you can enter them like this:
198
-
199
- `https://www.loc.gov/free-to-use/african-american-women-changemakers/|~|http://www.loc.gov`
200
-
201
-
202
- # Source
203
-
204
- A related resource from which the described resource is derived.
205
-
206
- This field is a string. *This field is optional*.
207
-
208
- ## Example
209
-
210
- `Library of Congress Online Catalog (976,247)`
211
-
212
- If you have multiple sources you can enter them like this:
213
-
214
- `Library of Congress Online Catalog (976,247)|~|Prints and Photographs Division (848,104)`
215
-
216
- # Resource Type
217
-
218
- This field is a string. *This field is optional*.
219
-
220
- Pre-defined categories to describe the type of content being uploaded, such as "Article" or "Dataset." More than one type may be selected.
221
-
222
- You must choose from one of the types listed [here](https://github.com/curationexperts/tenejo/blob/master/config/authorities/resource_types.yml).
223
-
224
- ## Example
225
-
226
- `Image`
227
-
228
- If you have multiple resource types you can enter them like this:
229
-
230
- `Image|~|Audio`
231
-
232
- # Visibility
233
-
234
- This field is a case-sensetive string. **This field is required**.
235
-
236
- You can only have one of these.
237
-
238
- You can use `open`, `registered`, or `restricted`
239
-
240
- ## Example
241
-
242
- `open`
243
-
244
- # Files
245
-
246
- You can add one or more files to associate with this work.
247
-
248
- This field is a string. **This field is required**.
249
-
250
- ## Example
251
-
252
- `01267_150px.jpg`
253
-
254
- If you have multiple resource types you can enter them like this:
255
-
256
- `01267_150px.jpg|~|01267_151px.jpg`
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
6
- * vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,4 +0,0 @@
1
- module ApplicationCable
2
- class Channel < ActionCable::Channel::Base
3
- end
4
- end
@@ -1,4 +0,0 @@
1
- module ApplicationCable
2
- class Connection < ActionCable::Connection::Base
3
- end
4
- end
@@ -1,3 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery with: :exception
3
- end
File without changes
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,2 +0,0 @@
1
- class ApplicationJob < ActiveJob::Base
2
- end
@@ -1,4 +0,0 @@
1
- class ApplicationMailer < ActionMailer::Base
2
- default from: 'from@example.com'
3
- layout 'mailer'
4
- end
@@ -1,3 +0,0 @@
1
- class ApplicationRecord < ActiveRecord::Base
2
- self.abstract_class = true
3
- end
File without changes
@@ -1,2 +0,0 @@
1
- class User < ApplicationRecord
2
- end
@@ -1,14 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>MyApp</title>
5
- <%= csrf_meta_tags %>
6
-
7
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
8
- <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
9
- </head>
10
-
11
- <body>
12
- <%= yield %>
13
- </body>
14
- </html>
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
- <style>
6
- /* Email styles need to be inline */
7
- </style>
8
- </head>
9
-
10
- <body>
11
- <%= yield %>
12
- </body>
13
- </html>
@@ -1 +0,0 @@
1
- <%= yield %>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/spec/dummy/bin/rails DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
- APP_PATH = File.expand_path('../config/application', __dir__)
8
- require_relative '../config/boot'
9
- require 'rails/commands'
data/spec/dummy/bin/rake DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
- require_relative '../config/boot'
8
- require 'rake'
9
- Rake.application.run
data/spec/dummy/bin/setup DELETED
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'pathname'
3
- require 'fileutils'
4
- include FileUtils
5
-
6
- # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
-
9
- def system!(*args)
10
- system(*args) || abort("\n== Command #{args} failed ==")
11
- end
12
-
13
- chdir APP_ROOT do
14
- # This script is a starting point to setup your application.
15
- # Add necessary setup steps to this file.
16
-
17
- puts '== Installing dependencies =='
18
- system! 'gem install bundler --conservative'
19
- system('bundle check') || system!('bundle install')
20
-
21
- # Install JavaScript dependencies if using Yarn
22
- # system('bin/yarn')
23
-
24
-
25
- # puts "\n== Copying sample files =="
26
- # unless File.exist?('config/database.yml')
27
- # cp 'config/database.yml.sample', 'config/database.yml'
28
- # end
29
-
30
- puts "\n== Preparing database =="
31
- system! 'bin/rails db:setup'
32
-
33
- puts "\n== Removing old logs and tempfiles =="
34
- system! 'bin/rails log:clear tmp:clear'
35
-
36
- puts "\n== Restarting application server =="
37
- system! 'bin/rails restart'
38
- end
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file loads Spring without using Bundler, in order to be fast.
4
- # It gets overwritten when you run the `spring binstub` command.
5
-
6
- unless defined?(Spring)
7
- require 'rubygems'
8
- require 'bundler'
9
-
10
- lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
11
- spring = lockfile.specs.detect { |spec| spec.name == 'spring' }
12
- if spring
13
- Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
14
- gem 'spring', spring.version
15
- require 'spring/binstub'
16
- end
17
- end
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'pathname'
3
- require 'fileutils'
4
- include FileUtils
5
-
6
- # path to your application root.
7
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
-
9
- def system!(*args)
10
- system(*args) || abort("\n== Command #{args} failed ==")
11
- end
12
-
13
- chdir APP_ROOT do
14
- # This script is a way to update your development environment automatically.
15
- # Add necessary update steps to this file.
16
-
17
- puts '== Installing dependencies =='
18
- system! 'gem install bundler --conservative'
19
- system('bundle check') || system!('bundle install')
20
-
21
- puts "\n== Updating database =="
22
- system! 'bin/rails db:migrate'
23
-
24
- puts "\n== Removing old logs and tempfiles =="
25
- system! 'bin/rails log:clear tmp:clear'
26
-
27
- puts "\n== Restarting application server =="
28
- system! 'bin/rails restart'
29
- end
data/spec/dummy/bin/yarn DELETED
@@ -1,11 +0,0 @@
1
- #!/usr/bin/env ruby
2
- VENDOR_PATH = File.expand_path('..', __dir__)
3
- Dir.chdir(VENDOR_PATH) do
4
- begin
5
- exec "yarnpkg #{ARGV.join(" ")}"
6
- rescue Errno::ENOENT
7
- $stderr.puts "Yarn executable was not detected in the system."
8
- $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9
- exit 1
10
- end
11
- end
@@ -1,18 +0,0 @@
1
- require_relative 'boot'
2
-
3
- require 'rails/all'
4
-
5
- # Require the gems listed in Gemfile, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(*Rails.groups)
8
-
9
- module MyApp
10
- class Application < Rails::Application
11
- # Initialize configuration defaults for originally generated Rails version.
12
- config.load_defaults 5.1
13
-
14
- # Settings in config/environments/* take precedence over those specified here.
15
- # Application configuration should go into files in config/initializers
16
- # -- all .rb files in that directory are automatically loaded.
17
- end
18
- end
@@ -1,3 +0,0 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
-
3
- require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1,10 +0,0 @@
1
- development:
2
- adapter: async
3
-
4
- test:
5
- adapter: async
6
-
7
- production:
8
- adapter: redis
9
- url: redis://localhost:6379/1
10
- channel_prefix: my_app_production
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require_relative 'application'
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,54 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports.
13
- config.consider_all_requests_local = true
14
-
15
- # Enable/disable caching. By default caching is disabled.
16
- if Rails.root.join('tmp/caching-dev.txt').exist?
17
- config.action_controller.perform_caching = true
18
-
19
- config.cache_store = :memory_store
20
- config.public_file_server.headers = {
21
- 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
22
- }
23
- else
24
- config.action_controller.perform_caching = false
25
-
26
- config.cache_store = :null_store
27
- end
28
-
29
- # Don't care if the mailer can't send.
30
- config.action_mailer.raise_delivery_errors = false
31
-
32
- config.action_mailer.perform_caching = false
33
-
34
- # Print deprecation notices to the Rails logger.
35
- config.active_support.deprecation = :log
36
-
37
- # Raise an error on page load if there are pending migrations.
38
- config.active_record.migration_error = :page_load
39
-
40
- # Debug mode disables concatenation and preprocessing of assets.
41
- # This option may cause significant delays in view rendering with a large
42
- # number of complex assets.
43
- config.assets.debug = true
44
-
45
- # Suppress logger output for asset requests.
46
- config.assets.quiet = true
47
-
48
- # Raises error for missing translations
49
- # config.action_view.raise_on_missing_translations = true
50
-
51
- # Use an evented file watcher to asynchronously detect changes in source code,
52
- # routes, locales, etc. This feature depends on the listen gem.
53
- config.file_watcher = ActiveSupport::EventedFileUpdateChecker
54
- end