atcoder_greedy 0.3.1 → 0.4.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: 105272b2cb7e939a47af8dcdf2133f8b71342bf4
4
- data.tar.gz: 2720cca358f94d5ee3f67d477353c91a4ade9d12
3
+ metadata.gz: c615d8f8d5392732a0823c7ca87250e7f85fb7eb
4
+ data.tar.gz: 0977f4aa39c014bd11a8b7621bcc72b5c183dc23
5
5
  SHA512:
6
- metadata.gz: 7199153eb58e547d7d0e01e2d518fd9d0fa087088edd3f981566fddfc4690e32ad131a1cafe5ccfbc95e82110f35c863609b9f30ad892572efe786465a780258
7
- data.tar.gz: ed9240b1d5ccf583f6b08cb7c830774d382de62ac66b7cbbcf7154bd24bde0c82e8d70b247527f19de11b2f87897b59ee291d5eb731a9d8262422a961d17fa3a
6
+ metadata.gz: d0550d84633c1740b05e459c324caec19fc15897d42066979360af402e2cf084a3f0b4d796a12cf1cc2ec98b1bccf1d51dd2c682e12fb4dbb5e31fb90d8af93b
7
+ data.tar.gz: 6a92836715a6a1633ce91aea0d99589667e4574035ea7458f9f36ce244692f878bb839b58991b38667c4a1c5cc472a3e803063d1d438f10fa7fd51fef634bece
data/README.md CHANGED
@@ -1,6 +1,12 @@
1
1
  # AtcoderGreedy
2
- 楽にatcoderを使いたい.
3
- 毎回サンプルインプットをコピペするのめんどくさくないですか?
2
+ 楽にatcoderを使いたい. Atcoderで行われるコンテストにおいて, 自動でテンプレートやインプットを生成するGemです.
3
+ 何かありましたらtwitter: @brook_bachまでお願いします.
4
+
5
+ ## 実装した機能
6
+ - コンテストフォルダ, 問題ファイルの生成
7
+ - サンプルインプット、アウトプットを用いたテストファイルの生成, テスト実行
8
+ - ユーザーテンプレート機能
9
+ - ruby, c/c++ に対応
4
10
 
5
11
  ## Installation
6
12
 
@@ -11,7 +17,7 @@
11
17
  configコマンドを使用してデフォルト言語の設定をしてください。
12
18
  ```
13
19
  $ atcoder_greedy config
14
- Choose default language from: ["rb", "cpp"]
20
+ Choose default language from: ["rb", "cpp", "c"]
15
21
  Input languages: cpp
16
22
  Update Your default language to [cpp].
17
23
  $
@@ -19,22 +25,50 @@ $
19
25
 
20
26
  ## Usage
21
27
 
22
- ### テンプレートファイルの作成
28
+ ### Createコマンド
29
+ コンテスト用のフォルダ, ファイルを作成します.
23
30
  ```
24
- $ atcoder_greedy create CONTESTNAME
31
+ $ atcoder_greedy create CONTEST_URL OPTION
25
32
  ```
26
-
27
- ### テストの実行
33
+ 作成時に使用できるオプション
34
+
35
+ | option name ARGUMENT | alias | detail |
36
+ | ------------------------------------ | ----- | ------- |
37
+ | --no-templates | --nt | テンプレートファイルを生成しません. |
38
+ | --no-input | --ni | 入力ファイルを生成しません. |
39
+ | --select-problem PROBLEM_NAMES | -p | 指定した問題のみ生成します. 複数の問題を指定する場合は'A B' のように''で囲ってください. |
40
+ | --select-directory DIR_PATH | -d | 指定したディレクトリに生成します. |
41
+ | --select-language LANGUAGE | -l | 指定した言語でテンプレートを生成します. |
42
+ | --select-template TEMP_NAME | -t | 指定したテンプレートで生成します. |
43
+
44
+ ### testコマンド
45
+ テストを実行します. 入力ファイルが生成されている必要があります.
28
46
  ```
29
47
  $ cd CONTESTNAME
30
48
  $ atcoder_greedy test PROBLEM_FILE_NAME
31
49
  ```
32
50
 
51
+ ### templateコマンド
52
+ テンプレートの設定を行います. テンプレートは複数保存でき, 言語毎に一つデフォルトテンプレートを設定することができます.
53
+ デフォルトに設定されたテンプレートは, createコマンドで作成するときに使用されます.
54
+ ```
55
+ $ atcoder_greedy template OPTION
56
+ ```
57
+ 使用できるオプション
58
+
59
+ | option name | alias | detail |
60
+ | ------------------------| ----- | ------- |
61
+ | --add FILE_PATH | -a | FILE_PATHで指定されたファイルをテンプレートに追加します. |
62
+ | --list | -l | テンプレート一覧を表示します. |
63
+ | --set-default FILE_NAME | -s | FILE_NAMEで指定されたテンプレートをその言語のデフォルトに設定します. |
64
+ | --delete FILE_NAME | -d | FILE_NAMEで指定されたテンプレートを削除します. |
65
+
33
66
  ## 使用例
34
- ABC009の場合
67
+ ### 例1
68
+ ARC014の場合
35
69
 
36
70
  ```
37
- $ atcoder_greedy create abc009
71
+ $ atcoder_greedy create http://arc014.contest.atcoder.jp
38
72
  ```
39
73
 
40
74
  とすると、以下のようなファイルが生成される。
@@ -82,21 +116,19 @@ Correct Answer:
82
116
  Test done.
83
117
  ```
84
118
 
85
- ## 実装した機能
86
- - 解答ファイルのテンプレート生成
87
- - サンプルインプット、アウトプットを用いたテストファイルの生成
88
- - テスト実行コマンド
89
- - ruby, c++ に対応
119
+ ### 例2
120
+ ARC015にて, カレントディレクトリにA問題のインプットファイルのみ生成したい場合
90
121
 
122
+ ```
123
+ $ atcoder_greedy create http://arc015.contest.atcoder.jp --nt -p A -d ./
124
+ ```
91
125
 
92
126
  ## TODO,実装したい機能
93
- - 問題を指定してその問題のみ生成
94
- - ユーザーテンプレート機能
127
+
95
128
  - 提出機能
96
129
  - 言語対応の拡大
97
130
  - gemのテスト作成
98
131
 
99
-
100
132
  ## Development
101
133
 
102
134
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -106,8 +138,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
106
138
  ## Contributing
107
139
 
108
140
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/atcoder_greedy. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
109
-
110
-
111
141
  ## License
112
142
 
113
143
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  end
24
24
 
25
25
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
26
- spec.bindir = "bin"
27
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
26
+ spec.bindir = "exe"
27
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
28
  spec.require_paths = ["lib"]
29
29
 
30
30
  spec.add_development_dependency "bundler", "~> 1.11"
File without changes
@@ -2,7 +2,6 @@ require 'open-uri'
2
2
  require 'nokogiri'
3
3
  require 'fileutils'
4
4
  require 'yaml'
5
- require 'psych'
6
5
 
7
6
  require "atcoder_greedy/version"
8
7
  require 'atcoder_greedy/command'
@@ -12,50 +11,58 @@ module AtcoderGreedy
12
11
  @config = {
13
12
  user_id: '',
14
13
  password: '',
15
- language: 'rb'
14
+ language: '',
15
+ default_template: {
16
+ rb: '',
17
+ cpp: '',
18
+ c: '',
19
+ py: ''
20
+ }
16
21
  }
17
22
 
23
+ @valid_languages = %w(rb cpp c py)
18
24
  @valid_config_keys = @config.keys
19
25
 
20
26
  # Configure through hash
21
27
  def self.configure(opts = {})
22
- opts.each { |k, v| @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym }
23
- end
24
-
25
- # Configure through yaml file
26
- def self.configure_with(path_to_yaml_file)
27
- begin
28
- config = YAML::load(IO.read(path_to_yaml_file))
29
- rescue Errno::ENOENT
30
- puts "YAML configuration file couldn't be found. Using defaults."; return
31
- rescue Psych::SyntaxError
32
- puts "YAML configuration file contains invalid syntax. Using defaults."; return
28
+ self.config
29
+ opts.each do |k, v|
30
+ if v.is_a?(Hash)
31
+ v.each do |ck, cv|
32
+ @config[k.to_sym][ck.to_sym] = cv if @valid_languages.include?(ck.to_s)
33
+ end
34
+ else
35
+ @config[k.to_sym] = v if @valid_config_keys.include? k.to_sym
36
+ end
33
37
  end
34
-
35
- configure(config)
38
+ self.save_config
36
39
  end
37
40
 
