Class: MotionBlender::RakeTasks
- Inherits:
-
Object
- Object
- MotionBlender::RakeTasks
- Defined in:
- lib/motion_blender/rake_tasks.rb
Instance Method Summary collapse
Instance Method Details
#analyze ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/motion_blender/rake_tasks.rb', line 14 def analyze analyzer = Analyzer.new files = config.incepted_files + Motion::Project::App.config.files files.flatten.each do |file| analyzer.analyze file end analyzer end |
#apply ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/motion_blender/rake_tasks.rb', line 23 def apply analyzer = analyze verify_dependencies analyzer.dependencies Motion::Project::App.setup do |app| new_files = analyzer.files - app.files app.exclude_from_detect_dependencies += new_files app.files = new_files + app.files app.files -= app.spec_files app.files_dependencies analyzer.dependencies end end |
#config ⇒ Object
10 11 12 |
# File 'lib/motion_blender/rake_tasks.rb', line 10 def config MotionBlender.config end |
#dump ⇒ Object
35 36 37 38 |
# File 'lib/motion_blender/rake_tasks.rb', line 35 def dump analyzer = analyze YAML.dump %w(files dependencies).map { |k| [k, analyzer.send(k)] }.to_h end |
#graph(options = {}) ⇒ Object
40 41 42 43 44 45 46 |
# File 'lib/motion_blender/rake_tasks.rb', line 40 def graph = {} analyzer = analyze graph_maker = GraphMaker.new analyzer.dependencies, graph_maker.title = Motion::Project::App.config.name graph_maker.build Motion::Project::App.info('Create', graph_maker.output) end |