roger 1.4.0 → 1.4.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: 49a1a247ec24477695446f28ee9fc18303c679db
4
- data.tar.gz: ec29ac61a0ea48418f81114a3826dbdf56ed3efd
3
+ metadata.gz: b6296e68b1cd2aceaa8409a8a537bb3deaa528b1
4
+ data.tar.gz: 8d0260c2766f9383687802c3fae0e7ad881c427c
5
5
  SHA512:
6
- metadata.gz: 256706c9c7e39642602d4dc33b85211b3ffb47889890e3334eaed3804331937ff4ffafb3fc8cb8d497daab234d847632d9986e8afadcffc19adad9be1b5510df
7
- data.tar.gz: 2317f5b6140e265463ff6d797d2e2f103e33146ff1b22ef1a8184609ae168eb0c522f992d2176af94b5f896a3e1ed37874946bca70feef1dc16cb74a9a2f906b
6
+ metadata.gz: c89421a2f22621bb0afadcff333fbae5d918af07157cc9c48f211015a86a92b3a36b134fb9f7c0b35003655ff2ba2b8e0bbc3b7e451b9bd58f6dc2fd65f45323
7
+ data.tar.gz: 730dc99915b6cababef13df14a2b33afc4457c36ead3fad2ec6f04e57ccd2d4bc33ecff01b9491c4fdec49544e3639465876f40b86aea5413de4484764400b38
data/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # Changelog
2
2
 
3
+ ## Version 1.4.1
4
+ * Minor fix for release on Linux when using the default `cp -RL` to copy html to build.
5
+
3
6
  ## Version 1.4.0
4
7
  * Rename Mockupfile to Rogerfile
5
8
  * Remove the deprecated `Roger::Extractor` (use `Roger::Template` instead)
data/lib/roger/release.rb CHANGED
@@ -282,11 +282,10 @@ module Roger
282
282
  end
283
283
 
284
284
  def copy_source_path_to_build_path!
285
- mkdir(build_path)
286
-
287
285
  if config[:cp]
288
286
  copy_source_path_to_build_path_using_system
289
287
  else
288
+ mkdir(build_path)
290
289
  cp_r(source_path.children, build_path)
291
290
  end
292
291
  end
data/lib/roger/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # Roger main namespace
2
2
  module Roger
3
- VERSION = "1.4.0"
3
+ VERSION = "1.4.1"
4
4
  end
@@ -10,6 +10,10 @@ module Roger
10
10
  @rogerfile = Roger::Rogerfile.new(@project)
11
11
  end
12
12
 
13
+ def teardown
14
+ @project.destroy
15
+ end
16
+
13
17
  def test_run_should_set_project_mode
14
18
  assert_equal @project.mode, nil
15
19
 
@@ -48,6 +52,38 @@ module Roger
48
52
  assert_equal Roger::Release::Processors::UrlRelativizer, release.stack.last.first.class
49
53
  end
50
54
 
55
+ # =============================
56
+ # = Copy source to build test =
57
+ # =============================
58
+
59
+ def test_copy_using_cp
60
+ @rogerfile.release(blank: true, cleanup_build: false)
61
+ @project.construct.file "html/test.txt"
62
+ @project.release.run!
63
+
64
+ build_path = @project.release.build_path
65
+
66
+ assert build_path.exist?
67
+ assert_equal 1, build_path.children.size
68
+ assert_equal build_path + "test.txt", build_path.children.first
69
+ end
70
+
71
+ def test_copy_using_fileutils
72
+ @rogerfile.release(cp: nil, blank: true, cleanup_build: false)
73
+ @project.construct.file "html/test.txt"
74
+ @project.release.run!
75
+
76
+ build_path = @project.release.build_path
77
+
78
+ assert build_path.exist?
79
+ assert_equal 1, build_path.children.size
80
+ assert_equal build_path + "test.txt", build_path.children.first
81
+ end
82
+
83
+ # ============================
84
+ # = Banner and comment tests =
85
+ # ============================
86
+
51
87
  def test_default_banner
52
88
  release = @rogerfile.release(scm: :fixed)
53
89
 
@@ -122,6 +158,10 @@ module Roger
122
158
  assert_equal "/* a\nb */", release.comment("a\nb", options)
123
159
  end
124
160
 
161
+ # ======================
162
+ # = Get callable tests =
163
+ # ======================
164
+
125
165
  def test_get_callable
126
166
  p = -> {}
127
167
  assert_equal Release.get_callable(p, {}), p
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.4.0
4
+ version: 1.4.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-07-24 00:00:00.000000000 Z
13
+ date: 2015-08-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: thor