hammer_cli 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/doc/release_notes.md +7 -0
- data/lib/hammer_cli/apipie/option_builder.rb +3 -3
- data/lib/hammer_cli/i18n.rb +9 -0
- data/lib/hammer_cli/options/normalizers.rb +17 -6
- data/lib/hammer_cli/version.rb +1 -1
- data/locale/en/LC_MESSAGES/hammer-cli.mo +0 -0
- data/locale/en/hammer-cli.po +1 -1
- data/locale/en_GB/LC_MESSAGES/hammer-cli.mo +0 -0
- data/locale/en_GB/hammer-cli.po +26 -9
- data/locale/es/LC_MESSAGES/hammer-cli.mo +0 -0
- data/locale/es/hammer-cli.po +29 -12
- data/locale/fr/LC_MESSAGES/hammer-cli.mo +0 -0
- data/locale/fr/hammer-cli.po +28 -11
- data/locale/hammer-cli.pot +13 -13
- data/locale/zanata.xml +2 -3
- data/test/unit/fixtures/apipie/documented.json +2 -2
- data/test/unit/options/normalizers_test.rb +12 -0
- metadata +2 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: f291ac84923a7a842e1464948770660d9eda7bc9
         | 
| 4 | 
            +
              data.tar.gz: 593e26e92e365344b6b5e2f319266e7a842a10d6
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 8ecca4d5ca8efe937fa4194f807f555078b7c494fbf33c78b88dbd7cbdae2a21d41835d255e1bbebcfdba5fd9ebef01e9b3c55a678413c4ac41026ba188318c8
         | 
| 7 | 
            +
              data.tar.gz: 263225f32a3c48c8a4de9748436f3129ebca50f0d2ce3a41c25188c77370125e9c22766870e038a82ca9a2af490935aa95548226b34681fa3ee16f926817afae
         | 
    
        data/doc/release_notes.md
    CHANGED
    
    | @@ -1,6 +1,13 @@ | |
| 1 1 | 
             
            Release notes
         | 
| 2 2 | 
             
            =============
         | 
| 3 3 |  | 
| 4 | 
            +
            ### 0.1.3
         | 
