git-contest 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/git/contest/common.rb +3 -1
- data/lib/git/contest/version.rb +1 -1
- data/spec/lib/common_spec.rb +50 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MjRlYzRhYjdlNmFhMTFkNjc3ZmM2MWFjNTYyODM5MmNmNmYzNzdhNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Mjk1M2JlNTdjY2RiZjM1ZjM5NDczYTQyNDE0ZmY1ZjJlZjZmODZiYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZDEyMGUwZmNjNzcxMzZhMmM2YzM0MzhmNzY4NWMzMWJkYzgxYWZhMjZlZDZm
|
10
|
+
Nzg3Mzk4MzUzZmM2MWE0Mzg4ZmM0ZDE3YTE2ZGI5YjI2YmNlZGNkNzg2YTI4
|
11
|
+
OGY0ZjJkZjg0ZjA0Njk0OWQ5MmRjMjZiMDhiZGRjZDc2MmU1YTk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODc4YjM4MTM3MmY5MGNiYTliZmNjNzYzZDVmYWE3NDc1ODdlZmI1ZTgzN2Uw
|
14
|
+
MDA0ZThkZGJjODExZmY4MmFjYjEwM2M3MzJiMTZkZmNkMjg2MmZkMzVmN2Zj
|
15
|
+
OTAzMmVkZTUxY2QyZGM2OWI4ZjZjNDQ5NWFhMzEzYTAyYjM3MmQ=
|
data/lib/git/contest/common.rb
CHANGED
data/lib/git/contest/version.rb
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe "Common" do
|
4
|
+
|
5
|
+
describe "get_config" do
|
6
|
+
|
7
|
+
let(:tmp_dir) { ::Dir.mktmpdir }
|
8
|
+
|
9
|
+
before do
|
10
|
+
$git_contest_config = File.join(tmp_dir, "config.yml")
|
11
|
+
end
|
12
|
+
|
13
|
+
after do
|
14
|
+
::FileUtils.rm_r tmp_dir
|
15
|
+
end
|
16
|
+
|
17
|
+
context "empty file" do
|
18
|
+
|
19
|
+
before do
|
20
|
+
::FileUtils.touch $git_contest_config
|
21
|
+
end
|
22
|
+
|
23
|
+
example do
|
24
|
+
expect do
|
25
|
+
config = get_config
|
26
|
+
config["sites"]["foo"] = "bar"
|
27
|
+
end.to_not raise_error
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
context "valid yaml" do
|
33
|
+
|
34
|
+
before do
|
35
|
+
::File.write $git_contest_config, {
|
36
|
+
}.to_yaml
|
37
|
+
end
|
38
|
+
|
39
|
+
example do
|
40
|
+
expect do
|
41
|
+
config = get_config
|
42
|
+
config["sites"]["foo"] = "bar"
|
43
|
+
end.to_not raise_error
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: git-contest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hiroyuki Sano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
@@ -232,6 +232,7 @@ files:
|
|
232
232
|
- spec/contest_driver/t003_uva_online_judge_spec.rb
|
233
233
|
- spec/contest_driver/t010_kattis_spec.rb
|
234
234
|
- spec/contest_driver/t011_utils_spec.rb
|
235
|
+
- spec/lib/common_spec.rb
|
235
236
|
- spec/mock/default_config/config.yml
|
236
237
|
- spec/mock/default_config/plugins/dummy_driver.rb
|
237
238
|
- spec/mock/t001/002.status_log.xml
|
@@ -297,6 +298,7 @@ test_files:
|
|
297
298
|
- spec/contest_driver/t003_uva_online_judge_spec.rb
|
298
299
|
- spec/contest_driver/t010_kattis_spec.rb
|
299
300
|
- spec/contest_driver/t011_utils_spec.rb
|
301
|
+
- spec/lib/common_spec.rb
|
300
302
|
- spec/mock/default_config/config.yml
|
301
303
|
- spec/mock/default_config/plugins/dummy_driver.rb
|
302
304
|
- spec/mock/t001/002.status_log.xml
|