arclight 0.3.0 → 1.6.2

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.
Files changed (240) hide show
  1. checksums.yaml +4 -4
  2. data/.eslintrc +11 -4
  3. data/.github/workflows/ruby.yml +51 -0
  4. data/.gitignore +1 -0
  5. data/.rspec +0 -1
  6. data/.rubocop.yml +498 -21
  7. data/.rubocop_todo.yml +69 -86
  8. data/.solr_wrapper +2 -1
  9. data/CONTRIBUTING.md +5 -5
  10. data/CONTRIBUTORS.md +1 -1
  11. data/Gemfile +15 -10
  12. data/README.md +22 -17
  13. data/app/assets/images/blacklight/bookmark.svg +1 -1
  14. data/app/assets/images/blacklight/collection.svg +1 -1
  15. data/app/assets/images/blacklight/compact.svg +1 -1
  16. data/app/assets/images/blacklight/container.svg +1 -1
  17. data/app/assets/images/blacklight/ead.svg +1 -1
  18. data/app/assets/images/blacklight/file.svg +1 -1
  19. data/app/assets/images/blacklight/folder.svg +1 -1
  20. data/app/assets/images/blacklight/list.svg +1 -1
  21. data/app/assets/images/blacklight/online.svg +1 -1
  22. data/app/assets/images/blacklight/pdf.svg +1 -1
  23. data/app/assets/images/blacklight/repository.svg +1 -1
  24. data/app/assets/javascripts/arclight/arclight.js +4 -8
  25. data/app/assets/javascripts/arclight/oembed_controller.js +58 -0
  26. data/app/assets/javascripts/arclight/truncate_controller.js +27 -0
  27. data/app/assets/stylesheets/arclight/application.scss +3 -5
  28. data/app/assets/stylesheets/arclight/build.scss +4 -0
  29. data/app/assets/stylesheets/arclight/modules/hierarchy_and_online_contents.scss +108 -130
  30. data/app/assets/stylesheets/arclight/modules/icons.scss +20 -0
  31. data/app/assets/stylesheets/arclight/modules/layout.scss +129 -100
  32. data/app/assets/stylesheets/arclight/modules/mastheads.scss +23 -96
  33. data/app/assets/stylesheets/arclight/modules/repositories.scss +2 -2
  34. data/app/assets/stylesheets/arclight/modules/repository_card.scss +4 -48
  35. data/app/assets/stylesheets/arclight/modules/search_form.scss +9 -0
  36. data/app/assets/stylesheets/arclight/modules/search_results.scss +95 -45
  37. data/app/assets/stylesheets/arclight/modules/show_collection.scss +5 -32
  38. data/app/assets/stylesheets/arclight/modules/truncator.scss +58 -0
  39. data/app/assets/stylesheets/arclight/variables.scss +7 -4
  40. data/app/components/arclight/access_component.html.erb +14 -0
  41. data/app/components/arclight/access_component.rb +25 -0
  42. data/app/components/arclight/bookmark_component.html.erb +25 -0
  43. data/app/components/arclight/bookmark_component.rb +9 -0
  44. data/app/components/arclight/breadcrumb_component.rb +50 -0
  45. data/app/components/arclight/breadcrumbs_hierarchy_component.html.erb +34 -0
  46. data/app/components/arclight/breadcrumbs_hierarchy_component.rb +25 -0
  47. data/app/components/arclight/collection_context_component.html.erb +12 -0
  48. data/app/components/arclight/collection_context_component.rb +27 -0
  49. data/app/components/arclight/collection_info_component.html.erb +28 -0
  50. data/app/components/arclight/collection_info_component.rb +26 -0
  51. data/app/components/arclight/collection_sidebar_component.html.erb +15 -0
  52. data/app/components/arclight/collection_sidebar_component.rb +39 -0
  53. data/app/{views/catalog/_search_results_repository.html.erb → components/arclight/constraints_component.html.erb} +2 -1
  54. data/app/components/arclight/constraints_component.rb +17 -0
  55. data/app/components/arclight/document_collection_context_component.html.erb +29 -0
  56. data/app/components/arclight/document_collection_context_component.rb +28 -0
  57. data/app/components/arclight/document_collection_hierarchy_component.html.erb +50 -0
  58. data/app/components/arclight/document_collection_hierarchy_component.rb +62 -0
  59. data/app/components/arclight/document_component.html.erb +39 -0
  60. data/app/components/arclight/document_component.rb +49 -0
  61. data/app/components/arclight/document_components_hierarchy_component.html.erb +20 -0
  62. data/app/components/arclight/document_components_hierarchy_component.rb +34 -0
  63. data/app/components/arclight/document_download_component.html.erb +24 -0
  64. data/app/components/arclight/document_download_component.rb +71 -0
  65. data/app/components/arclight/embed_component.html.erb +10 -0
  66. data/app/components/arclight/embed_component.rb +43 -0
  67. data/app/components/arclight/expand_hierarchy_button_component.html.erb +5 -0
  68. data/app/components/arclight/expand_hierarchy_button_component.rb +16 -0
  69. data/app/components/arclight/group_component.html.erb +34 -0
  70. data/app/components/arclight/group_component.rb +23 -0
  71. data/app/components/arclight/header_component.html.erb +5 -0
  72. data/app/components/arclight/header_component.rb +10 -0
  73. data/app/components/arclight/index_metadata_field_component.html.erb +16 -0
  74. data/app/components/arclight/index_metadata_field_component.rb +20 -0
  75. data/app/components/arclight/masthead_component.html.erb +17 -0
  76. data/app/components/arclight/masthead_component.rb +10 -0
  77. data/app/components/arclight/metadata_section_component.html.erb +13 -0
  78. data/app/components/arclight/metadata_section_component.rb +22 -0
  79. data/app/components/arclight/oembed_viewer_component.html.erb +5 -0
  80. data/app/components/arclight/oembed_viewer_component.rb +16 -0
  81. data/app/components/arclight/online_content_filter_component.html.erb +15 -0
  82. data/app/components/arclight/online_content_filter_component.rb +17 -0
  83. data/app/components/arclight/online_status_indicator_component.rb +19 -0
  84. data/app/components/arclight/repository_breadcrumb_component.html.erb +10 -0
  85. data/app/components/arclight/repository_breadcrumb_component.rb +17 -0
  86. data/app/components/arclight/repository_location_component.html.erb +20 -0
  87. data/app/components/arclight/repository_location_component.rb +10 -0
  88. data/app/components/arclight/search_bar_component.html.erb +27 -0
  89. data/app/components/arclight/search_bar_component.rb +32 -0
  90. data/app/components/arclight/search_result_breadcrumbs_component.html.erb +6 -0
  91. data/app/components/arclight/search_result_breadcrumbs_component.rb +37 -0
  92. data/app/components/arclight/search_result_component.html.erb +20 -0
  93. data/app/components/arclight/search_result_component.rb +18 -0
  94. data/app/components/arclight/search_result_title_component.html.erb +15 -0
  95. data/app/components/arclight/search_result_title_component.rb +15 -0
  96. data/app/components/arclight/sidebar_component.html.erb +9 -0
  97. data/app/components/arclight/sidebar_component.rb +19 -0
  98. data/app/components/arclight/upper_metadata_layout_component.rb +10 -0
  99. data/app/components/blacklight/icons/bookmark_component.rb +12 -0
  100. data/app/components/blacklight/icons/collection_component.rb +14 -0
  101. data/app/components/blacklight/icons/compact_component.rb +12 -0
  102. data/app/components/blacklight/icons/container_component.rb +14 -0
  103. data/app/components/blacklight/icons/ead_component.rb +12 -0
  104. data/app/components/blacklight/icons/file_component.rb +14 -0
  105. data/app/components/blacklight/icons/folder_component.rb +12 -0
  106. data/app/components/blacklight/icons/online_component.rb +15 -0
  107. data/app/components/blacklight/icons/pdf_component.rb +12 -0
  108. data/app/components/blacklight/icons/repository_component.rb +12 -0
  109. data/app/controllers/arclight/repositories_controller.rb +4 -4
  110. data/app/{controllers/concerns → helpers}/arclight/ead_format_helpers.rb +91 -7
  111. data/app/helpers/arclight/field_config_helpers.rb +26 -0
  112. data/app/helpers/arclight_helper.rb +24 -251
  113. data/app/models/arclight/document_downloads.rb +12 -15
  114. data/app/models/arclight/parent.rb +6 -8
  115. data/app/models/arclight/parents.rb +7 -4
  116. data/app/models/arclight/requests/aeon_external_request.rb +1 -1
  117. data/app/models/arclight/requests/aeon_web_ead.rb +8 -3
  118. data/app/models/arclight/requests/google_form.rb +8 -3
  119. data/app/models/concerns/arclight/catalog.rb +25 -15
  120. data/app/models/concerns/arclight/search_behavior.rb +12 -26
  121. data/app/models/concerns/arclight/solr_document.rb +80 -73
  122. data/app/presenters/arclight/show_presenter.rb +34 -7
  123. data/app/views/arclight/_requests.html.erb +2 -2
  124. data/app/views/arclight/repositories/_repository.html.erb +21 -40
  125. data/app/views/arclight/repositories/index.html.erb +3 -1
  126. data/app/views/arclight/repositories/show.html.erb +4 -6
  127. data/app/views/arclight/requests/_aeon_external_request_endpoint.html.erb +4 -5
  128. data/app/views/arclight/requests/_aeon_web_ead.html.erb +3 -4
  129. data/app/views/arclight/requests/_google_form.html.erb +4 -6
  130. data/app/views/catalog/_document_list.html.erb +8 -0
  131. data/app/views/catalog/_group.html.erb +2 -19
  132. data/app/views/catalog/_group_toggle.html.erb +1 -1
  133. data/app/views/catalog/_search_results_header.html.erb +3 -0
  134. data/app/views/catalog/hierarchy.html.erb +19 -0
  135. data/app/views/catalog/index.html.erb +16 -7
  136. data/app/views/shared/_breadcrumbs.html.erb +2 -14
  137. data/app/views/shared/_main_menu_links.html.erb +1 -1
  138. data/arclight.gemspec +17 -15
  139. data/config/breadcrumbs.rb +24 -0
  140. data/config/i18n-tasks.yml +9 -8
  141. data/config/importmap.rb +3 -0
  142. data/config/locales/arclight.en.yml +31 -30
  143. data/config/routes.rb +1 -1
  144. data/docker-compose.yml +16 -0
  145. data/lib/arclight/digital_object.rb +2 -1
  146. data/lib/arclight/engine.rb +18 -37
  147. data/lib/arclight/exceptions.rb +1 -0
  148. data/lib/arclight/hash_absolute_xpath.rb +2 -1
  149. data/lib/arclight/normalized_date.rb +5 -10
  150. data/lib/arclight/normalized_id.rb +6 -2
  151. data/lib/arclight/normalized_title.rb +2 -0
  152. data/lib/arclight/repository.rb +46 -57
  153. data/lib/arclight/routes/hierarchy.rb +19 -0
  154. data/lib/arclight/routes.rb +8 -0
  155. data/lib/arclight/traject/ead2_component_config.rb +335 -0
  156. data/lib/arclight/traject/ead2_config.rb +120 -298
  157. data/lib/arclight/version.rb +1 -1
  158. data/lib/arclight/year_range.rb +4 -3
  159. data/lib/arclight.rb +6 -1
  160. data/lib/generators/arclight/install_generator.rb +97 -11
  161. data/lib/generators/arclight/templates/arclight.scss +6 -3
  162. data/lib/generators/arclight/templates/catalog_controller.rb +193 -163
  163. data/lib/generators/arclight/templates/config/locales/arclight.en.yml +61 -0
  164. data/lib/generators/arclight/templates/config/repositories.yml +22 -29
  165. data/lib/tasks/index.rake +14 -17
  166. data/package.json +13 -14
  167. data/solr/conf/schema.xml +49 -39
  168. data/solr/conf/solrconfig.xml +78 -58
  169. data/tasks/arclight.rake +17 -9
  170. data/template.rb +6 -7
  171. metadata +159 -127
  172. data/.babelrc +0 -3
  173. data/.travis.yml +0 -28
  174. data/app/assets/javascripts/arclight/collection_navigation.js +0 -100
  175. data/app/assets/javascripts/arclight/collection_scrollspy.js +0 -6
  176. data/app/assets/javascripts/arclight/context_navigation.js +0 -374
  177. data/app/assets/javascripts/arclight/oembed_viewer.js +0 -46
  178. data/app/assets/javascripts/arclight/truncator.js.erb +0 -29
  179. data/app/assets/stylesheets/arclight/bootstrap_overrides.scss +0 -26
  180. data/app/assets/stylesheets/arclight/modules/context_navigation.scss +0 -75
  181. data/app/controllers/concerns/arclight/field_config_helpers.rb +0 -102
  182. data/app/factories/blacklight_field_configuration_factory.rb +0 -30
  183. data/app/views/arclight/repositories/_in_person_repository.html.erb +0 -19
  184. data/app/views/arclight/repositories/_repository_contact.html.erb +0 -9
  185. data/app/views/arclight/viewers/_oembed.html.erb +0 -8
  186. data/app/views/catalog/_access_contents.html.erb +0 -15
  187. data/app/views/catalog/_arclight_abstract_or_scope.html.erb +0 -5
  188. data/app/views/catalog/_arclight_bookmark_control.html.erb +0 -38
  189. data/app/views/catalog/_arclight_document_header_icon.html.erb +0 -1
  190. data/app/views/catalog/_arclight_document_index_header.html.erb +0 -13
  191. data/app/views/catalog/_arclight_document_index_header_hierarchy_default.html.erb +0 -0
  192. data/app/views/catalog/_arclight_document_index_header_online_contents_default.html.erb +0 -0
  193. data/app/views/catalog/_arclight_index_compact_default.html.erb +0 -22
  194. data/app/views/catalog/_arclight_index_default.html.erb +0 -45
  195. data/app/views/catalog/_arclight_index_group_document_compact_default.html.erb +0 -19
  196. data/app/views/catalog/_arclight_index_group_document_default.html.erb +0 -18
  197. data/app/views/catalog/_arclight_online_content_indicator.html.erb +0 -3
  198. data/app/views/catalog/_arclight_rangelimit.html.erb +0 -24
  199. data/app/views/catalog/_arclight_viewer_default.html.erb +0 -1
  200. data/app/views/catalog/_collection_contents.html.erb +0 -4
  201. data/app/views/catalog/_collection_context.html.erb +0 -15
  202. data/app/views/catalog/_collection_context_nav.html.erb +0 -12
  203. data/app/views/catalog/_collection_online_contents.html.erb +0 -17
  204. data/app/views/catalog/_component_context.html.erb +0 -5
  205. data/app/views/catalog/_containers.html.erb +0 -3
  206. data/app/views/catalog/_context_card.html.erb +0 -27
  207. data/app/views/catalog/_context_sidebar.html.erb +0 -8
  208. data/app/views/catalog/_custom_metadata.html.erb +0 -16
  209. data/app/views/catalog/_document_downloads.html.erb +0 -14
  210. data/app/views/catalog/_group_header_compact_default.html.erb +0 -15
  211. data/app/views/catalog/_group_header_default.html.erb +0 -20
  212. data/app/views/catalog/_home.html.erb +0 -1
  213. data/app/views/catalog/_index_breadcrumb_default.html.erb +0 -6
  214. data/app/views/catalog/_index_collection_context_default.html.erb +0 -53
  215. data/app/views/catalog/_index_default.html.erb +0 -17
  216. data/app/views/catalog/_index_header.html.erb +0 -7
  217. data/app/views/catalog/_index_header_online_contents_default.html.erb +0 -1
  218. data/app/views/catalog/_index_online_contents_default.html.erb +0 -6
  219. data/app/views/catalog/_online_content_label.html.erb +0 -5
  220. data/app/views/catalog/_search_form.html.erb +0 -34
  221. data/app/views/catalog/_search_results.html.erb +0 -28
  222. data/app/views/catalog/_show_actions_box_default.html.erb +0 -27
  223. data/app/views/catalog/_show_breadcrumbs_default.html.erb +0 -6
  224. data/app/views/catalog/_show_collection.html.erb +0 -66
  225. data/app/views/catalog/_show_default.html.erb +0 -70
  226. data/app/views/catalog/_show_upper_metadata_collection.html.erb +0 -1
  227. data/app/views/catalog/_show_upper_metadata_default.html.erb +0 -14
  228. data/app/views/catalog/_sort_and_per_page.html.erb +0 -8
  229. data/app/views/catalog/_within_collection_dropdown.html.erb +0 -26
  230. data/app/views/layouts/catalog_result.html.erb +0 -7
  231. data/app/views/shared/_context_sidebar.html.erb +0 -8
  232. data/app/views/shared/_header_navbar.html.erb +0 -61
  233. data/app/views/shared/_show_breadcrumbs.html.erb +0 -27
  234. data/lib/arclight/viewer.rb +0 -45
  235. data/lib/arclight/viewers/oembed.rb +0 -57
  236. data/lib/generators/arclight/templates/arclight.js +0 -2
  237. data/solr/conf/scripts.conf +0 -24
  238. data/vendor/assets/javascripts/responsiveTruncator.js +0 -69
  239. data/vendor/assets/javascripts/stickyfill.js +0 -480
  240. /data/app/assets/images/{blacklight → arclight}/logo.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1e2cb448d566788ea1305d2c0d8637427db85d1e053c58e53aa815a242b61fd
