codeforces-viewer 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f84c5a69101037d7e82b4e19d1f70859bc1a7faa
4
- data.tar.gz: 2982dccf14455c2c16c26bd109bcdd27c4a351e5
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NmY5NjMzYzg4NzRiMzNiMGJmYjZkMzk5MGRkZjAwZWMwYWVjYjJjZg==
5
+ data.tar.gz: !binary |-
6
+ OTNhZWNjYmNlYjU1YzdkYmZjZjlmZmQ4YTI0YTZlM2EzNGE1ODdjNw==
5
7
  SHA512:
6
- metadata.gz: 6e678360a4b164df4d2b49be5f552afacd187068489f3f85e9d5baa776953e57127794fe09645d7ba4039a2f47096a2883263c27ac3dc3ebc9aaf30da63759f8
7
- data.tar.gz: 85cba4d0d3462c23f6d2985371c3ac822b9e397fdea288f9dc50c5a2bcf5154740c579809dbebe0164e4f441f1a40cc9fe671b5bb4432ef6dc49672277ea2103
8
+ metadata.gz: !binary |-
9
+ ZDJiNzMwNzA3Njc0NzkwYWFjMmYwOTVmZjczY2QzODExNDg5MDEyOGE3YWE3
10
+ NTJmZmQ3NDQxNDA2ZTRjOTM3YTAyYzEzNGMzYmFhOTJlMDhhMzM3MzliZWFi
11
+ ZjJlNDQ0ZTlhNmVhODI1ZGI4OTRjYjI1Mzk1OTgwMGNhNmU4MDk=
12
+ data.tar.gz: !binary |-
13
+ OTJkYTY4NDlmMzNjMjI5OTJhYTFiMTlkZDhkZDQ5ODlkYjYyMWZlNmFkYWRh
14
+ MDQxMGZjNzA0MGRlZjBhMDNlMDUwNmUxNzkyMWMyNTdkYjljZWQ1OWE1NTM3
15
+ MzdlYTk2Y2Q3OWYzNjYyNTg4OTRlNDdkMDY4NGZkYjUyMGJiMzc=
data/.travis.yml ADDED
@@ -0,0 +1,17 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - 1.9.3
6
+ install:
7
+ - export NOKOGIRI_USE_SYSTEM_LIBRARIES="YES"
8
+ - bundle install
9
+ script:
10
+ - bundle exec rake spec
11
+ deploy:
12
+ provider: rubygems
13
+ api_key:
14
+ master:
15
+ secure: "dXTqo1MMFAA4xaXCewzAxGqiW17JmwVJ842c0pBzC6wlbayzG+zsnlRErxMtWn3XLG8OaaYytqmg/hZIW6vkn7uMekCFh55sPaEU7A8aCd4BPJlepAhPrUep8zMFPkm++dkifEYmO9b1X8tH6hhmfQHStV5SAMlVAd0INQwP7HU="
16
+ gem:
17
+ master: codeforces-viewer
data/README.md CHANGED
@@ -1,29 +1,86 @@
1
1
  # Codeforces::Viewer
2
2
 
