codewars 0.1.0 → 0.1.1

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: 4e4dddc1a09377085643f16eea71fce41a4a9d31
4
- data.tar.gz: 3cd42b90f917e19b5fa4bb38fe278b218d723daa
3
+ metadata.gz: 15aa0750a5b5deb1d3c29958e1fffc0b72cd5249
4
+ data.tar.gz: 763c2b53f345365d0e1039ed36c18197a4e1b555
5
5
  SHA512:
6
- metadata.gz: 6695455d2851b69dcaceda15efb5c9b78d35c3c482c4f1da7ed05e97aa6571b30ee0148787836a06ba8dc0796e359b5320b526e8170b0cf0d6353491e995d5c5
7
- data.tar.gz: 107cb38b4d340d68e81f3d141c71cc82a99b7b38b30eaaf6f5dfc10111c2537b31efc5ec639a619297474fa166e8ed5a637cdce48dc8f350d14523558bb77168
6
+ metadata.gz: 179c627c436f46ca53fef8ea591b2b0c24f9d8dcfd42f7bd9c201418731f3eaa80f16b19c98554d0a5a1e698572d170956fac385f094a6ef20a47278c5e5599b
7
+ data.tar.gz: 9450c2a6c6b8bb1eefe1bbecc0abf33a39d97d98d35c2031feb56b64b5a48082438280d05f1033eebb9a66f31ab949bdf2246560f1849ec09b023893733d95ce
@@ -1,25 +1,27 @@
1
1
  module Codewars
2
- class Description < Thor::Shell::Basic
2
+ class Description < Thor
3
3
  DESCRIPTION_FILE_NAME = 'description.md'
4
4
 
5
- def take_value_from_file(regex_with_group, param_key)
6
- @data ||= read_file(DESCRIPTION_FILE_NAME)
7
- param = @data.match(regex_with_group)
8
- unless param
9
- fail Thor::Error, "'#{param_key}' has not been found in the 'description.md' file."
5
+ no_commands do
6
+ def take_value_from_file(regex_with_group, param_key)
7
+ @data ||= read_file(DESCRIPTION_FILE_NAME)
8
+ param = @data.match(regex_with_group)
9
+ unless param
10
+ fail Thor::Error, "'#{param_key}' has not been found in the 'description.md' file."
11
+ end
12
+ param[1]
10
13
  end
11
- param[1]
12
- end
13
14
 
14
- def print_kata_desc(kata)
15
- print_parameter('Name', kata.name)
16
- print_parameter('Link', "#{CODEWARS_URL}#{kata.href}")
17
- print_parameter('Description', kata.description)
18
- print_parameter('Tags', kata.tags.join(', ')) if kata.tags
19
- print_parameter('Rank', kata.rank.to_s) if kata.rank
20
- say ''
21
- print_parameter('Type to start this kata',
22
- "codewars train #{kata.slug}", :blue, true)
15
+ def print_kata_desc(kata)
16
+ print_parameter('Name', kata.name)
17
+ print_parameter('Link', "#{CODEWARS_URL}#{kata.href}")
18
+ print_parameter('Description', kata.description)
19
+ print_parameter('Tags', kata.tags.join(', ')) if kata.tags
20
+ print_parameter('Rank', kata.rank.to_s) if kata.rank
21
+ say ''
22
+ print_parameter('Type to start this kata',
23
+ "codewars train #{kata.slug}", :blue, true)
24
+ end
23
25
  end
24
26
 
25
27
  private
@@ -1,5 +1,5 @@
1
1
  module Codewars
2
- class TrainNext < Thor::Shell::Basic
2
+ class TrainNext < Thor
3
3
  def initialize
4
4
  message = []
5
5
  api_key = Configuration.option('api_key')
@@ -1,3 +1,3 @@
1
1
  module Codewars
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codewars
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgeny Morozov