Skip to content

Commit

Permalink
Merge pull request #74 from ba-st/allow_urls_in_configuration
Browse files Browse the repository at this point in the history
Fix Application Configuration Plugin to allow URLs
  • Loading branch information
gcotelli committed Nov 28, 2019
2 parents d5b8bfb + 0758734 commit 5e1ac73
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ Class {
{ #category : #private }
ApplicationConfigurationPluginAPITest >> configurationDefinitions [

^ Array with: ( FlagArgument named: 'debug-mode' )
^ Array with: ( MandatoryArgument named: 'public-url' )
]

{ #category : #private }
ApplicationConfigurationPluginAPITest >> configurationProvider [

^ [ Dictionary new
at: 'debug-mode' put: true;
at: 'public-url' put: 'http://api.example.com' asUrl;
yourself
]
]
Expand Down Expand Up @@ -62,8 +62,8 @@ ApplicationConfigurationPluginAPITest >> testGetConfigurationWithPermissions [
withTheOnlyOneIn: configurations
do: [ :config |
self
assert: config name equals: 'debug-mode';
assert: ( config at: #'current-value' )
assert: config name equals: 'public-url';
assert: ( config at: #'current-value' ) equals: 'http://api.example.com/'
]
]
]
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ ApplicationConfigurationRESTfulController >> configureConfigurationEncodingOn: w
mapAccessor: #name;
mapProperty: #'current-value' getter: [ :definition | plugin currentValueFor: definition ];
mapAccessor: #default
]
];
for: ZnUrl customDo: [ :mapping | mapping encoder: [ :url | url printString ] ]
]

{ #category : #routes }
Expand Down

0 comments on commit 5e1ac73

Please sign in to comment.