<commit_before>#
# Rake task to compile ViSH Editor JavaScript and CSS files
# Compile javascript using google's closure compiler (see http://code.google.com/closure/compiler/)
# Minify css using YUI Compressor (see http://yui.github.io/yuicompressor/)
# Also rewrite routes
#

#PATHS
VISH_EDITOR_PLUGIN_PATH = "vendor/plugins/vish_editor";
VISH_EDITOR_PATH = "../vish_editor/public/vishEditor";

# Vish Editor and Vish Viewer files and dirs :

JS_FILES_AND_DIRS = ['app/assets/js_to_compile/lang','app/assets/js_to_compile/VISH.js', 'app/assets/js_to_compile/VISH.Constant.js', 'app/assets/js_to_compile/libs/jquery-1.7.2.min.js', 'app/assets/js_to_compile/libs/jquery-ui-1.9.2.custom.min.js', 'app/assets/js_to_compile/libs/jquery.mousewheel-3.0.4.pack.js', 'app/assets/js_to_compile/libs','app/assets/js_to_compile/VISH.Renderer.js', 'app/assets/js_to_compile/VISH.Status.js', 'app/assets/js_to_compile/VISH.Status.Device.js', 'app/assets/js_to_compile/VISH.Utils.js', 'app/assets/js_to_compile/VISH.Editor.js', 'app/assets/js_to_compile/VISH.Editor.Utils.js', 'app/assets/js_to_compile/VISH.Editor.Text.js', 'app/assets/js_to_compile/VISH.Editor.Video.js', 'app/assets/js_to_compile/VISH.Editor.Image.js', 'app/assets/js_to_compile/VISH.Editor.Object.js', 'app/assets/js_to_compile/VISH.Editor.Presentation.js', 'app/assets/js_to_compile/VISH.Editor.Presentation.Repository.js', 'app/assets/js_to_compile/VISH.Editor.Slideset.js', 'app/assets/js_to_compile/VISH.Editor.VirtualTour.js', 'app/assets/js_to_compile/VISH.Editor.Flashcard.js', 'app/assets/js_to_compile/VISH.Editor.Slideset.Repository.js', 'app/assets/js_to_compile/VISH.Samples.js', 'app/assets/js_to_compile/VISH.Samples.API.js', 'app/assets/js_to_compile/VISH.Slides.js', 'app/assets/js_to_compile/VISH.Events.js', 'app/assets/js_to_compile/VISH.Flashcard.js', 'app/assets/js_to_compile/VISH.Quiz.js', 'app/assets/js_to_compile/VISH.Editor.Tools.js', 'app/assets/js_to_compile/VISH.Addons.js', 'app/assets/js_to_compile/VISH.VideoPlayer.js', 'app/assets/js_to_compile/VISH.Messenger.js' , 'app/assets/js_to_compile/VISH.Editor.Quiz.js', 'app/assets/js_to_compile']
CSS_FILES_AND_DIRS = ['app/assets/css_to_compile/libs','app/assets/css_to_compile']

# Vish Editor css first files
CSS_EDITOR = ['vendor/plugins/vish_editor/app/assets/css_to_compile/all/editor.css']

# Vish Viewer files and dirs
JS_VIEWER = ['lang/translations.js', 'libs/jquery-1.7.2.min.js', 'libs/jquery.watermark.min.js', 'libs/RegaddiChart.js', 'VISH.js', 'VISH.Constant.js', 'VISH.Configuration.js', 'VISH.QuizCharts.js', 'VISH.IframeAPI.js', 'libs/jquery-ui-1.9.2.custom.min.js', 'libs/jquery.fancybox-1.3.4.js', 'libs/jquery.qrcode.min.js', 'libs/yt_iframe_api.js', 'libs/jquery.joyride-1.0.5.js', 'libs/jquery.cookie.js', 'libs/modernizr.mq.js', 'libs/modernizr.foundation.js', 'VISH.User.js', 'VISH.I18n.js', 'VISH.Object.js', 'VISH.Renderer.js', 'VISH.Renderer.Filter.js', 'VISH.Debugging.js', 'VISH.Presentation.js', 'VISH.SlidesSelector.js', 'VISH.Text.js', 'VISH.VideoPlayer.js', 'VISH.VideoPlayer.CustomPlayer.js', 'VISH.VideoPlayer.HTML5.js', 'VISH.VideoPlayer.Youtube.js', 'VISH.ObjectPlayer.js', 'VISH.SnapshotPlayer.js', 'VISH.AppletPlayer.js', 'VISH.Viewer.js', 'VISH.Utils.js', 'VISH.Utils.Loader.js', 'VISH.Status.js', 'VISH.Status.Device.js', 'VISH.Status.Device.Browser.js', 'VISH.Status.Device.Features.js', 'VISH.ViewerAdapter.js', 'VISH.Flashcard.js',  'VISH.VirtualTour.js', 'VISH.Themes.js', 'VISH.Animations.js', 'VISH.Messenger.js', 'VISH.Messenger.Helper.js', 'VISH.Addons.js', 'VISH.Addons.IframeMessenger.js', 'VISH.Storage.js', 'VISH.Slides.js', 'VISH.Events.js', 'VISH.EventsNotifier.js', 'VISH.Quiz.js', 'VISH.Quiz.MC.js', 'VISH.Quiz.TF.js', 'VISH.Quiz.API.js', 'VISH.Events.Mobile.js', 'VISH.Recommendations.js', 'VISH.Tour.js']
CSS_VIEWER = ['customPlayer.css','pack1templates.css','quiz.css','styles.css'];