| 5 | 
            +
            * Fixed detection of list type options  ([#7144](http://projects.theforeman.org/issues/7144))
         | 
| 6 | 
            +
            * Key-value normalizer accepts arrays ([#7133](http://projects.theforeman.org/issues/7133))
         | 
| 7 | 
            +
            * Make the zanata settings consistent ([#7111](http://projects.theforeman.org/issues/7111))
         | 
| 8 | 
            +
            * Adding system locale domain ([#7083](http://projects.theforeman.org/issues/7083))
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
| 4 11 | 
             
            ### 0.1.2
         | 
| 5 12 | 
             
            * Allow override of request options, e.g. :response => :raw
         | 
| 6 13 | 
             
            * Lazy loaded subcommands ([#6761](http://projects.theforeman.org/issues/6761))
         | 
| @@ -59,9 +59,9 @@ module HammerCLI::Apipie | |
| 59 59 | 
             
                def option_opts(param)
         | 
| 60 60 | 
             
                  opts = {}
         | 
| 61 61 | 
             
                  opts[:required] = true if (param.required? and require_options?)
         | 
| 62 | 
            -
                   | 
| 63 | 
            -
             | 
| 64 | 
            -
                   | 
| 62 | 
            +
                  if param.expected_type == :array || param.validator =~ /Array/i
         | 
| 63 | 
            +
                    opts[:format] = HammerCLI::Options::Normalizers::List.new
         | 
| 64 | 
            +
                  end
         | 
| 65 65 | 
             
                  opts[:attribute_name] = HammerCLI.option_accessor_name(param.name)
         | 
| 66 66 | 
             
                  return opts
         | 
| 67 67 | 
             
                end
         | 
    
        data/lib/hammer_cli/i18n.rb
    CHANGED
    
    | @@ -102,6 +102,14 @@ module HammerCLI | |
| 102 102 |  | 
| 103 103 | 
             
                end
         | 
| 104 104 |  | 
| 105 | 
            +
                class SystemLocaleDomain < LocaleDomain
         | 
| 106 | 
            +
             | 
| 107 | 
            +
                  def locale_dir
         | 
| 108 | 
            +
                    '/usr/share/locale'
         | 
| 109 | 
            +
                  end
         | 
| 110 | 
            +
             | 
| 111 | 
            +
                end
         | 
| 112 | 
            +
             | 
| 105 113 |  | 
| 106 114 | 
             
                def self.locale
         | 
| 107 115 | 
             
                  lang_variant = Locale.current.to_simple.to_str
         | 
| @@ -145,4 +153,5 @@ include FastGettext::Translation | |
| 145 153 | 
             
            include HammerCLI::I18n::AllDomains
         | 
| 146 154 |  | 
| 147 155 | 
             
            HammerCLI::I18n.add_domain(HammerCLI::I18n::LocaleDomain.new)
         | 
| 156 | 
            +
            HammerCLI::I18n.add_domain(HammerCLI::I18n::SystemLocaleDomain.new)
         | 
| 148 157 |  | 
| @@ -28,14 +28,25 @@ module HammerCLI | |
| 28 28 |  | 
| 29 29 | 
             
                    def format(val)
         | 
| 30 30 | 
             
                      return {} unless val.is_a?(String)
         | 
| 31 | 
            +
                      return {} if val.empty?
         | 
| 31 32 |  | 
| 32 | 
            -
                       | 
| 33 | 
            -
             | 
| 34 | 
            -
             | 
| 35 | 
            -
             | 
| 36 | 
            -
             | 
| 37 | 
            -
             | 
| 33 | 
            +
                      result = {}
         | 
| 34 | 
            +
             | 
| 35 | 
            +
                      pair_re = '([^,]+)=([^,\[]+|\[[^\[\]]*\])'
         | 
| 36 | 
            +
                      full_re = "^((%s)[,]?)+$" % pair_re
         | 
| 37 | 
            +
             | 
| 38 | 
            +
                      unless Regexp.new(full_re).match(val)
         | 
| 39 | 
            +
                        raise ArgumentError, _("value must be defined as a comma-separated list of key=value")
         | 
| 38 40 | 
             
                      end
         | 
| 41 | 
            +
             | 
| 42 | 
            +
                      val.scan(Regexp.new(pair_re)) do |key, value|
         | 
| 43 | 
            +
                        value = value.strip
         | 
| 44 | 
            +
                        value = value.scan(/[^,\[\]]+/) if value.start_with?('[')
         | 
| 45 | 
            +
             | 
| 46 | 
            +
                        result[key.strip]=value
         | 
| 47 | 
            +
                      end
         | 
| 48 | 
            +
                      return result
         | 
| 49 | 
            +
             | 
| 39 50 | 
             
                    end
         | 
| 40 51 | 
             
                  end
         | 
| 41 52 |  | 
    
        data/lib/hammer_cli/version.rb
    CHANGED
    
    
| Binary file | 
    
        data/locale/en/hammer-cli.po
    CHANGED
    
    
| Binary file | 
    
        data/locale/en_GB/hammer-cli.po
    CHANGED
    
    | @@ -5,10 +5,10 @@ | |
| 5 5 | 
             
            # Translators:
         | 
| 6 6 | 
             
            msgid ""
         | 
| 7 7 | 
             
            msgstr ""
         | 
| 8 | 
            -
            "Project-Id-Version: hammer-cli 0.1. | 
| 8 | 
            +
            "Project-Id-Version: hammer-cli 0.1.3\n"
         | 
| 9 9 | 
             
            "Report-Msgid-Bugs-To: \n"
         | 
| 10 | 
            -
            "POT-Creation-Date: 2014-08- | 
| 11 | 
            -
            "PO-Revision-Date: 2014-08- | 
| 10 | 
            +
            "POT-Creation-Date: 2014-08-13 16:09+0200\n"
         | 
| 11 | 
            +
            "PO-Revision-Date: 2014-08-14 09:42+0000\n"
         | 
| 12 12 | 
             
            "Last-Translator: Lukáš Zapletal\n"
         | 
| 13 13 | 
             
            "Language-Team: English (United Kingdom) (http://www.transifex.com/projects/p/foreman/language/en_GB/)\n"
         | 
| 14 14 | 
             
            "MIME-Version: 1.0\n"
         | 
| @@ -194,18 +194,29 @@ msgid "Error: %s" | |
| 194 194 | 
             
            msgstr ""
         | 
| 195 195 |  | 
| 196 196 | 
             
            #: lib/hammer_cli/exception_handler.rb:66
         | 
| 197 | 
            -
            msgid "Error: %{message} | 
| 197 | 
            +
            msgid "Error: %{message}"
         | 
| 198 198 | 
             
            msgstr ""
         | 
| 199 199 |  | 
| 200 | 
            -
            #: lib/hammer_cli/exception_handler.rb: | 
| 200 | 
            +
            #: lib/hammer_cli/exception_handler.rb:67
         | 
| 201 | 
            +
            msgid "See: '%{path} --help'"
         | 
| 202 | 
            +
            msgstr ""
         | 
| 203 | 
            +
             | 
| 204 | 
            +
            #: lib/hammer_cli/exception_handler.rb:84
         | 
| 201 205 | 
             
            msgid "Invalid username or password"
         | 
| 202 206 | 
             
            msgstr ""
         | 
| 203 207 |  | 
| 204 | 
            -
            #: lib/hammer_cli/exception_handler.rb: | 
| 208 | 
            +
            #: lib/hammer_cli/exception_handler.rb:91
         | 
| 209 | 
            +
            msgid "Could not load the API description from the server"
         | 
| 210 | 
            +
            msgstr ""
         | 
| 211 | 
            +
             | 
| 212 | 
            +
            #: lib/hammer_cli/exception_handler.rb:92
         | 
| 213 | 
            +
            msgid "is the server down?"
         | 
| 214 | 
            +
            msgstr ""
         | 
| 215 | 
            +
             | 
| 216 | 
            +
            #: lib/hammer_cli/exception_handler.rb:93
         | 
| 205 217 | 
             
            msgid ""
         | 
| 206 | 
            -
            " | 
| 207 | 
            -
            " | 
| 208 | 
            -
            "when using apipie cache? (typical production settings))\\n\""
         | 
| 218 | 
            +
            "was '%s' run on the server when using apipie cache? (typical production "
         | 
| 219 | 
            +
            "settings)"
         | 
| 209 220 | 
             
            msgstr ""
         | 
| 210 221 |  | 
| 211 222 | 
             
            #: lib/hammer_cli/validator.rb:41
         | 
| @@ -272,3 +283,9 @@ msgstr "" | |
| 272 283 | 
             
            #: lib/hammer_cli/shell.rb:138
         | 
| 273 284 | 
             
            msgid "Interactive shell"
         | 
| 274 285 | 
             
            msgstr ""
         | 
| 286 | 
            +
             | 
| 287 | 
            +
            #: lib/hammer_cli/subcommand.rb:56
         | 
| 288 | 
            +
            msgid ""
         | 
| 289 | 
            +
            "can't replace subcommand %<name>s (%<existing_class>s) with %<name>s "
         | 
| 290 | 
            +
            "(%<new_class>s)"
         | 
| 291 | 
            +
            msgstr ""
         | 
| Binary file | 
    
        data/locale/es/hammer-cli.po
    CHANGED
    
    | @@ -6,11 +6,11 @@ | |
| 6 6 | 
             
            # Sergio Ocón <sergio@redhat.com>, 2014
         | 
| 7 7 | 
             
            msgid ""
         | 
| 8 8 | 
             
            msgstr ""
         | 
| 9 | 
            -
            "Project-Id-Version: hammer-cli 0.1. | 
| 9 | 
            +
            "Project-Id-Version: hammer-cli 0.1.3\n"
         | 
| 10 10 | 
             
            "Report-Msgid-Bugs-To: \n"
         | 
| 11 | 
            -
            "POT-Creation-Date: 2014-08- | 
| 12 | 
            -
            "PO-Revision-Date: 2014-08- | 
| 13 | 
            -
            "Last-Translator:  | 
| 11 | 
            +
            "POT-Creation-Date: 2014-08-13 16:09+0200\n"
         | 
| 12 | 
            +
            "PO-Revision-Date: 2014-08-14 09:42+0000\n"
         | 
| 13 | 
            +
            "Last-Translator: Lukáš Zapletal\n"
         | 
| 14 14 | 
             
            "Language-Team: Spanish (http://www.transifex.com/projects/p/foreman/language/es/)\n"
         | 
| 15 15 | 
             
            "MIME-Version: 1.0\n"
         | 
| 16 16 | 
             
            "Content-Type: text/plain; charset=UTF-8\n"
         | 
| @@ -195,19 +195,30 @@ msgid "Error: %s" | |
| 195 195 | 
             
            msgstr "Error: %s"
         | 
| 196 196 |  | 
| 197 197 | 
             
            #: lib/hammer_cli/exception_handler.rb:66
         | 
| 198 | 
            -
            msgid "Error: %{message} | 
| 199 | 
            -
            msgstr " | 
| 198 | 
            +
            msgid "Error: %{message}"
         | 
| 199 | 
            +
            msgstr ""
         | 
| 200 | 
            +
             | 
| 201 | 
            +
            #: lib/hammer_cli/exception_handler.rb:67
         | 
| 202 | 
            +
            msgid "See: '%{path} --help'"
         | 
| 203 | 
            +
            msgstr ""
         | 
| 200 204 |  | 
| 201 | 
            -
            #: lib/hammer_cli/exception_handler.rb: | 
| 205 | 
            +
            #: lib/hammer_cli/exception_handler.rb:84
         | 
| 202 206 | 
             
            msgid "Invalid username or password"
         | 
| 203 207 | 
             
            msgstr "Nombre o password inválidos"
         | 
| 204 208 |  | 
| 205 | 
            -
            #: lib/hammer_cli/exception_handler.rb: | 
| 209 | 
            +
            #: lib/hammer_cli/exception_handler.rb:91
         | 
| 210 | 
            +
            msgid "Could not load the API description from the server"
         | 
| 211 | 
            +
            msgstr ""
         | 
| 212 | 
            +
             | 
| 213 | 
            +
            #: lib/hammer_cli/exception_handler.rb:92
         | 
| 214 | 
            +
            msgid "is the server down?"
         | 
| 215 | 
            +
            msgstr ""
         | 
| 216 | 
            +
             | 
| 217 | 
            +
            #: lib/hammer_cli/exception_handler.rb:93
         | 
| 206 218 | 
             
            msgid ""
         | 
| 207 | 
            -
            " | 
| 208 | 
            -
            " | 
| 209 | 
            -
             | 
| 210 | 
            -
            msgstr "No se pudo cargar la descripción de la API del servidor\\n - está caído=\\n\\\\n \" - se ejecutó \\\"#{rake_command}\\\" en el servidor mientras se usaba la cache apipie? (configuración típica en producción))\\n\""
         | 
| 219 | 
            +
            "was '%s' run on the server when using apipie cache? (typical production "
         | 
| 220 | 
            +
            "settings)"
         | 
| 221 | 
            +
            msgstr ""
         | 
| 211 222 |  | 
| 212 223 | 
             
            #: lib/hammer_cli/validator.rb:41
         | 
| 213 224 | 
             
            msgid "Unknown option name '%s'"
         | 
| @@ -273,3 +284,9 @@ msgstr "El completado de comandos está deshabilitado para ruby <1.9 debido a pr | |
| 273 284 | 
             
            #: lib/hammer_cli/shell.rb:138
         | 
| 274 285 | 
             
            msgid "Interactive shell"
         | 
| 275 286 | 
             
            msgstr "Shell interactivo"
         | 
| 287 | 
            +
             | 
| 288 | 
            +
            #: lib/hammer_cli/subcommand.rb:56
         | 
| 289 | 
            +
            msgid ""
         | 
| 290 | 
            +
            "can't replace subcommand %<name>s (%<existing_class>s) with %<name>s "
         | 
| 291 | 
            +
            "(%<new_class>s)"
         | 
| 292 | 
            +
            msgstr ""
         | 
| Binary file | 
    
        data/locale/fr/hammer-cli.po
    CHANGED
    
    | @@ -7,10 +7,10 @@ | |
| 7 7 | 
             
            # Pierre-Emmanuel Dutang <dutangp@gmail.com>, 2014
         | 
| 8 8 | 
             
            msgid ""
         | 
| 9 9 | 
             
            msgstr ""
         | 
| 10 | 
            -
            "Project-Id-Version: hammer-cli 0.1. | 
| 10 | 
            +
            "Project-Id-Version: hammer-cli 0.1.3\n"
         | 
| 11 11 | 
             
            "Report-Msgid-Bugs-To: \n"
         | 
| 12 | 
            -
            "POT-Creation-Date: 2014-08- | 
| 13 | 
            -
            "PO-Revision-Date: 2014-08- | 
| 12 | 
            +
            "POT-Creation-Date: 2014-08-13 16:09+0200\n"
         | 
| 13 | 
            +
            "PO-Revision-Date: 2014-08-19 12:01+0000\n"
         | 
| 14 14 | 
             
            "Last-Translator: Claer <transiblu@claer.hammock.fr>\n"
         | 
| 15 15 | 
             
            "Language-Team: French (http://www.transifex.com/projects/p/foreman/language/fr/)\n"
         | 
| 16 16 | 
             
            "MIME-Version: 1.0\n"
         | 
| @@ -196,19 +196,30 @@ msgid "Error: %s" | |
| 196 196 | 
             
            msgstr "Erreur : %s"
         | 
| 197 197 |  | 
| 198 198 | 
             
            #: lib/hammer_cli/exception_handler.rb:66
         | 
| 199 | 
            -
            msgid "Error: %{message} | 
| 200 | 
            -
            msgstr "Erreur : %{message} | 
| 199 | 
            +
            msgid "Error: %{message}"
         | 
| 200 | 
            +
            msgstr "Erreur : %{message}"
         | 
| 201 201 |  | 
| 202 | 
            -
            #: lib/hammer_cli/exception_handler.rb: | 
| 202 | 
            +
            #: lib/hammer_cli/exception_handler.rb:67
         | 
| 203 | 
            +
            msgid "See: '%{path} --help'"
         | 
| 204 | 
            +
            msgstr "Voir : '%{path} --help'"
         | 
| 205 | 
            +
             | 
| 206 | 
            +
            #: lib/hammer_cli/exception_handler.rb:84
         | 
| 203 207 | 
             
            msgid "Invalid username or password"
         | 
| 204 208 | 
             
            msgstr "Utilisateur ou mot de passe incorrect"
         | 
| 205 209 |  | 
| 206 | 
            -
            #: lib/hammer_cli/exception_handler.rb: | 
| 210 | 
            +
            #: lib/hammer_cli/exception_handler.rb:91
         | 
| 211 | 
            +
            msgid "Could not load the API description from the server"
         | 
| 212 | 
            +
            msgstr "Impossible de charger la description de l'API depuis le serveur"
         | 
| 213 | 
            +
             | 
| 214 | 
            +
            #: lib/hammer_cli/exception_handler.rb:92
         | 
| 215 | 
            +
            msgid "is the server down?"
         | 
| 216 | 
            +
            msgstr "Le serveur est-il éteint ?"
         | 
| 217 | 
            +
             | 
| 218 | 
            +
            #: lib/hammer_cli/exception_handler.rb:93
         | 
| 207 219 | 
             
            msgid ""
         | 
| 208 | 
            -
            " | 
| 209 | 
            -
            " | 
| 210 | 
            -
            " | 
| 211 | 
            -
            msgstr "Impossible de charger la description de l'API depuis le serveur\\n - serveur éteint ?\\n\\n \" - est ce que \\\"#{rake_command}\\\" est lancé sur le serveur en même temps que le cache apipie est actif ? (fonctionnement classique en production)\\n\""
         | 
| 220 | 
            +
            "was '%s' run on the server when using apipie cache? (typical production "
         | 
| 221 | 
            +
            "settings)"
         | 
| 222 | 
            +
            msgstr "Est ce que '%s' était lancé pendant que le cache apipie était en cours d'utilisation ? (état normal pour un serveur de production)"
         | 
| 212 223 |  | 
| 213 224 | 
             
            #: lib/hammer_cli/validator.rb:41
         | 
| 214 225 | 
             
            msgid "Unknown option name '%s'"
         | 
| @@ -274,3 +285,9 @@ msgstr "La complétion automatique est désactivée pour ruby < 1.9 à cause de | |
| 274 285 | 
             
            #: lib/hammer_cli/shell.rb:138
         | 
| 275 286 | 
             
            msgid "Interactive shell"
         | 
| 276 287 | 
             
            msgstr "Shell interactif"
         | 
| 288 | 
            +
             | 
| 289 | 
            +
            #: lib/hammer_cli/subcommand.rb:56
         | 
| 290 | 
            +
            msgid ""
         | 
| 291 | 
            +
            "can't replace subcommand %<name>s (%<existing_class>s) with %<name>s "
         | 
| 292 | 
            +
            "(%<new_class>s)"
         | 
| 293 | 
            +
            msgstr "impossible de remplacer la sous-commande %<name>s (%<existing_class>s) par %<name>s (%<new_class>s)"
         | 
    
        data/locale/hammer-cli.pot
    CHANGED
    
    | @@ -6,9 +6,9 @@ | |
| 6 6 | 
             
            #, fuzzy
         | 
| 7 7 | 
             
            msgid ""
         | 
| 8 8 | 
             
            msgstr ""
         | 
| 9 | 
            -
            "Project-Id-Version: hammer-cli 0.1. | 
| 9 | 
            +
            "Project-Id-Version: hammer-cli 0.1.3\n"
         | 
| 10 10 | 
             
            "Report-Msgid-Bugs-To: \n"
         | 
| 11 | 
            -
            "POT-Creation-Date: 2014-08-13 | 
| 11 | 
            +
            "POT-Creation-Date: 2014-08-20 13:02+0200\n"
         | 
| 12 12 | 
             
            "PO-Revision-Date: 2014-03-04 16:38+0000\n"
         | 
| 13 13 | 
             
            "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
         | 
| 14 14 | 
             
            "Language-Team: LANGUAGE <LL@li.org>\n"
         | 
| @@ -70,47 +70,47 @@ msgstr "" | |
| 70 70 | 
             
            msgid "Comma-separated list of key=value."
         | 
| 71 71 | 
             
            msgstr ""
         | 
| 72 72 |  | 
| 73 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 73 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:39
         | 
| 74 74 | 
             
            msgid "value must be defined as a comma-separated list of key=value"
         | 
| 75 75 | 
             
            msgstr ""
         | 
| 76 76 |  | 
| 77 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 77 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:57
         | 
| 78 78 | 
             
            msgid "Comma separated list of values."
         | 
| 79 79 | 
             
            msgstr ""
         | 
| 80 80 |  | 
| 81 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 81 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:69
         | 
| 82 82 | 
             
            msgid "One of true/false, yes/no, 1/0."
         | 
| 83 83 | 
             
            msgstr ""
         | 
| 84 84 |  | 
| 85 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 85 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:79
         | 
| 86 86 | 
             
            msgid "value must be one of true/false, yes/no, 1/0"
         | 
| 87 87 | 
             
            msgstr ""
         | 
| 88 88 |  | 
| 89 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 89 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:118
         | 
| 90 90 | 
             
            msgid "Unable to parse JSON input"
         | 
| 91 91 | 
             
            msgstr ""
         | 
| 92 92 |  | 
| 93 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 93 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:131
         | 
| 94 94 | 
             
            msgid "One of %s"
         | 
| 95 95 | 
             
            msgstr ""
         | 
| 96 96 |  | 
| 97 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 97 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:138
         | 
| 98 98 | 
             
            msgid "value must be one of '%s'"
         | 
| 99 99 | 
             
            msgstr ""
         | 
| 100 100 |  | 
| 101 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 101 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:157
         | 
| 102 102 | 
             
            msgid "Date and time in YYYY-MM-DD HH:MM:SS or ISO 8601 format"
         | 
| 103 103 | 
             
            msgstr ""
         | 
| 104 104 |  | 
| 105 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 105 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:164
         | 
| 106 106 | 
             
            msgid "'%s' is not a valid date"
         | 
| 107 107 | 
             
            msgstr ""
         | 
| 108 108 |  | 
| 109 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 109 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:175
         | 
| 110 110 | 
             
            msgid "Any combination (comma separated list) of '%s'"
         | 
| 111 111 | 
             
            msgstr ""
         | 
| 112 112 |  | 
| 113 | 
            -
            #: lib/hammer_cli/options/normalizers.rb: | 
| 113 | 
            +
            #: lib/hammer_cli/options/normalizers.rb:195
         | 
| 114 114 | 
             
            msgid "value must be a combination of '%s'"
         | 
| 115 115 | 
             
            msgstr ""
         | 
| 116 116 |  | 
    
        data/locale/zanata.xml
    CHANGED
    
    | @@ -17,9 +17,8 @@ | |
| 17 17 | 
             
                    <locale>te</locale>
         | 
| 18 18 | 
             
                    <locale>pa</locale>
         | 
| 19 19 | 
             
                    <locale>kn</locale>
         | 
| 20 | 
            -
                    <locale>de</locale>
         | 
| 21 | 
            -
                    <locale>es</locale>
         | 
| 22 | 
            -
                    <locale>gl</locale>
         | 
| 20 | 
            +
                    <locale map-from="de">de-DE</locale>
         | 
| 21 | 
            +
                    <locale map-from="es">es-ES</locale>
         | 
| 23 22 | 
             
                    <locale map-from="pt_BR">pt-BR</locale>
         | 
| 24 23 | 
             
                    <locale map-from="bn">bn-IN</locale>
         | 
| 25 24 | 
             
                    <locale map-from="ta">ta-IN</locale>
         | 
| @@ -54,7 +54,7 @@ | |
| 54 54 | 
             
                                            "allow_null": false,
         | 
| 55 55 | 
             
                                            "full_name": "organization_ids",
         | 
| 56 56 | 
             
                                            "validator": "Array of numbers",
         | 
| 57 | 
            -
                                            "expected_type": " | 
| 57 | 
            +
                                            "expected_type": "array",
         | 
| 58 58 | 
             
                                            "description": "",
         | 
| 59 59 | 
             
                                            "required": false
         | 
| 60 60 | 
             
                                        },
         | 
| @@ -107,7 +107,7 @@ | |
| 107 107 | 
             
                                                    "allow_null": false,
         | 
| 108 108 | 
             
                                                    "full_name": "documented[array_param]",
         | 
| 109 109 | 
             
                                                    "validator": "Must be Array",
         | 
| 110 | 
            -
                                                    "expected_type": " | 
| 110 | 
            +
                                                    "expected_type": "array",
         | 
| 111 111 | 
             
                                                    "description": "",
         | 
| 112 112 | 
             
                                                    "required": true
         | 
| 113 113 | 
             
                                                }
         | 
| @@ -56,6 +56,18 @@ describe HammerCLI::Options::Normalizers do | |
| 56 56 | 
             
                  formatter.format("a=1,b=2,c=3").must_equal({'a' => '1', 'b' => '2', 'c' => '3'})
         | 
| 57 57 | 
             
                end
         | 
| 58 58 |  | 
| 59 | 
            +
                it "should parse arrays" do
         | 
| 60 | 
            +
                  formatter.format("a=1,b=[1,2,3],c=3").must_equal({'a' => '1', 'b' => ['1', '2', '3'], 'c' => '3'})
         | 
| 61 | 
            +
                end
         | 
| 62 | 
            +
             | 
| 63 | 
            +
                it "should parse array with one item" do
         | 
| 64 | 
            +
                  formatter.format("a=1,b=[abc],c=3").must_equal({'a' => '1', 'b' => ['abc'], 'c' => '3'})
         | 
| 65 | 
            +
                end
         | 
| 66 | 
            +
             | 
| 67 | 
            +
                it "should parse empty array" do
         | 
| 68 | 
            +
                  formatter.format("a=1,b=[],c=3").must_equal({'a' => '1', 'b' => [], 'c' => '3'})
         | 
| 69 | 
            +
                end
         | 
| 70 | 
            +
             | 
| 59 71 | 
             
                it "should parse a comma separated string 2" do
         | 
| 60 72 | 
             
                  proc { formatter.format("a=1,b,c=3") }.must_raise ArgumentError
         | 
| 61 73 | 
             
                end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: hammer_cli
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.3
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Martin Bačovský
         | 
| @@ -9,7 +9,7 @@ authors: | |
| 9 9 | 
             
            autorequire: 
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2014-08- | 
| 12 | 
            +
            date: 2014-08-20 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: clamp
         | 
| @@ -645,4 +645,3 @@ test_files: | |
| 645 645 | 
             
            - test/unit/modules_test.rb
         | 
| 646 646 | 
             
            - test/unit/test_helper.rb
         | 
| 647 647 | 
             
            - test/unit/connection_test.rb
         | 
| 648 | 
            -
            has_rdoc: 
         |