Sha256: 51de5e6cc397beee57c48ae9d8d64da66c0525ceb4969e442e6849020029ab55

Contents?: true

Size: 1012 Bytes

Versions: 63

Compression:

Stored size: 1012 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module EacRubyBase1
    module Sources
      class Update
        require_sub __FILE__
        enable_simple_cache
        enable_speaker
        common_constructor :source do
          perform
        end

        def bundle_update
          infom 'Running "bundle update && bundle install"...'
          source.bundle_update.execute!
        end

        protected

        def perform
          update_gemfile_lock
          update_subs
        end

        def update_gemfile_lock
          source.scm.commit_if_change(-> { update_gemfile_lock_commit_message }) do
            bundle_update
          end
        end

        def update_gemfile_lock_commit_message
          i18n_translate(__method__, __locale: source.locale)
        end

        def update_subs
          source.subs.each do |sub|
            ::Avm::EacRubyBase1::Sources::Update::SubUpdate.new(self, sub)
          end
        end
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 2 rubygems

Version Path
eac_tools-0.53.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
avm-eac_ruby_base1-0.28.1 lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.52.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
avm-eac_ruby_base1-0.28.0 lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.51.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.50.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.49.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.48.1 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.48.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
avm-eac_ruby_base1-0.27.3 lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.47.2 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
avm-eac_ruby_base1-0.27.2 lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.47.1 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.47.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.46.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.45.2 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.45.1 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
avm-eac_ruby_base1-0.27.1 lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.45.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb
eac_tools-0.44.0 sub/avm-eac_ruby_base1/lib/avm/eac_ruby_base1/sources/update.rb