COMPILER_JAR_PATH = "lib/tasks/compile"
JSCOMPILER_JAR_FILE = COMPILER_JAR_PATH + "/compiler.jar"
CSSCOMPILER_JAR_FILE = COMPILER_JAR_PATH + "/yuicompressor-2.4.2.jar"
# JSCOMPILER_DOWNLOAD_URI = 'http://closure-compiler.googlecode.com/files/compiler-latest.zip'
JSCOMPILER_DOWNLOAD_URI =  'http://closure-compiler.googlecode.com/files/compiler-20130823.zip'
CSSCOMPILER_DOWNLOAD_URI = 'http://yui.zenfs.com/releases/builder/builder_1.0.0b1.zip'


# Rake Task
namespace :vish_editor do
    
  task :build do
    Rake::Task["vish_editor:prepare"].invoke
    Rake::Task["vish_editor:compile"].invoke
    Rake::Task["vish_editor:cleanCompile"].invoke
    Rake::Task["vish_editor:buildSCORM"].invoke
    Rake::Task["vish_editor:rewritePaths"].invoke
  end

  task :prepare do<commit_msg>Update VE rake task<commit_after>#
# Rake task to compile ViSH Editor JavaScript and CSS files
# Compile javascript using google's closure compiler (see http://code.google.com/closure/compiler/)
# Minify css using YUI Compressor (see http://yui.github.io/yuicompressor/)
# Also rewrite routes
#

#PATHS
VISH_EDITOR_PLUGIN_PATH = "vendor/plugins/vish_editor";
VISH_EDITOR_PATH = "../vish_editor/public/vishEditor";

# Vish Editor and Vish Viewer files and dirs :

JS_FILES_AND_DIRS = ['app/assets/js_to_compile/lang','app/assets/js_to_compile/VISH.js', 'app/assets/js_to_compile/VISH.Constant.js', 'app/assets/js_to_compile/libs/jquery-1.7.2.min.js', 'app/assets/js_to_compile/libs/jquery-ui-1.9.2.custom.min.js', 'app/assets/js_to_compile/libs/jquery.mousewheel-3.0.4.pack.js', 'app/assets/js_to_compile/libs','app/assets/js_to_compile/VISH.Renderer.js', 'app/assets/js_to_compile/VISH.Status.js', 'app/assets/js_to_compile/VISH.Status.Device.js', 'app/assets/js_to_compile/VISH.Utils.js', 'app/assets/js_to_compile/VISH.Editor.js', 'app/assets/js_to_compile/VISH.Editor.Utils.js', 'app/assets/js_to_compile/VISH.Editor.Text.js', 'app/assets/js_to_compile/VISH.Editor.Video.js', 'app/assets/js_to_compile/VISH.Editor.Image.js', 'app/assets/js_to_compile/VISH.Editor.Object.js', 'app/assets/js_to_compile/VISH.Editor.Presentation.js', 'app/assets/js_to_compile/VISH.Editor.Presentation.Repository.js', 'app/assets/js_to_compile/VISH.Editor.Slideset.js', 'app/assets/js_to_compile/VISH.Editor.VirtualTour.js', 'app/assets/js_to_compile/VISH.Editor.Flashcard.js', 'app/assets/js_to_compile/VISH.Samples.js', 'app/assets/js_to_compile/VISH.Samples.API.js', 'app/assets/js_to_compile/VISH.Slides.js', 'app/assets/js_to_compile/VISH.Events.js', 'app/assets/js_to_compile/VISH.Flashcard.js', 'app/assets/js_to_compile/VISH.Quiz.js', 'app/assets/js_to_compile/VISH.Editor.Tools.js', 'app/assets/js_to_compile/VISH.Addons.js', 'app/assets/js_to_compile/VISH.VideoPlayer.js', 'app/assets/js_to_compile/VISH.Messenger.js' , 'app/assets/js_to_compile/VISH.Editor.Quiz.js', 'app/assets/js_to_compile']
CSS_FILES_AND_DIRS = ['app/assets/css_to_compile/libs','app/assets/css_to_compile']

