Skip to content

Set correct script attributes in AbstractSimpleAggregation - #748

Merged
ruflin merged 5 commits into
ruflin:masterfrom
matthiasmullie:patch-2
Jan 14, 2015
Merged

Set correct script attributes in AbstractSimpleAggregation#748
ruflin merged 5 commits into
ruflin:masterfrom
matthiasmullie:patch-2

Conversation

@matthiasmullie

Copy link
Copy Markdown
Contributor

Existing code would not set 'lang' (making it impossible to e.g. use groovy in those scripts)
It would also always add 'params', even if there aren't any

Existing code would not set 'lang' (making it impossible to e.g. use groovy in those scripts)
It would also always add 'params', even if there aren't any
I had blindly set params, overriding any existing params.
Now they'll be merged properly: only the params known to $script will be overriden.
Unrelated existing additional parameters will remain intact.
@ruflin

ruflin commented Jan 13, 2015

Copy link
Copy Markdown
Owner

Can you add a small test to make sure this problem does not occur again?

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.03%) when pulling 8d87609 on matthiasmullie:patch-2 into b14eb57 on ruflin:master.

MediaWiki has spaces around parentheses & my IDE auto-formats source like that.
Obviously, don't want this here.
My change slightly dropped code coverage: when passing a Script, it used to
manually extract the script (as string) from the Script object & set it.
Now that I've changed it to use Script::toArray(), that "set script as string"
patch was no longer being tested.
This adds a separate test for that case.
ruflin added a commit that referenced this pull request Jan 14, 2015
Set correct script attributes in AbstractSimpleAggregation
@ruflin
ruflin merged commit acc9604 into ruflin:master Jan 14, 2015
@ruflin

ruflin commented Jan 14, 2015

Copy link
Copy Markdown
Owner

Thx, merged.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.07%) when pulling 1331583 on matthiasmullie:patch-2 into b14eb57 on ruflin:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants