Skip to content

Commit e6acc87

Browse files
dcermakD4N
authored andcommitted
Use single quotes and string templates where applicable
1 parent ae7af63 commit e6acc87

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

bin/gem2rpm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env ruby
22
# -*- ruby -*-
33

4-
$LOAD_PATH.push(File.expand_path(File.dirname(__FILE__) + "/../lib"))
4+
$LOAD_PATH.push(File.expand_path("#{File.dirname(__FILE__)}/../lib"))
55

66
require 'gem2rpm'
77
require 'fileutils'
@@ -97,7 +97,7 @@ Gem2Rpm.convert(gemfile, template, output_spec, options[:nongem], options[:local
9797

9898
# Save or print a specfile.
9999
if options[:output_file]
100-
File.open(options[:output_file], "w") do |f|
100+
File.open(options[:output_file], 'w') do |f|
101101
f.puts(output_spec.string)
102102
end
103103
else
@@ -110,15 +110,15 @@ if options[:srpm]
110110
Dir.mktmpdir "gem2rpm-#{gemname}-" do |srpmdir|
111111
specfile = File.join(srpmdir, "rubygem-#{gemname}.spec")
112112

113-
File.open(specfile, "w") do |f|
113+
File.open(specfile, 'w') do |f|
114114
f.puts(output_spec.string)
115115
end
116116

117117
FileUtils.copy(gemfile, srpmdir)
118118

119119
command =
120-
"rpmbuild -bs --nodeps " +
121-
"--define '_sourcedir #{srpmdir}' " +
120+
'rpmbuild -bs --nodeps ' \
121+
"--define '_sourcedir #{srpmdir}' " \
122122
"--define '_srcrpmdir #{out_dir}' " +
123123
specfile
124124

0 commit comments

Comments
 (0)