38
41
  def self.get_config_path
39
42
  config_path = Dir.home + '/.atcoder_greedy'
40
43
  if Dir.exists?(config_path)
41
- # use user settings
42
44
  config_path
43
45
  else
44
- # use default settings
45
- File.join(File.dirname(__dir__), '/lib/atcoder_greedy')
46
+ raise "Can't find config directory. please init by command: 'atcoder_greedy config'.'"
46
47
  end
47
48
  end
48
49
 
49
50
  def self.config
50
51
  yml_path = get_config_path + '/settings.yml'
51
- configure_with(yml_path)
52
- @config
52
+ yml_file = YAML.load_file(yml_path)
53
+ if yml_file
54
+ @config = yml_file
55
+ else
56
+ File.open(yml_path, 'w') { |f| YAML.dump(@config, f) }
57
+ end
53
58
  end
54
59
 
55
60
  def self.save_config
56
61
  yml_path = get_config_path + '/settings.yml'
57
- f = File.open(yml_path, 'w')
58
- f.print(@config.to_yaml)
59
- f.close
62
+ if File.exists?(yml_path)
63
+ File.open(yml_path, 'w') { |f| YAML.dump(@config, f) }
64
+ else
65
+ raise "Can't find #{yml_path}. please set configure."
66
+ end
60
67
  end
61
68
  end
@@ -4,6 +4,7 @@ require 'atcoder_greedy/command/create'
4
4
  require 'atcoder_greedy/command/destroy'
5
5
  require 'atcoder_greedy/command/test'
6
6
  require 'atcoder_greedy/command/config'
7
+ require 'atcoder_greedy/command/template'
7
8
 
8
9
  module AtcoderGreedy
9
10
  class Command < Thor
@@ -12,7 +12,8 @@ module AtcoderGreedy
12
12
  puts "Your current language is [#{AtcoderGreedy.config[:language]}]."
13
13
  else
14
14
  Dir.mkdir(config_path)
15
- File.new(config_path + '/settings.yml', 'w')
15
+ yml_path = AtcoderGreedy.get_config_path + '/settings.yml'
16
+ File.open(yml_path, 'w').close
16
17
  end
17
18
  puts "Choose default language from: #{languages}"
18
19
  print "Input languages: "
@@ -27,7 +28,6 @@ module AtcoderGreedy
27
28
  end
28
29
  end
29
30
 
30
- AtcoderGreedy.save_config
31
31
  puts "Update Your default language to [#{AtcoderGreedy.config[:language]}]."
32
32
  end
33
33
  end
@@ -4,10 +4,28 @@ require 'atcoder_greedy/lib/contest'
4
4
 
5
5
  module AtcoderGreedy
6
6
  class Command < Thor
7
- desc 'create [CONTESTNAME]', 'create contest templates for [CONTESTNAME]'
7
+ desc 'create [CONTESTURL] [OPTION]', 'create contest templates for [CONTESTURL]'
8
+ option :no_templates, type: :boolean, default: false, aliases: "\--nt"
9
+ option :no_input, type: :boolean, default: false, aliases: "\--ni"
10
+ option :select_problem, aliases: '-p', default: nil, desc: 'create only select problem'
11
+ option :select_directory, aliases: '-d', default: '', desc: 'select target directory'
12
+ option :select_language, aliases: '-l', default: '', desc: 'select language'
13
+ option :select_template, aliases: '-t', default: '', desc: 'select generate template'
8
14
 
9
- def create(contest_name)
10
- Contest.new(contest_name.downcase)
15
+ def create(contest_url)
16
+ user_options = {
17
+ without: {input: false, template: false},
18
+ problems: [],
19
+ directory: options[:select_directory],
20
+ language: options[:select_language],
21
+ template: options[:select_template]
22
+ }
23
+
24
+ user_options[:without][:input] = true if options[:no_input]
25
+ user_options[:without][:template] = true if options[:no_templates]
26
+ user_options[:problems] = options[:select_problem].split unless options[:select_problem].nil?
27
+
28
+ Contest.new(contest_url, user_options)
11
29
  end
12
30
  end
13
31
  end
