Sha256: f7a185d8f4c57b9c3bc67d75ca94611c05c784770e73226aed5c3005b8061150
Contents?: true
Size: 1.46 KB
Versions: 1
Compression:
Stored size: 1.46 KB
Contents
if ENV["SYSTEEM"].present? module ActionController class Base before_filter :set_theme def set_theme session["run_count"] = 0 unless session["run_count"].present? session["run_count"] += 1 if session["run_count"] <= 1 affirmation_path = "./" + SelfSysteem.test_dir + "/system/support/affirmations/" + ENV["SYSTEEM"] + ".yml" if File.exist?(affirmation_path) affirmation_requirements = YAML.load_file(affirmation_path)[:requirements].last session_path = ("./" + SelfSysteem.test_dir + "/system/support/affirmations/" + affirmation_requirements.to_s + "_session.yml") db_path = ("./" + SelfSysteem.test_dir + "/system/support/affirmations/" + affirmation_requirements.to_s + "_db.yml") if File.exist?(session_path) systeem_session = YAML.load_file(session_path) systeem_session.each_pair do |k, v| unless ["session_id", "_csrf_token"].include?(k) session[k] ||= systeem_session[k] end end end if File.exist?(db_path) YamlDbSynch.load(db_path) end else Rails.application.load_seed end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
self_systeem-0.1.0 | lib/action_controller_monkey.rb |