Method needed to get rake command line options for spawning new rake job
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
Rechercherichtung
Beginne mit Rake.application und verfolge die Einstiegspunkte handle_options und standard_rake_options, um zu sehen, wie Befehlszeilenoptionen geparst und beibehalten werden. Prüfe, wie ein Rakefile der obersten Ebene den geparsten Wert lesen könnte, wenn es Jobs in Unterverzeichnissen startet. Als erledigt gilt die Aufgabe, wenn die geparsten Optionen über ein öffentliches application-Attribut verfügbar gemacht werden, ohne dass Aufrufer die Optionsanalyse duplizieren müssen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 2.5k
- Forks
- 650
- Ø Merge
- 6 Min.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus ruby/rake
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 68/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 28/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 45/100
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 38/100
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
-
バグ
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
voxpupuli/puppet-epel#186 · 1 Kommentar ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OffenBug Frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100