# Vish Editor css first files
CSS_EDITOR = ['vendor/plugins/vish_editor/app/assets/css_to_compile/all/editor.css']

# Vish Viewer files and dirs
JS_VIEWER = ['lang/translations.js', 'libs/jquery-1.7.2.min.js', 'libs/jquery.watermark.min.js', 'libs/RegaddiChart.js', 'VISH.js', 'VISH.Constant.js', 'VISH.Configuration.js', 'VISH.QuizCharts.js', 'VISH.IframeAPI.js', 'libs/jquery-ui-1.9.2.custom.min.js', 'libs/jquery.fancybox-1.3.4.js', 'libs/jquery.qrcode.min.js', 'libs/yt_iframe_api.js', 'libs/jquery.joyride-1.0.5.js', 'libs/jquery.cookie.js', 'libs/modernizr.mq.js', 'libs/modernizr.foundation.js', 'VISH.User.js', 'VISH.I18n.js', 'VISH.Object.js', 'VISH.Renderer.js', 'VISH.Renderer.Filter.js', 'VISH.Debugging.js', 'VISH.Presentation.js', 'VISH.SlidesSelector.js', 'VISH.Text.js', 'VISH.VideoPlayer.js', 'VISH.VideoPlayer.CustomPlayer.js', 'VISH.VideoPlayer.HTML5.js', 'VISH.VideoPlayer.Youtube.js', 'VISH.ObjectPlayer.js', 'VISH.SnapshotPlayer.js', 'VISH.AppletPlayer.js', 'VISH.Viewer.js', 'VISH.Utils.js', 'VISH.Utils.Loader.js', 'VISH.Status.js', 'VISH.Status.Device.js', 'VISH.Status.Device.Browser.js', 'VISH.Status.Device.Features.js', 'VISH.ViewerAdapter.js', 'VISH.Flashcard.js',  'VISH.VirtualTour.js', 'VISH.Themes.js', 'VISH.Animations.js', 'VISH.Messenger.js', 'VISH.Messenger.Helper.js', 'VISH.Addons.js', 'VISH.Addons.IframeMessenger.js', 'VISH.Storage.js', 'VISH.Slides.js', 'VISH.Events.js', 'VISH.EventsNotifier.js', 'VISH.Quiz.js', 'VISH.Quiz.MC.js', 'VISH.Quiz.TF.js', 'VISH.Quiz.API.js', 'VISH.Events.Mobile.js', 'VISH.Recommendations.js', 'VISH.Tour.js']
CSS_VIEWER = ['customPlayer.css','pack1templates.css','quiz.css','styles.css'];

COMPILER_JAR_PATH = "lib/tasks/compile"
JSCOMPILER_JAR_FILE = COMPILER_JAR_PATH + "/compiler.jar"
CSSCOMPILER_JAR_FILE = COMPILER_JAR_PATH + "/yuicompressor-2.4.2.jar"
# JSCOMPILER_DOWNLOAD_URI = 'http://closure-compiler.googlecode.com/files/compiler-latest.zip'
JSCOMPILER_DOWNLOAD_URI =  'http://closure-compiler.googlecode.com/files/compiler-20130823.zip'
CSSCOMPILER_DOWNLOAD_URI = 'http://yui.zenfs.com/releases/builder/builder_1.0.0b1.zip'


# Rake Task
namespace :vish_editor do
    
  task :build do
    Rake::Task["vish_editor:prepare"].invoke
    Rake::Task["vish_editor:compile"].invoke
    Rake::Task["vish_editor:cleanCompile"].invoke
    Rake::Task["vish_editor:buildSCORM"].invoke
    Rake::Task["vish_editor:rewritePaths"].invoke
  end

  task :prepare do
{'fraction_non_alphanumeric': 0.1815633423180593, 'fraction_numerical': 0.00862533692722372, 'mean_word_length': 5.741279069767442, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6784326', 'n_tokens_mistral': 3828, 'n_tokens_neox': 3728, 'n_words': 369}