firespring_dev_commands 1.3.0 → 1.4.0.pre.alpha.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6f07bb537b2a77642593e6f28ad14791810c0395b56eb73b7dfe062f414491c
4
- data.tar.gz: 6fd0bb605fb7fa4fe17f5baf565003a960479774b0f0d83a4c5c3b6cf1ceacd9
3
+ metadata.gz: d2ec7f66ba027cbcf0eb5dad2b07cc309a7871131c33635c7b1dc8c31a1e99bc
4
+ data.tar.gz: 29b232ed437a4164fb5e979277aef795b2ccba8fda3a56f4a880eb5c705eb597
5
5
  SHA512:
6
- metadata.gz: a8f58eca8af848da446bd775e0fb7a329cf94188abe44ae6a6ce4b7f074cf09a6d7a8598bbd4a8e1cdd69031dae586380d543f28b398821c5f63ac4c53fbe13d
7
- data.tar.gz: 2edd0e114d231fbc3019d4c4235a51629df99e91dcd49c4ca4b0d03ee40cbf7ee8d2639670e4f5613f0027cfdb89b6b3ad204cd5856e9896099381fbbad2b2d7
6
+ metadata.gz: '0332855a40f32659bce79e1d0caf0d11a9915f42a685bddf5baab2881f1b40c637aabefba6feddaa9f914200e12e1cc230ba3582cb486c02e4b4bd08ac273f2c'
7
+ data.tar.gz: e4d7851de55cbd84f62f2b365eff66151c0e9fa95656741240af9e1fbc90c40f57efdbf0f1b2a6a82bfb624395525ed307fd60642dacfa3664e8aaa8e2968159
data/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2022 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.
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.
@@ -7,6 +7,8 @@ module Dev
7
7
  class BaseInterface
8
8
  include ::Rake::DSL
9
9
 
10
+ attr_reader :exclude
11
+
10
12
  def initialize(exclude: [])
11
13
  @exclude = Array(exclude).map(&:to_sym)
12
14
  create_tasks!
@@ -32,6 +34,8 @@ module Dev
32
34
  class ApplicationInterface < Dev::Template::BaseInterface
33
35
  include ::Rake::DSL
34
36
 
37
+ attr_reader :name
38
+
35
39
  def initialize(name, exclude: [])
36
40
  @name = name
37
41
  super(exclude: exclude)
@@ -47,8 +51,166 @@ DEV_COMMANDS_TOP_LEVEL.instance_eval do
47
51
  end
48
52
  end
49
53
 
54
+ # Create the base init_docker command
50
55
  DEV_COMMANDS_TOP_LEVEL.instance_eval do
51
56
  task init_docker: %w(init) do
52
57
  LOG.debug 'In base init docker'
53
58
  end
54
59
  end
