lib/capsulecd/ruby/ruby_engine.rb in capsulecd-1.0.0 vs lib/capsulecd/ruby/ruby_engine.rb in capsulecd-1.0.1
- old
+ new
@@ -9,14 +9,14 @@
class RubyEngine < Engine
def build_step
super
gemspec_path = CapsuleCD::Ruby::RubyHelper.get_gemspec_path(@source_git_local_path)
- # check for/create required VERSION file
- gemspec_data = CapsuleCD::Ruby::RubyHelper.load_gemspec_data(gemspec_path)
+ # check for required VERSION file
+ gemspec_data = CapsuleCD::Ruby::RubyHelper.get_gemspec_data(@source_git_local_path)
- if !gemspec_data || !File.exist?(CapsuleCD::Ruby::RubyHelper.version_filepath(@source_git_local_path, gemspec_data.name))
+ if !File.exist?(CapsuleCD::Ruby::RubyHelper.version_filepath(@source_git_local_path, gemspec_data.name))
fail CapsuleCD::Error::BuildPackageInvalid, 'version.rb file is required to process Ruby gem'
end
# bump up the version here.
# since there's no standardized way to bump up the version in the *.gemspec file, we're going to assume that the version
@@ -65,9 +65,12 @@
end
# wait for process
external.join
unless external.value.success?
fail CapsuleCD::Error::BuildPackageFailed, 'gem build failed. Check gemspec file and dependencies'
+ end
+ unless File.exist?(@source_git_local_path + "/#{gemspec_data.name}-#{next_version.to_s}.gem")
+ fail CapsuleCD::Error::BuildPackageFailed, "gem build failed. #{gemspec_data.name}-#{next_version.to_s}.gem not found"
end
end
end
def test_step