old_definitions in progress
This commit is contained in:
+2
-2
@@ -13,9 +13,9 @@ LOG_ACTIVE_RECORD=false
|
||||
LOG_ACTION_VIEW=false
|
||||
|
||||
# with default value, type gets inferred from
|
||||
INTEGER=1
|
||||
INTEGER=a
|
||||
STRING=456
|
||||
BOOLEAN=true
|
||||
BOOLEAN=false
|
||||
|
||||
# with no default value (evaluated to nil), type must be defined expressively otherwise it reverts to a string type
|
||||
# INTEGER=:integer
|
||||
|
||||
@@ -10,20 +10,17 @@ gem install bundler
|
||||
bundle install
|
||||
```
|
||||
|
||||
### database.yml
|
||||
## DATABASE
|
||||
|
||||
```yaml
|
||||
[...]
|
||||
development:
|
||||
<<: *default
|
||||
database: ruby-debug
|
||||
user: ruby-debug
|
||||
password: ruby-debug
|
||||
host: ct1.lxd
|
||||
[...]
|
||||
```
|
||||
rails generate scaffold score name:string grade:integer
|
||||
rails db:migrate
|
||||
* # miaou, reuse dbs.lxd (or ct1.lxd)
|
||||
* echo "DATABASE_HOST=ct1.lxd" >> .env
|
||||
* # connect to miaou host
|
||||
* db-psql create easy-going-rails
|
||||
|
||||
## RUN
|
||||
|
||||
* rails db:migrate
|
||||
* ./bin/dev
|
||||
|
||||
## TODO
|
||||
|
||||
@@ -69,9 +66,6 @@ rails db:migrate
|
||||
* [ ] remove /bin/setup
|
||||
* [ ] ask for main configuration (application_title, alpineJs)
|
||||
|
||||
* [ ] ViewComponent
|
||||
* [ ] https://viewcomponent.org/
|
||||
|
||||
* [ ] Postgresql text search
|
||||
* [ ] Fuzzy search with trigrams
|
||||
|
||||
|
||||
@@ -44,8 +44,10 @@ module HotConstants
|
||||
|
||||
new_env = Dotenv.parse
|
||||
constants_to_delete = HOTENV.except(*new_env.keys)
|
||||
constants_to_delete.each do |constant|
|
||||
LOGGER.info("constant <#{constant}> reverts to default value <#{}>")
|
||||
constants_to_delete.each do |name, _|
|
||||
# FIXME: default should read default and type from @old_definitions
|
||||
type, default = @old_definitions[name]
|
||||
LOGGER.info("constant <#{name}> reverts to default value <#{default}> of type <#{type}>")
|
||||
end
|
||||
|
||||
constants_to_add = new_env.except(*HOTENV.keys)
|
||||
|
||||
Reference in New Issue
Block a user