lib/tasks/web.rake in slack-ruby-client-0.15.1 vs lib/tasks/web.rake in slack-ruby-client-0.16.0
- old
+ new
@@ -49,13 +49,17 @@
File.exist?("spec/slack/web/api/endpoints/custom_specs/#{group}_spec.rb")
unless custom_spec_exists
rendered_method_spec = method_spec_template.result(group: group, names: names)
File.write "spec/slack/web/api/endpoints/#{snaked_group}_spec.rb", rendered_method_spec
end
- Dir.glob("lib/slack/web/api/patches/#{group}*.patch").sort.each do |patch|
- puts "- patching #{patch}"
- system("git apply #{patch}") || raise('failed to apply patch')
+
+ unless ENV.key?('SKIP_PATCH')
+ Dir.glob("lib/slack/web/api/patches/#{group}*.patch").sort.each do |patch|
+ puts "- patching #{patch}"
+ system("git apply #{patch}") || raise('failed to apply patch')
+ end
end
+
# command
raise "Missing group #{group}" unless groups.key?(group)
rendered_command = command_template.result(group: groups[group], names: names)
File.write "bin/commands/#{snaked_group}.rb", rendered_command