at_coder_friends 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: aee130f1a99a63ef7d97ca67fa85fcac10345f469fca73eaa448464432053b24
4
- data.tar.gz: 1492cbe3b1a4a1cc006e6fff72c0f46eeecce71be0bc4d37b925904be8a48b9c
3
+ metadata.gz: 5c01f28420d768fccb30960702213d768caeaefd54cb9686cb0bafb3591ba44d
4
+ data.tar.gz: 35acd1fb67232149a831394b4afa34f5eb1ade9e2ea3658d03d0ec191566975b
5
5
  SHA512:
6
- metadata.gz: e9381159e0e389c9f8cb63b7bc18b2b775dfc015720a7118568562e22efbfb877a95c6eb531d3c6c4184f69c3bcb135a9796c21cc6e7f7446b8e2fdd71effb51
7
- data.tar.gz: 275a4ac13b90a3e85cfd6a60eb1efb47230255ecd5d8d79fe1102a96fb3a3ce8bfb9bdbb62429d0232011d5fc5cdf4fb7bd3992be6add45032f7e0a499b10d16
6
+ metadata.gz: 6015841608385002fea3d1ff31f738f92719ce7fca2d9331e68c44aef8605ba31047194a6e4a53229062110dd2cd55067932baa0c1e44e2628041e5bc72468e4
7
+ data.tar.gz: 8a96a65f43b823666914b86eeba623bf0ae15074406c1ad432d55163c9e8b5d88625e7d08046a1db5d8b0698738bb0fcb5c9b7060a9b5a7232202242f2774ea1
data/.gitignore CHANGED
@@ -6,6 +6,8 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /vendor/
10
+ /.at_coder_friends.yml
9
11
 
10
12
  # rspec failure tracking
11
13
  .rspec_status
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- at_coder_friends (0.3.2)
4
+ at_coder_friends (0.3.3)
5
+ launchy (~> 2.4.3)
5
6
  mechanize (~> 2.0)
6
7
 
7
8
  GEM
@@ -14,12 +15,14 @@ GEM
14
15
  safe_yaml (~> 1.0.0)
15
16
  diff-lcs (1.3)
16
17
  docile (1.3.1)
17
- domain_name (0.5.20180417)
18
+ domain_name (0.5.20190701)
18
19
  unf (>= 0.0.5, < 1.0.0)
19
20
  hashdiff (0.3.8)
20
21
  http-cookie (1.0.3)
21
22
  domain_name (~> 0.5)
22
23
  json (2.1.0)
24
+ launchy (2.4.3)
25
+ addressable (~> 2.3)
23
26
  mechanize (2.7.6)
24
27
  domain_name (~> 0.5, >= 0.5.1)
25
28
  http-cookie (~> 1.0)
@@ -31,12 +34,12 @@ GEM
31
34
  webrobots (>= 0.0.9, < 0.2)
32
35
  mime-types (3.2.2)
33
36
  mime-types-data (~> 3.2015)
34
- mime-types-data (3.2018.0812)
37
+ mime-types-data (3.2019.0331)
35
38
  mini_portile2 (2.4.0)
36
39
  net-http-digest_auth (1.4.1)
37
- net-http-persistent (3.0.0)
40
+ net-http-persistent (3.1.0)
38
41
  connection_pool (~> 2.2)
39
- nokogiri (1.10.1)
42
+ nokogiri (1.10.4)
40
43
  mini_portile2 (~> 2.4.0)
41
44
  ntlm-http (0.1.1)
42
45
  public_suffix (3.0.3)
@@ -62,7 +65,7 @@ GEM
62
65
  simplecov-html (0.10.2)
63
66
  unf (0.1.4)
64
67
  unf_ext
65
- unf_ext (0.0.7.5)
68
+ unf_ext (0.0.7.6)
66
69
  webmock (3.5.1)
67
70
  addressable (>= 2.3.6)
68
71
  crack (>= 0.3.2)
@@ -82,4 +85,4 @@ DEPENDENCIES
82
85
  webmock (~> 3.0)
83
86
 
84
87
  BUNDLED WITH
