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-5.8.1 lib/rubysmith/extensions/bundler.rb
rubysmith-5.8.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.7.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.6.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.5.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.4.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.3.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.2.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.1.0 lib/rubysmith/extensions/bundler.rb
rubysmith-5.0.1 lib/rubysmith/extensions/bundler.rb
rubysmith-4.9.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.8.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.7.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.6.1 lib/rubysmith/extensions/bundler.rb
rubysmith-4.6.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.5.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.4.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.3.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.2.0 lib/rubysmith/extensions/bundler.rb
rubysmith-4.1.0 lib/rubysmith/extensions/bundler.rb