firespring_dev_commands 3.0.0.pre.alpha.2 → 3.0.0.pre.alpha.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.
- checksums.yaml +4 -4
- data/lib/firespring_dev_commands/docker/compose.rb +5 -0
- data/lib/firespring_dev_commands/docker.rb +1 -1
- data/lib/firespring_dev_commands/templates/base_interface.rb +12 -12
- data/lib/firespring_dev_commands/templates/docker/application.rb +4 -4
- data/lib/firespring_dev_commands/templates/docker/default.rb +7 -5
- data/lib/firespring_dev_commands/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ae0ecadec576f4f6c986fc7391faa03f1d148473f3c04f250c40edb120355df
|
4
|
+
data.tar.gz: ab84f1118a1c28c1667d0a825bbf57bfddf01d3a219e07715422e4e0ec50bf04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 575c45ba8a86cad256f030eebe6a9ee7987fb0cd0bb8f413989efa92e237d7fc40e1030a325e965696b5c6da47cd55e91a941eecd5b8e2f4bd81bcafcaeaee3b
|
7
|
+
data.tar.gz: 3c07674f01809f4f8aaa2042691815c4795cffc298ff3ffffeabf293d00b4e61c64d5989a4d81ebcaa287258cf75002836eaa0d1c23ef22af445b7420dd786b7
|
@@ -126,6 +126,11 @@ module Dev
|
|
126
126
|
execute_command(build_command('stop'))
|
127
127
|
end
|
128
128
|
|
129
|
+
# Pull in supported env settings and call restart
|
130
|
+
def restart
|
131
|
+
execute_command(build_command('restart'))
|
132
|
+
end
|
133
|
+
|
129
134
|
# Call the compose exec method passing the given args after it
|
130
135
|
def exec(*args)
|
131
136
|
execute_command(build_command('exec', *args))
|
@@ -144,18 +144,18 @@ DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
|
144
144
|
# In that case it is recommended that you call the base _post_stop_hooks as a dependency of that task
|
145
145
|
end
|
146
146
|
|
147
|
-
# Define an empty
|
148
|
-
task :
|
149
|
-
# The user may define custom
|
150
|
-
# Define this process in the appropriate namespace to add them only to a specific
|
151
|
-
# In that case it is recommended that you call the base
|
152
|
-
end
|
153
|
-
|
154
|
-
# Define an empty
|
155
|
-
task :
|
156
|
-
# The user may define custom
|
157
|
-
# Define this process in the appropriate namespace to add them only to a specific
|
158
|
-
# In that case it is recommended that you call the base
|
147
|
+
# Define an empty _pre_restart_hooks handler which can be overridden by the user
|
148
|
+
task :_pre_restart_hooks do
|
149
|
+
# The user may define custom _pre_restart_hooks tasks to add any pre-restart actions the restart process
|
150
|
+
# Define this process in the appropriate namespace to add them only to a specific restart
|
151
|
+
# In that case it is recommended that you call the base _pre_restart_hooks as a dependency of that task
|
152
|
+
end
|
153
|
+
|
154
|
+
# Define an empty _post_restart_hooks handler which can be overridden by the user
|
155
|
+
task :_post_restart_hooks do
|
156
|
+
# The user may define custom _post_restart_hooks tasks to add any post-restart actions the restart process
|
157
|
+
# Define this process in the appropriate namespace to add them only to a specific restart
|
158
|
+
# In that case it is recommended that you call the base _post_restart_hooks as a dependency of that task
|
159
159
|
end
|
160
160
|
|
161
161
|
# Define an empty _pre_clean_hooks handler which can be overridden by the user
|
@@ -145,17 +145,17 @@ module Dev
|
|
145
145
|
end
|
146
146
|
|
147
147
|
# Create the rake task which stops, cleans, and starts the application
|
148
|
-
def
|
148
|
+
def create_restart_task!
|
149
149
|
application = @name
|
150
150
|
exclude = @exclude
|
151
151
|
|
152
152
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
153
153
|
namespace application do
|
154
|
-
return if exclude.include?(:
|
154
|
+
return if exclude.include?(:restart)
|
155
155
|
|
156
156
|
desc "Reloads the #{application} container"
|
157
|
-
task
|
158
|
-
Rake::Task[:
|
157
|
+
task restart: %w(init_docker _pre_restart_hooks down up_no_deps) do
|
158
|
+
Rake::Task[:_post_restart_hooks].execute
|
159
159
|
end
|
160
160
|
end
|
161
161
|
end
|
@@ -101,16 +101,18 @@ module Dev
|
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
104
|
-
# Create the rake task which runs a docker compose
|
105
|
-
def
|
104
|
+
# Create the rake task which runs a docker compose restart
|
105
|
+
def create_restart_task!
|
106
106
|
exclude = @exclude
|
107
107
|
|
108
108
|
DEV_COMMANDS_TOP_LEVEL.instance_eval do
|
109
|
-
return if exclude.include?(:
|
109
|
+
return if exclude.include?(:restart)
|
110
110
|
|
111
111
|
desc 'Runs a "down" followed by an "up"'
|
112
|
-
task
|
113
|
-
|
112
|
+
task restart: %w(_pre_restart_hooks) do
|
113
|
+
LOG.debug('In base restart')
|
114
|
+
Dev::Docker::Compose.new.restart
|
115
|
+
Rake::Task[:_post_restart_hooks].execute
|
114
116
|
end
|
115
117
|
end
|
116
118
|
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: 3.0.0.pre.alpha.
|
4
|
+
version: 3.0.0.pre.alpha.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Firespring
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|