Method needed to get rake command line options for spawning new rake job
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Ruby
- Estrellas
- 2.5k
- Forks
- 650
- Merge medio
- 6 min
- PR fusionados (30 d)
- 3
Descripción
I am implementing a "top level" Rakefile that will spawn off rake jobs in sub-directories.
This is not hard to do, except that I want to pass the same options to the jobs that was passed to the original rake command. I cannot find a way to reliably find out what those options were without using some quasi private methods such as handle_options in the application object. I do not want the targets, just the options.
Could we add code to handle_options to put the options that are parsed into an array that is a public attribute of the application object?
Then I could grab the rake options by a simple use of something like:
Rake.application.rake_options
If there is some way to easily do this that I am missing please let me know. I originally was just iterating over the ARGV entries and grabbing things out of it, but quickly realized that the command line options may or may not have an argument following a "-" prefixed option and there is no way I can know that without duplicating all the code in standard_rake_options.
Thanks.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con Rake.application y sigue los puntos de entrada handle_options y standard_rake_options para ver cómo se analizan y conservan las opciones de la línea de comandos. Comprueba cómo un Rakefile de nivel superior podría leer el valor analizado al iniciar trabajos en subdirectorios. Se considera terminado cuando las opciones analizadas están expuestas mediante un atributo público application sin requerir que los llamadores dupliquen el análisis de opciones.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- ruby
- Área
- cli
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100