Skip to content

Commit e94359b

Browse files
luke-hillbarancev
authored andcommitted
Remove all Javascript CrazyFun code
Alter CF ruby / rake files to correctly named ruby_mappings and rake_mappings Move global method ruby to be duplicated in the requisite classes (We can dry this up later)
1 parent 6f89506 commit e94359b

File tree

8 files changed

+57
-1279
lines changed

8 files changed

+57
-1279
lines changed

Rakefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ require 'rake_tasks/selenium_rake/crazy_fun'
2121

2222
# The CrazyFun builders - Most of these are either partially or fully obsolete
2323
require 'rake_tasks/crazy_fun/mappings/file_copy_hack'
24-
require 'rake_tasks/crazy_fun/mappings/javascript'
24+
require 'rake_tasks/crazy_fun/mappings/rake_mappings'
25+
require 'rake_tasks/crazy_fun/mappings/ruby_mappings'
2526
require 'rake_tasks/crazy_fun/mappings/tasks'
26-
require 'rake_tasks/crazy_fun/mappings/rake'
27-
require 'rake_tasks/crazy_fun/mappings/ruby'
2827

2928
# Location of all new methods
3029
require 'rake_tasks/selenium_rake/checks'

rake_tasks/crazy_fun/mappings/javascript.rb

Lines changed: 0 additions & 1257 deletions
This file was deleted.

rake_tasks/crazy_fun/mappings/ruby.rb

Lines changed: 0 additions & 1 deletion
This file was deleted.

rake_tasks/crazy_fun/mappings/ruby_mappings.rb

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,3 @@ def add_all(fun)
2525
fun.add_mapping "rubygem", RubyGem.new
2626
end
2727
end
28-
29-
def ruby(opts)
30-
cmd = %w(bundle exec ruby -w)
31-
cmd << "-d" if opts[:debug]
32-
33-
if opts.has_key? :include
34-
cmd << "-I"
35-
cmd << Array(opts[:include]).join(File::PATH_SEPARATOR)
36-
end
37-
38-
cmd << "-S" << opts[:command] if opts.has_key?(:command)
39-
cmd += Array(opts[:args]) if opts.has_key?(:args)
40-
cmd += Array(opts[:files]) if opts.has_key?(:files)
41-
42-
puts cmd.join(' ')
43-
44-
sh(*cmd)
45-
end

rake_tasks/crazy_fun/mappings/ruby_mappings/ruby_docs.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,23 @@ def handle(_fun, dir, args)
2020
:files => files
2121
end
2222
end
23+
24+
def ruby(opts)
25+
cmd = %w(bundle exec ruby -w)
26+
cmd << "-d" if opts[:debug]
27+
28+
if opts.has_key? :include
29+
cmd << "-I"
30+
cmd << Array(opts[:include]).join(File::PATH_SEPARATOR)
31+
end
32+
33+
cmd << "-S" << opts[:command] if opts.has_key?(:command)
34+
cmd += Array(opts[:args]) if opts.has_key?(:args)
35+
cmd += Array(opts[:files]) if opts.has_key?(:files)
36+
37+
puts cmd.join(' ')
38+
39+
sh(*cmd)
40+
end
2341
end
2442
end

rake_tasks/crazy_fun/mappings/ruby_mappings/ruby_linter.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,23 @@ def handle(_fun, dir, args)
77
:files => args[:srcs]
88
end
99
end
10+
11+
def ruby(opts)
12+
cmd = %w(bundle exec ruby -w)
13+
cmd << "-d" if opts[:debug]
14+
15+
if opts.has_key? :include
16+
cmd << "-I"
17+
cmd << Array(opts[:include]).join(File::PATH_SEPARATOR)
18+
end
19+
20+
cmd << "-S" << opts[:command] if opts.has_key?(:command)
21+
cmd += Array(opts[:args]) if opts.has_key?(:args)
22+
cmd += Array(opts[:files]) if opts.has_key?(:files)
23+
24+
puts cmd.join(' ')
25+
26+
sh(*cmd)
27+
end
1028
end
1129
end

rake_tasks/crazy_fun/mappings/ruby_mappings/ruby_test.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,24 @@ def handle(_fun, dir, args)
2222
:files => args[:srcs]
2323
end
2424
end
25+
26+
def ruby(opts)
27+
cmd = %w(bundle exec ruby -w)
28+
cmd << "-d" if opts[:debug]
29+
30+
if opts.has_key? :include
31+
cmd << "-I"
32+
cmd << Array(opts[:include]).join(File::PATH_SEPARATOR)
33+
end
34+
35+
cmd << "-S" << opts[:command] if opts.has_key?(:command)
36+
cmd += Array(opts[:args]) if opts.has_key?(:args)
37+
cmd += Array(opts[:files]) if opts.has_key?(:files)
38+
39+
puts cmd.join(' ')
40+
41+
sh(*cmd)
42+
end
43+
2544
end
2645
end

0 commit comments

Comments
 (0)