4
- data.tar.gz: 9894a2d18a455ebe5a8e73d8c8fc12b85c47bec741b9633bfeab6d6e68610788
3
+ metadata.gz: 0f420e8cfdd2330f786efc0792a102163f114625752b77c32695c172217d66ce
4
+ data.tar.gz: b373b12a559f9fafadb8d0a0fb0e66e1691b81a91e989ecf23db5cf090f7ee27
5
5
  SHA512:
6
- metadata.gz: 445ae2035ef21b80534d7cdfd6ee3d2996ce4504cb7e86598036d21c26808f7cafab2973d41e671492a4d28b238fce751bedfa5f8b601eb7cbe16faa17442445
7
- data.tar.gz: 0c2782bd753200360c9b17b82a01ac7de3610a58584def844a97ba0b4d1bf7ce25bb4171c75f938b9fc57d142e554d032625b5c8b0c2d10ea06279a3da19c642
6
+ metadata.gz: 15656150e9dcc4c27a871376c9a7f297fa44bc8f45b20354ec11f8320742c51531c968e662bf926b5fb7c3c5f514060fc6e1ed9ba142a51b31b9febef501e573
7
+ data.tar.gz: 0fb9df78502d8e33a5dd4ca59117ca82ccfe770e0c6c9caac785c9d311ee3d12db88201e061a9ed9a33678276ec2cb1e75c011c29640e0219f87d99359874ce0
data/.eslintrc CHANGED
@@ -2,14 +2,21 @@
2
2
  "env": {
3
3
  "es6": true
4
4
  },
