roger 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/roger/release.rb +16 -6
- data/roger.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0f86b2900d47b937fc8dfb690db21c77872639
|
4
|
+
data.tar.gz: 60c2e435b91fd529cf336117bdcb14150275c742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23e28a30047b8822944a568d6ecf48cdf32ddc56ef8aad5316d275edce910f5cef21293d96b57bba3a535a3d518c8ecdd2427c43b2bc12e285ee8b3db6181330
|
7
|
+
data.tar.gz: 0beb01fdac08535e30f380f0650ff29c8b44228bbf8f20f4635ea991c226020a4d21e8a7110157e292bcb818759622ec732df7e2de1e7887dcf1e8c5726dce2a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## Version 1.0.1
|
4
|
+
|
5
|
+
* Release copy command is now configurable by passing :cp configuration option to the mockup.release command in the mockup file. By default the release now uses system cp instead of fileutils cp so we can follow symlinks (you don't want symlinks in your release). If you want the old behaviour you have to pass {cp: nil}.
|
6
|
+
|
3
7
|
## Version 1.0.0
|
4
8
|
|
5
9
|
There should be no breaking changes between 0.13.0 and 1.0.0
|
data/lib/roger/release.rb
CHANGED
@@ -2,6 +2,8 @@ require File.dirname(__FILE__) + "/cli"
|
|
2
2
|
require File.dirname(__FILE__) + "/helpers/get_callable"
|
3
3
|
require File.dirname(__FILE__) + "/helpers/logging"
|
4
4
|
|
5
|
+
require "shellwords"
|
6
|
+
|
5
7
|
module Roger
|
6
8
|
class Release
|
7
9
|
include Roger::Helpers::Logging
|
@@ -12,7 +14,7 @@ module Roger
|
|
12
14
|
|
13
15
|
class << self
|
14
16
|
include Roger::Helpers::GetCallable
|
15
|
-
|
17
|
+
|
16
18
|
def default_stack
|
17
19
|
[]
|
18
20
|
end
|
@@ -27,12 +29,14 @@ module Roger
|
|
27
29
|
# @option config [String, Pathname] :target_path The path/directory to put the release into
|
28
30
|
# @option config [String, Pathname]:build_path Temporary path used to build the release
|
29
31
|
# @option config [Boolean] :cleanup_build Wether or not to remove the build_path after we're done (default = true)
|
32
|
+
# @option config [Array,String, nil] :cp CP command to use; Array will be escaped with Shellwords. Pass nil to get native Ruby CP. (default = ["cp", "-RL"])
|
30
33
|
def initialize(project, config = {})
|
31
34
|
defaults = {
|
32
35
|
:scm => :git,
|
33
36
|
:source_path => Pathname.new(Dir.pwd) + "html",
|
34
37
|
:target_path => Pathname.new(Dir.pwd) + "releases",
|
35
38
|
:build_path => Pathname.new(Dir.pwd) + "build",
|
39
|
+
:cp => ["cp", "-RL"],
|
36
40
|
:cleanup_build => true
|
37
41
|
}
|
38
42
|
|
@@ -186,10 +190,10 @@ module Roger
|
|
186
190
|
|
187
191
|
# Cleanup
|
188
192
|
cleanup! if self.config[:cleanup_build]
|
189
|
-
|
190
|
-
end
|
191
|
-
|
192
|
-
|
193
|
+
|
194
|
+
end
|
195
|
+
|
196
|
+
|
193
197
|
# @param [Array] globs an array of file path globs that will be globbed against the build_path
|
194
198
|
# @param [Array] excludes an array of regexps that will be excluded from the result
|
195
199
|
def get_files(globs, excludes = [])
|
@@ -245,7 +249,13 @@ module Roger
|
|
245
249
|
|
246
250
|
def copy_source_path_to_build_path!
|
247
251
|
mkdir(self.build_path)
|
248
|
-
|
252
|
+
|
253
|
+
if self.config[:cp]
|
254
|
+
command = [self.config[:cp]].flatten
|
255
|
+
system(Shellwords.join(command + ["#{self.source_path}/", self.build_path]))
|
256
|
+
else
|
257
|
+
cp_r(self.source_path.children, self.build_path)
|
258
|
+
end
|
249
259
|
end
|
250
260
|
|
251
261
|
def run_stack!
|
data/roger.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Flurin Egger
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-05-
|
13
|
+
date: 2015-05-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|