hexlet 0.2.2 → 0.3.0

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: 506092198382b3785e4dbcd42163950e26aa933b
4
- data.tar.gz: f3ae2b6f152e4af35cef99092a11b9a413490c35
3
+ metadata.gz: bf0a5cfe6953585d6ee0a85ac95190d43acd4b1e
4
+ data.tar.gz: ee497e3ec67dbe821496f4eee542e84a394ec74e
5
5
  SHA512:
6
- metadata.gz: 742d1e8a45ad9672437a6fb55ca26cb4ac1b703e62018e16edf55a2395b568fa0be10dd0b4c7b08e53794294b9c26df765bc73296e6e9582675681a0e8502b8a
7
- data.tar.gz: 8affdcb249d3f0c716b712bd26ec81acaeaf56f3765669e6e19c86b84af238ab58426ee64b164e90aab4bc180113d484406634d818860b4d5e1759afb9fe01ed
6
+ metadata.gz: 060389e4e4e837a9ac72a12de9f2b090b46b6d1120ee772f6eaa88ac4407ec2a457141a5bfd9aeecb32fb1aef258d716e40d0a214e4770a3168a1004cff72fe2
7
+ data.tar.gz: 62fcec24c2232098e0179ae47b10f1a0d21a97f194f0bbd398892a9ab848a5157654145ad246f0f637bb9518dbb346a003a36eea94dfaeefa0a8a8a44e5516fd
@@ -8,6 +8,7 @@ module Hexlet
8
8
  FileUtils.cp_r(template_folder, folder)
9
9
 
10
10
  puts (t "lesson_folder_created", folder: folder)
11
+ true
11
12
  end
12
13
 
13
14
  desc "submit PATH_TO_LESSON", "submit lesson"
@@ -21,12 +22,11 @@ module Hexlet
21
22
  return false
22
23
  end
23
24
 
24
- slug = parts[0, parts.size - 2].join("_")
25
- locale = parts[-2]
25
+ slug = parts[0, parts.size - 1].join("_")
26
26
 
27
- filepath = generate_lesson_tarball(path)
27
+ filepath = generate_lesson_tarball(expanded_path)
28
28
 
29
- result = client.submit slug, locale, filepath
29
+ result = client.submit slug, filepath
30
30
 
31
31
  if result
32
32
  puts (t :created)
@@ -1,6 +1,6 @@
1
1
  module Hexlet
2
2
  class TeacherClient < BaseClient
3
- def submit(slug, locale, file)
3
+ def submit(slug, file)
4
4
  url = @router.api_teacher_lessons_url
5
5
  @logger.debug url
6
6
 
@@ -9,7 +9,6 @@ module Hexlet
9
9
  attrs = {
10
10
  lesson: {
11
11
  slug: slug,
12
- locale: locale,
13
12
  "packs_attributes[]" => [
14
13
  {tarball: fd}
15
14
  ]
@@ -1,3 +1,3 @@
1
1
  module Hexlet
2
- VERSION = "0.2.2"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -3,5 +3,6 @@ en:
3
3
  init:
4
4
  lesson_folder_created: create '%{folder}'
5
5
  submit:
6
+ error: "Can't submit lesson"
6
7
  created: lesson has been uploaded
7
8
  wrong_lesson_folder: Wrong lesson folder
@@ -17,7 +17,7 @@ class Hexlet::TeacherCLITest < MiniTest::Test
17
17
  to_return(:status => 201)
18
18
 
19
19
  FakeFS do
20
- folder = "my_super_ru_lesson"
20
+ folder = "my_super_lesson"
21
21
  FileUtils.mkdir(folder)
22
22
  result = Hexlet::TeacherCLI.start ["submit", folder, "--verbose"]
23
23
  assert { result }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hexlet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Mokevnin