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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecc0ec2a17b553bfd87e14cfa37912f871a7dfcf
4
- data.tar.gz: b7cfc1af54a97825b5e8e8391229c50e92db462c
3
+ metadata.gz: 5e0f86b2900d47b937fc8dfb690db21c77872639
4
+ data.tar.gz: 60c2e435b91fd529cf336117bdcb14150275c742
5
5
  SHA512:
6
- metadata.gz: 6a7c25f086b27be5312061c869ff554521ed5a81ecd284e2311a2a3853d475e31fc51f0ae1d769fd1341df8fa051d7c818008bf57125165da9d5353057064be6
7
- data.tar.gz: 4813688ee371de200b8797ee84edf1b5e7076e2cd88dd8663c53452ab1f41bc94cbe38175ba99a82a5216cfde9f9090c708f15f7ea23dd00e27c4700ea4090e7
6
+ metadata.gz: 23e28a30047b8822944a568d6ecf48cdf32ddc56ef8aad5316d275edce910f5cef21293d96b57bba3a535a3d518c8ecdd2427c43b2bc12e285ee8b3db6181330
7
+ data.tar.gz: 0beb01fdac08535e30f380f0650ff29c8b44228bbf8f20f4635ea991c226020a4d21e8a7110157e292bcb818759622ec732df7e2de1e7887dcf1e8c5726dce2a
@@ -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
@@ -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
- cp_r(self.source_path.children, self.build_path)
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!
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "roger"
5
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
6
6
 
7
7
  s.authors = ["Flurin Egger", "Edwin van der Graaf", "Joran Kapteijns"]
8
8
  s.email = ["info@digitpaint.nl", "flurin@digitpaint.nl"]
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.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-05 00:00:00.000000000 Z
13
+ date: 2015-05-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor