run_tasks 3.2.1 → 3.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/CHEATSHEET.md +31 -25
  3. data/src/bootstrap.rb +1 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d9a68d0e13118096e666e14fe7d9017555028b5fb3aa03501b2f818fa459528c
4
- data.tar.gz: 548eb3281cadebf9282dcecbe7336916b2026751cfa1fee1294e3cd709160b43
3
+ metadata.gz: d9e8f32ee31f48e5f7d451f2b956faac1881b4a1a20b40de21eb02a32831a7ad
4
+ data.tar.gz: dd121f1d5f725e9497fe05a3b04423415f65c1621f53ba9f59a9c453b4569c7e
5
5
  SHA512:
6
- metadata.gz: 40c8dcc4c1a5521202b367e56da1afa60e5da97acddfdd516a5ebce791471b8092161d7e44c9550be80bc80326671d4466f33e080f134735479fa08c67d83204
7
- data.tar.gz: a88efe99f700e0bf1bf70e79c12a494afa411f1a3429ce7aaf330ba2f8dadc78e98c12ad1df82d08551ef668b8a51ec1b5ee180c499d9b881166dd8cc2fc9828
6
+ metadata.gz: fe92ecc38071af0a6b80ed2e98288c308a6c191dd95a5610f6039672f5a4f25ae61d6dc3b5cceb0b78e1bae30f61f9f9f00848cadc15b061b909403dd14fc809
7
+ data.tar.gz: d022b3de66d9d7642b76ec7a852dc427e4ca67244f1fbc0cca5d9d0449bd4d5f6c8331892a6dcbad37b708239c0a406bbd84078023f3bd82c15a4a9ad2be2d0c
data/CHEATSHEET.md CHANGED
@@ -1,20 +1,18 @@
1
- # Run cheatsheet
2
-
3
- ## Defining a task
1
+ # Defining a task
4
2
 
5
3
  ```rb
6
4
  task :eslint do
7
5
  end
8
6
  ```
9
7
 
10
- ## Defining a task with aliases
8
+ # Defining a task with aliases
11
9
 
12
10
  ```rb
13
11
  task [:console, :c] do
14
12
  end
15
13
  ```
16
14
 
17
- ## Defining a task with parameters
15
+ # Defining a task with parameters
18
16
 
19
17
  ```rb
20
18
  task :hello do |name, age|
@@ -22,7 +20,7 @@ task :hello do |name, age|
22
20
  end
23
21
  ```
24
22
 
25
- ## Running commands
23
+ # Running commands
26
24
 
27
25
  ```rb
28
26
  task :clear_all do
@@ -30,7 +28,7 @@ task :clear_all do
30
28
  end
31
29
  ```
32
30
 
33
- ## Running subtasks
31
+ # Running subtasks
34
32
 
35
33
  ```rb
36
34
  task :linting do
@@ -39,7 +37,7 @@ task :linting do
39
37
  end
40
38
  ```
41
39
 
42
- ## Running a task/command in quiet mode
40
+ # Running a task/command in quiet mode
43
41
 
44
42
  ```rb
45
43
  task :clear_cache do
@@ -47,7 +45,7 @@ task :clear_cache do
47
45
  end
48
46
  ```
49
47
 
50
- ## Using named booleans
48
+ # Using named booleans
51
49
 
52
50
  ```sh
53
51
  run server +tunnel
@@ -59,9 +57,9 @@ task :server do |tunnel: false|
59
57
  end
60
58
  ```
61
59
 
62
- ## Helpers
60
+ # Helpers
63
61
 
64
- ### are_you_sure
62
+ ## are_you_sure
65
63
 
66
64
  ```rb
67
65
  task :dangerous_task do
@@ -70,13 +68,9 @@ task :dangerous_task do
70
68
  end
71
69
  ```
72
70
 
73
- ### bind
71
+ ## bind
74
72
 
75
73
  ```rb
76
- task :dev do
77
- bind :rails, :vite
78
- end
79
-
80
74
  task :rails do
81
75
  run "bundle exec unicorn -c config/unicorn.rb -p 3000"
82
76
  end
@@ -84,9 +78,21 @@ end
84
78
  task :vite do
85
79
  run "bin/vite dev"
86
80
  end
81
+
82
+ task :dev do
83
+ # Bind `rails` and `vite` tasks together, if one closes, the other terminates too.
84
+ bind :rails, :vite
85
+ end
86
+ ```
87
+
88
+ ```rb
89
+ task :dev do
90
+ # Plug STDIN to the `rails` task.
91
+ bind :rails, :vite, stdin: :rails
92
+ end
87
93
  ```
88
94
 
89
- ### catch_interruption
95
+ ## catch_interruption
90
96
 
91
97
  ```rb
92
98
  task :server do
@@ -96,7 +102,7 @@ task :server do
96
102
  end
97
103
  ```
98
104
 
99
- ### exists
105
+ ## exists
100
106
 
101
107
  ```rb
102
108
  task :man do
@@ -105,7 +111,7 @@ task :man do
105
111
  end
106
112
  ```
107
113
 
108
- ### expand
114
+ ## expand
109
115
 
110
116
  ```rb
111
117
  task :scan do |glob|
@@ -115,7 +121,7 @@ task :scan do |glob|
115
121
  end
116
122
  ```
117
123
 
118
- ### menu
124
+ ## menu
119
125
 
120
126
  ```rb
121
127
  task :deploy_aws do
@@ -133,7 +139,7 @@ task :deploy_aws do
133
139
  end
134
140
  ```
135
141
 
136
- ### pause
142
+ ## pause
137
143
 
138
144
  ```rb
139
145
  task :deploy do
@@ -143,7 +149,7 @@ task :deploy do
143
149
  end
144
150
  ```
145
151
 
146
- ### question
152
+ ## question
147
153
 
148
154
  ```rb
149
155
  task :survey do
@@ -157,7 +163,7 @@ task :age do
157
163
  end
158
164
  ```
159
165
 
160
- ### wait_for_interruption
166
+ ## wait_for_interruption
161
167
 
162
168
  ```rb
163
169
  task :server do
@@ -174,7 +180,7 @@ task :server do
174
180
  end
175
181
  ```
176
182
 
177
- ## Colorization
183
+ # Colorization
178
184
 
179
185
  ```rb
180
186
  puts "hello".bold
@@ -205,7 +211,7 @@ puts "hello".bright_white
205
211
  puts "hello".green.bold.italic
206
212
  ```
207
213
 
208
- ## Advanced usage
214
+ # Advanced usage
209
215
 
210
216
  ```sh
211
217
  RUNFILE=/path/to/Runfile.rb run my_task
data/src/bootstrap.rb CHANGED
@@ -79,8 +79,7 @@ end
79
79
 
80
80
  # Display the manual.
81
81
  task :man do
82
- command = exists("bat") ? "bat" : "cat"
83
- run "#{command} #{__dir__}/../CHEATSHEET.md"
82
+ puts Markdown::Engine.new(File.read("#{__dir__}/../CHEATSHEET.md")).to_ansi
84
83
  end
85
84
 
86
85
  # Expose helpers.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: run_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.1
4
+ version: 3.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aurélien Delogu