Class: Ruboty::Handlers::Bundler::Install
- Inherits:
-
Object
- Object
- Ruboty::Handlers::Bundler::Install
- Defined in:
- lib/ruboty/handlers/bundler.rb
Instance Method Summary collapse
-
#call ⇒ String
Content of Gemfile.lock.
-
#initialize(gemfile_content) ⇒ Install
constructor
A new instance of Install.
Constructor Details
#initialize(gemfile_content) ⇒ Install
Returns a new instance of Install.
234 235 236 |
# File 'lib/ruboty/handlers/bundler.rb', line 234 def initialize(gemfile_content) @gemfile_content = gemfile_content end |
Instance Method Details
#call ⇒ String
Returns Content of Gemfile.lock.
239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/ruboty/handlers/bundler.rb', line 239 def call Dir.mktmpdir do |dir| Dir.chdir(dir) do File.write("Gemfile", @gemfile_content) ::Bundler.with_clean_env do Ruboty.logger.debug(`bundle install`) end File.read("Gemfile.lock") end end end |