3
- TODO: Write a gem description
3
+ A simple command-line viewer for Codeforces.
4
+
5
+ [![Gem Version](https://badge.fury.io/rb/codeforces-viewer.png)](http://badge.fury.io/rb/codeforces-viewer)
6
+ [![Build Status](https://travis-ci.org/sh19910711/ruby-codeforces-viewer.png?branch=develop)](https://travis-ci.org/sh19910711/ruby-codeforces-viewer)
4
7
 
5
8
  ## Installation
6
9
 
7
- Add this line to your application's Gemfile:
10
+ $ gem install codeforces-viewer
8
11
 
9
- gem 'codeforces-viewer'
12
+ ## Usage
10
13
 
11
- And then execute:
14
+ ### How to view problem statement
12
15
 
13
- $ bundle
16
+ $ codeforces-viewer -c {contest-id} -p {problem-id}
14
17
 
15
- Or install it yourself as:
18
+ #### Example usage
16
19
 
17
- $ gem install codeforces-viewer
20
+ $ codeforces-viewer -c 123 -p A
18
21
 
19
- ## Usage
22
+ #### One More Thing: Use pager command [less, more, etc...]
23
+
24
+ $ codeforces-viewer -c 123 -p A | less -R
25
+
26
+ ### Download sample input/output
27
+
28
+ #### Download sample input
29
+
30
+ $ codeforces-viewer -c 123 -p A -i 0 > input.all.txt
31
+
32
+ You can specify input id as follow:
33
+
34
+ $ codeforces-viewer -c 123 -p A -i 1 > input.1.txt
35
+
36
+ #### Donwload sample output
37
+
38
+ $ codeforces-viewer -c 123 -p A -o 0 > input.all.txt
39
+
40
+ You can also specify output id as follow:
20
41
 
21
- TODO: Write usage instructions here
42
+ $ codeforces-viewer -c 123 -p A -o 2 > output.2.txt
43
+
44
+ #### Disable to cache
45
+
46
+ Downloaded files (currently, html files only) are cached (in `~/.codeforces-viewer/cache/*`) by default.
47
+
48
+ When you don't want to cache them, add `--no-cache` option as follow:
49
+
50
+ $ codeforces-viewer -c 123 -p A --no-cache | less -R
22
51
 
23
52
  ## Contributing
24
53
 
25
- 1. Fork it ( http://github.com/<my-github-username>/codeforces-viewer/fork )
54
+ 1. Fork it ( https://github.com/sh19910711/ruby-codeforces-viewer/fork )
26
55
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
56
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
57
  4. Push to the branch (`git push origin my-new-feature`)
29
58
  5. Create new Pull Request
59
+
60
+ ## License
61
+
62
+ Copyright (c) 2014 [Hiroyuki Sano](https://github.com/sh19910711)
63
+
64
+ MIT License
65
+
66
+ Permission is hereby granted, free of charge, to any person obtaining
67
+ a copy of this software and associated documentation files (the
68
+ "Software"), to deal in the Software without restriction, including
69
+ without limitation the rights to use, copy, modify, merge, publish,
70
+ distribute, sublicense, and/or sell copies of the Software, and to
71
+ permit persons to whom the Software is furnished to do so, subject to
72
+ the following conditions:
73
+
74
+ The above copyright notice and this permission notice shall be
75
+ included in all copies or substantial portions of the Software.
76
+
77
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
78
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
79
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
80
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
81
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
82
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
83
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
84
+
85
+
86
+
@@ -1,5 +1,5 @@
1
1
  module Codeforces
2
2
  module Viewer
3
- VERSION = "0.0.1"
3
+ VERSION = "0.1.0"
4
4
  end
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'codeforces/viewer'
2
4
 
3
5
  require 'fakefs/safe'
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Codeforces::Viewer::Render do
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Codeforces::Viewer::Viewer do
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  require 'spec_helper'
2
4
 
3
5
  describe Codeforces::Viewer::Cacher do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeforces-viewer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroyuki Sano
@@ -14,98 +14,98 @@ dependencies:
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: colorize
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.5'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.5'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - ! '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - ! '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: fakefs
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - ! '>='
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - ! '>='
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  description: A simple command-line viewer for Codeforces
@@ -116,7 +116,8 @@ executables:
116
116
  extensions: []
117
117
  extra_rdoc_files: []
118
118
  files:
119
- - ".gitignore"
119
+ - .gitignore
120
+ - .travis.yml
120
121
  - Gemfile
121
122
  - LICENSE.txt
122
123
  - README.md
@@ -147,17 +148,17 @@ require_paths:
147
148
  - lib
148
149
  required_ruby_version: !ruby/object:Gem::Requirement
149
150
  requirements:
150
- - - ">="
151
+ - - ! '>='
151
152
  - !ruby/object:Gem::Version
152
153
  version: '0'
153
154
  required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  requirements:
155
- - - ">="
156
+ - - ! '>='
156
157
  - !ruby/object:Gem::Version
157
158
  version: '0'
158
159
  requirements: []
159
160
  rubyforge_project:
160
- rubygems_version: 2.2.0
161
+ rubygems_version: 2.2.1
161
162
  signing_key:
162
163
  specification_version: 4
163
164
  summary: A simple command-line viewer for Codeforces