60
+
61
+ # Create the base hook commands
62
+ DEV_COMMANDS_TOP_LEVEL.instance_eval do
63
+ # Define an empty _pre_build_hooks handler which can be overridden by the user
64
+ task :_pre_build_hooks do
65
+ # The user may define custom _pre_build_hooks tasks to add any pre-build actions the build process
66
+ # Define this process in the appropriate namespace to add them only to a specific build
67
+ # In that case it is recommended that you call the base _pre_build_hooks as a dependency of that task
68
+ end
69
+
70
+ # Define an empty _post_build_hooks handler which can be overridden by the user
71
+ task :_post_build_hooks do
72
+ # The user may define custom _post_build_hooks tasks to add any post-build actions the build process
73
+ # Define this process in the appropriate namespace to add them only to a specific build
74
+ # In that case it is recommended that you call the base _post_build_hooks as a dependency of that task
75
+ end
76
+
77
+ # Define an empty _pre_up_hooks handler which can be overridden by the user
78
+ task :_pre_up_hooks do
79
+ # The user may define custom _pre_up_hooks tasks to add any pre-up actions the up process
80
+ # Define this process in the appropriate namespace to add them only to a specific up
81
+ # In that case it is recommended that you call the base _pre_up_hooks as a dependency of that task
82
+ end
83
+
84
+ # Define an empty _post_up_hooks handler which can be overridden by the user
85
+ task :_post_up_hooks do
86
+ # The user may define custom _post_up_hooks tasks to add any post-up actions the up process
87
+ # Define this process in the appropriate namespace to add them only to a specific up
88
+ # In that case it is recommended that you call the base _post_up_hooks as a dependency of that task
89
+ end
90
+
91
+ # Define an empty _pre_sh_hooks handler which can be overridden by the user
92
+ task :_pre_sh_hooks do
93
+ # The user may define custom _pre_sh_hooks tasks to add any pre-sh actions the sh process
94
+ # Define this process in the appropriate namespace to add them only to a specific sh
95
+ # In that case it is recommended that you call the base _pre_sh_hooks as a dependency of that task
96
+ end
97
+
98
+ # Define an empty _post_sh_hooks handler which can be overridden by the user
99
+ task :_post_sh_hooks do
100
+ # The user may define custom _post_sh_hooks tasks to add any post-sh actions the sh process
101
+ # Define this process in the appropriate namespace to add them only to a specific sh
102
+ # In that case it is recommended that you call the base _post_sh_hooks as a dependency of that task
103
+ end
104
+
105
+ # Define an empty _pre_logs_hooks handler which can be overridden by the user
106
+ task :_pre_logs_hooks do
107
+ # The user may define custom _pre_logs_hooks tasks to add any pre-logs actions the logs process
108
+ # Define this process in the appropriate namespace to add them only to a specific logs
109
+ # In that case it is recommended that you call the base _pre_logs_hooks as a dependency of that task
110
+ end
111
+
112
+ # Define an empty _post_logs_hooks handler which can be overridden by the user
113
+ task :_post_logs_hooks do
114
+ # The user may define custom _post_logs_hooks tasks to add any post-logs actions the logs process
115
+ # Define this process in the appropriate namespace to add them only to a specific logs
116
+ # In that case it is recommended that you call the base _post_logs_hooks as a dependency of that task
117
+ end
118
+
119
+ # Define an empty _pre_down_hooks handler which can be overridden by the user
120
+ task :_pre_down_hooks do
121
+ # The user may define custom _pre_logs_hooks tasks to add any pre-logs actions the logs process
122
+ # Define this process in the appropriate namespace to add them only to a specific logs
123
+ # In that case it is recommended that you call the base _pre_logs_hooks as a dependency of that task
124
+ end
125
+
126
+ # Define an empty _post_down_hooks handler which can be overridden by the user
127
+ task :_post_down_hooks do
128
+ # The user may define custom _post_down_hooks tasks to add any post-down actions the down process
129
+ # Define this process in the appropriate namespace to add them only to a specific down
130
+ # In that case it is recommended that you call the base _post_down_hooks as a dependency of that task
131
+ end
132
+
133
+ # Define an empty _pre_reload_hooks handler which can be overridden by the user
134
+ task :_pre_reload_hooks do
135
+ # The user may define custom _pre_reload_hooks tasks to add any pre-reload actions the reload process
136
+ # Define this process in the appropriate namespace to add them only to a specific reload
137
+ # In that case it is recommended that you call the base _pre_reload_hooks as a dependency of that task
138
+ end
139
+
140
+ # Define an empty _post_reload_hooks handler which can be overridden by the user
141
+ task :_post_reload_hooks do
142
+ # The user may define custom _post_reload_hooks tasks to add any post-reload actions the reload process
143
+ # Define this process in the appropriate namespace to add them only to a specific reload
144
+ # In that case it is recommended that you call the base _post_reload_hooks as a dependency of that task
145
+ end
146
+
147
+ # Define an empty _pre_clean_hooks handler which can be overridden by the user
148
+ task :_pre_clean_hooks do
149
+ # The user may define custom _pre_clean_hooks tasks to add any pre-clean actions the clean process
150
+ # Define this process in the appropriate namespace to add them only to a specific clean
151
+ # In that case it is recommended that you call the base _pre_clean_hooks as a dependency of that task
152
+ end
153
+
154
+ # Define an empty _post_clean_hooks handler which can be overridden by the user
155
+ task :_post_clean_hooks do
156
+ # The user may define custom _post_clean_hooks tasks to add any post-clean actions the clean process
157
+ # Define this process in the appropriate namespace to add them only to a specific clean
158
+ # In that case it is recommended that you call the base _post_clean_hooks as a dependency of that task
159
+ end
160
+
161
+ # Define an empty _pre_push_hooks handler which can be overridden by the user
162
+ task :_pre_push_hooks do
163
+ # The user may define custom _pre_push_hooks tasks to add any pre-push actions the push process
164
+ # Define this process in the appropriate namespace to add them only to a specific push
165
+ # In that case it is recommended that you call the base _pre_push_hooks as a dependency of that task
166
+ end
167
+
168
+ # Define an empty _post_push_hooks handler which can be overridden by the user
169
+ task :_post_push_hooks do
170
+ # The user may define custom _post_push_hooks tasks to add any post-push actions the push process
171
+ # Define this process in the appropriate namespace to add them only to a specific push
172
+ # In that case it is recommended that you call the base _post_push_hooks as a dependency of that task
173
+ end
174
+
175
+ # Define an empty _pre_pull_hooks handler which can be overridden by the user
176
+ task :_pre_pull_hooks do
177
+ # The user may define custom _pre_pull_hooks tasks to add any pre-pull actions the pull process
178
+ # Define this process in the appropriate namespace to add them only to a specific pull
179
+ # In that case it is recommended that you call the base _pre_pull_hooks as a dependency of that task
180
+ end
181
+
182
+ # Define an empty _post_pull_hooks handler which can be overridden by the user
183
+ task :_post_pull_hooks do
184
+ # The user may define custom _post_pull_hooks tasks to add any post-pull actions the pull process
185
+ # Define this process in the appropriate namespace to add them only to a specific pull
186
+ # In that case it is recommended that you call the base _post_pull_hooks as a dependency of that task
187
+ end
188
+
189
+ # Define an empty _pre_images_hooks handler which can be overridden by the user
190
+ task :_pre_images_hooks do
191
+ # The user may define custom _pre_images_hooks tasks to add any pre-images actions the images process
192
+ # Define this process in the appropriate namespace to add them only to a specific images
193
+ # In that case it is recommended that you call the base _pre_images_hooks as a dependency of that task
194
+ end
195
+
196
+ # Define an empty _post_images_hooks handler which can be overridden by the user
197
+ task :_post_images_hooks do
198
+ # The user may define custom _post_images_hooks tasks to add any post-images actions the images process
199
+ # Define this process in the appropriate namespace to add them only to a specific images
200
+ # In that case it is recommended that you call the base _post_images_hooks as a dependency of that task
201
+ end
202
+
203
+ # Define an empty _pre_ps_hooks handler which can be overridden by the user
204
+ task :_pre_ps_hooks do
205
+ # The user may define custom _pre_ps_hooks tasks to add any pre-ps actions the ps process
206
+ # Define this process in the appropriate namespace to add them only to a specific ps
207
+ # In that case it is recommended that you call the base _pre_ps_hooks as a dependency of that task
208
+ end
209
+
210
+ # Define an empty _post_ps_hooks handler which can be overridden by the user
211
+ task :_post_ps_hooks do
212
+ # The user may define custom _post_ps_hooks tasks to add any post-ps actions the ps process
213
+ # Define this process in the appropriate namespace to add them only to a specific ps
214
+ # In that case it is recommended that you call the base _post_ps_hooks as a dependency of that task
215
+ end
216
+ end
@@ -5,6 +5,8 @@ module Dev
5
5
  class Aws