5
+ "parserOptions": {
6
+ "ecmaVersion": 2022,
7
+ "sourceType": "module"
8
+ },
5
9
  "extends": "airbnb-base/legacy",
6
10
  "globals": {
7
- "jQuery": true,
8
- "$": true,
9
- "Blacklight": true
11
+ "Blacklight": true,
12
+ "bootstrap": true,
13
+ "Stimulus": true,
10
14
  },
11
15
  "rules": {
12
16
  "no-param-reassign": [2, { "props": false }],
13
- "func-names": ["error", "never"]
17
+ "func-names": ["error", "never"],
18
+ "indent": ["warn"],
19
+ "quotes": ["error", "single", { "avoidEscape": true }],
20
+ "semi": ["warn", "never"]
14
21
  }
15
22
  }
@@ -0,0 +1,51 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main, release-*]
6
+ pull_request:
7
+ branches: [main, release-*]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ rails_version: [7.1.5.1, 7.2.2.1]
15
+ ruby: ["3.2", "3.3"]
16
+ additional_engine_cart_rails_options: [""]
17
+ include:
18
+ - ruby: "3.1"
19
+ rails_version: "7.1.5"
20
+ - ruby: "3.3"
21
+ rails_version: "8.0.1"
22
+ env:
23
+ RAILS_VERSION: ${{ matrix.rails_version }}
24
+ ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-kamal --skip-solid --skip-coffee --skip-test --css bootstrap -a propshaft -j importmap ${{ matrix.additional_engine_cart_rails_options }}"
25
+ steps:
26
+ - uses: actions/checkout@v4
27
+ - name: Set up Ruby ${{ matrix.ruby }}
28
+ uses: ruby/setup-ruby@v1
29
+ with:
30
+ bundler: latest
31
+ ruby-version: ${{ matrix.ruby }}
32
+ - name: Install dependencies with Rails ${{ matrix.rails_version }}
33
+ run: bundle install
34
+ - name: Run tests
35
+ run: bundle exec rake ci
36
+ lint:
37
+ runs-on: ubuntu-latest
38
+ steps:
39
+ - name: Checkout code
40
+ uses: actions/checkout@v4
41
+ - name: Install Ruby and gems
42
+ uses: ruby/setup-ruby@v1
43
+ with:
44
+ bundler: latest
45
+ ruby-version: 3.2
46
+ - name: Install dependencies with Bundler
47
+ run: bundle install
48
+ - name: Install dependencies with yarn
49
+ run: yarn install
50
+ - name: Lint Ruby files
51
+ run: bundle exec rake rubocop eslint
data/.gitignore CHANGED
@@ -9,6 +9,7 @@
9
9
  /pkg/