@@ -0,0 +1,26 @@
1
+ require 'atcoder_greedy'
2
+ require 'atcoder_greedy/command'
3
+ require 'atcoder_greedy/lib/greedy_template'
4
+
5
+ module AtcoderGreedy
6
+ class Command < Thor
7
+ desc 'template [OPTION]', 'set template'
8
+ option :add, aliases: '-a'
9
+ option :list, aliases: '-l'
10
+ option :set_default, aliases: '-s'
11
+ option :delete, aliases: '-d'
12
+ def template
13
+ temp = GreedyTemplate.new
14
+ if options[:add]
15
+ temp.add(options[:add])
16
+ elsif options[:list]
17
+ temp.list
18
+ elsif options[:set_default]
19
+ temp.set_default(options[:set_default])
20
+ elsif options[:delete]
21
+ temp.delete(options[:delete])
22
+ end
23
+ end
24
+ end
25
+ end
26
+
@@ -1,52 +1,66 @@
1
+ require 'uri'
2
+ require 'atcoder_greedy'
3
+ require 'atcoder_greedy/lib/greedy_template'
4
+
1
5
  class Contest
2
6
  attr_accessor :name, :url
3
7
 
4
- def initialize(name)
5
- @language = AtcoderGreedy.config[:language]
6
- template_path = File.join(File.dirname(__dir__), '/templates')
7
- @solve_template = open(template_path + "/#{@language}/solve.#{@language}", &:read)
8
- @problem_names = %w(A B C D)
9
- @name = name
10
- puts "Create #{name} contest files"
11
- @base_url = create_contest_url(name)
12
- puts "Contest url is #{@base_url}"
13
- @problem_urls = create_contest_problem_urls(name)
14
- puts 'Create directories'
15
- create_directories
16
- create_templates
17
- puts 'Set up done.'
18
- end
8
+ def initialize(url, **options)
9
+ if options[:language] != ''
10
+ @language = options[:language]
11
+ else
12
+ @language = AtcoderGreedy.config[:language]
13
+ end
14
+ @url = url
15
+ set_contest_info(options[:problems])
16
+ set_directories(options[:directory])
17
+
18
+ create_inputs unless options[:without][:input]
19
+ create_templates(options[:template]) unless options[:without][:template]
19
20
 
20
- def create_contest_url(contest_name)
21
- 'http://' + contest_name + '.contest.atcoder.jp'
21
+ puts 'Set up done. Go for it!'
22
22
  end
23
23
 
24
- def create_contest_problem_urls(contest_name)
25
- urls = []
26
- if (contest_name.include?('abc') && contest_name[3..5].to_i > 19) ||
27
- (contest_name.include?('arc') && contest_name[3..5].to_i > 34)
28
- task_num = %w(a b c d)
29
- else
30
- task_num = %w(1 2 3 4)
24
+ def set_contest_info(option_problems)
25
+ print 'Set contest info ... '
26
+ @name = URI.parse(@url).host.split('.').first
27
+ charset = nil
28
+ html = open(@url + '/assignments') do |f|
29
+ charset = f.charset
30
+ f.read
31
31
  end
32
+ doc = Nokogiri::HTML.parse(html, nil, charset)
32
33
 
33
- 4.times do |i|
34
- urls.push(name: "#{@problem_names[i]}", path: @base_url + "/tasks/#{contest_name}_#{task_num[i]}")
34
+ all_problems = nil
35
+ doc.xpath('//tbody').each do |tbody|
36
+ all_problems = tbody.xpath('.//a[@class="linkwrapper"]')
35
37
  end
36
- urls
38
+
39
+ @problems = []
40
+ until all_problems.empty?
41
+ path = all_problems[0].attributes['href'].value
42
+ pro = all_problems.select { |l| l.attributes['href'].value == path }
43
+ all_problems = all_problems.reject { |l| l.attributes['href'].value == path }
44
+ name = pro[0].inner_text
45
+ if option_problems.empty? || (!option_problems.empty? && option_problems.include?(name))
46
+ @problems.push(name: pro[0].inner_text, path: path)
47
+ print "#{name} "
48
+ end
49
+ end
50
+ puts 'Done!'
37
51
  end
38
52
 
39
- def create_templates
40
- @problem_urls.each_with_index do |url, pro_i|
41
- problem_dir = "./#{@name}"
42
- # urlからインプット、アウトプットパラメータをとってきてファイルにしまう
53
+ def create_inputs
54
+ print 'Create inputs ... '
55
+ @problems.each do |problem|
56
+ # take input and output params from url and save to file
43
57
  charset = nil
