middleman-targets 1.0.12 → 1.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1da8a94933a48b1ca7ad3403cf367333f5a17608
4
- data.tar.gz: 66dbc64d01a283b5a262e63c31afe405ec7d7b3a
3
+ metadata.gz: a9dac61ef46f8718f9048a416f5b2b2f94c1a609
4
+ data.tar.gz: 6c54d519c2966b012339ab7164cd8d63d49457a5
5
5
  SHA512:
6
- metadata.gz: 47e1f682923fc87aa862d773e15a72cdc2a6ee09525e3a7e5d51e8988468e0e3ca8c707e269e0c29699b9d07b55a6c788ecc918aafb64d89afde1dab1c543670
7
- data.tar.gz: 2bf1b17e55d8221450a31bcee8602fd436aac3442b73fc8b49943c350b666b11a0feed7a8e5b059caa14bb52e017aa4836f8bc96c089195557d2c94adbfd34be
6
+ metadata.gz: 57d35e792099d180d7103b55fa27060dfcb9e197370fe4b18cacd003cbba691c57a1743807d97e7f8f010d4b974082210c511fbf16f5353259877903ccc0a781
7
+ data.tar.gz: c597317043df3192021c94ad65edeb6e5f4e97ad954ad41c4c66fdae8e48faa802c92a82fd45ed7b3f324d9a3ad1dc1f5518002bef2f5f1e96ce8abca76458b5
@@ -103,7 +103,7 @@ helpers do
103
103
  end
104
104
 
105
105
  def product_version
106
- '1.0.12'
106
+ '1.0.13'
107
107
  end
108
108
 
109
109
  end
@@ -31,16 +31,17 @@ class MiddlemanTargets < ::Middleman::Extension
31
31
 
32
32
  # @!attribute [rw] config[:targets]=
33
33
  # A hash that defines all of the characteristics of your individual targets.
34
- # The `build_dir` and `features` keys in a target have special meanings;
35
- # other keys can be added arbitrarily and helpers can fetch these for you.
36
- # A best practice is to assign the same features to _all_ of your targets and
37
- # toggle them `on` or `off` on a target-specific basis.
34
+ # The `build_dir`, 'http_prefix', and `features` keys in a target have special
35
+ # meanings; other keys can be added arbitrarily and helpers can fetch these
36
+ # for you. A best practice is to assign the same features to _all_ of your
37
+ # targets and toggle them `on` or `off` on a target-specific basis.
38
38
  # @example You might define this in your `config.rb` like this:
39
39
  # config[:targets] = {
40
40
  # :free =>
41
41
  # {
42
42
  # :sample_key => 'People who use free versions don\'t drive profits.',
43
43
  # :build_dir => 'build (%s)',
44
+ # :http_prefix => '/free',
44
45
  # :features =>
45
46
  # {
46
47
  # :feature_advertise_pro => true,
@@ -52,6 +53,7 @@ class MiddlemanTargets < ::Middleman::Extension
52
53
  # :pro =>
53
54
  # {
54
55
  # :sample_key => 'You are a valued contributor to our balance sheet!',
56
+ # :http_prefix => '/pro',
55
57
  # :features =>
56
58
  # {
57
59
  # :feature_advertise_pro => false,
@@ -98,6 +100,16 @@ class MiddlemanTargets < ::Middleman::Extension
98
100
  # @note This is a Middleman application level config option.
99
101
 
100
102
 
103
+ # @!attribute [rw] config[:http_prefix]=
104
+ # Default prefix for building paths. Used by HTML helpers.
105
+ #
106
+ # If the `http_prefix` key is present for any of the `config[:targets]`,
107
+ # they will override this setting.
108
+ # @return [String] Indicate the HTTP prefix that will be used by
109
+ # HTML helpers.
110
+ # @note This is a Middleman application level config option.
111
+
112
+
101
113
  # @!endgroup
102
114
 
103
115
 
@@ -146,6 +158,11 @@ class MiddlemanTargets < ::Middleman::Extension
146
158
  else
147
159
  say "Middleman will build using target \"#{requested_target}\".", :blue
148
160
  say "Build directory is \"#{app.config[:build_dir]}\".", :blue
161
+
162
+ if (http_prefix = app.config[:targets][app.config[:target]][:http_prefix])
163
+ app.config[:http_prefix] = http_prefix
164
+ say "Using http_prefix \"#{app.config[:http_prefix]}\".", :blue
165
+ end
149
166
  end
150
167
 
151
168
  else
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module MiddlemanTargets
3
- VERSION = '1.0.12'
3
+ VERSION = '1.0.13'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-targets
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jim Derry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-09 00:00:00.000000000 Z
11
+ date: 2018-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: middleman-core