summaryrefslogtreecommitdiffhomepage
path: root/Rakefile
diff options
context:
space:
mode:
author_Tradam <[email protected]>2021-12-30 07:33:12 -0500
committerGitHub <[email protected]>2021-12-30 07:33:12 -0500
commit5ef652300e71b572ca58b061610d606840ce19a9 (patch)
treeb82c99051b378c18ad4a8af98292681869dfa5a7 /Rakefile
parentac8888f6682c68d74bfb362789fb43044e1c0961 (diff)
downloadFelECS-5ef652300e71b572ca58b061610d606840ce19a9.tar.gz
FelECS-5ef652300e71b572ca58b061610d606840ce19a9.zip
Major 4.0 update (#12)
Check the changelog
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index edf99bc..f7d8c6c 100644
--- a/Rakefile
+++ b/Rakefile
@@ -11,6 +11,26 @@ require "rubocop/rake_task"
task :default => [:spec, :yard, 'coverage:format']
#task default: :rubocop
+desc 'Export to single file'
+task :buildfile do
+ result = ''
+ main = File.read('lib/felflame.rb')
+ tmp = main.lines(chomp: true).select do |line|
+ line.include? "require_relative "
+ end
+ tmp.each do |file|
+ file.delete_prefix!("require_relative ")
+ result += File.read("lib/#{file[1,file.length-2]}.rb") + "\n"
+ end
+
+ result += main.lines.reject do |line|
+ line.include? "require_relative "
+ end.join
+
+ `mkdir pkg`
+ File.write('pkg/felflame.rb', result)
+end
+
RuboCop::RakeTask.new
namespace :coverage do