85
- 1.16.1
88
+ 1.17.3
data/README.md CHANGED
@@ -16,10 +16,6 @@ AtCoderFriends automates tasks about [AtCoder](https://atcoder.jp/) programming
16
16
 
17
17
  ## Installation
18
18
 
19
- <!--
20
- See [Development](#Develoment).
21
- -->
22
-
23
19
  Add this line to your application's Gemfile:
24
20
 
25
21
  ```ruby
@@ -32,7 +28,7 @@ And then execute:
32
28
 
33
29
  Or install it yourself as:
34
30
 
35
- $ gem install at_coder_friends
31
+ $ gem install at_coder_friends
36
32
 
37
33
  ## Configuration
38
34
 
@@ -53,6 +49,13 @@ at_coder_friends setup /path/to/contest
53
49
 
54
50
  Creates contest folder, and generates example data and source skeletons into the folder.
55
51
 
52
+ ### Open Contest Page
53
+
54
+ ```
55
+ at_coder_friends open-contest /path/to/contest/source_file
56
+ ```
57
+
58
+ Opens the contet page which the contest folder linked to.
56
59
 
57
60
  ### Run first test case
58
61
 
@@ -75,7 +78,7 @@ at_coder_friends submit /path/to/contest/source_file
75
78
  ### Naming Convention
76
79
 
77
80
  - Contest folder name will be used in the contest site URL.
78
- For example, if ```arc001``` folder is specified, AtCoderFriends will use ```arc001.contest.atcoder.jp```.
81
+ For example, if ```arc001``` folder is specified, AtCoderFriends will use ```https://atcoder.jp/contests/arc001/```.
79
82
  - Source file should be named ```[problem ID].[language specific extension]```(e.g. ```A.rb```),
80
83
  in order to let AtCoderFriends find test cases or fill the submission form.
81
84
  - Suffixes (start with underscore) may be added to the file name (e.g. ```A_v2.rb```),
@@ -97,9 +100,10 @@ It is convenient to use AtCoderFriends from Sublime Text plugin.
97
100
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
98
101
 
99
102
  To install this gem onto your local machine, run `bundle exec rake install`.
100
- <!---
103
+
104
+ <!--
101
105
  To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
102
- --->
106
+ -->
103
107
 
104
108
  ## Contributing
105
109
 
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.required_ruby_version = '>= 2.3.0'
32
32
 
33
33
  spec.add_dependency 'mechanize', '~> 2.0'
34
+ spec.add_dependency 'launchy', '~> 2.4.3'
34
35
 
35
36
  spec.add_development_dependency 'bundler', '~> 1.16'
36
37
  spec.add_development_dependency 'rake', '~> 10.0'
@@ -11,10 +11,11 @@ module AtCoderFriends
11
11
  OPTION_BANNER =
12
12
  <<~TEXT
13
13
  Usage:
14
- at_coder_friends setup path/contest # setup contest folder
15
- at_coder_friends test-one path/contest/src # run 1st test case
16
- at_coder_friends test-all path/contest/src # run all test cases
17
- at_coder_friends submit path/contest/src # submit source code
14
+ at_coder_friends setup path/contest # setup contest folder
15
+ at_coder_friends test-one path/contest/src # run 1st test case
16
+ at_coder_friends test-all path/contest/src # run all test cases
17
+ at_coder_friends submit path/contest/src # submit source code
18
+ at_coder_friends open-contest path/contest/src # open contest page
18
19
  Options:
19
20
  TEXT
20
21
  STATUS_SUCCESS = 0
@@ -72,6 +73,8 @@ module AtCoderFriends
72
73
  judge_one(path, id)
73
74
  when 'judge-all'
74
75
  judge_all(path)
76
+ when 'open-contest'
77
+ open_contest(path)
75
78
  else
76
79
  raise ParamError, "unknown command: #{command}"
77
80
  end
@@ -118,5 +121,9 @@ module AtCoderFriends
118
121
  def judge_all(path)
119
122
  JudgeTestRunner.new(path).judge_all
120
123
  end
124
+
125
+ def open_contest(path)
126
+ ScrapingAgent.new(contest_name(path), @config).open_contest
127
+ end
121
128
  end
122
129
  end
@@ -4,6 +4,7 @@ require 'uri'
4
4
  require 'mechanize'
5
5
  require 'logger'
6
6
  require 'English'
7
+ require 'launchy'
7
8
 
8
9
  module AtCoderFriends
9
10
  # scrapes AtCoder contest site and
@@ -143,5 +144,9 @@ module AtCoderFriends
143
144
  form.field_with(name: 'sourceCode').value = src
144
145
  form.submit
145
146
  end
147
+
148
+ def open_contest
149
+ Launchy.open(contest_url(''))
150
+ end
146
151
  end
147
152
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AtCoderFriends
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: at_coder_friends
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - nejiko96
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-26 00:00:00.000000000 Z
11
+ date: 2019-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: launchy
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.4.3
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.4.3
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: bundler
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -158,8 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
158
172
  - !ruby/object:Gem::Version
159
173
  version: '0'
160
174
  requirements: []
161
- rubyforge_project:
162
- rubygems_version: 2.7.5
175
+ rubygems_version: 3.0.6
163
176
  signing_key:
164
177
  specification_version: 4
165
178
  summary: AtCoder support tool