gettc 1.6.1 → 1.6.2

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: cf50b3a174bc6348bfbf9e6d963119378a48fe99
4
- data.tar.gz: 59c052e76941f9679e0abb72a86f72e7c46f92be
3
+ metadata.gz: bfdcf3cad6f2ab23e59e2d081b56f6d1b2e2c6e5
4
+ data.tar.gz: 8d45ab50e760b31e3e0de2ec2ae05b76f1c75c81
5
5
  SHA512:
6
- metadata.gz: df332f77c57b9c7ec25a2548d5fae1b0e39a06c283ed21fd4a2d2164195e4e012a14e5f77fc8c461c5fff7fb682d84313911673f36c396f6fc07eb740362f3f1
7
- data.tar.gz: 5ef195b4738326adccb759379380c588306fa8194e9b5ae4e9e37412cbf2819ebe3d41e9dc921044278c4b08eb9cb00fb67fd3e13159146dc72422c78028b42f
6
+ metadata.gz: 4dcd3251badaeaba339c3b62593c644083985ec126d27ff464de1e8188cc27dc558b1c4ba18c394c905113d53fd80bfe61d963c3bd8dec870fbf10d86b0edf28
7
+ data.tar.gz: c929bbfe92fbf5e1cc03c38132d6e295e9a236e0675ac638f13da89bec994a1c84cf92442a0b046277788b8033ab248264bf22998b45091de53b45ca9a7adce3
data/bin/gettc CHANGED
@@ -11,7 +11,7 @@ def init
11
11
  $config_d = ENV.fetch "GETTC_HOME", File.expand_path("~/.gettc")
12
12
  gem_d = Gem.loaded_specs["gettc"]
13
13
  if gem_d.nil? then
14
- $root_d = File.join File.basename(__FILE__), "../"
14
+ $root_d = File.join File.dirname(__FILE__), "../"
15
15
  else
16
16
  $root_d = gem_d.full_gem_path
17
17
  end
@@ -43,9 +43,21 @@ end
43
43
 
44
44
  def main
45
45
  prog = File.basename __FILE__
46
- usage = "Usage: #{prog} <id>\nWhere <id> is the problem ID, eg 11138"
46
+ usage = <<-eos.strip
47
+ gettc <id>: Generate a solution for the TopCoder problem with that ID, eg 11138.
48
+ gettc version: Print version string.
49
+ gettc reset: Force a reset of the contents in GETTC_HOME.
50
+ eos
47
51
  if ARGV.empty?
48
52
  puts usage
53
+ return
54
+ end
55
+ command = ARGV[0]
56
+ if command == "version"
57
+ puts VERSION
58
+ elsif command == "reset"
59
+ FileUtils.rm_rf $config_d
60
+ replace_config
49
61
  else
50
62
  id = ARGV[0].to_i
51
63
  puts "You have given ID = #{id}"
@@ -76,4 +88,4 @@ def main
76
88
  end
77
89
 
78
90
  init
79
- main
91
+ main
@@ -1,7 +1,7 @@
1
1
  module Gettc
2
- VERSION = "1.6.1"
2
+ VERSION = "1.6.2"
3
3
  end
4
4
 
5
5
  require "gettc/download"
6
6
  require "gettc/parse"
7
- require "gettc/generate"
7
+ require "gettc/generate"
@@ -1,3 +1,3 @@
1
1
  username: gettc
2
2
  password: algorithm
3
- version: 1.6
3
+ version: 1.6.2
@@ -97,4 +97,4 @@ parseList parser = do
97
97
  spaces >> char '[' >> spaces
98
98
  xs <- parseElems parser
99
99
  spaces >> char ']'
100
- return xs
100
+ return xs
@@ -1,4 +1,4 @@
1
- #! python
1
+ #! /usr/bin/env python
2
2
 
3
3
  import os, sys
4
4
  import <%= prob.name %>
@@ -24,4 +24,4 @@ def main():
24
24
 
25
25
  if __name__ == "__main__":
26
26
  init()
27
- main()
27
+ main()
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gettc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seri
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-25 00:00:00.000000000 Z
11
+ date: 2014-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hpricot
@@ -58,6 +58,10 @@ files:
58
58
  - dist/include/java/engine.rb
59
59
  - dist/include/python/engine.rb
60
60
  - dist/include/python/topcoder/__init__.py
61
+ - dist/include/python/topcoder/__pycache__/__init__.cpython-32.pyc
62
+ - dist/include/python/topcoder/__pycache__/errors.cpython-32.pyc
63
+ - dist/include/python/topcoder/__pycache__/reader.cpython-32.pyc
64
+ - dist/include/python/topcoder/__pycache__/writer.cpython-32.pyc
61
65
  - dist/include/python/topcoder/errors.py
62
66
  - dist/include/python/topcoder/reader.py
63
67
  - dist/include/python/topcoder/writer.py