Skip to content

Commit 5e81974

Browse files
authored
feat: Remove Zenodo enabled feature toggle (#440)
1 parent a858b98 commit 5e81974

File tree

5 files changed

+12
-44
lines changed

5 files changed

+12
-44
lines changed

application/app/views/layouts/nav/_navigation.html.erb

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,16 @@
5151
</a>
5252
</li>
5353

54-
<% if ::Configuration.zenodo_enabled %>
55-
<li>
56-
<a class="dropdown-item d-flex align-items-center gap-2"
57-
href="<%= explore_path(connector_type: ConnectorType::ZENODO.to_s, server_domain: Zenodo::ZenodoUrl::DEFAULT_SERVER, object_type: 'landing', object_id: ':root') %>"
58-
id="nav-zenodo">
59-
<span class="icon-wrapper bg-white rounded d-inline-flex align-items-center justify-content-center p-1" aria-hidden="true">
60-
<%= connector_icon(ConnectorType::ZENODO) %>
61-
</span>
62-
<%= t('.link_zenodo_text') %>
63-
</a>
64-
</li>
65-
<% end %>
54+
<li>
55+
<a class="dropdown-item d-flex align-items-center gap-2"
56+
href="<%= explore_path(connector_type: ConnectorType::ZENODO.to_s, server_domain: Zenodo::ZenodoUrl::DEFAULT_SERVER, object_type: 'landing', object_id: ':root') %>"
57+
id="nav-zenodo">
58+
<span class="icon-wrapper bg-white rounded d-inline-flex align-items-center justify-content-center p-1" aria-hidden="true">
59+
<%= connector_icon(ConnectorType::ZENODO) %>
60+
</span>
61+
<%= t('.link_zenodo_text') %>
62+
</a>
63+
</li>
6664

6765
<li><hr class="dropdown-divider" role="separator"></li>
6866

application/app/views/sitemap/index.html.erb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
<li><%= t('layouts.nav.navigation.link_repositories_text') %></li>
99
<ul>
1010
<li><%= link_to t('layouts.nav.navigation.link_dataverse_text'), link_to_landing(ConnectorType::DATAVERSE) %></li>
11-
<% if ::Configuration.zenodo_enabled %>
12-
<li><%= link_to t('layouts.nav.navigation.link_zenodo_text'), explore_path(connector_type: ConnectorType::ZENODO.to_s, server_domain: Zenodo::ZenodoUrl::DEFAULT_SERVER, object_type: 'landing', object_id: ':root') %></li>
13-
<% end %>
11+
<li><%= link_to t('layouts.nav.navigation.link_zenodo_text'), explore_path(connector_type: ConnectorType::ZENODO.to_s, server_domain: Zenodo::ZenodoUrl::DEFAULT_SERVER, object_type: 'landing', object_id: ':root') %></li>
1412
<li><%= link_to t('layouts.nav.navigation.link_repo_settings_text'), repository_settings_path %></li>
1513
</ul>
1614
<li><%= link_to t('layouts.nav.navigation.link_guide_text'), guide_url %></li>

application/config/configuration_singleton.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ def property_configs
2727
::ConfigurationProperty.integer(:detached_process_status_interval, default: 10 * 1000), # 10s in MILLISECONDS
2828
::ConfigurationProperty.integer(:max_download_file_size, default: 10 * 1024 * 1024 * 1024), # 10 GIGABYTE
2929
::ConfigurationProperty.integer(:max_upload_file_size, default: 1024 * 1024 * 1024), # 1 GIGABYTE
30-
::ConfigurationProperty.boolean(:zenodo_enabled, default: false),
3130
::ConfigurationProperty.property(:guide_url, default: 'https://iqss.github.io/ondemand-loop/'),
3231
::ConfigurationProperty.property(:http_proxy, read_from_env: false),
3332
::ConfigurationProperty.integer(:default_connect_timeout, default: 5),

application/test/config/configuration_singleton_test.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,6 @@ def setup
6565
ENV.delete('OOD_LOOP_MAX_UPLOAD_FILE_SIZE')
6666
end
6767

68-
test 'should return default boolean values when ENV is not set' do
69-
assert_equal false, @config_instance.zenodo_enabled
70-
end
71-
72-
test 'should override boolean values from ENV' do
73-
ENV['OOD_LOOP_ZENODO_ENABLED'] = 'true'
74-
config = ConfigurationSingleton.new
75-
assert_equal true, config.zenodo_enabled
76-
ensure
77-
ENV.delete('OOD_LOOP_ZENODO_ENABLED')
78-
end
79-
8068
test 'should return default guide_url when not set' do
8169
assert_equal 'https://iqss.github.io/ondemand-loop/', @config_instance.guide_url
8270
end

docs/guide/content/admin.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ You can override the default configuration values in **two supported ways**:
2020

2121
Create one or more `.yml` files in the directory: `/etc/loop/config/loop.d`
2222

23-
Each file should contain a simple key-value structure where the keys match the configuration property names (e.g. `download_root`, `zenodo_enabled`). These files are loaded **once at application startup**, so any changes require a restart.
23+
Each file should contain a simple key-value structure where the keys match the configuration property names (e.g. `download_root`). These files are loaded **once at application startup**, so any changes require a restart.
2424

2525
#### 2. Environment Variables
2626

@@ -75,7 +75,6 @@ You can define environment variables in one of the following ways:
7575
- [detached_process_status_interval](#detached_process_status_interval)
7676
- [max_download_file_size](#max_download_file_size)
7777
- [max_upload_file_size](#max_upload_file_size)
78-
- [zenodo_enabled](#zenodo_enabled)
7978
- [guide_url](#guide_url)
8079
- [http_proxy](#http_proxy)
8180
- [default_connect_timeout](#default_connect_timeout)
@@ -229,18 +228,6 @@ Defines the maximum allowed size (in bytes) for an individual file upload. Files
229228

230229
- **Default**: `1_073_741_824` (1 GB)
231230
- **Environment Variable**: `OOD_LOOP_MAX_UPLOAD_FILE_SIZE`
232-
233-
---
234-
235-
<a id="zenodo_enabled"></a>
236-
**`zenodo_enabled`**
237-
Boolean flag to enable or disable the Zenodo connector in the application. If set to `false`, Zenodo integration will be hidden and inactive.
238-
239-
- **Default**: `false`
240-
- **Environment Variable**: `OOD_LOOP_ZENODO_ENABLED`
241-
242-
---
243-
244231
<a id="guide_url"></a>
245232
**`guide_url`**
246233
URL to the external documentation site. This is used for help links in the interface and should point to the current user or admin guide for your Loop deployment.
@@ -365,7 +352,6 @@ detached_controller_interval: 5
365352
detached_process_status_interval: 2_000
366353
max_download_file_size: 15_000_000_000
367354
max_upload_file_size: 2_000_000_000
368-
zenodo_enabled: true
369355
guide_url: https://example.com/loop
370356
```
371357
@@ -392,6 +378,5 @@ OOD_LOOP_DETACHED_CONTROLLER_INTERVAL=5
392378
OOD_LOOP_DETACHED_PROCESS_STATUS_INTERVAL=2_000
393379
OOD_LOOP_MAX_DOWNLOAD_FILE_SIZE=15_000_000_000
394380
OOD_LOOP_MAX_UPLOAD_FILE_SIZE=2_000_000_000
395-
OOD_LOOP_ZENODO_ENABLED=true
396381
OOD_LOOP_GUIDE_URL=https://example.com/loop
397382
```

0 commit comments

Comments
 (0)