```ruby
module Build
  module Convert
    def convert!(opts = {}, &block)
      Rails.logger.tagged("build") do
        @opts = opts

        if @opts[:debug]
          dir = "/tmp/build"
          FileUtils.rm_rf(dir)
          FileUtils.mkdir_p(dir)
          build_in_dir(dir, &block)
        else
          Dir.mktmpdir do |dir|
            build_in_dir(dir, &block)
          end
        end
      end
    end

    def try_convert(opts = {})
      convert!(opts)
    rescue Build::BuildError => ex
      Rails.logger.error ex.message
      nil
    end

    def file_store
      @file_store ||= FileStore.new
    end

    protected

    def build_in_dir(dir, &block)
      Rails.logger.debug "Building in #{dir}"

      file_store.with_lock(file_store.bower_lock) do
        Bower.install(self.full, dir)
      end

      results = Dir[File.join(dir, "bower_components", "*")].map do |file|
        name = File.basename(file)

        if name == self.name && self.github?
          name = self.github_name
        end

        GemBuilder.new(dir, name).build!(@opts)
      end

      results.each do |result|
        if result[:pkg]
          file_store.save(result[:gem_component], result[:pkg])
        end
      end

      Reindex.perform_async

      block.call(dir) if block

      results.find { |r| r[:bower_component].name == self.name }
    end
  end
end
```

Remove mutation variables from Convert
user
```ruby
module Build
  module Convert # extends BowerComponent

    def convert!(options = {}, &block)
      Dir.mktmpdir do |dir|
        Rails.logger.debug "Building in #{dir}"

        file_store.with_lock(file_store.bower_lock) do
          Bower.install(self.full, dir)
        end

        results = Dir[File.join(dir, "bower_components", "*")].map do |file|
          name = File.basename(file)

          if name == self.name && self.github?
            name = self.github_name
          end

          GemBuilder.new(dir, name).build!(options)
        end

        results.each do |result|
          if result[:pkg]
            file_store.save(result[:gem_component], result[:pkg])
          end
        end

        Reindex.perform_async

        block.call(dir) if block

        results.find { |r| r[:bower_component].name == self.name }
      end
    end

    protected

    def file_store
      @file_store ||= FileStore.new
    end

  end
end
```
assistant