Commit 8818b91
committed
Merge branch 'develop'
Merge details:
commit 85259b7
Author: Jelle Sebreghts <sebreghts.jelle@gmail.com>
Date: Tue Jul 2 16:29:40 2019
Refactoring to move away from monolithic RoboFile.
- Use the command builder
- Define task classes and traits
Why we use traits instead of command classes.
Command classes define a command. Each public method on a RoboFile (in
the root of the project) is also a command. Public methods can be
overridden by the RoboFile. Command classes cannot (at least not in a
reliable way, there's no way of telling robo which of the command
classes that define a command with the same name, is the actual command
you want to use).
I also introduced TraitDependencyCheckerTrait (not my proudest moment),
because traits cannot extend other traits, but some have overlapping
functionality, and, you know, DRY. This trait helps other traits define
dependencies (on yet some other traits) and checks if these
dependencies are met. Just add a method named
get[MyTraitClassName]Dependencies, and return an array of full trait
names (with namespace). If the class using this trait doesn't also use
every dependend trait, an exception will be thrown.
Also: Roave/BetterReflection#486File tree
28 files changed
+2452
-1403
lines changed- src
- Robo/Plugins/Tasks
- Traits
- Util
28 files changed
+2452
-1403
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
0 commit comments