middleman-core 4.3.3 → 4.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 61cbb0971519b39e43ab5691e5b7de36ef5c582c23378c667ab2cc059e3d006b
4
- data.tar.gz: 277df7e8ba7b78e776212de95518611a920ca80a03fac4e373f8a5f1a7f75810
3
+ metadata.gz: 38f104570f1ccbea0c4c223490a37f25a282dcb9bcd94c07c830e746bcedf02b
4
+ data.tar.gz: 32e569392cf1cd42430441dd07ea184e1018519fae154929ceafebbcd124103b
5
5
  SHA512:
6
- metadata.gz: 31be3f47fc41353b3e58a70f4760baa81fc34f0ae1d8a6a08b88aefa9b1682e7b89bb3bb02409d916b945bf21b3e772cb39b911c7bdc26b2137d881181d9cc22
7
- data.tar.gz: abd1e8c5ca18cb09484947d7241e44dccf93f02b0e20dec82b87e5d223c4e07a5839f9b7452994b98134f49f0a42514d06c8efd8e136f3dad4b477e9eccf098b
6
+ metadata.gz: 5367eefd17066d8f3d1b2a242bbc3cf6a7a6962b30e281ced3496c2202d6bcdc30e9626af0dfbdd175477935446469420e5ed35d954d3a0a40768df2c6ee232c
7
+ data.tar.gz: 055e20d30f88dcc68383a3bf1f2d5f553c95aa8ab2e49e15bb5554fb5cfb3101319d5eafb43549fd645c7b4e281afd84c25dcf42e238395ceba950738e073bf9
@@ -7,11 +7,12 @@ Feature: Ignoring paths
7
7
  ignore 'plain.html'
8
8
  """
9
9
  And a successfully built app at "ignore-app"
10
+ When I cd to "build"
10
11
  Then the following files should exist:
11
- | build/index.html |
12
+ | index.html |
12
13
  And the following files should not exist:
13
- | build/plain.html |
14
- | build/about.html |
14
+ | plain.html |
15
+ | about.html |
15
16
 
16
17
  Scenario: Ignore a single path (server)
17
18
  Given a fixture app "ignore-app"
@@ -66,16 +67,17 @@ Feature: Ignoring paths
66
67
  ignore 'images/**/*.png'
67
68
  """
68
69
  And a successfully built app at "ignore-app"
70
+ When I cd to "build"
69
71
  Then the following files should exist:
70
- | build/plain.html |
71
- | build/images/portrait.jpg |
72
- | build/images/pic.png |
72
+ | plain.html |
73
+ | images/portrait.jpg |
74
+ | images/pic.png |
73
75
  And the following files should not exist:
74
- | build/about.html |
75
- | build/index.html |
76
- | build/reports/index.html |
77
- | build/reports/another.html |
78
- | build/images/icons/messages.png |
76
+ | about.html |
77
+ | index.html |
78
+ | reports/index.html |
79
+ | reports/another.html |
80
+ | images/icons/messages.png |
79
81
 
80
82
  Scenario: Ignore a globbed path (server)
81
83
  Given a fixture app "ignore-app"
@@ -148,3 +150,57 @@ Feature: Ignoring paths
148
150
  Then I should see "File Not Found"
149
151
  When I go to "/images/icons/messages.png"
150
152
  Then I should see "File Not Found"
153
+
154
+ Scenario: Ignore localized templates (build)
155
+ Given a fixture app "i18n-test-app"
156
+ And a file named "config.rb" with:
157
+ """
158
+ activate :i18n
159
+ ignore 'localizable/hello.html.erb'
160
+ ignore /morning/
161
+ ignore 'localizable/*.md'
162
+ """
163
+ And a successfully built app at "i18n-test-app"
164
+ When I cd to "build"
165
+ Then the following files should exist:
166
+ | index.html |
167
+ | es/index.html |
168
+ And the following files should not exist:
169
+ | hello.html |
170
+ | morning.html |
171
+ | one.html |
172
+ | es/hola.html |
173
+ | es/manana.html |
174
+ | es/una.html |
175
+ | es/hello.html |
176
+ | es/morning.html |
177
+ | es/one.html |
178
+ And the file "index.html" should contain "Howdy"
179
+ And the file "es/index.html" should contain "Como Esta?"
180
+
181
+ Scenario: Ignore localized templates (server)
182
+ Given a fixture app "i18n-test-app"
183
+ And a file named "config.rb" with:
184
+ """
185
+ activate :i18n
186
+ ignore 'localizable/hello.html.erb'
187
+ ignore /morning/
188
+ ignore 'localizable/*.md'
189
+ """
190
+ And the Server is running
191
+ When I go to "/index.html"
192
+ Then I should not see "File Not Found"
193
+ When I go to "/es/index.html"
194
+ Then I should not see "File Not Found"
195
+ When I go to "/hello.html"
196
+ Then I should see "File Not Found"
197
+ When I go to "/morning.html"
198
+ Then I should see "File Not Found"
199
+ When I go to "/one.html"
200
+ Then I should see "File Not Found"
201
+ When I go to "/es/hola.html"
202
+ Then I should see "File Not Found"
203
+ When I go to "/es/manana.html"
204
+ Then I should see "File Not Found"
205
+ When I go to "/es/una.html"
206
+ Then I should see "File Not Found"
@@ -155,6 +155,8 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
155
155
 
156
156
  # If it's a "localizable template"
157
157
  localizable_folder_resources.each do |resource|
158
+ next if resource.ignored?
159
+
158
160
  page_id = File.basename(resource.path, File.extname(resource.path))
159
161
  locales.each do |locale|
160
162
  # Remove folder name
@@ -174,6 +176,8 @@ class Middleman::CoreExtensions::Internationalization < ::Middleman::Extension
174
176
 
175
177
  # If it uses file extension localization
176
178
  file_extension_resources.each do |resource|
179
+ next if resource.ignored?
180
+
177
181
  result = parse_locale_extension(resource.path)
178
182
  ext_locale, path, page_id = result
179
183
  new_resources << build_resource(path, resource.path, page_id, ext_locale)
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  # Current Version
3
3
  # @return [String]
4
- VERSION = '4.3.3'.freeze unless const_defined?(:VERSION)
4
+ VERSION = '4.3.4'.freeze unless const_defined?(:VERSION)
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.3
4
+ version: 4.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Reynolds
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2019-02-18 00:00:00.000000000 Z
13
+ date: 2019-05-13 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler