Sha256: 134f2d1969aa3a65a13874314bcb32db802d59427481d0e403c8da1562cd64ce

Contents?: true

Size: 790 Bytes

Versions: 1

Compression:

Stored size: 790 Bytes

Contents

require 'ansi/core'

module Space
  class Action
    class Execute < Action
      def run
        Events.sources.registered do
          in_scope do |repo|
            Dir.chdir(repo.path) do
              puts "in #{repo.path}\n".ansi(:bold, :green)
              system(*args)
              puts
            end
          end
          confirm
        end
      end
    end

    class Refresh < Action
      def run
        project.bundler.refresh
        in_scope do |repo|
          repo.refresh
        end
      end
    end

    class Scope < Action
      def run
        project.repos.scope = scope
        Events.notify(:finish)
      end
    end

    class Unscope < Action
      def run
        project.repos.scope = nil
        Events.notify(:finish)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
space-0.0.6 lib/space/action/builtin.rb