44
- html = open(url[:path]) do |f|
58
+ html = open(@url + problem[:path]) do |f|
45
59
  charset = f.charset
46
60
  f.read
47
61
  end
48
62
  doc = Nokogiri::HTML.parse(html, nil, charset)
49
- in_file = File.new(problem_dir + "/input_#{@problem_names[pro_i]}.txt", 'w')
63
+ in_file = File.new(@dir + "/input_#{problem[:name]}.txt", 'w')
50
64
 
51
65
  params = doc.xpath('//pre')
52
66
  params.shift
@@ -61,19 +75,53 @@ class Contest
61
75
  end
62
76
 
63
77
  in_file.close
78
+ end
79
+ puts 'Done!'
80
+ end
64
81
 
65
- solve_file_content = @solve_template.clone
82
+ def create_templates(option_template)
83
+ print 'Create Templates ... '
84
+ if option_template == ''
85
+ # use user default or system default template
86
+ if AtcoderGreedy.config[:default_template][:"#{@language}"] != ''
87
+ solve_template = open(AtcoderGreedy.config[:default_template][:"#{@language}"], &:read)
88
+ else
89
+ solve_template = open(File.dirname(__dir__) + '/templates' + "/#{@language}/solve.#{@language}", &:read)
90
+ end
91
+ else
92
+ # use option_template
93
+ template_path = GreedyTemplate.get_template_path(option_template)
94
+ if template_path.nil?
95
+ raise "ERROR: Template #{option_template} doesn't found"
96
+ else
97
+ solve_template = open(template_path, &:read)
98
+ end
99
+ end
100
+
101
+ @problems.each_with_index do |problem|
102
+ solve_file_content = solve_template.clone
66
103
  solve_file_content.gsub!(/DATE/, Time.now.strftime('%F'))
67
104
  solve_file_content.gsub!(/CONTEST/, @name.upcase)
68
- solve_file_content.gsub!(/PROBLEM/, url[:name].upcase)
69
- solve_file = File.new(problem_dir + "/#{url[:name]}.#{@language}", 'w')
105
+ solve_file_content.gsub!(/PROBLEM/, problem[:name])
106
+ solve_file = File.new(@dir + "/#{problem[:name]}.#{@language}", 'w')
70
107
  solve_file.print solve_file_content
71
108
  solve_file.close
72
109
  end
110
+ puts 'Done!'
73
111
  end
74
112
 
75
- def create_directories
76
- # コンテストディレクトリ作成
77
- FileUtils.mkdir(@name)
113
+ def set_directories(directory)
114
+ print 'Set contest directory ... '
115
+ if directory == ''
116
+ FileUtils.mkdir(@name)
117
+ @dir = "./#{@name}"
118
+ else
119
+ if Dir.exists?(directory)
120
+ @dir = directory
121
+ else
122
+ raise "ERROR: Directory doesn't exists:#{@dir}"
123
+ end
124
+ end
125
+ puts 'Done!'
78
126
  end
