middleman-target 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +56 -25
- data/features/support/env.rb +0 -2
- metadata +30 -29
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NDFiMDk5MjIxMzE1ZjM5YTBlNDg1Mjk4N2I5ODExMGEwNGFkNzcwNQ==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 562b1b74b5e5445b403684d567b4d3b9a84a1dbb
|
4
|
+
data.tar.gz: 4283cff7a1f21a65a1218bf3ab87509ec4fe764b
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
MmUyYzkwZGFhODhmOTVhNGNjMzI3MGRjNmI0NzFlZDE1YzVjNzU1OTU1ZjAy
|
11
|
-
Yzk2NWQzMjY3YjIxZDA1NTE4MWMyYWM5NGNlY2VlZDMxYTg1NTM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
M2VlYzk1MDdlMTkwNzZjM2VkZTc3OWFmMTU1MzBjYWE3OWU1NmQ5YWE0Y2I3
|
14
|
-
ODM0MmI3MTI4ZWJiYzRkYjA3OWVlYjZhMWJiODdmZWVjOTI2ZjVjNDgwYjMw
|
15
|
-
ZjBmZjE5YTEzZTE1OTNiZWQ4MmY5NjYwNjBiYjQ2ZGU3MzA5Njc=
|
6
|
+
metadata.gz: df8c5dc0d8ec1dc7ce8b654f119d8066f99482dc49fb7786da8681633ce1090ae0650b6049f33a46e7871d6d25badab75f0f8b5158f3171b4d7b9f4727b4e0eb
|
7
|
+
data.tar.gz: 47b0d3b3586accbe3aa51e5f971ed9decdeff206ea16c4c65a52c808baa16c4e8a730b9be597e0c8c53f05c9b84568247ce40e0b78efe9628d8e84129a190b7d
|
data/README.md
CHANGED
@@ -3,9 +3,17 @@
|
|
3
3
|
|
4
4
|
# Middleman-Target
|
5
5
|
|
6
|
-
Middleman-Target is an extension to [MIDDLEMAN] 3.
|
6
|
+
Middleman-Target is an extension to [MIDDLEMAN] 3.x.x and greater to allow
|
7
|
+
you to specify a build target and generate the content accordingly.
|
7
8
|
|
8
|
-
You can use Middleman-Target in your Middleman project to build multiple
|
9
|
+
You can use Middleman-Target in your Middleman project to build multiple
|
10
|
+
versions of your source from one source tree. This is especially useful for
|
11
|
+
Phonegap/Cordova, so you can use one source tree to build apps for different
|
12
|
+
platforms.
|
13
|
+
|
14
|
+
NOTE: This version is for [MIDDLEMAN] >= 3.x.x and Ruby >= 1.9.1. For
|
15
|
+
compatibility with Middleman 2.x.x or Ruby 1.8.7, please see version 0.0.1
|
16
|
+
of this gem.
|
9
17
|
|
10
18
|
# Examples
|
11
19
|
|
@@ -38,11 +46,13 @@ Output when run with a build target of 'foo':
|
|
38
46
|
|
39
47
|
## Less simple using build target maps:
|
40
48
|
|
41
|
-
If you wanted a particular condition to apply to more than one target you may
|
49
|
+
If you wanted a particular condition to apply to more than one target you may
|
50
|
+
do something like:
|
42
51
|
|
43
52
|
if (target?(:anrdroid) || target?(:ios)) { ... }
|
44
53
|
|
45
|
-
..but that can get ugly. Instead we have the concept of "build target maps".
|
54
|
+
..but that can get ugly. Instead we have the concept of "build target maps".
|
55
|
+
They are declared in the `config.rb`:
|
46
56
|
|
47
57
|
activate :target do |t|
|
48
58
|
t.build_targets = {
|
@@ -56,9 +66,13 @@ If you wanted a particular condition to apply to more than one target you may do
|
|
56
66
|
|
57
67
|
build_target_is?(:phonegap)
|
58
68
|
|
59
|
-
..will be TRUE since "android" is specifed as being 'included' in this
|
69
|
+
..will be TRUE since "android" is specifed as being 'included' in this
|
70
|
+
phonegap build target.
|
60
71
|
|
61
|
-
NOTE: You cannot "build" the "phonegap" target directly, you would build the
|
72
|
+
NOTE: You cannot "build" the "phonegap" target directly, you would build the
|
73
|
+
"android" and "ios" targets separately. This is here so you can specify
|
74
|
+
conditions that span two or more build targets without having to make
|
75
|
+
complicated "if" statements.
|
62
76
|
|
63
77
|
## Default target
|
64
78
|
|
@@ -70,34 +84,23 @@ Please see the EXAMPLES directory for more thorough information.
|
|
70
84
|
|
71
85
|
# Building a target
|
72
86
|
|
73
|
-
Middleman-target doesn't yet properly connect to the CLI portion of Middleman.
|
87
|
+
Middleman-target doesn't yet properly connect to the CLI portion of Middleman.
|
88
|
+
Instead, to specify a build target you currently use and environment variable
|
89
|
+
named "MIDDLEMAN_BUILD_TARGET".
|
74
90
|
|
75
91
|
To build the target of "aardvark" you would run:
|
76
92
|
|
77
93
|
MIDDLEMAN_BUILD_TARGET=aardvark middleman build
|
78
94
|
|
79
|
-
# TODO:
|
80
|
-
|
81
|
-
* repace target.build_targets with something more extensible
|
82
|
-
* write rdoc
|
83
|
-
* validate the hash passed in to set_build_targets()
|
84
|
-
* set build target on the command line as "middleman build TARGET"
|
85
|
-
* use app.set instead of always reading ENV for build target
|
86
|
-
* not allowed to use a build target from the command line if that build_target if specified as a first-order entry in set_build_targets()
|
87
|
-
|
88
|
-
# REQUIREMENTS AND INSTALLATION
|
89
|
-
|
90
|
-
This new version is for [MIDDLEMAN] 3.0.x and greater ONLY. For compatibility with Middleman 2.0.x, please see version 0.0.1 of this gem.
|
91
|
-
|
92
95
|
## Installing in to Middleman tree
|
93
96
|
|
94
|
-
Add the following near the top of your config.rb
|
97
|
+
Add the following near the top of your `config.rb`:
|
95
98
|
|
96
99
|
require 'rubygems' # may not be needed depending on ruby ver
|
97
100
|
require 'middleman-target'
|
98
101
|
activate :target
|
99
102
|
|
100
|
-
To specify a build target map, pass a block in to the
|
103
|
+
To specify a build target map, pass a block in to the `activate` method as:
|
101
104
|
|
102
105
|
activate :target do |t|
|
103
106
|
t.build_targets = { ... }
|
@@ -105,6 +108,15 @@ To specify a build target map, pass a block in to the "activate" method as:
|
|
105
108
|
|
106
109
|
Please see /examples for a working usage example.
|
107
110
|
|
111
|
+
# TODO:
|
112
|
+
|
113
|
+
* repace target.build_targets with something more extensible
|
114
|
+
* write rdoc
|
115
|
+
* validate the hash passed in to set_build_targets()
|
116
|
+
* set build target on the command line as "middleman build TARGET"
|
117
|
+
* use app.set instead of always reading ENV for build target
|
118
|
+
* not allowed to use a build target from the command line if that build_target if specified as a first-order entry in set_build_targets()
|
119
|
+
|
108
120
|
# Contributing
|
109
121
|
|
110
122
|
If there is any thing you'd like to contribute or fix, please:
|
@@ -117,10 +129,29 @@ If there is any thing you'd like to contribute or fix, please:
|
|
117
129
|
|
118
130
|
The Cucumber features for this project assume the gem is installed, so to make any changes you will need to build and install the gem locally with your changes.
|
119
131
|
|
132
|
+
# Changes
|
133
|
+
|
134
|
+
0.0.7
|
135
|
+
* Tested with middleman 3.3.7, changed post-install warning to reflect this.
|
136
|
+
* Fixes https://github.com/xunker/middleman-target/issues/12
|
137
|
+
|
138
|
+
0.0.6
|
139
|
+
* Removed maximal middleman version requirement. If the version of middleman
|
140
|
+
currently installed in greater than the last-tested version, a post-install
|
141
|
+
warning is given but the installation will succeed.
|
142
|
+
|
143
|
+
0.0.5
|
144
|
+
* Changed middleman dependency from ~>3.0.11 to >= 3.0.0 and < 3.2
|
145
|
+
|
146
|
+
0.0.4
|
147
|
+
* Fixes https://github.com/xunker/middleman-target/issues/3
|
148
|
+
|
120
149
|
# Misc
|
121
150
|
|
122
|
-
The middleman-target gem is Copyright 2012-
|
151
|
+
The middleman-target gem is Copyright 2012-2015 Matthew Nielsen, distributed
|
152
|
+
under the MIT License.
|
123
153
|
|
124
|
-
Thanks to jtwalters@github for patches and motivation to add Middleman 3
|
154
|
+
Thanks to jtwalters@github for patches and motivation to add Middleman 3
|
155
|
+
compatibility.
|
125
156
|
|
126
|
-
[MIDDLEMAN]: https://github.com/middleman/middleman/
|
157
|
+
[MIDDLEMAN]: https://github.com/middleman/middleman/
|
data/features/support/env.rb
CHANGED
@@ -4,7 +4,6 @@ ENV["AUTOLOAD_SPROCKETS"] = "false"
|
|
4
4
|
PROJECT_ROOT_PATH = File.dirname(File.dirname(File.dirname(__FILE__)))
|
5
5
|
require "middleman-core"
|
6
6
|
require "middleman-core/step_definitions"
|
7
|
-
# require File.join(PROJECT_ROOT_PATH, 'lib', 'middleman-target')
|
8
7
|
|
9
8
|
require 'middleman-target'
|
10
9
|
|
@@ -12,7 +11,6 @@ After do
|
|
12
11
|
ENV['MIDDLEMAN_BUILD_TARGET'] = nil
|
13
12
|
end
|
14
13
|
|
15
|
-
|
16
14
|
Given /^build target is "(.*?)"$/ do |target_name|
|
17
15
|
ENV['MIDDLEMAN_BUILD_TARGET'] = target_name
|
18
16
|
end
|
metadata
CHANGED
@@ -1,85 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-target
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Nielsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: cucumber
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: aruba
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0
|
68
|
+
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: '0'
|
83
83
|
description: Allows you specify different targets for a middleman build so you can
|
84
84
|
build different versions of a site from the same source tree.
|
85
85
|
email: xunker@pyxidis.org
|
@@ -90,9 +90,8 @@ files:
|
|
90
90
|
- README.md
|
91
91
|
- examples/config.rb
|
92
92
|
- examples/source/index.html.erb
|
93
|
-
-
|
94
|
-
-
|
95
|
-
- lib/middleman_extension.rb
|
93
|
+
- features/support/env.rb
|
94
|
+
- features/target.feature
|
96
95
|
- fixtures/build_target/config.rb
|
97
96
|
- fixtures/build_target/source/build_target.html.erb
|
98
97
|
- fixtures/build_target_default/config.rb
|
@@ -101,10 +100,12 @@ files:
|
|
101
100
|
- fixtures/build_target_includes/source/build_target_includes.html.erb
|
102
101
|
- fixtures/build_targets/config.rb
|
103
102
|
- fixtures/build_targets/source/build_targets.html.erb
|
104
|
-
-
|
105
|
-
-
|
103
|
+
- lib/middleman-target.rb
|
104
|
+
- lib/middleman-target/extension.rb
|
105
|
+
- lib/middleman_extension.rb
|
106
106
|
homepage: https://github.com/xunker/middleman-target
|
107
|
-
licenses:
|
107
|
+
licenses:
|
108
|
+
- MIT
|
108
109
|
metadata: {}
|
109
110
|
post_install_message:
|
110
111
|
rdoc_options: []
|
@@ -112,17 +113,17 @@ require_paths:
|
|
112
113
|
- lib
|
113
114
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
115
|
requirements:
|
115
|
-
- -
|
116
|
+
- - ">="
|
116
117
|
- !ruby/object:Gem::Version
|
117
118
|
version: '0'
|
118
119
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
120
|
requirements:
|
120
|
-
- -
|
121
|
+
- - ">="
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0'
|
123
124
|
requirements: []
|
124
125
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
126
|
+
rubygems_version: 2.2.2
|
126
127
|
signing_key:
|
127
128
|
specification_version: 4
|
128
129
|
summary: Ability to specify build targets for Middleman projects
|