6
6
  # Class contains rake templates for managing your ci/cd resources
7
7
  class Ci < Dev::Template::BaseInterface
8
+ attr_reader :cloudformation
9
+
8
10
  # Base interface template customized for codepipelines which require a pipeline pattern which will match the pipeline name
9
11
  def initialize(cloudformation, exclude: [])
10
12
  @cloudformations = Array(cloudformation).sort_by(&:name)
@@ -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
- # Run the down and then the up commands
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
- LOG.debug('In reload')
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
- end
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
@@ -7,6 +7,8 @@ module Dev
7
7
  module Node
8
8
  # Class for default rake tasks associated with a node project
9
9
  class Application < Dev::Template::ApplicationInterface
10
+ attr_reader :node
11
+
10
12
  # Allow for custom container path for the application
11
13
  def initialize(application, container_path: nil, local_path: nil, exclude: [])
12
14
  @node = Dev::Node.new(container_path: container_path, local_path: local_path)
@@ -7,6 +7,8 @@ module Dev
7
7
  module Php
8
8
  # Class for default rake tasks associated with a php project
9
9
  class Application < Dev::Template::ApplicationInterface
10
+ attr_reader :php
11
+
10
12
  # Allow for custom container path for the application
11
13
  def initialize(application, container_path: nil, local_path: nil, exclude: [])
12
14
  @php = Dev::Php.new(container_path: container_path, local_path: local_path)
@@ -7,6 +7,8 @@ module Dev
7
7
  module Ruby
8
8
  # Class for default rake tasks associated with a ruby project
9
9
  class Application < Dev::Template::ApplicationInterface
10
+ attr_reader :ruby
11
+
10
12
  # Allow for custom container path for the application
11
13
  def initialize(application, container_path: nil, local_path: nil, exclude: [])
12
14
  @ruby = Dev::Ruby.new(container_path: container_path, local_path: local_path)
@@ -6,6 +6,6 @@ module Dev
6
6
  # Use 'v.v.v.pre.alpha.v' for pre-release vesions
7
7
  # Use 'v.v.v.beta.v for beta versions
8
8
  # Use semantic versioning for any releases (https://semver.org/)
9
- VERSION = '1.3.0'.freeze
9
+ VERSION = '1.4.0.pre.alpha.2'.freeze
10
10
  end
11
11
  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.3.0
4
+ version: 1.4.0.pre.alpha.2
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-21 00:00:00.000000000 Z
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: '0'
444
+ version: 1.3.1
431
445
  requirements: []
432
446
  rubygems_version: 3.1.6
433
447
  signing_key: