crayfish 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/crayfish/html.rb +4 -0
- data/lib/crayfish/version.rb +1 -1
- data/test/dummy/log/test.log +115 -0
- data/test/html_test.rb +8 -0
- metadata +13 -13
data/lib/crayfish/html.rb
CHANGED
@@ -76,6 +76,10 @@ module Crayfish
|
|
76
76
|
end
|
77
77
|
|
78
78
|
def public_path_to_fs_path path
|
79
|
+
if /^(?<stripped>[^\?]*)\?[0-9]*$/ =~ path
|
80
|
+
path = stripped
|
81
|
+
end
|
82
|
+
|
79
83
|
search_paths = [::Rails.public_path] + ::Rails.configuration.assets.paths
|
80
84
|
search_paths.each do |search_path|
|
81
85
|
if File.exists?("#{search_path}/#{path}")
|
data/lib/crayfish/version.rb
CHANGED
data/test/dummy/log/test.log
CHANGED
@@ -1625,3 +1625,118 @@ undefined local variable or method `aaa' for #<CrayfishActionViewTest::ActionVie
|
|
1625
1625
|
[1m[35m (0.0ms)[0m rollback transaction
|
1626
1626
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1627
1627
|
[1m[35m (0.0ms)[0m rollback transaction
|
1628
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1629
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1630
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1631
|
+
[1;31munknown node p in CrayHtml[0m
|
1632
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1633
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1634
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1635
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1636
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1637
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1638
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1639
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1640
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1641
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1642
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1643
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1644
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1645
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1646
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1647
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1648
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1649
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1650
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1651
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1652
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1653
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1654
|
+
[1;31munknown node p in CrayHtml[0m
|
1655
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1656
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1657
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1658
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1659
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1660
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1661
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1662
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1663
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1664
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1665
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1666
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1667
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1668
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1669
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1670
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1671
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1672
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1673
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1674
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1675
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1676
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1677
|
+
[1;31munknown node p in CrayHtml[0m
|
1678
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1679
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1680
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1681
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1682
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1683
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1684
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1685
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1686
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1687
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1688
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1689
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1690
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1691
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1692
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1693
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1694
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1695
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1696
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1697
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1698
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1699
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1700
|
+
[1;31munknown node p in CrayHtml[0m
|
1701
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1702
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1703
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1704
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1705
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1706
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1707
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1708
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1709
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1710
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1711
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1712
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1713
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1714
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1715
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1716
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1717
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1718
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1719
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1720
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
1721
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1722
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1723
|
+
[1;31munknown node p in CrayHtml[0m
|
1724
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1725
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1726
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1727
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1728
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1729
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1730
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1731
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1732
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1733
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1734
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1735
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1736
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1737
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1738
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1739
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1740
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1741
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1742
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
data/test/html_test.rb
CHANGED
@@ -43,6 +43,14 @@ class HtmlTest < ActiveSupport::TestCase
|
|
43
43
|
assert_equal "/assets/a.file", @html.public_path_to_fs_path('a.file')
|
44
44
|
end
|
45
45
|
|
46
|
+
test "should strip session key from public files" do # are these realy session keys?
|
47
|
+
::Rails.stubs(:public_path).returns('/pub')
|
48
|
+
::Rails.configuration.assets.stubs(:paths).returns(['/assets'])
|
49
|
+
File.expects(:exists?).with("/pub/a.file").returns(false)
|
50
|
+
File.expects(:exists?).with("/assets/a.file").returns(true)
|
51
|
+
assert_equal "/assets/a.file", @html.public_path_to_fs_path('a.file?123456')
|
52
|
+
end
|
53
|
+
|
46
54
|
test "compile img" do
|
47
55
|
img = stub('html img')
|
48
56
|
img.stubs(:name).returns(:img)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: crayfish
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-05-14 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70128930912640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70128930912640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: prawn
|
27
|
-
requirement: &
|
27
|
+
requirement: &70128930893620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70128930893620
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: nokogiri
|
38
|
-
requirement: &
|
38
|
+
requirement: &70128930892100 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70128930892100
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: sqlite3
|
49
|
-
requirement: &
|
49
|
+
requirement: &70128930890080 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70128930890080
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: mocha
|
60
|
-
requirement: &
|
60
|
+
requirement: &70128930887780 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70128930887780
|
69
69
|
description: Crayfish - PDF templating for Rails
|
70
70
|
email:
|
71
71
|
- patrick.hanevold@gmail.com
|
@@ -133,7 +133,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
133
|
version: '0'
|
134
134
|
segments:
|
135
135
|
- 0
|
136
|
-
hash:
|
136
|
+
hash: -1425163839330226270
|
137
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
version: '0'
|
143
143
|
segments:
|
144
144
|
- 0
|
145
|
-
hash:
|
145
|
+
hash: -1425163839330226270
|
146
146
|
requirements: []
|
147
147
|
rubyforge_project:
|
148
148
|
rubygems_version: 1.8.15
|