html_mockup 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 0.8.3
4
+ * Make the url relativizer respect :skip parameter
5
+
3
6
  ## Version 0.8.2
4
7
  * If bundler is installed we're running Bundler.require automatically.
5
8
 
data/README.rdoc CHANGED
@@ -1,3 +1,5 @@
1
+ {<img src="https://badge.fury.io/rb/html_mockup.png" alt="Gem Version" />}[http://badge.fury.io/rb/html_mockup]
2
+
1
3
  == HtmlMockup
2
4
 
3
5
  HTML Mockup is a set of tools to create self-containing HTML mockups. HtmlMockup gives you the flexibility
@@ -84,4 +86,4 @@ Options:
84
86
  --filter:: What files should be validated, defaults to [^_]*.html
85
87
 
86
88
  === Copyright & license
87
- Copyright (c) 2012 Flurin Egger, Edwin van der Graaf, DigitPaint, MIT Style License. (see MIT-LICENSE)
89
+ Copyright (c) 2012 Flurin Egger, Edwin van der Graaf, DigitPaint, MIT Style License. (see MIT-LICENSE)
data/html_mockup.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "html_mockup"
5
- s.version = "0.8.2"
5
+ s.version = "0.8.3"
6
6
 
7
7
  s.authors = ["Flurin Egger", "Edwin van der Graaf", "Joran Kapteijns"]
8
8
  s.email = ["info@digitpaint.nl", "flurin@digitpaint.nl"]
@@ -6,7 +6,8 @@ module HtmlMockup::Release::Processors
6
6
  def initialize(options={})
7
7
  @options = {
8
8
  :url_attributes => %w{src href action},
9
- :match => ["**/*.html"]
9
+ :match => ["**/*.html"],
10
+ :skip => []
10
11
  }
11
12
 
12
13
  @options.update(options) if options
@@ -15,10 +16,10 @@ module HtmlMockup::Release::Processors
15
16
  def call(release, options={})
16
17
  options = {}.update(@options).update(options)
17
18
 
18
- release.log(self, "Relativizing all URLS in #{options[:match].inspect} files in attributes #{options[:url_attributes].inspect}")
19
+ release.log(self, "Relativizing all URLS in #{options[:match].inspect} files in attributes #{options[:url_attributes].inspect}, skipping #{options[:skip].any? ? options[:skip].inspect : "none" }")
19
20
 
20
21
  @resolver = HtmlMockup::Resolver.new(release.build_path)
21
- release.get_files(options[:match]).each do |file_path|
22
+ release.get_files(options[:match], options[:skip]).each do |file_path|
22
23
  release.debug(self, "Relativizing URLS in #{file_path}") do
23
24
  orig_source = File.read(file_path)
24
25
  File.open(file_path,"w") do |f|
@@ -1,12 +1,12 @@
1
1
  PATH
2
2
  remote: /Users/flurin/Projects.local/libraries/html_mockup
3
3
  specs:
4
- html_mockup (0.7.4)
4
+ html_mockup (0.8.2)
5
5
  hpricot (>= 0.6.4)
6
6
  rack (>= 1.0.0)
7
7
  sass
8
8
  thor (~> 0.16.0)
9
- tilt
9
+ tilt (~> 1.4.0)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
@@ -1,7 +1,10 @@
1
1
 
2
+ mockup.project.options[:verbose] = true;
3
+
2
4
  mockup.serve do |s|
3
5
  end
4
6
 
5
7
  mockup.release do |r|
6
-
8
+ r.use :mockup
9
+ r.use :url_relativizer, :skip => [/non-relative.*/]
7
10
  end
@@ -0,0 +1,9 @@
1
+ <h1>Links should not be made relative</h1>
2
+
3
+ <p>
4
+ <a href="/static/non-relative.html">/test</a>
5
+ <img src="/static/non-relative.html">
6
+ <form action="/static/non-relative.html">
7
+ Form
8
+ </form>
9
+ </p>
@@ -0,0 +1,9 @@
1
+ <h1>Links should be made relative</h1>
2
+
3
+ <p>
4
+ <a href="/static/relative.html">/test</a>
5
+ <img src="/static/relative.html">
6
+ <form action="/static/relative.html">
7
+ Form
8
+ </form>
9
+ </p>
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_mockup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Flurin Egger
@@ -10,11 +11,12 @@ authors:
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2014-02-19 00:00:00.000000000 Z
14
+ date: 2014-02-27 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: thor
17
18
  requirement: !ruby/object:Gem::Requirement
19
+ none: false
18
20
  requirements:
19
21
  - - ~>
20
22
  - !ruby/object:Gem::Version
@@ -22,6 +24,7 @@ dependencies:
22
24
  type: :runtime
23
25
  prerelease: false
24
26
  version_requirements: !ruby/object:Gem::Requirement
27
+ none: false
25
28
  requirements:
26
29
  - - ~>
27
30
  - !ruby/object:Gem::Version
@@ -29,6 +32,7 @@ dependencies:
29
32
  - !ruby/object:Gem::Dependency
30
33
  name: rack
31
34
  requirement: !ruby/object:Gem::Requirement
35
+ none: false
32
36
  requirements:
33
37
  - - ! '>='
34
38
  - !ruby/object:Gem::Version
@@ -36,6 +40,7 @@ dependencies:
36
40
  type: :runtime
37
41
  prerelease: false
38
42
  version_requirements: !ruby/object:Gem::Requirement
43
+ none: false
39
44
  requirements:
40
45
  - - ! '>='
41
46
  - !ruby/object:Gem::Version
@@ -43,6 +48,7 @@ dependencies:
43
48
  - !ruby/object:Gem::Dependency
44
49
  name: tilt
45
50
  requirement: !ruby/object:Gem::Requirement
51
+ none: false
46
52
  requirements:
47
53
  - - ~>
48
54
  - !ruby/object:Gem::Version
@@ -50,6 +56,7 @@ dependencies:
50
56
  type: :runtime
51
57
  prerelease: false
52
58
  version_requirements: !ruby/object:Gem::Requirement
59
+ none: false
53
60
  requirements:
54
61
  - - ~>
55
62
  - !ruby/object:Gem::Version
@@ -57,6 +64,7 @@ dependencies:
57
64
  - !ruby/object:Gem::Dependency
58
65
  name: sass
59
66
  requirement: !ruby/object:Gem::Requirement
67
+ none: false
60
68
  requirements:
61
69
  - - ! '>='
62
70
  - !ruby/object:Gem::Version
@@ -64,6 +72,7 @@ dependencies:
64
72
  type: :runtime
65
73
  prerelease: false
66
74
  version_requirements: !ruby/object:Gem::Requirement
75
+ none: false
67
76
  requirements:
68
77
  - - ! '>='
69
78
  - !ruby/object:Gem::Version
@@ -71,6 +80,7 @@ dependencies:
71
80
  - !ruby/object:Gem::Dependency
72
81
  name: hpricot
73
82
  requirement: !ruby/object:Gem::Requirement
83
+ none: false
74
84
  requirements:
75
85
  - - ! '>='
76
86
  - !ruby/object:Gem::Version
@@ -78,6 +88,7 @@ dependencies:
78
88
  type: :runtime
79
89
  prerelease: false
80
90
  version_requirements: !ruby/object:Gem::Requirement
91
+ none: false
81
92
  requirements:
82
93
  - - ! '>='
83
94
  - !ruby/object:Gem::Version
@@ -149,6 +160,8 @@ files:
149
160
  - test/project/html/layouts/erb.html.erb
150
161
  - test/project/html/partials/erb.html.erb
151
162
  - test/project/html/partials/mockup.html
163
+ - test/project/html/static/non-relative.html.erb
164
+ - test/project/html/static/relative.html.erb
152
165
  - test/project/layouts/test.html.erb
153
166
  - test/project/partials/test/erb.html.erb
154
167
  - test/project/partials/test/markdown.md
@@ -158,27 +171,28 @@ files:
158
171
  homepage: http://github.com/digitpaint/html_mockup
159
172
  licenses:
160
173
  - MIT
161
- metadata: {}
162
174
  post_install_message:
163
175
  rdoc_options:
164
176
  - --charset=UTF-8
165
177
  require_paths:
166
178
  - lib
167
179
  required_ruby_version: !ruby/object:Gem::Requirement
180
+ none: false
168
181
  requirements:
169
182
  - - ! '>='
170
183
  - !ruby/object:Gem::Version
171
184
  version: '0'
172
185
  required_rubygems_version: !ruby/object:Gem::Requirement
186
+ none: false
173
187
  requirements:
174
188
  - - ! '>='
175
189
  - !ruby/object:Gem::Version
176
190
  version: '0'
177
191
  requirements: []
178
192
  rubyforge_project:
179
- rubygems_version: 2.0.6
193
+ rubygems_version: 1.8.23
180
194
  signing_key:
181
- specification_version: 4
195
+ specification_version: 3
182
196
  summary: HTML Mockup is a set of tools to create self-containing HTML mockups.
183
197
  test_files:
184
198
  - test/Mockupfile-syntax.rb
@@ -195,6 +209,8 @@ test_files:
195
209
  - test/project/html/layouts/erb.html.erb
196
210
  - test/project/html/partials/erb.html.erb
197
211
  - test/project/html/partials/mockup.html
212
+ - test/project/html/static/non-relative.html.erb
213
+ - test/project/html/static/relative.html.erb
198
214
  - test/project/layouts/test.html.erb
199
215
  - test/project/partials/test/erb.html.erb
200
216
  - test/project/partials/test/markdown.md
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YjkwNTdkYjA0NGU0MjZkZjg2NTZiNzY1MjkzNmZkNDQ1MDc2ZjZkNQ==
5
- data.tar.gz: !binary |-
6
- NjkzZjc2ODcwMDZkOGFkY2UyN2ZiNTdiYmI5ZmJjM2RjYTI5MDQ0OQ==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MWVjMTEwZDJmYzgxZTNiNzdhNmZjM2FhMDBlYzZmYzkyODVjNGUwNWQwMTll
10
- MTA0ZjA2OWMwODdlMDE4NWE5OGRmZWExYTFjMmFjYzkyZTgzZGY5Y2Y0MjYw
11
- NjI5ZDBmNzllOGE2MmFhOTA0N2IzNWJhMzMzZTkwMDMyZWMzYTU=
12
- data.tar.gz: !binary |-
13
- ZTQyYzdiOGNjZWZmZWUyNzRlMjZhNGY3NjQ5ZDgxMWRlOTMzMmE5ZDUwNTkz
14
- MzZlMWQ5ZGIxODA3ODE1NTVkM2UzYzlmOWRjOGRhNzdiZTEzMGUyMTdkMDg0
15
- MmM4MTcxZDNlM2NmZmFkMjRjYWJmYWM2N2JhMzMyZmQ3NTEzYTA=