codewars 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codewars/train_next.rb +1 -1
- data/lib/codewars/train_specific.rb +6 -7
- data/lib/codewars/version.rb +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: 7c03b3de953031420795b6493fe73da7595a4691
|
4
|
+
data.tar.gz: 49cbaf916607644186555aad111a1efb5d4c7a75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c384ca882f3eb1afdc75d83725491823dc0694900e3ee36402ac9c516f253108bf8dbf9135af3f776739a639b226318311102e587898555cb9df79904272b603
|
7
|
+
data.tar.gz: f67a86c1deaa96cbf9bbd2406a286a28273eb5b3ae10aa6b60ed7afd2fadb90e1b91b49a2ea6308f53c342067ef2feb307423c66321d1cbba35e920fc99fa289
|
data/lib/codewars/train_next.rb
CHANGED
@@ -6,18 +6,17 @@ module Codewars
|
|
6
6
|
message = []
|
7
7
|
api_key = Configuration.option('api_key')
|
8
8
|
message.push 'You should set an api-key to use this command' unless api_key
|
9
|
-
|
10
|
-
message.push 'You should set an default language to use this command' unless
|
9
|
+
languages = Configuration.option('language')
|
10
|
+
message.push 'You should set an default language to use this command' unless languages
|
11
11
|
fail Thor::Error, message.join("\n") unless message.empty?
|
12
12
|
|
13
13
|
say "Starting the '#{id_or_slug}' kata."
|
14
14
|
|
15
15
|
client = CodewarsApi::Client.new(api_key: api_key)
|
16
|
-
|
17
|
-
language: language,
|
18
|
-
|
19
|
-
|
20
|
-
handle_specific_kata(kata, language)
|
16
|
+
languages.split(',').each do |language|
|
17
|
+
kata = client.train_specific_kata(language: language, id_or_slug: id_or_slug) rescue next
|
18
|
+
handle_specific_kata(kata, language)
|
19
|
+
end
|
21
20
|
end
|
22
21
|
|
23
22
|
private
|
data/lib/codewars/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codewars
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgeny Morozov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|