Skip to content

Commit b2a6fac

Browse files
committed
style: standardrb - unshadow the rescue, brace spacing in spec
1 parent 3700f1f commit b2a6fac

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/interscript.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def detect(source, destination, **kwargs)
9191
def locate_map_gems_yaml
9292
found = begin
9393
Gem.find_latest_files("interscript-maps.yaml")
94-
rescue StandardError, NameError
94+
rescue StandardError
9595
nil
9696
end
9797
return found if found.is_a?(Array) && found.any?

‎spec/interscript/map_gems_spec.rb‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
gem_dir = File.join(dir, "gems", "interscript-maps-9.9.9")
1313
FileUtils.mkdir_p(gem_dir)
1414
yaml_path = File.join(gem_dir, "interscript-maps.yaml")
15-
File.write(yaml_path, { "paths" => ["maps"] }.to_yaml)
15+
File.write(yaml_path, {"paths" => ["maps"]}.to_yaml)
1616
spec = Struct.new(:name, :full_gem_path).new("interscript-maps", gem_dir)
1717
allow(Gem::Specification).to receive(:latest_specs).and_return([spec])
1818
allow(Gem).to receive(:find_latest_files).with("interscript-maps.yaml").and_return([yaml_path])
@@ -25,7 +25,7 @@
2525
gem_dir = File.join(dir, "gems", "interscript-maps-9.9.9")
2626
FileUtils.mkdir_p(File.join(gem_dir, "maps"))
2727
yaml_path = File.join(gem_dir, "interscript-maps.yaml")
28-
File.write(yaml_path, { "paths" => ["maps"] }.to_yaml)
28+
File.write(yaml_path, {"paths" => ["maps"]}.to_yaml)
2929
spec = Struct.new(:name, :full_gem_path).new("interscript-maps", gem_dir)
3030
allow(Gem::Specification).to receive(:latest_specs).and_return([spec])
3131
allow(Gem).to receive(:find_latest_files).with("interscript-maps.yaml")

0 commit comments

Comments
 (0)