Sha256: f7a4d622d43eb702425010773065d3db56e4894e0810816754d475133badae90

Contents?: true

Size: 518 Bytes

Versions: 7

Compression:

Stored size: 518 Bytes

Contents

module GitCompound
  module Worker
    # Worker that updates component
    #
    class ComponentUpdater < Worker
      def initialize(lock)
        @lock    = lock
        @print   = PrettyPrint.new
      end

      def visit_component(component)
        raise "Component `#{component.name}` is not built !" unless
          component.exists?

        Logger.inline 'Updating:  '
        @print.visit_component(component)

        component.update!

        @lock.lock_component(component)
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
git_compound-0.2.2 lib/git_compound/worker/component_updater.rb
git_compound-0.2.1 lib/git_compound/worker/component_updater.rb
git_compound-0.2.0 lib/git_compound/worker/component_updater.rb
git_compound-0.1.2 lib/git_compound/worker/component_updater.rb
git_compound-0.1.1 lib/git_compound/worker/component_updater.rb
git_compound-0.1.0 lib/git_compound/worker/component_updater.rb
git_compound-0.0.10 lib/git_compound/worker/component_updater.rb