Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Support multibyte description

To out put file as "#{md5}.html"
  • Loading branch information...
commit c21408fd0216b88dba93a7c303e9199446ccbcb4 1 parent 8296db9
@mataki mataki authored
View
2  lib/rspec_api_documentation/html_writer.rb
@@ -73,7 +73,7 @@ def dirname
def filename
basename = description.downcase.gsub(/\s+/, '_').gsub(/[^a-z_]/, '')
- basename = URI.encode(description) if basename.blank?
+ basename = Digest::MD5.new.update(description).to_s if basename.blank?
"#{basename}.html"
end
View
3  spec/html_writer_spec.rb
@@ -49,7 +49,8 @@
let(:example) { group.example(label) {} }
it "should have downcased filename" do
- html_example.filename.should == URI.encode(label) + ".html"
+ filename = Digest::MD5.new.update(label).to_s
+ html_example.filename.should == filename + ".html"
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.