File tree Expand file tree Collapse file tree 11 files changed +64
-4
lines changed Expand file tree Collapse file tree 11 files changed +64
-4
lines changed Original file line number Diff line number Diff line change 1- /db /* .sqlite3
2- /db /* .sqlite3-journal
3- /db /* .sqlite3- [0-9 ]*
1+ /db /* .sqlite3 *
42/coverage /
53
64# Ignore all logfiles and tempfiles.
Original file line number Diff line number Diff line change @@ -48,3 +48,5 @@ group :test do
4848 gem 'vcr'
4949 gem 'webmock'
5050end
51+
52+ gem 'flipflop' , '~> 2.7'
Original file line number Diff line number Diff line change 135135 ffi-compiler (1.0.1 )
136136 ffi (>= 1.0.0 )
137137 rake
138+ flipflop (2.7.1 )
139+ activesupport (>= 4.0 )
140+ terminal-table (>= 1.8 )
138141 globalid (1.2.1 )
139142 activesupport (>= 6.1 )
140143 graphql (2.0.27 )
315318 stimulus-rails (1.3.3 )
316319 railties (>= 6.0.0 )
317320 stringio (3.1.0 )
321+ terminal-table (3.0.2 )
322+ unicode-display_width (>= 1.1.1 , < 3 )
318323 thor (1.3.0 )
319324 tilt (2.3.0 )
320325 timeout (0.4.1 )
@@ -361,6 +366,7 @@ DEPENDENCIES
361366 climate_control
362367 debug
363368 dotenv-rails
369+ flipflop (~> 2.7 )
364370 graphql (~> 2.0.27 )
365371 graphql-client
366372 http
Original file line number Diff line number Diff line change @@ -51,6 +51,9 @@ change as part of the work.
5151
5252- ` ABOUT_APP ` : If populated, an 'about' partial containing the contents of this variable will render on
5353` basic_search#index ` .
54+ - ` GDT ` : Enables features related to geospatial data discovery. Setting this variable with any value will trigger GDT
55+ mode (e.g., ` GDT=false ` will still enable GDT features). Note that this is currently intended _ only_ for the GDT app and
56+ may have unexpected consequences if applied to other TIMDEX UI apps.
5457- ` GLOBAL_ALERT ` : The main functionality for this comes from our theme gem, but when set the value will be rendered as
5558 safe html above the main header of the site.
5659- ` SENTRY_DSN ` : Client key for Sentry exception logging.
Original file line number Diff line number Diff line change 99
1010module TimdexUi
1111 class Application < Rails ::Application
12+ # Before filter for Flipflop dashboard. Replace with a lambda or method name
13+ # defined in ApplicationController to implement access control.
14+ config . flipflop . dashboard_access_filter = -> { head :forbidden }
15+
16+ # By default, when set to `nil`, strategy loading errors are suppressed in test
17+ # mode. Set to `true` to always raise errors, or `false` to always warn.
18+ config . flipflop . raise_strategy_errors = nil
19+
1220 # Initialize configuration defaults for originally generated Rails version.
1321 config . load_defaults 7.0
1422
Original file line number Diff line number Diff line change 11require "active_support/core_ext/integer/time"
22
33Rails . application . configure do
4+ # Before filter for Flipflop dashboard. Replace with a lambda or method name
5+ # defined in ApplicationController to implement access control.
6+ config . flipflop . dashboard_access_filter = nil
7+
8+ # By default, when set to `nil`, strategy loading errors are suppressed in test
9+ # mode. Set to `true` to always raise errors, or `false` to always warn.
10+ config . flipflop . raise_strategy_errors = nil
11+
412 # Settings specified here will take precedence over those in config/application.rb.
513
614 # In the development environment your application's code is reloaded any time
Original file line number Diff line number Diff line change 66# and recreated between test runs. Don't rely on the data there!
77
88Rails . application . configure do
9+ # Before filter for Flipflop dashboard. Replace with a lambda or method name
10+ # defined in ApplicationController to implement access control.
11+ config . flipflop . dashboard_access_filter = nil
12+
13+ # By default, when set to `nil`, strategy loading errors are suppressed in test
14+ # mode. Set to `true` to always raise errors, or `false` to always warn.
15+ config . flipflop . raise_strategy_errors = nil
16+
917 # Settings specified here will take precedence over those in config/application.rb.
1018
1119 # Turn false under Spring and add config.action_view.cache_template_loading = true.
Original file line number Diff line number Diff line change 1+ Flipflop . configure do
2+ # Strategies will be used in the order listed here.
3+ strategy :session
4+ strategy :default
5+
6+ feature :gdt ,
7+ default : ENV . fetch ( 'GDT' , false ) ,
8+ description : "Enable geodata discovery features."
9+ end
Original file line number Diff line number Diff line change 11Rails . application . routes . draw do
2+ mount Flipflop ::Engine => "/flipflop"
23 root "basic_search#index"
34
45 get 'doi' , to : 'fact#doi'
Original file line number Diff line number Diff line change 1+ class CreateFeatures < ActiveRecord ::Migration [ 7.1 ]
2+ def change
3+ create_table :flipflop_features do |t |
4+ t . string :key , null : false
5+ t . boolean :enabled , null : false , default : false
6+
7+ t . timestamps null : false
8+ end
9+ end
10+ end
You can’t perform that action at this time.
0 commit comments