Skip to content

Instantly share code, notes, and snippets.

it "should raise exception on GMT command failure" do
FileUtils.makedirs(GmtMapFile::temp_map_dir) unless File.directory?(GmtMapFile::temp_map_dir)
ps_file_name = File.join(GmtMapFile::temp_map_dir, "not enough options.ps")
expect { GmtMap.run "pscoast", ">", ps_file_name }.to raise_error RuntimeError
end
Maybe because he tries to use directives to create custom elements too much? I can totally understand. Although that's one of Angular's the biggest selling points, it is also where it sucks the most. It is recommended to put html into a separate resource file then reference to it using templateUrl. Managing these alone will soon become a nightmare if you want to reuse these components.
And CSS for directive - this is a real nightmare. You can't create/expose custom css properties for your element (?!). Let say you have an h1 in your directive and you want to customize it, you will have to give it a custom class. This will lead to many problems. CSS gets leak everywhere. Can't easily set default styling for an element without creating another nightmare with CSS !important. Name will become silly and hard to remember can will easily caused conflict down the road (instead of my-element.label, you will have h1.my-element-label - the former is nicer and won't be affected by a random h1 CSS value somewhere).
Reac