hexlet 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hexlet/base_cli.rb +1 -1
- data/lib/hexlet/member_cli.rb +4 -2
- data/lib/hexlet/teacher_cli.rb +3 -2
- data/lib/hexlet/version.rb +1 -1
- data/locales/en.membercli.yml +7 -7
- data/locales/en.teachercli.yml +1 -1
- data/locales/en.yml +1 -1
- 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: 3274ee106665e58461c5b533f9ae4a56b10d5932
|
4
|
+
data.tar.gz: 1dc4d25ce21eda12f198441647c1be0f6c68b023
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 425b0568413f0f1fabb08c265fcc06d923ce0451925283287128dce65ba1270bfc5342032ab3590d5001294decc90bba6502290c1a2e91a7f94f54e69d0ddbc4
|
7
|
+
data.tar.gz: bc6d4c1dd24a556e692880e8c89c67095ee3a493c3abfa1c610667674dc0240627df4147bfabff63791f735eca69d760438f0dc461434ca2cfc4042640de9431
|
data/lib/hexlet/base_cli.rb
CHANGED
data/lib/hexlet/member_cli.rb
CHANGED
@@ -18,6 +18,7 @@ module Hexlet
|
|
18
18
|
# process.start
|
19
19
|
_, e, s = Open3.capture3("make test -C #{path}")
|
20
20
|
if s == 0
|
21
|
+
client = build_client
|
21
22
|
result = client.submit lesson_slug, exercise_folder_name
|
22
23
|
if result
|
23
24
|
puts (t :created)
|
@@ -36,6 +37,7 @@ module Hexlet
|
|
36
37
|
desc "fetch LESSON_SLUG EXERCISE_SLUG", "download lesson exercise"
|
37
38
|
def fetch(lesson_slug, exercise_slug)
|
38
39
|
# FIXME check login
|
40
|
+
client = build_client
|
39
41
|
if content = client.fetch(lesson_slug, exercise_slug)
|
40
42
|
lesson_path = File.join("/", "vagrant", "exercises", "#{lesson_slug}_lesson")
|
41
43
|
exercise_path = File.join(lesson_path, exercise_slug)
|
@@ -67,8 +69,8 @@ module Hexlet
|
|
67
69
|
|
68
70
|
private
|
69
71
|
|
70
|
-
def
|
71
|
-
|
72
|
+
def build_client(key = config["hexlet_api_key"])
|
73
|
+
Hexlet::MemberClient.new options[:key], logger: logger, host: options["host"]
|
72
74
|
end
|
73
75
|
end
|
74
76
|
end
|
data/lib/hexlet/teacher_cli.rb
CHANGED
@@ -26,6 +26,7 @@ module Hexlet
|
|
26
26
|
|
27
27
|
filepath = generate_lesson_tarball(expanded_path)
|
28
28
|
|
29
|
+
client = build_client
|
29
30
|
result = client.submit slug, filepath
|
30
31
|
|
31
32
|
if result
|
@@ -68,8 +69,8 @@ module Hexlet
|
|
68
69
|
exercise_tarball_path
|
69
70
|
end
|
70
71
|
|
71
|
-
def
|
72
|
-
|
72
|
+
def build_client(key = config["hexlet_api_key"])
|
73
|
+
Hexlet::TeacherClient.new key, logger: logger, host: options["host"]
|
73
74
|
end
|
74
75
|
end
|
75
76
|
end
|
data/lib/hexlet/version.rb
CHANGED
data/locales/en.membercli.yml
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
en:
|
2
2
|
membercli:
|
3
3
|
submit:
|
4
|
-
created:
|
5
|
-
wrong_lesson_folder:
|
4
|
+
created: Exercise submitted
|
5
|
+
wrong_lesson_folder: Wrong folder, please submit the exercise folder
|
6
6
|
fetch:
|
7
|
-
ok:
|
8
|
-
not_found:
|
7
|
+
ok: Exercise downloaded
|
8
|
+
not_found: Lesson or exercise not found
|
9
9
|
ask:
|
10
|
-
replace_exercise: Exercise already exists. Would you like
|
10
|
+
replace_exercise: Exercise already exists. Would you like overwrite it?
|
11
11
|
login:
|
12
|
-
ok:
|
13
|
-
not_found: User
|
12
|
+
ok: Logged in
|
13
|
+
not_found: User not found
|
data/locales/en.teachercli.yml
CHANGED
data/locales/en.yml
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
en:
|
2
|
-
update_config:
|
2
|
+
update_config: Configuration updated
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hexlet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kirill Mokevnin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|