roger 1.9.1 → 1.10.0

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
  SHA256:
3
- metadata.gz: 6071a3c717f18dc4886723a0614e5ef650efb9e1147c3b14f2cbdb88e2b8f66a
4
- data.tar.gz: 39d6a8f3f1bf2dbb762ae3dbc09c5ece10d134557142aa48734565f18d915eb4
3
+ metadata.gz: efd7941dc2b51531780bfe297876031cb0bc851bad27433b7042e0bc4ee12e8d
4
+ data.tar.gz: 6060734502ae24c45ae60855e6bce313f4e3551802dc94ef4a076d8d5568af07
5
5
  SHA512:
6
- metadata.gz: 26d5bb54c66be7aad6bf1a7446108fd6c546ee6f08161f36256b7eb00ed7183799bb82a25c182aacf7d66560690b59e41761580464f16a7bddb25ba9008ab9b0
7
- data.tar.gz: 4f226bb86eb4ba2514889cd67337f02eefbdb997c3a5edfc1226d801f37e8ae88c7a06a0d6d3e32a8a6f9568d35c6eb0bcd78c13b9fc6e50ec496b2668069328
6
+ metadata.gz: 2d4a64b951547af9a8c77d77f5f0e18993fdd52299e704c376a1fb7b56c06715f8b165794203f993fc53d71230e164f83ffa6f86c008a79440e297091a7e60b1
7
+ data.tar.gz: 72ea2cedc15788fb235c586394bc5fff115c23f92368654c34ede2f37a7004be8ca71baabada71ce000f1cb23a4f0edde91adc9f714ce549dfb3ed11b993f9f9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 1.10.0
4
+ * Make release-copy command a configurable lambda and use xcopy on Windows by default
5
+
3
6
  ## Version 1.9.1
4
7
  * Make Roger work on Windows (except the rsync finalizer)
5
8
 
data/lib/roger/release.rb CHANGED
@@ -24,8 +24,7 @@ module Roger
24
24
  # @option config [String, Pathname]:build_path Temporary path used to build the release
25
25
  # @option config [Boolean] :cleanup_build Wether or not to remove the build_path after we're
26
26
  # done (default = true)
27
- # @option config [Array,String, nil] :cp CP command to use; Array will be escaped with
28
- # Shellwords. Pass nil to get native Ruby CP. (default = ["cp", "-RL"])
27
+ # @option config [lambda] :cp Function to be called for copying
29
28
  # @option config [Boolean] :blank Keeps the release clean, don't automatically add any
30
29
  # processors or finalizers (default = false)
31
30
  def initialize(project, config = {})
@@ -35,7 +34,18 @@ module Roger
35
34
  source_path: project.html_path.realpath,
36
35
  target_path: real_project_path + "releases",
37
36
  build_path: real_project_path + "build",
38
- cp: ["cp", "-RL"],
37
+ cp: lambda do |source, dest|
38
+ if RUBY_PLATFORM.match("mswin") || RUBY_PLATFORM.match("mingw")
39
+ unless system(["echo d | xcopy", "/E", "/Y", source.to_s.gsub("/", "\\"),
40
+ dest.to_s.gsub("/", "\\")].join(" "))
41
+ raise "Could not copy build directory using xcopy"
42
+ end
43
+ else
44
+ unless system(Shellwords.join(["cp", "-LR", "#{source}/", dest.to_s]))
45
+ raise "Could not copy build directory using cp"
46
+ end
47
+ end
48
+ end,
39
49
  blank: false,
40
50
  cleanup_build: true
41
51
  }
@@ -281,18 +291,13 @@ module Roger
281
291
 
282
292
  def copy_source_path_to_build_path!
283
293
  if config[:cp]
284
- copy_source_path_to_build_path_using_system
294
+ config[:cp].call(source_path, build_path)
285
295
  else
286
296
  mkdir(build_path)
287
297
  cp_r(source_path.children, build_path)
288
298
  end
289
299
  end
290
300
 
291
- def copy_source_path_to_build_path_using_system
292
- command = [config[:cp]].flatten
293
- system(Shellwords.join(command + ["#{source_path}/", build_path.to_s]))
294
- end
295
-
296
301
  def run_stack!
297
302
  # call all objects in @stack
298
303
  @stack.each do |task|
data/lib/roger/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Roger main namespace
2
2
  module Roger
3
- VERSION = "1.9.1".freeze
3
+ VERSION = "1.10.0".freeze
4
4
  end
data/roger.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
6
6
  s.name = "roger"
7
7
  s.version = Roger::VERSION
8
8
 
9
- s.authors = ["Flurin Egger", "Edwin van der Graaf", "Joran Kapteijns"]
9
+ s.authors = ["Flurin Egger", "Edwin van der Graaf", "Joran Kapteijns", "Hans Krutzer"]
10
10
  s.email = ["info@digitpaint.nl", "flurin@digitpaint.nl"]
11
11
  s.homepage = "http://github.com/digitpaint/roger"
12
12
  s.summary = "Roger is a set of tools to create self-containing HTML mockups."
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: roger
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.1
4
+ version: 1.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flurin Egger
8
8
  - Edwin van der Graaf
9
9
  - Joran Kapteijns
10
+ - Hans Krutzer
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2019-02-04 00:00:00.000000000 Z
14
+ date: 2019-04-18 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: thor
@@ -356,8 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
356
357
  - !ruby/object:Gem::Version
357
358
  version: '0'
358
359
  requirements: []
359
- rubyforge_project:
360
- rubygems_version: 2.7.8
360
+ rubygems_version: 3.0.1
361
361
  signing_key:
362
362
  specification_version: 4
363
363
  summary: Roger is a set of tools to create self-containing HTML mockups.