aoj 0.0.5 → 0.0.6

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: 449266fb56333786a7e8ee152e4dfab57b245027
4
- data.tar.gz: 3c74831e04c44d5d4af266bbb353cd45adf7a314
3
+ metadata.gz: eaaab9b85e5e52c80d1fb9b3d5fbd40d8f001162
4
+ data.tar.gz: 33f19ba192e743db8817f2ff3afa1866d23ea3c7
5
5
  SHA512:
6
- metadata.gz: 3308c88f00e9a2a672836311754469a75be365719110e3f31aad85f5c4b73986dbf4637a8a0062aab9e24de3cd7d8b14cdf805c5ed10f13fae19ff813f29395d
7
- data.tar.gz: ebe6e094de834312214e66b7f008e9df335552698669a3a9b22c8799377df7e39683d0a31662952fc2a742eca38440ab46cdb63c593aefb27e02043fb2eeda38
6
+ metadata.gz: a17278da35417fe4d839249624d2454ec866a1b13e8891db06c29729359323fb17559a5f375ca1d0d08a99a9551ede84574dae34376bbf7dd63f9846b8625d1a
7
+ data.tar.gz: 44209b33d25159f72f46fe187947169bf40cc7184c64a5f3588da77273b9cea235d0432bc7a8da86542613a7f8044705cfa5ec2c399272d6909f5d2c231d5f96
data/README.md CHANGED
@@ -29,7 +29,7 @@ $ aoj submit 0001.cpp
29
29
  $ aoj submit mysource.cpp -p 0001 -l cpp11
30
30
  ```
31
31
 
32
- #### Submit and Tweet result
32
+ #### Tweet result (only when accepted)
33
33
 
34
34
  ```
35
35
  $ aoj submit 0001.cpp -t
@@ -83,7 +83,7 @@ which means, `hoge.py` file will be submitted as Python3 and `hoge.cpp` is C++11
83
83
 
84
84
  ## Contributing
85
85
 
86
- 1. Fork it ( http://github.com/na-o-sss/aoj/fork )
86
+ 1. Fork it ( http://github.com/na-o-ys/aoj/fork )
87
87
  2. Create your feature branch (`git checkout -b my-new-feature`)
88
88
  3. Commit your changes (`git commit -am 'Add some feature'`)
89
89
  4. Push to the branch (`git push origin my-new-feature`)
@@ -113,7 +113,6 @@ module AOJ
113
113
  if AOJ::HTTP.post_form(uri, params).code != '200'
114
114
  raise AOJ::Error::APIError, 'Failed to submit'
115
115
  end
116
- # TODO: when userid or password is wrong
117
116
  solution
118
117
  end
119
118
 
@@ -32,7 +32,7 @@ module AOJ
32
32
 
33
33
  print_result result
34
34
 
35
- if options[:twitter]
35
+ if options[:twitter] and result.status == 'Accepted'
36
36
  unless conf.has_twitter_credential?
37
37
  puts
38
38
  twitter_auth
@@ -24,12 +24,15 @@ module AOJ
24
24
  private
25
25
  def create_text(solution, status)
26
26
  text = <<-"EOS"
27
- #{status.status} #AOJ
28
- [#{solution.problem.id}:%s] %s
29
- SOURCE: %s
30
- LANG: #{solution.language.submit_name}
27
+ Accepted [#{solution.problem.id}:%s] #AOJ
28
+ %s
29
+
30
+ Lang: #{solution.language.submit_name}
31
+ Size: #{status.code_size} B
32
+ Source: %s
31
33
  EOS
32
34
 
35
+ # TODO: refactor and create test
33
36
  # Shortening problem title
34
37
  url_len = 2 * client.configuration.short_url_length
35
38
  title = solution.problem.name
@@ -1,3 +1,3 @@
1
1
  module AOJ
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aoj
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - na-o-ys
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-26 00:00:00.000000000 Z
11
+ date: 2015-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler