html_mockup 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +4 -0
- data/html_mockup.gemspec +1 -1
- data/lib/html_mockup/extractor.rb +3 -3
- data/lib/html_mockup/template.rb +2 -1
- metadata +9 -9
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 0.7.1
|
4
|
+
* Pass target_file to the ERBTemplate to files with erb errors
|
5
|
+
* Fix env["MOCKUP_PROJECT"] setting in extractor
|
6
|
+
|
3
7
|
## Version 0.7.0
|
4
8
|
* Replace --quiet with -s in as it's no longer supported in newer GIT versions
|
5
9
|
* Add support for ENV passing to the partials
|
data/html_mockup.gemspec
CHANGED
@@ -28,7 +28,7 @@ module HtmlMockup
|
|
28
28
|
|
29
29
|
@options.update(options) if options
|
30
30
|
|
31
|
-
env.update("MOCKUP_PROJECT" => project)
|
31
|
+
@options[:env].update("MOCKUP_PROJECT" => project)
|
32
32
|
end
|
33
33
|
|
34
34
|
def run!
|
@@ -60,11 +60,11 @@ module HtmlMockup
|
|
60
60
|
# Runs the extractor on a single file and return processed source.
|
61
61
|
def extract_source_from_file(file_path, env = {})
|
62
62
|
source = HtmlMockup::Template.open(file_path, :partial_path => self.project.partial_path).render(env)
|
63
|
-
|
63
|
+
|
64
64
|
if @options[:url_relativize]
|
65
65
|
source = relativize_urls(source, file_path)
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
source
|
69
69
|
end
|
70
70
|
|
data/lib/html_mockup/template.rb
CHANGED
@@ -44,12 +44,13 @@ module HtmlMockup
|
|
44
44
|
# @param [Hash] options See options
|
45
45
|
#
|
46
46
|
# @option options [String] partial_path Path where the partials reside (default: $0/../../partials)
|
47
|
+
# @option options [String] target_file Path of the processed file
|
47
48
|
def initialize(source, options={})
|
48
49
|
defaults = {
|
49
50
|
:partial_path => File.dirname(__FILE__) + "/../../partials/"
|
50
51
|
}
|
51
52
|
@source = source
|
52
|
-
@template = Tilt::ERBTemplate.new{ @source }
|
53
|
+
@template = Tilt::ERBTemplate.new(options[:target_file].to_s){ @source }
|
53
54
|
@options = defaults.update(options)
|
54
55
|
raise "Partial path '#{self.options[:partial_path]}' not found" unless File.exist?(self.options[:partial_path])
|
55
56
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_mockup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -14,7 +14,7 @@ date: 2013-01-22 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|
17
|
-
requirement: &
|
17
|
+
requirement: &70340987175420 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 0.16.0
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70340987175420
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: rack
|
28
|
-
requirement: &
|
28
|
+
requirement: &70340987174940 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: 1.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70340987174940
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: tilt
|
39
|
-
requirement: &
|
39
|
+
requirement: &70340986945660 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :runtime
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70340986945660
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: hpricot
|
50
|
-
requirement: &
|
50
|
+
requirement: &70340998865640 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,7 +55,7 @@ dependencies:
|
|
55
55
|
version: 0.6.4
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70340998865640
|
59
59
|
description:
|
60
60
|
email:
|
61
61
|
- info@digitpaint.nl
|