Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unrecognized datatypes inside array in decorate method #29

Conversation

deadratfink
Copy link
Contributor

No description provided.

@deadratfink
Copy link
Contributor Author

Hi,

first thx for the nice module. I think I found an error when handling param values in the gitlab.rb.erb.
The current impl does not allow to process e.g. hashes which are handled in the decorate(v) method, for instance:

      gitlab_rails => {
...
          'omniauth_providers'                => [
              {
                  "name"  => "crowd",
                  "args"  => {
                      "crowd_server_url"     => "my_url",
                      "application_name"     => "Gitlab",
                      "application_password" => "my_passwd"
                  }
              }
          ],
...
      },

will result in:

gitlab_rails['omniauth_providers'] = ["{"name"=>"crowd", "args"=>{"crowd_server_url"=>"my_url", "application_name"=>"Gitlab", "application_password"=>"my_passwd"}}"]

which is incorrect and leads to an error in provision, it should be without the double quotes around the hash:

gitlab_rails['omniauth_providers'] = [{"name"=>"crowd", "args"=>{"crowd_server_url"=>"my_url", "application_name"=>"Gitlab", "application_password"=>"my_passwd"}}]

Best Regards
Jens

@tobru
Copy link
Contributor

tobru commented Sep 29, 2015

@deadratfink Thanks a lot for your PR. This is indeed an error inside the decorate function. Before I can merge your fix I would appreciate if you could fix the tests accordingly.

@deadratfink
Copy link
Contributor Author

Adapted test now, pls check, sorry for inconvenience :-)

tobru added a commit that referenced this pull request Sep 29, 2015
…es_inside_array_in_decorate_method

Fix unrecognized datatypes inside array in decorate method
@tobru tobru merged commit f7b7162 into voxpupuli:master Sep 29, 2015
@tobru
Copy link
Contributor

tobru commented Sep 29, 2015

@deadratfink thanks for fixing the test. looks good to me now.

@deadratfink deadratfink deleted the fix_unrecognized_datatypes_inside_array_in_decorate_method branch September 29, 2015 11:24
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.

2 participants