firespring_dev_commands 1.3.0 → 1.4.0.pre.alpha.1
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/LICENSE +21 -21
- data/lib/firespring_dev_commands/templates/base_interface.rb +158 -0
- data/lib/firespring_dev_commands/templates/docker/application.rb +18 -10
- data/lib/firespring_dev_commands/templates/docker/default.rb +20 -41
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfbd9f0c516989ed9533d89c0ac479d8ba0721ee3be2c49e0804ca6fd0583a82
|
4
|
+
data.tar.gz: 9ba36433baabd374d4d213005996e71ef68e553a7351c191d7712cf182bc923f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c86e589fd697eaea43352ab91fabea539d6c1d5bed10319ef827f48abd9df0cc895c47c04b8738bf5b45d640ce3ab274de812d98ab6b0a43d5167bc75e261edd
|
7
|
+
data.tar.gz: 3de8999147a150a425588dacef3dd9947c7e60f45ca781858a707b9a87f152c92e1827bbde7237d5ec8c0157a1b875f448d79a93ed1e128fdbdf0188939d3601
|
data/LICENSE
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Copyright (c)
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
13
|
-
copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
-
SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Firespring
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -47,8 +47,166 @@ DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
50
|
+
# Create the base init_docker command
|
50
51
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
51
52
|
task init_docker: %w(init) do
|
52
53
|
LOG.debug 'In base init docker'
|
53
54
|
end
|
54
55
|
end
|
56
|
+
|
57
|
+
# Create the base hook commands
|
58
|
+
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
59
|
+
# Define an empty _pre_build_hooks handler which can be overridden by the user
|
60
|
+
task :_pre_build_hooks do
|
61
|
+
# The user may define custom _pre_build_hooks tasks to add any pre-build actions the build process
|
62
|
+
# Define this process in the appropriate namespace to add them only to a specific build
|
63
|
+
# In that case it is recommended that you call the base _pre_build_hooks as a dependency of that task
|
64
|
+
end
|
65
|
+
|
66
|
+
# Define an empty _post_build_hooks handler which can be overridden by the user
|
67
|
+
task :_post_build_hooks do
|
68
|
+
# The user may define custom _post_build_hooks tasks to add any post-build actions the build process
|
69
|
+
# Define this process in the appropriate namespace to add them only to a specific build
|
70
|
+
# In that case it is recommended that you call the base _post_build_hooks as a dependency of that task
|
71
|
+
end
|
72
|
+
|
73
|
+
# Define an empty _pre_up_hooks handler which can be overridden by the user
|
74
|
+
task :_pre_up_hooks do
|
75
|
+
# The user may define custom _pre_up_hooks tasks to add any pre-up actions the up process
|
76
|
+
# Define this process in the appropriate namespace to add them only to a specific up
|
77
|
+
# In that case it is recommended that you call the base _pre_up_hooks as a dependency of that task
|
78
|
+
end
|
79
|
+
|
80
|
+
# Define an empty _post_up_hooks handler which can be overridden by the user
|
81
|
+
task :_post_up_hooks do
|
82
|
+
# The user may define custom _post_up_hooks tasks to add any post-up actions the up process
|
83
|
+
# Define this process in the appropriate namespace to add them only to a specific up
|
84
|
+
# In that case it is recommended that you call the base _post_up_hooks as a dependency of that task
|
85
|
+
end
|
86
|
+
|
87
|
+
# Define an empty _pre_sh_hooks handler which can be overridden by the user
|
88
|
+
task :_pre_sh_hooks do
|
89
|
+
# The user may define custom _pre_sh_hooks tasks to add any pre-sh actions the sh process
|
90
|
+
# Define this process in the appropriate namespace to add them only to a specific sh
|
91
|
+
# In that case it is recommended that you call the base _pre_sh_hooks as a dependency of that task
|
92
|
+
end
|
93
|
+
|
94
|
+
# Define an empty _post_sh_hooks handler which can be overridden by the user
|
95
|
+
task :_post_sh_hooks do
|
96
|
+
# The user may define custom _post_sh_hooks tasks to add any post-sh actions the sh process
|
97
|
+
# Define this process in the appropriate namespace to add them only to a specific sh
|
98
|
+
# In that case it is recommended that you call the base _post_sh_hooks as a dependency of that task
|
99
|
+
end
|
100
|
+
|
101
|
+
# Define an empty _pre_logs_hooks handler which can be overridden by the user
|
102
|
+
task :_pre_logs_hooks do
|
103
|
+
# The user may define custom _pre_logs_hooks tasks to add any pre-logs actions the logs process
|
104
|
+
# Define this process in the appropriate namespace to add them only to a specific logs
|
105
|
+
# In that case it is recommended that you call the base _pre_logs_hooks as a dependency of that task
|
106
|
+
end
|
107
|
+
|
108
|
+
# Define an empty _post_logs_hooks handler which can be overridden by the user
|
109
|
+
task :_post_logs_hooks do
|
110
|
+
# The user may define custom _post_logs_hooks tasks to add any post-logs actions the logs process
|
111
|
+
# Define this process in the appropriate namespace to add them only to a specific logs
|
112
|
+
# In that case it is recommended that you call the base _post_logs_hooks as a dependency of that task
|
113
|
+
end
|
114
|
+
|
115
|
+
# Define an empty _pre_down_hooks handler which can be overridden by the user
|
116
|
+
task :_pre_down_hooks do
|
117
|
+
# The user may define custom _pre_logs_hooks tasks to add any pre-logs actions the logs process
|
118
|
+
# Define this process in the appropriate namespace to add them only to a specific logs
|
119
|
+
# In that case it is recommended that you call the base _pre_logs_hooks as a dependency of that task
|
120
|
+
end
|
121
|
+
|
122
|
+
# Define an empty _post_down_hooks handler which can be overridden by the user
|
123
|
+
task :_post_down_hooks do
|
124
|
+
# The user may define custom _post_down_hooks tasks to add any post-down actions the down process
|
125
|
+
# Define this process in the appropriate namespace to add them only to a specific down
|
126
|
+
# In that case it is recommended that you call the base _post_down_hooks as a dependency of that task
|
127
|
+
end
|
128
|
+
|
129
|
+
# Define an empty _pre_reload_hooks handler which can be overridden by the user
|
130
|
+
task :_pre_reload_hooks do
|
131
|
+
# The user may define custom _pre_reload_hooks tasks to add any pre-reload actions the reload process
|
132
|
+
# Define this process in the appropriate namespace to add them only to a specific reload
|
133
|
+
# In that case it is recommended that you call the base _pre_reload_hooks as a dependency of that task
|
134
|
+
end
|
135
|
+
|
136
|
+
# Define an empty _post_reload_hooks handler which can be overridden by the user
|
137
|
+
task :_post_reload_hooks do
|
138
|
+
# The user may define custom _post_reload_hooks tasks to add any post-reload actions the reload process
|
139
|
+
# Define this process in the appropriate namespace to add them only to a specific reload
|
140
|
+
# In that case it is recommended that you call the base _post_reload_hooks as a dependency of that task
|
141
|
+
end
|
142
|
+
|
143
|
+
# Define an empty _pre_clean_hooks handler which can be overridden by the user
|
144
|
+
task :_pre_clean_hooks do
|
145
|
+
# The user may define custom _pre_clean_hooks tasks to add any pre-clean actions the clean process
|
146
|
+
# Define this process in the appropriate namespace to add them only to a specific clean
|
147
|
+
# In that case it is recommended that you call the base _pre_clean_hooks as a dependency of that task
|
148
|
+
end
|
149
|
+
|
150
|
+
# Define an empty _post_clean_hooks handler which can be overridden by the user
|
151
|
+
task :_post_clean_hooks do
|
152
|
+
# The user may define custom _post_clean_hooks tasks to add any post-clean actions the clean process
|
153
|
+
# Define this process in the appropriate namespace to add them only to a specific clean
|
154
|
+
# In that case it is recommended that you call the base _post_clean_hooks as a dependency of that task
|
155
|
+
end
|
156
|
+
|
157
|
+
# Define an empty _pre_push_hooks handler which can be overridden by the user
|
158
|
+
task :_pre_push_hooks do
|
159
|
+
# The user may define custom _pre_push_hooks tasks to add any pre-push actions the push process
|
160
|
+
# Define this process in the appropriate namespace to add them only to a specific push
|
161
|
+
# In that case it is recommended that you call the base _pre_push_hooks as a dependency of that task
|
162
|
+
end
|
163
|
+
|
164
|
+
# Define an empty _post_push_hooks handler which can be overridden by the user
|
165
|
+
task :_post_push_hooks do
|
166
|
+
# The user may define custom _post_push_hooks tasks to add any post-push actions the push process
|
167
|
+
# Define this process in the appropriate namespace to add them only to a specific push
|
168
|
+
# In that case it is recommended that you call the base _post_push_hooks as a dependency of that task
|
169
|
+
end
|
170
|
+
|
171
|
+
# Define an empty _pre_pull_hooks handler which can be overridden by the user
|
172
|
+
task :_pre_pull_hooks do
|
173
|
+
# The user may define custom _pre_pull_hooks tasks to add any pre-pull actions the pull process
|
174
|
+
# Define this process in the appropriate namespace to add them only to a specific pull
|
175
|
+
# In that case it is recommended that you call the base _pre_pull_hooks as a dependency of that task
|
176
|
+
end
|
177
|
+
|
178
|
+
# Define an empty _post_pull_hooks handler which can be overridden by the user
|
179
|
+
task :_post_pull_hooks do
|
180
|
+
# The user may define custom _post_pull_hooks tasks to add any post-pull actions the pull process
|
181
|
+
# Define this process in the appropriate namespace to add them only to a specific pull
|
182
|
+
# In that case it is recommended that you call the base _post_pull_hooks as a dependency of that task
|
183
|
+
end
|
184
|
+
|
185
|
+
# Define an empty _pre_images_hooks handler which can be overridden by the user
|
186
|
+
task :_pre_images_hooks do
|
187
|
+
# The user may define custom _pre_images_hooks tasks to add any pre-images actions the images process
|
188
|
+
# Define this process in the appropriate namespace to add them only to a specific images
|
189
|
+
# In that case it is recommended that you call the base _pre_images_hooks as a dependency of that task
|
190
|
+
end
|
191
|
+
|
192
|
+
# Define an empty _post_images_hooks handler which can be overridden by the user
|
193
|
+
task :_post_images_hooks do
|
194
|
+
# The user may define custom _post_images_hooks tasks to add any post-images actions the images process
|
195
|
+
# Define this process in the appropriate namespace to add them only to a specific images
|
196
|
+
# In that case it is recommended that you call the base _post_images_hooks as a dependency of that task
|
197
|
+
end
|
198
|
+
|
199
|
+
# Define an empty _pre_ps_hooks handler which can be overridden by the user
|
200
|
+
task :_pre_ps_hooks do
|
201
|
+
# The user may define custom _pre_ps_hooks tasks to add any pre-ps actions the ps process
|
202
|
+
# Define this process in the appropriate namespace to add them only to a specific ps
|
203
|
+
# In that case it is recommended that you call the base _pre_ps_hooks as a dependency of that task
|
204
|
+
end
|
205
|
+
|
206
|
+
# Define an empty _post_ps_hooks handler which can be overridden by the user
|
207
|
+
task :_post_ps_hooks do
|
208
|
+
# The user may define custom _post_ps_hooks tasks to add any post-ps actions the ps process
|
209
|
+
# Define this process in the appropriate namespace to add them only to a specific ps
|
210
|
+
# In that case it is recommended that you call the base _post_ps_hooks as a dependency of that task
|
211
|
+
end
|
212
|
+
end
|
@@ -15,9 +15,10 @@ module Dev
|
|
15
15
|
return if exclude.include?(:build)
|
16
16
|
|
17
17
|
desc "Builds the #{application} container"
|
18
|
-
task build: %w(init_docker) do
|
18
|
+
task build: %w(init_docker _pre_build_hooks) do
|
19
19
|
LOG.debug "In #{application} build"
|
20
20
|
Dev::Docker::Compose.new(services: [application]).build
|
21
|
+
Rake::Task[:_post_build_hooks].execute
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
@@ -33,9 +34,10 @@ module Dev
|
|
33
34
|
return if exclude.include?(:up)
|
34
35
|
|
35
36
|
desc "Starts up the #{application} container and it's dependencies"
|
36
|
-
task up: %w(init_docker) do
|
37
|
+
task up: %w(init_docker _pre_up_hooks) do
|
37
38
|
LOG.debug "In #{application} up"
|
38
39
|
Dev::Docker::Compose.new(services: [application]).up
|
40
|
+
Rake::Task[:_post_up_hooks].execute
|
39
41
|
end
|
40
42
|
end
|
41
43
|
end
|
@@ -51,9 +53,10 @@ module Dev
|
|
51
53
|
return if exclude.include?(:up_no_deps)
|
52
54
|
|
53
55
|
desc "Starts up the #{application} container but no dependencies"
|
54
|
-
task up_no_deps: %w(init_docker) do
|
56
|
+
task up_no_deps: %w(init_docker _pre_up_hooks) do
|
55
57
|
LOG.debug "In #{application} up_no_deps"
|
56
58
|
Dev::Docker::Compose.new(services: [application], options: ['--no-deps']).up
|
59
|
+
Rake::Task[:_post_up_hooks].execute
|
57
60
|
end
|
58
61
|
end
|
59
62
|
end
|
@@ -69,8 +72,9 @@ module Dev
|
|
69
72
|
return if exclude.include?(:sh)
|
70
73
|
|
71
74
|
desc "Open a shell into a running #{application} container"
|
72
|
-
task sh: %W(init_docker #{application}:up) do
|
75
|
+
task sh: %W(init_docker #{application}:up _pre_sh_hooks) do
|
73
76
|
Dev::Docker::Compose.new(services: [application]).sh
|
77
|
+
Rake::Task[:_post_sh_hooks].execute
|
74
78
|
end
|
75
79
|
end
|
76
80
|
end
|
@@ -86,9 +90,10 @@ module Dev
|
|
86
90
|
return if exclude.include?(:logs)
|
87
91
|
|
88
92
|
desc "Shows logs for the #{application} container"
|
89
|
-
task logs: %w(init_docker) do
|
93
|
+
task logs: %w(init_docker _pre_logs_hooks) do
|
90
94
|
LOG.debug "In #{application} logs"
|
91
95
|
Dev::Docker::Compose.new(services: [application]).logs
|
96
|
+
Rake::Task[:_post_logs_hooks].execute
|
92
97
|
end
|
93
98
|
end
|
94
99
|
end
|
@@ -104,7 +109,7 @@ module Dev
|
|
104
109
|
return if exclude.include?(:down)
|
105
110
|
|
106
111
|
desc "Stops the #{application} container"
|
107
|
-
task down: %w(init_docker) do
|
112
|
+
task down: %w(init_docker _pre_down_hooks) do
|
108
113
|
LOG.debug "In #{application} down"
|
109
114
|
|
110
115
|
# docker-copmose down shuts down everything (you can't only specify a single service)
|
@@ -114,6 +119,7 @@ module Dev
|
|
114
119
|
Dev::Docker.new.prune_networks
|
115
120
|
Dev::Docker.new.prune_volumes if ENV['REMOVE_VOLUMES'].to_s.strip == 'true'
|
116
121
|
Dev::Docker.new.prune_images
|
122
|
+
Rake::Task[:_post_down_hooks].execute
|
117
123
|
end
|
118
124
|
end
|
119
125
|
end
|
@@ -129,8 +135,8 @@ module Dev
|
|
129
135
|
return if exclude.include?(:reload)
|
130
136
|
|
131
137
|
desc "Reloads the #{application} container"
|
132
|
-
task reload: %w(init_docker down up) do
|
133
|
-
|
138
|
+
task reload: %w(init_docker _pre_reload_hooks down up) do
|
139
|
+
Rake::Task[:_post_reload_hooks].execute
|
134
140
|
end
|
135
141
|
end
|
136
142
|
end
|
@@ -146,9 +152,10 @@ module Dev
|
|
146
152
|
return if exclude.include?(:push)
|
147
153
|
|
148
154
|
desc "Push the #{application} container to the configured image repository"
|
149
|
-
task push: %w(init_docker) do
|
155
|
+
task push: %w(init_docker _pre_push_hooks) do
|
150
156
|
LOG.debug "In #{application} push"
|
151
157
|
Dev::Docker::Compose.new(services: [application]).push
|
158
|
+
Rake::Task[:_post_push_hooks].execute
|
152
159
|
end
|
153
160
|
end
|
154
161
|
end
|
@@ -164,9 +171,10 @@ module Dev
|
|
164
171
|
return if exclude.include?(:pull)
|
165
172
|
|
166
173
|
desc "Pull the #{application} container from the configured image repository"
|
167
|
-
task pull: %w(init_docker) do
|
174
|
+
task pull: %w(init_docker _pre_pull_hooks) do
|
168
175
|
LOG.debug "In #{application} pull"
|
169
176
|
Dev::Docker::Compose.new(services: [application]).pull
|
177
|
+
Rake::Task[:_post_pull_hooks].execute
|
170
178
|
end
|
171
179
|
end
|
172
180
|
end
|
@@ -16,9 +16,10 @@ module Dev
|
|
16
16
|
desc 'Builds all images used by services in the compose files' \
|
17
17
|
"\n\toptionally specify NO_CACHE=true to not use build cache" \
|
18
18
|
"\n\toptionally specify PULL=true to force pulling new base images"
|
19
|
-
task build: %w(init_docker) do
|
19
|
+
task build: %w(init_docker _pre_build_hooks) do
|
20
20
|
LOG.debug('In base build')
|
21
21
|
Dev::Docker::Compose.new.build
|
22
|
+
Rake::Task[:_post_build_hooks].execute
|
22
23
|
end
|
23
24
|
end
|
24
25
|
end
|
@@ -32,9 +33,10 @@ module Dev
|
|
32
33
|
|
33
34
|
desc 'Starts containers for all services listed in the compose files' \
|
34
35
|
"\n\toptionally specify DETACHED=false to not detach from the started services"
|
35
|
-
task up: %w(init_docker) do
|
36
|
+
task up: %w(init_docker _pre_up_hooks) do
|
36
37
|
LOG.debug('In base up')
|
37
38
|
Dev::Docker::Compose.new.up
|
39
|
+
Rake::Task[:_post_up_hooks].execute
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
@@ -49,9 +51,10 @@ module Dev
|
|
49
51
|
desc 'Connects to the output stream of all running containers' \
|
50
52
|
"\n\toptionally specify NO_FOLLOW=true to print all current output and exit" \
|
51
53
|
"\n\toptionally specify TAIL=n to print the last 'n' lines of output"
|
52
|
-
task logs: %w(init_docker) do
|
54
|
+
task logs: %w(init_docker _pre_logs_hooks) do
|
53
55
|
LOG.debug('In base logs')
|
54
56
|
Dev::Docker::Compose.new.logs
|
57
|
+
Rake::Task[:_post_logs_hooks].execute
|
55
58
|
end
|
56
59
|
end
|
57
60
|
end
|
@@ -65,9 +68,10 @@ module Dev
|
|
65
68
|
|
66
69
|
desc 'Stops and removes containers and associated resources' \
|
67
70
|
"\n\toptionally specify REMOVE_VOLUMES=true to also remove unused volumes"
|
68
|
-
task down: %w(init_docker) do
|
71
|
+
task down: %w(init_docker _pre_down_hooks) do
|
69
72
|
LOG.debug('In base down')
|
70
73
|
Dev::Docker::Compose.new.down
|
74
|
+
Rake::Task[:_post_down_hooks].execute
|
71
75
|
end
|
72
76
|
end
|
73
77
|
end
|
@@ -80,8 +84,8 @@ module Dev
|
|
80
84
|
return if exclude.include?(:reload)
|
81
85
|
|
82
86
|
desc 'Runs a "down" followed by an "up"'
|
83
|
-
task reload: %w(down up) do
|
84
|
-
|
87
|
+
task reload: %w(_pre_reload_hooks down up) do
|
88
|
+
Rake::Task[:_post_reload_hooks].execute
|
85
89
|
end
|
86
90
|
end
|
87
91
|
end
|
@@ -94,10 +98,11 @@ module Dev
|
|
94
98
|
return if exclude.include?(:clean)
|
95
99
|
|
96
100
|
desc 'Removes all stopped containers and unused images, volumes, and networks'
|
97
|
-
task clean: %w(init_docker) do
|
101
|
+
task clean: %w(init_docker _pre_clean_hooks) do
|
98
102
|
LOG.debug 'In base clean'
|
99
103
|
Dev::Docker.new.prune
|
100
104
|
LOG.info
|
105
|
+
Rake::Task[:_post_clean_hooks].execute
|
101
106
|
end
|
102
107
|
task prune: [:clean] do
|
103
108
|
# This is an alias to the clean command
|
@@ -113,9 +118,10 @@ module Dev
|
|
113
118
|
return if exclude.include?(:push)
|
114
119
|
|
115
120
|
desc 'Push all local images to their defined image repository'
|
116
|
-
task push: %w(init_docker) do
|
121
|
+
task push: %w(init_docker _pre_push_hooks) do
|
117
122
|
LOG.debug 'In base push'
|
118
123
|
Dev::Docker::Compose.new.push
|
124
|
+
Rake::Task[:_post_push_hooks].execute
|
119
125
|
end
|
120
126
|
end
|
121
127
|
end
|
@@ -128,9 +134,10 @@ module Dev
|
|
128
134
|
return if exclude.include?(:pull)
|
129
135
|
|
130
136
|
desc 'Pull all images from their defined image repository'
|
131
|
-
task pull: %w(init_docker) do
|
137
|
+
task pull: %w(init_docker _pre_pull_hooks) do
|
132
138
|
LOG.debug 'In base pull'
|
133
139
|
Dev::Docker::Compose.new.pull
|
140
|
+
Rake::Task[:_post_pull_hooks].execute
|
134
141
|
end
|
135
142
|
end
|
136
143
|
end
|
@@ -144,8 +151,9 @@ module Dev
|
|
144
151
|
|
145
152
|
desc 'Print a table of all images' \
|
146
153
|
"\n\t(equivalent to docker images)"
|
147
|
-
task images: %w(init_docker) do
|
154
|
+
task images: %w(init_docker _pre_images_hooks) do
|
148
155
|
Dev::Docker.new.print_images
|
156
|
+
Rake::Task[:_post_images_hooks].execute
|
149
157
|
end
|
150
158
|
end
|
151
159
|
end
|
@@ -159,38 +167,9 @@ module Dev
|
|
159
167
|
|
160
168
|
desc 'Print a table of all running containers' \
|
161
169
|
"\n\t(equivalent to docker ps)"
|
162
|
-
task ps: %w(init_docker) do
|
170
|
+
task ps: %w(init_docker _pre_ps_hooks) do
|
163
171
|
Dev::Docker.new.print_containers
|
164
|
-
|
165
|
-
end
|
166
|
-
end
|
167
|
-
|
168
|
-
# Create the rake task which shows all docker images on the system
|
169
|
-
def create_images_task!
|
170
|
-
exclude = @exclude
|
171
|
-
|
172
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
173
|
-
unless exclude.include?(:images)
|
174
|
-
desc 'Print a table of all images' \
|
175
|
-
"\n\t(equivalent to docker images)"
|
176
|
-
task images: [:init] do
|
177
|
-
Dev::Docker.new.print_images
|
178
|
-
end
|
179
|
-
end
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
# Create the rake task which shows all docker containers on the system
|
184
|
-
def create_ps_task!
|
185
|
-
exclude = @exclude
|
186
|
-
|
187
|
-
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
188
|
-
unless exclude.include?(:ps)
|
189
|
-
desc 'Print a table of all running containers' \
|
190
|
-
"\n\t(equivalent to docker ps)"
|
191
|
-
task ps: [:init] do
|
192
|
-
Dev::Docker.new.print_containers
|
193
|
-
end
|
172
|
+
Rake::Task[:_post_ps_hooks].execute
|
194
173
|
end
|
195
174
|
end
|
196
175
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firespring_dev_commands
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0.pre.alpha.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -262,6 +262,20 @@ dependencies:
|
|
262
262
|
- - "~>"
|
263
263
|
- !ruby/object:Gem::Version
|
264
264
|
version: 0.9.0
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: launchy
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 2.5.2
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - "~>"
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 2.5.2
|
265
279
|
- !ruby/object:Gem::Dependency
|
266
280
|
name: rake
|
267
281
|
requirement: !ruby/object:Gem::Requirement
|
@@ -425,9 +439,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
425
439
|
version: '2.7'
|
426
440
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
427
441
|
requirements:
|
428
|
-
- - "
|
442
|
+
- - ">"
|
429
443
|
- !ruby/object:Gem::Version
|
430
|
-
version:
|
444
|
+
version: 1.3.1
|
431
445
|
requirements: []
|
432
446
|
rubygems_version: 3.1.6
|
433
447
|
signing_key:
|