10
10
  /spec/reports/
11
11
  /tmp/
12
+ /app/assets/builds/
12
13
 
13
14
  # rspec failure tracking
14
15
  .rspec_status
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format documentation
2
1
  --color
data/.rubocop.yml CHANGED
@@ -1,36 +1,48 @@
1
- require: rubocop-rspec
1
+ plugins:
2
+ - rubocop-factory_bot
3
+
4
+ require:
5
+ - rubocop-rspec
6
+ - rubocop-rails
7
+ - rubocop-rake
8
+ - rubocop-rspec_rails
9
+ - rubocop-capybara
2
10
 
3
11
  inherit_from:
4
12
  - .rubocop_todo.yml
5
13
 
6
14
  AllCops:
7
15
  Exclude:
8
- - '.internal_test_app/**/*'
9
- - 'bin/**/*'
10
- - 'db/**/*'
11
- - 'lib/generators/arclight/templates/**/*'
12
- - 'vendor/**/*'
13
- - 'node_modules/**/*'
14
- TargetRubyVersion: 2.4
16
+ - ".internal_test_app/**/*"
17
+ - "bin/**/*"
18
+ - "db/**/*"
19
+ - "lib/generators/arclight/templates/**/*"
20
+ - "vendor/**/*"
21
+ - "node_modules/**/*"
22
+ TargetRubyVersion: 3.0
15
23
  DisplayCopNames: true
