hubdown 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,10 +7,11 @@ class StyleSheet
7
7
 
8
8
 
9
9
  def from_tag tag
10
- matcher = /href=['|"](([\w:.\/])*)\/([\w|-]+.css)/.match( tag.to_s )
10
+ matcher = /href=['|"]((?:[\w:.\/-])*)\/([\w|-]+.css)/.match( tag.to_s )
11
+
11
12
  if matcher
12
13
  @url = matcher.captures[0]
13
- @name = matcher.captures[2]
14
+ @name = matcher.captures[1]
14
15
  end
15
16
  end
16
17
 
@@ -1,3 +1,3 @@
1
1
  module Hubdown
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -12,10 +12,10 @@ describe StyleSheet do
12
12
 
13
13
  it "strips attributes from a given tag" do
14
14
  sh = StyleSheet.new
15
- sh.from_tag "<link href=\"https://a248.e.akamai.net/assets.github.com/assets/github-6c7984e384129edf1958345326c26471eedcdc23.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\">\n"
15
+ sh.from_tag "<link href=\"https://assets-cdn.github.com/assets/github-da7475c114a3c2eab7b91a0584202a89fd188935.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\">"
16
16
 
17
- sh.name.should eq "github-6c7984e384129edf1958345326c26471eedcdc23.css"
18
- sh.url.should eq "https://a248.e.akamai.net/assets.github.com/assets"
17
+ sh.name.should eq "github-da7475c114a3c2eab7b91a0584202a89fd188935.css"
18
+ sh.url.should eq "https://assets-cdn.github.com/assets"
19
19
  end
20
20
 
21
21
  it "loads web content" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-10-22 00:00:00.000000000 Z
12
+ date: 2014-05-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mixlib-cli
@@ -164,3 +164,4 @@ summary: CLI for GitHub Flavored markdown to html conversion
164
164
  test_files:
165
165
  - spec/spec_helper.rb
166
166
  - spec/style_sheet_spec.rb
167
+ has_rdoc: