You could combine regexes:

```ruby
        case repository_type
          when /yum/i
            'yum'
          when /puppet/i
            'puppet'
          else
          raise "Unrecognized repository type '#{repository_type}'"
        end
```

Or to be more precise:

```ruby
        case repository_type
          when /[Yy]um/
            'yum'
          when /[Pp]uppet/
            'puppet'
          else
          raise "Unrecognized repository type '#{repository_type}'"
        end
```