16
24
 
17
25
  Metrics/ModuleLength:
18
26
  Exclude:
19
- - 'app/helpers/arclight_helper.rb'
20
- - 'app/models/concerns/arclight/solr_document.rb'
27
+ - "app/helpers/arclight_helper.rb"
28
+ - "app/models/concerns/arclight/solr_document.rb"
21
29
 
22
30
  Metrics/BlockLength:
23
31
  Exclude:
24
- - 'arclight.gemspec'
25
- - 'lib/arclight/traject/ead2_config.rb'
26
- - 'lib/tasks/**/*'
27
- - 'spec/features/traject/ead2_indexing_spec.rb'
28
- - 'spec/helpers/arclight_helper_spec.rb'
29
- - 'spec/features/collection_page_spec.rb'
30
- - 'spec/**/*'
31
- - 'tasks/**/*'
32
-
33
- Metrics/LineLength:
32
+ - "arclight.gemspec"
33
+ - "lib/arclight/traject/ead2_config.rb"
34
+ - "lib/tasks/**/*"
35
+ - "spec/features/traject/ead2_indexing_spec.rb"
36
+ - "spec/helpers/arclight_helper_spec.rb"
37
+ - "spec/features/collection_page_spec.rb"
38
+ - "spec/**/*"
39
+ - "tasks/**/*"
40
+
41
+ Naming/PredicateName:
42
+ ForbiddenPrefixes:
43
+ - is_
44
+
45
+ Layout/LineLength:
34
46
  Max: 160
35
47
 
36
48
  Rails:
@@ -41,4 +53,469 @@ Bundler/DuplicatedGem:
41
53
 
42
54
  Style/FormatStringToken:
43
55
  Exclude:
