Project

General

Profile

Refactor #2660

Setting model, improve tests, string parsing and change to create!

Added by Dominic Cleal almost 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Refactor relating to #2343:

  • added string settings type
  • fixed tests previously commented out due to CI failures
  • more tests for core settings functionality
  • parsing of string values enhanced and extracted to a separate method
  • setting value to nil when it equals default is back
  • create! is now prefered method for creating settings as it raises exceptions on invalid states

https://github.com/theforeman/foreman/pull/637


Related issues

Related to Foreman - Bug #2343: app/models/setting.rb#default chokes on nil attributesClosed2013-03-20

Associated revisions

Revision 8da68b88 (diff)
Added by Tomáš Strachota almost 6 years ago

fixes #2660 - settings, improve tests and fixes

- added string settings type
- fixed tests previously commented out due to CI failures
- more tests for core settings functionality
- parsing of string values enhanced and extracted to a separate method
- setting value to nil when it equals default is back
- create! is now prefered method for creating settings as it raises exceptions on invalid states
- setting takes string as default type when parsing values from user input

Revision 8c6eddcf (diff)
Added by Tomáš Strachota almost 6 years ago

fixes #2660 - settings, improve tests and fixes

- added string settings type
- fixed tests previously commented out due to CI failures
- more tests for core settings functionality
- parsing of string values enhanced and extracted to a separate method
- setting value to nil when it equals default is back
- create! is now prefered method for creating settings as it raises exceptions on invalid states
- setting takes string as default type when parsing values from user input
(cherry picked from commit 8da68b88093f497491a20f337d4e658addad7432)

History

#1 Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF