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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/roger/release.rb +1 -2
- data/lib/roger/version.rb +1 -1
- data/test/unit/release_test.rb +40 -0
- 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: b6296e68b1cd2aceaa8409a8a537bb3deaa528b1
|
4
|
+
data.tar.gz: 8d0260c2766f9383687802c3fae0e7ad881c427c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c89421a2f22621bb0afadcff333fbae5d918af07157cc9c48f211015a86a92b3a36b134fb9f7c0b35003655ff2ba2b8e0bbc3b7e451b9bd58f6dc2fd65f45323
|
7
|
+
data.tar.gz: 730dc99915b6cababef13df14a2b33afc4457c36ead3fad2ec6f04e57ccd2d4bc33ecff01b9491c4fdec49544e3639465876f40b86aea5413de4484764400b38
|
data/CHANGELOG.md
CHANGED
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
data/test/unit/release_test.rb
CHANGED
@@ -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.
|
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-
|
13
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: thor
|