44
- - 'spec/test_app_templates/lib/generators/test_app_generator.rb'
56
+ - "spec/test_app_templates/lib/generators/test_app_generator.rb"
57
+
58
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
59
+ Enabled: true
60
+ Gemspec/RequireMFA: # new in 1.23
61
+ Enabled: false
62
+ Layout/LineContinuationLeadingSpace: # new in 1.31
63
+ Enabled: true
64
+ Layout/LineContinuationSpacing: # new in 1.31
65
+ Enabled: true
66
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
67
+ Enabled: true
68
+ Layout/SpaceBeforeBrackets: # new in 1.7
69
+ Enabled: true
70
+ Lint/AmbiguousAssignment: # new in 1.7
71
+ Enabled: true
72
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
73
+ Enabled: true
74
+ Lint/AmbiguousRange: # new in 1.19
75
+ Enabled: true
76
+ Lint/ConstantOverwrittenInRescue: # new in 1.31
77
+ Enabled: true
78
+ Lint/DeprecatedConstants: # new in 1.8
79
+ Enabled: true
80
+ Lint/DuplicateBranch: # new in 1.3
81
+ Enabled: true
82
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
83
+ Enabled: true
84
+ Lint/EmptyBlock: # new in 1.1
85
+ Enabled: true
86
+ Lint/EmptyClass: # new in 1.3
87
+ Enabled: true
88
+ Lint/EmptyInPattern: # new in 1.16
89
+ Enabled: true
90
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
91
+ Enabled: true
92
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
93
+ Enabled: true
94
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
95
+ Enabled: true
96
+ Lint/NonAtomicFileOperation: # new in 1.31
97
+ Enabled: true
98
+ Lint/NumberedParameterAssignment: # new in 1.9
99
+ Enabled: true
100
+ Lint/OrAssignmentToConstant: # new in 1.9
101
+ Enabled: true
102
+ Lint/RedundantDirGlobSort: # new in 1.8
103
+ Enabled: true
104
+ Lint/RefinementImportMethods: # new in 1.27
105
+ Enabled: true
106
+ Lint/RequireRangeParentheses: # new in 1.32
107
+ Enabled: true
108
+ Lint/RequireRelativeSelfPath: # new in 1.22
109
+ Enabled: true
110
+ Lint/SymbolConversion: # new in 1.9
111
+ Enabled: true
112
+ Lint/ToEnumArguments: # new in 1.1
113
+ Enabled: true
114
+ Lint/TripleQuotes: # new in 1.9
115
+ Enabled: true
116
+ Lint/UnexpectedBlockArity: # new in 1.5
117
+ Enabled: true
118
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
119
+ Enabled: true
120
+ Lint/UselessRuby2Keywords: # new in 1.23
121
+ Enabled: true
122
+ Naming/BlockForwarding: # new in 1.24
123
+ Enabled: true
124
+ Security/CompoundHash: # new in 1.28
125
+ Enabled: true
126
+ Security/IoMethods: # new in 1.22
127
+ Enabled: true
128
+ Style/ArgumentsForwarding: # new in 1.1
129
+ Enabled: true
130
+ Style/CollectionCompact: # new in 1.2
131
+ Enabled: true
132
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
133
+ Enabled: true
134
+ Style/EmptyHeredoc: # new in 1.32
135
+ Enabled: true
136
+ Style/EndlessMethod: # new in 1.8
137
+ Enabled: true
138
+ Style/EnvHome: # new in 1.29
139
+ Enabled: true
140
+ Style/FetchEnvVar: # new in 1.28
141
+ Enabled: true
142
+ Style/FileRead: # new in 1.24
143
+ Enabled: true
144
+ Style/FileWrite: # new in 1.24
145
+ Enabled: true
146
+ Style/HashConversion: # new in 1.10
147
+ Enabled: true
148
+ Style/HashExcept: # new in 1.7
149
+ Enabled: true
150
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
151
+ Enabled: true
152
+ Style/InPatternThen: # new in 1.16
153
+ Enabled: true
154
+ Style/MagicCommentFormat: # new in 1.35
155
+ Enabled: true
156
+ Style/MapCompactWithConditionalBlock: # new in 1.30
157
+ Enabled: true
158
+ Style/MapToHash: # new in 1.24
159
+ Enabled: true
160
+ Style/MultilineInPatternThen: # new in 1.16
161
+ Enabled: true
162
+ Style/NegatedIfElseCondition: # new in 1.2
163
+ Enabled: true
164
+ Style/NestedFileDirname: # new in 1.26
165
+ Enabled: true
166
+ Style/NilLambda: # new in 1.3
167
+ Enabled: true
168
+ Style/NumberedParameters: # new in 1.22
169
+ Enabled: true
170
+ Style/NumberedParametersLimit: # new in 1.22
171
+ Enabled: true
172
+ Style/ObjectThen: # new in 1.28
173
+ Enabled: true
174
+ Style/OpenStructUse: # new in 1.23
175
+ Enabled: true
176
+ Style/QuotedSymbols: # new in 1.16
177
+ Enabled: true
178
+ Style/RedundantArgument: # new in 1.4
179
+ Enabled: true
180
+ Style/RedundantInitialize: # new in 1.27
181
+ Enabled: true
182
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
183
+ Enabled: true
184
+ Style/SelectByRegexp: # new in 1.22
185
+ Enabled: true
186
+ Style/StringChars: # new in 1.12
187
+ Enabled: true
188
+ Style/SwapValues: # new in 1.1
189
+ Enabled: true
190
+ RSpec/BeEq: # new in 2.9.0
191
+ Enabled: true
192
+ RSpec/BeNil: # new in 2.9.0
193
+ Enabled: true
194
+ RSpec/ChangeByZero: # new in 2.11
195
+ Enabled: true
196
+ RSpec/ClassCheck: # new in 2.13
197
+ Enabled: true
198
+ RSpec/ExcessiveDocstringSpacing: # new in 2.5
199
+ Enabled: true
200
+ RSpec/IdenticalEqualityAssertion: # new in 2.4
201
+ Enabled: true
202
+ RSpec/NoExpectationExample: # new in 2.13
203
+ Enabled: true
204
+ RSpec/SubjectDeclaration: # new in 2.5
205
+ Enabled: true
206
+ RSpec/VerifiedDoubleReference: # new in 2.10.0
207
+ Enabled: true
208
+ Capybara/SpecificFinders: # new in 2.13
209
+ Enabled: true
210
+ Capybara/SpecificMatcher: # new in 2.12
211
+ Enabled: true
212
+ FactoryBot/SyntaxMethods: # new in 2.7
213
+ Enabled: true
214
+ RSpecRails/AvoidSetupHook: # new in 2.4
215
+ Enabled: true
216
+ RSpecRails/HaveHttpStatus: # new in 2.12
217
+ Enabled: true
218
+ Rails/ActionControllerFlashBeforeRender: # new in 2.16
219
+ Enabled: true
220
+ Rails/ActionControllerTestCase: # new in 2.14
221
+ Enabled: true
222
+ Rails/ActiveRecordCallbacksOrder: # new in 2.7
223
+ Enabled: true
224
+ Rails/ActiveSupportOnLoad: # new in 2.16
225
+ Enabled: true
226
+ Rails/AddColumnIndex: # new in 2.11
227
+ Enabled: true
228
+ Rails/AfterCommitOverride: # new in 2.8
229
+ Enabled: true
230
+ Rails/AttributeDefaultBlockValue: # new in 2.9
231
+ Enabled: true
232
+ Rails/CompactBlank: # new in 2.13
233
+ Enabled: true
234
+ Rails/DeprecatedActiveModelErrorsMethods: # new in 2.14
235
+ Enabled: true
236
+ Rails/DotSeparatedKeys: # new in 2.15
237
+ Enabled: true
238
+ Rails/DuplicateAssociation: # new in 2.14
239
+ Enabled: true
240
+ Rails/DuplicateScope: # new in 2.14
241
+ Enabled: true
242
+ Rails/DurationArithmetic: # new in 2.13
243
+ Enabled: true
244
+ Rails/EagerEvaluationLogMessage: # new in 2.11
245
+ Enabled: true
246
+ Rails/ExpandedDateRange: # new in 2.11
247
+ Enabled: true
248
+ Rails/FindById: # new in 2.7
249
+ Enabled: true
250
+ Rails/FreezeTime: # new in 2.16
251
+ Enabled: true
252
+ Rails/I18nLazyLookup: # new in 2.14
253
+ Enabled: true
254
+ Rails/I18nLocaleAssignment: # new in 2.11
255
+ Enabled: true
256
+ Rails/I18nLocaleTexts: # new in 2.14
257
+ Enabled: true
258
+ Rails/Inquiry: # new in 2.7
259
+ Enabled: true
260
+ Rails/MailerName: # new in 2.7
261
+ Enabled: true
262
+ Rails/MatchRoute: # new in 2.7
263
+ Enabled: true
264
+ Rails/MigrationClassName: # new in 2.14
265
+ Enabled: true
266
+ Rails/NegateInclude: # new in 2.7
267
+ Enabled: true
268
+ Rails/Pluck: # new in 2.7
269
+ Enabled: true
270
+ Rails/PluckInWhere: # new in 2.7
271
+ Enabled: true
272
+ Rails/RedundantPresenceValidationOnBelongsTo: # new in 2.13
273
+ Enabled: true
274
+ Rails/RedundantTravelBack: # new in 2.12
275
+ Enabled: true
276
+ Rails/RenderInline: # new in 2.7
277
+ Enabled: true
278
+ Rails/RenderPlainText: # new in 2.7
279
+ Enabled: true
280
+ Rails/RootJoinChain: # new in 2.13
281
+ Enabled: true
282
+ Rails/RootPathnameMethods: # new in 2.16
283
+ Enabled: true
284
+ Rails/RootPublicPath: # new in 2.15
285
+ Enabled: true
286
+ Rails/ShortI18n: # new in 2.7
287
+ Enabled: true
288
+ Rails/SquishedSQLHeredocs: # new in 2.8
289
+ Enabled: true
290
+ Rails/StripHeredoc: # new in 2.15
291
+ Enabled: true
292
+ Rails/TimeZoneAssignment: # new in 2.10
293
+ Enabled: true
294
+ Rails/ToFormattedS: # new in 2.15
295
+ Enabled: true
296
+ Rails/ToSWithArgument: # new in 2.16
297
+ Enabled: true
298
+ Rails/TopLevelHashWithIndifferentAccess: # new in 2.16
299
+ Enabled: true
300
+ Rails/TransactionExitStatement: # new in 2.14
301
+ Enabled: true
302
+ Rails/UnusedIgnoredColumns: # new in 2.11
303
+ Enabled: true
304
+ Rails/WhereEquals: # new in 2.9
305
+ Enabled: true
306
+ Rails/WhereExists: # new in 2.7
307
+ Enabled: true
308
+ Rails/WhereMissing: # new in 2.16
309
+ Enabled: true
310
+ Rails/WhereNot: # new in 2.8
311
+ Enabled: true
312
+ Lint/DuplicateMagicComment: # new in 1.37
313
+ Enabled: true
314
+ Style/OperatorMethodCall: # new in 1.37
315
+ Enabled: true
316
+ Style/RedundantEach: # new in 1.38
317
+ Enabled: true
318
+ Style/RedundantStringEscape: # new in 1.37
319
+ Enabled: true
320
+ RSpec/SortMetadata: # new in 2.14
321
+ Enabled: true
322
+ Capybara/NegationMatcher: # new in 2.14
323
+ Enabled: true
324
+ Capybara/SpecificActions: # new in 2.14
325
+ Enabled: true
326
+ FactoryBot/ConsistentParenthesesStyle: # new in 2.14
327
+ Enabled: false # https://github.com/rspec/rspec-rails/issues/2635
328
+ RSpecRails/InferredSpecType: # new in 2.14
329
+ Enabled: true
330
+ Rails/ActionOrder: # new in 2.17
331
+ Enabled: true
332
+ Rails/IgnoredColumnsAssignment: # new in 2.17
333
+ Enabled: true
334
+ Rails/WhereNotWithMultipleConditions: # new in 2.17
335
+ Enabled: true
336
+ Gemspec/DevelopmentDependencies: # new in 1.44
337
+ Enabled: true
338
+ Lint/UselessRescue: # new in 1.43
339
+ Enabled: true
340
+ Style/ArrayIntersect: # new in 1.40
341
+ Enabled: true
342
+ Style/ComparableClamp: # new in 1.44
343
+ Enabled: true
344
+ Style/ConcatArrayLiterals: # new in 1.41
345
+ Enabled: true
346
+ Style/MapToSet: # new in 1.42
347
+ Enabled: true
348
+ Style/MinMaxComparison: # new in 1.42
349
+ Enabled: true
350
+ Style/RedundantConstantBase: # new in 1.40
351
+ Enabled: true
352
+ Style/RedundantDoubleSplatHashBraces: # new in 1.41
353
+ Enabled: true
354
+ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
355
+ Enabled: true
356
+ Capybara/MatchStyle: # new in 2.17
357
+ Enabled: true
358
+ RSpec/DuplicatedMetadata: # new in 2.16
359
+ Enabled: true
360
+ RSpec/PendingWithoutReason: # new in 2.16
361
+ Enabled: true
362
+ FactoryBot/FactoryNameStyle: # new in 2.16
363
+ Enabled: false # https://github.com/rubocop/rubocop-rspec/issues/1587
364
+ RSpecRails/MinitestAssertions: # new in 2.17
365
+ Enabled: true
366
+ Rails/ResponseParsedBody: # new in 2.18
367
+ Enabled: true
368
+ Gemspec/AddRuntimeDependency: # new in 1.65
369
+ Enabled: true
370
+ Lint/DuplicateMatchPattern: # new in 1.50
371
+ Enabled: true
372
+ Lint/DuplicateSetElement: # new in 1.67
373
+ Enabled: true
374
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
375
+ Enabled: true
376
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
377
+ Enabled: true
378
+ Lint/LiteralAssignmentInCondition: # new in 1.58
379
+ Enabled: true
380
+ Lint/MixedCaseRange: # new in 1.53
381
+ Enabled: true
382
+ Lint/NumericOperationWithConstantResult: # new in 1.69
383
+ Enabled: true
384
+ Lint/RedundantRegexpQuantifiers: # new in 1.53
385
+ Enabled: true
386
+ Lint/UnescapedBracketInRegexp: # new in 1.68
387
+ Enabled: true
388
+ Lint/UselessDefined: # new in 1.69
389
+ Enabled: true
390
+ Lint/UselessNumericOperation: # new in 1.66
391
+ Enabled: true
392
+ Metrics/CollectionLiteralLength: # new in 1.47
393
+ Enabled: true
394
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
395
+ Enabled: true
396
+ Style/BitwisePredicate: # new in 1.68
397
+ Enabled: true
398
+ Style/CombinableDefined: # new in 1.68
399
+ Enabled: true
400
+ Style/DataInheritance: # new in 1.49
401
+ Enabled: true
402
+ Style/DigChain: # new in 1.69
403
+ Enabled: true
404
+ Style/DirEmpty: # new in 1.48
405
+ Enabled: true
406
+ Style/ExactRegexpMatch: # new in 1.51
407
+ Enabled: true
408
+ Style/FileEmpty: # new in 1.48
409
+ Enabled: true
410
+ Style/FileNull: # new in 1.69
411
+ Enabled: true
412
+ Style/FileTouch: # new in 1.69
413
+ Enabled: true
414
+ Style/KeywordArgumentsMerging: # new in 1.68
415
+ Enabled: true
416
+ Style/MapIntoArray: # new in 1.63
417
+ Enabled: true
418
+ Style/RedundantArrayConstructor: # new in 1.52
419
+ Enabled: true
420
+ Style/RedundantCurrentDirectoryInPath: # new in 1.53
421
+ Enabled: true
422
+ Style/RedundantFilterChain: # new in 1.52
423
+ Enabled: true
424
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
425
+ Enabled: true
426
+ Style/RedundantLineContinuation: # new in 1.49
427
+ Enabled: true
428
+ Style/RedundantRegexpArgument: # new in 1.53
429
+ Enabled: true
430
+ Style/RedundantRegexpConstructor: # new in 1.52
431
+ Enabled: true
432
+ Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
433
+ Enabled: true
434
+ Style/SafeNavigationChainLength: # new in 1.68
435
+ Enabled: true
436
+ Style/SendWithLiteralMethodName: # new in 1.64
437
+ Enabled: true
438
+ Style/SingleLineDoEndBlock: # new in 1.57
439
+ Enabled: true
440
+ Style/SuperArguments: # new in 1.64
441
+ Enabled: true
442
+ Style/SuperWithArgsParentheses: # new in 1.58
443
+ Enabled: true
444
+ Style/YAMLFileRead: # new in 1.53
445
+ Enabled: true
446
+ Capybara/ClickLinkOrButtonStyle: # new in 2.19
447
+ Enabled: true
448
+ Capybara/RedundantWithinFind: # new in 2.20
449
+ Enabled: true
450
+ Capybara/RSpec/HaveSelector: # new in 2.19
451
+ Enabled: true
452
+ Capybara/RSpec/PredicateMatcher: # new in 2.19
453
+ Enabled: true
454
+ FactoryBot/AssociationStyle: # new in 2.23
455
+ Enabled: true
456
+ FactoryBot/ExcessiveCreateList: # new in 2.25
457
+ Enabled: true
458
+ FactoryBot/FactoryAssociationWithStrategy: # new in 2.23
459
+ Enabled: true
460
+ FactoryBot/IdSequence: # new in 2.24
461
+ Enabled: true
462
+ FactoryBot/RedundantFactoryOption: # new in 2.23
463
+ Enabled: true
464
+ RSpecRails/NegationBeValid: # new in 2.23
465
+ Enabled: true
466
+ RSpecRails/TravelAround: # new in 2.19
467
+ Enabled: true
468
+ RSpec/BeEmpty: # new in 2.20
469
+ Enabled: true
470
+ RSpec/ContainExactly: # new in 2.19
471
+ Enabled: true
472
+ RSpec/EmptyMetadata: # new in 2.24
473
+ Enabled: true
474
+ RSpec/EmptyOutput: # new in 2.29
475
+ Enabled: true
476
+ RSpec/Eq: # new in 2.24
477
+ Enabled: true
478
+ RSpec/ExpectInLet: # new in 2.30
479
+ Enabled: true
480
+ RSpec/IndexedLet: # new in 2.20
481
+ Enabled: true
482
+ RSpec/IsExpectedSpecify: # new in 2.27
483
+ Enabled: true
484
+ RSpec/MatchArray: # new in 2.19
485
+ Enabled: true
486
+ RSpec/MetadataStyle: # new in 2.24
487
+ Enabled: true
488
+ RSpec/ReceiveMessages: # new in 2.23
489
+ Enabled: true
490
+ RSpec/RedundantAround: # new in 2.19
491
+ Enabled: true
492
+ RSpec/RedundantPredicateMatcher: # new in 2.26
493
+ Enabled: true
494
+ RSpec/RemoveConst: # new in 2.26
495
+ Enabled: true
496
+ RSpec/RepeatedSubjectCall: # new in 2.27
497
+ Enabled: true
498
+ RSpec/SkipBlockInsideExample: # new in 2.19
499
+ Enabled: true
500
+ RSpec/SpecFilePathFormat: # new in 2.24
501
+ Enabled: true
502
+ RSpec/SpecFilePathSuffix: # new in 2.24
503
+ Enabled: true
504
+ RSpec/UndescriptiveLiteralsDescription: # new in 2.29
505
+ Enabled: true
506
+ Rails/DangerousColumnNames: # new in 2.21
507
+ Enabled: true
508
+ Rails/EnumSyntax: # new in 2.26
509
+ Enabled: true
510
+ Rails/EnvLocal: # new in 2.22
511
+ Enabled: true
512
+ Rails/RedundantActiveRecordAllMethod: # new in 2.21
513
+ Enabled: true
514
+ Rails/SelectMap: # new in 2.21
515
+ Enabled: true
516
+ Rails/ThreeStateBooleanColumn: # new in 2.19
517
+ Enabled: true
518
+ Rails/UnusedRenderContent: # new in 2.21
519
+ Enabled: true
520
+ Rails/WhereRange: # new in 2.25
521
+ Enabled: true