Rakefile in xcknife-0.11.1 vs Rakefile in xcknife-0.12.0
- old
+ new
@@ -1,22 +1,26 @@
-require 'rspec/core/rake_task'
+# frozen_string_literal: true
+
require 'fileutils'
+require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec)
-task default: :spec
+require 'rubocop/rake_task'
+RuboCop::RakeTask.new
-desc "Builds TestDumper.dylib"
+task default: %w[spec rubocop]
+
+desc 'Builds TestDumper.dylib'
task :build_test_dumper do
- target_dir = File.join(File.dirname(__FILE__), "TestDumper")
+ target_dir = File.join(File.dirname(__FILE__), 'TestDumper')
Dir.chdir(target_dir) do
- system "./build.sh"
- FileUtils.copy_file("./testdumperbuild/Build/Products/Debug-iphonesimulator/TestDumper.framework/TestDumper", "./TestDumper.dylib")
- puts "TestDumper.dylib was created successfully"
+ system './build.sh'
+ FileUtils.copy_file('./testdumperbuild/Build/Products/Debug-iphonesimulator/TestDumper.framework/TestDumper', './TestDumper.dylib')
+ puts 'TestDumper.dylib was created successfully'
end
end
-desc "Release wih test_dumper"
-task :gem_release => [:build_test_dumper, :build] do
+desc 'Release wih test_dumper'
+task gem_release: %i[build_test_dumper build] do
system 'gem push pkg/xcknife-*.gem'
end
-