Everything becomes easy if you normalize the response for configured_dependent_repos. 
```ruby
      def configured_dependent_repos
        config['dependent_repos'].to_a
      end
```
that way you can remove this line and all other checks on the code