Sha256: 7b7bd2b1341c6ae4e62eb38a06b9d3bfea6ac8bafff86e449fb4095c5215510d

Contents?: true

Size: 623 Bytes

Versions: 40

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true

require "bundler"
require "bundler/cli"
require "refinements/pathnames"

module Rubysmith
  module Extensions
    # Ensures gem dependencies are installed.
    class Bundler
      using Refinements::Pathnames

      def self.call(...) = new(...).call

      def initialize configuration, client: ::Bundler::CLI
        @configuration = configuration
        @client = client
      end

      def call
        configuration.project_root.change_dir { client.start %w[install --quiet] }
        configuration
      end

      private

      attr_reader :configuration, :client
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
rubysmith-4.0.1 lib/rubysmith/extensions/bundler.rb
rubysmith-4.0.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.8.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.7.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.6.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.5.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.4.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.3.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.2.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.1.0 lib/rubysmith/extensions/bundler.rb
rubysmith-3.0.1 lib/rubysmith/extensions/bundler.rb
rubysmith-3.0.0 lib/rubysmith/extensions/bundler.rb
rubysmith-2.0.2 lib/rubysmith/extensions/bundler.rb
rubysmith-2.0.1 lib/rubysmith/extensions/bundler.rb
rubysmith-2.0.0 lib/rubysmith/extensions/bundler.rb
rubysmith-1.3.0 lib/rubysmith/extensions/bundler.rb
rubysmith-1.2.0 lib/rubysmith/extensions/bundler.rb
rubysmith-1.1.1 lib/rubysmith/extensions/bundler.rb
rubysmith-1.1.0 lib/rubysmith/extensions/bundler.rb
rubysmith-1.0.0 lib/rubysmith/extensions/bundler.rb