79
- end
127
+ end
@@ -0,0 +1,93 @@
1
+ # require 'FileUtils'
2
+ require 'atcoder_greedy'
3
+
4
+ class GreedyTemplate
5
+ def initialize
6
+ @dir = AtcoderGreedy::get_config_path + '/templates'
7
+ Dir.mkdir(@dir) unless Dir.exists?(@dir)
8
+ end
9
+
10
+ def add(file_path)
11
+ # save template to language directory
12
+ file = File.open(file_path)
13
+ file_name = File.basename(file_path)
14
+ type_dir = @dir + '/' + File.extname(file_path).delete('.')
15
+ Dir.mkdir(type_dir) unless Dir.exists?(type_dir)
16
+ if File.exists?(type_dir + '/' + file_name)
17
+ print "Template [#{file_name}] is already exists. Do you update?[y/N]:"
18
+ s = $stdin.gets.chomp
19
+ if s == 'y' || s == 'yes'
20
+ FileUtils.cp(file, type_dir)
21
+ puts 'Template file is updated.'
22
+ puts "if you want to use this file as a default, please run 'atcoder_greedy template -s #{file_name}'"
23
+ end
24
+ else
25
+ FileUtils.cp(file, type_dir)
26
+ puts 'Template file is added.'
27
+ puts "if you want to use this file as a default, please run 'atcoder_greedy template -s #{file_name}'"
28
+ end
29
+ end
30
+
31
+ def list
32
+ puts "Show Template file lists. [d] is this language default. ---------------------"
33
+ Dir::glob(@dir + '/*').each do |l|
34
+ puts "#{File.basename(l)}:"
35
+ Dir::glob("#{l}/*").each do |f|
36
+ default = get_default(File.basename(l))
37
+ if default != nil && File.basename(f) == default
38
+ print ' [d] '
39
+ else
40
+ print ' - '
41
+ end
42
+ puts "#{File.basename(f)}"
43
+ end
44
+ end
45
+ end
46
+
47
+ def set_default(file_name)
48
+ type = File.extname(file_name).delete('.')
49
+ type_dir = @dir + '/' + type
50
+ file = type_dir + '/' + File.basename(file_name)
51
+ if File.exists?(file)
52
+ AtcoderGreedy.configure(default_template: {"#{type}": file})
53
+ puts 'Set new default template.'
54
+ else
55
+ puts "File [#{file_name}] doesn't exists. confirm input name."
56
+ self.list
57
+ end
58
+ end
59
+
60
+ def delete(file_name)
61
+ type = File.extname(file_name).delete('.')
62
+ type_dir = @dir + '/' + type
63
+ file = type_dir + '/' + File.basename(file_name)
64
+ if File.exists?(file)
65
+ print "Do you delete [#{file_name}]?[y/N]:"
66
+ s = $stdin.gets.chomp
67
+ if s == 'y' || s == 'yes'
68
+ if File.basename(file_name) == get_default(type)
69
+ AtcoderGreedy.configure(default_template: {"#{type}": ''})
70
+ end
71
+ FileUtils.remove_file(file)
72
+ puts 'Template file is deleted.'
73
+ end
74
+ else
75
+ puts "File [#{file_name}] doesn't exists. confirm input name."
76
+ self.list
77
+ end
78
+ end
79
+
80
+ def self.get_template_path(file_name)
81
+ type = File.extname(file_name).delete('.')
82
+ type_dir = AtcoderGreedy::get_config_path + '/templates' + '/' + type
83
+ file = type_dir + '/' + File.basename(file_name)
84
+ File.exists?(file) ? file : nil
85
+ end
86
+
87
+ private
88
+ def get_default(language)
89
+ unless AtcoderGreedy.config[:default_template][:"#{language}"].nil?
90
+ File.basename(AtcoderGreedy.config[:default_template][:"#{language}"])
91
+ end
92
+ end
93
+ end
@@ -2,6 +2,7 @@ require 'diff/lcs'
2
2
  require 'tempfile'
3
3
  require 'benchmark'
4
4
  require 'atcoder_greedy/lib/languages'
5
+
5
6
  class TestCase
6
7
  def initialize(problem_name)
7
8
  language = File.extname(problem_name)
@@ -1,3 +1,3 @@
1
1
  module AtcoderGreedy
2
- VERSION = '0.3.1'
2
+ VERSION = '0.4.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: atcoder_greedy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - keigo-brook
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-13 00:00:00.000000000 Z
11
+ date: 2016-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -85,8 +85,6 @@ email:
85
85
  - goog@brookbach.com
86
86
  executables:
87
87
  - atcoder_greedy
88
- - console
89
- - setup
90
88
  extensions: []
91
89
  extra_rdoc_files: []
92
90
  files:
@@ -98,16 +96,18 @@ files:
98
96
  - README.md
99
97
  - Rakefile
100
98
  - atcoder_greedy.gemspec
101
- - bin/atcoder_greedy
102
99
  - bin/console
103
100
  - bin/setup
101
+ - exe/atcoder_greedy
104
102
  - lib/atcoder_greedy.rb
105
103
  - lib/atcoder_greedy/command.rb
106
104
  - lib/atcoder_greedy/command/config.rb
107
105
  - lib/atcoder_greedy/command/create.rb
108
106
  - lib/atcoder_greedy/command/destroy.rb
107
+ - lib/atcoder_greedy/command/template.rb
109
108
  - lib/atcoder_greedy/command/test.rb
110
109
  - lib/atcoder_greedy/lib/contest.rb
110
+ - lib/atcoder_greedy/lib/greedy_template.rb
111
111
  - lib/atcoder_greedy/lib/languages.rb
112
112
  - lib/atcoder_greedy/lib/test_case.rb
113
113
  - lib/atcoder_greedy/settings.yml