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
13 14 15 16 17 18 19 20 |
# File 'lib/motion_blender/rake_tasks.rb', line 13 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
22 23 24 25 26 27 28 29 30 31 |
# File 'lib/motion_blender/rake_tasks.rb', line 22 def apply analyzer = analyze 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
9 10 11 |
# File 'lib/motion_blender/rake_tasks.rb', line 9 def config MotionBlender.config end |
#dump ⇒ Object
33 34 35 36 |
# File 'lib/motion_blender/rake_tasks.rb', line 33 def dump analyzer = analyze YAML.dump %w(files dependencies).map { |k| [k, analyzer.send(k)] }.to_h end |
#graph(options = {}) ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/motion_blender/rake_tasks.rb', line 38 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 |