ci_in_a_can 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cc7b9a3c96269cab17933b73e3c25f8bf640fb9
|
4
|
+
data.tar.gz: a0f059a4b8ffeb8d3c7adbd5e4ee8caf5c8ac5ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d66137bb18e8252c226c3ba61bf5f437d62b701ea8a8a4c98d8b59d67a4f85aa676621ca9185db49653a8ec6d7d4d6bf179a361cde2778c4fba0847eb71885bc
|
7
|
+
data.tar.gz: 5a44a7b4a1f3e92452c0aa410b9f84829014cf72708dcd1cfed779ea1bdee29925946a79211ca03652e53dc222c790d034dc5718f3b9c036f3b75c9250d7cbe3
|
data/lib/ci_in_a_can/app.rb
CHANGED
@@ -82,17 +82,8 @@ EOF
|
|
82
82
|
end
|
83
83
|
|
84
84
|
get '/' do
|
85
|
-
|
86
|
-
|
87
|
-
CiInACan::WebContent.full_page_of(
|
88
|
-
<<EOF
|
89
|
-
<table class="table table-bordered">
|
90
|
-
<tbody>
|
91
|
-
#{run_html}
|
92
|
-
</tbody>
|
93
|
-
</table>
|
94
|
-
EOF
|
95
|
-
)
|
85
|
+
runs = CiInACan::Run.all.to_a
|
86
|
+
::CiInACan::ViewModels::AListOfRuns.new(runs).to_html
|
96
87
|
end
|
97
88
|
|
98
89
|
post %r{/push/(.+)} do
|
data/lib/ci_in_a_can/version.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
module CiInACan
|
2
|
+
|
3
|
+
module ViewModels
|
4
|
+
|
5
|
+
class AListOfRuns < ViewModel
|
6
|
+
|
7
|
+
def to_html
|
8
|
+
run_html = the_original_value.map { |r| r.to_html }.join("\n")
|
9
|
+
|
10
|
+
CiInACan::WebContent.full_page_of(
|
11
|
+
<<EOF
|
12
|
+
<table class="table table-bordered">
|
13
|
+
<tbody>
|
14
|
+
#{run_html}
|
15
|
+
</tbody>
|
16
|
+
</table>
|
17
|
+
EOF
|
18
|
+
)
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
@@ -17,4 +17,10 @@ describe CiInACan::ViewModels::ViewModel do
|
|
17
17
|
|
18
18
|
end
|
19
19
|
|
20
|
+
it "should make the original value available" do
|
21
|
+
object = Object.new
|
22
|
+
result = ::CiInACan::ViewModels::ViewModel.new(object).the_original_value
|
23
|
+
result.must_be_same_as result
|
24
|
+
end
|
25
|
+
|
20
26
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ci_in_a_can
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Darren Cauthon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -247,6 +247,7 @@ files:
|
|
247
247
|
- lib/ci_in_a_can/test_result_notifier.rb
|
248
248
|
- lib/ci_in_a_can/test_runner.rb
|
249
249
|
- lib/ci_in_a_can/version.rb
|
250
|
+
- lib/ci_in_a_can/view_models/a_list_of_runs.rb
|
250
251
|
- lib/ci_in_a_can/view_models/run_view_model.rb
|
251
252
|
- lib/ci_in_a_can/view_models/test_result_view_model.rb
|
252
253
|
- lib/ci_in_a_can/view_models/view_model.rb
|