-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ef7e378
commit b7ebd12
Showing
6 changed files
with
53 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
require 'rake/testtask' | ||
|
||
Rake::TestTask.new do |t| | ||
t.libs << 'test' | ||
end | ||
|
||
desc "Run tests" | ||
task :default => :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/env ruby | ||
|
||
require 'getscore' | ||
|
||
|
||
print "输入登录信息->\n" | ||
print "学号: " | ||
xh = gets.chomp | ||
print "密码:" | ||
mm = gets.chomp | ||
|
||
me = CheckOne.new(xh, mm) | ||
me.get_score.parse_html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
Gem::Specification.new do |s| | ||
s.name = 'getscore' | ||
s.version = '0.0.0' | ||
s.version = '0.0.2' | ||
s.date = '2015-05-26' | ||
s.summary = "Hola!" | ||
s.summary = "Get Score!" | ||
s.description = "A gem for get URP score" | ||
s.authors = ["Ge Hao"] | ||
s.email = 'althoughghgh@gmail.com' | ||
s.files = ["lib/getscore.rb", | ||
"lib/getscore/check_one.rb", | ||
s.files = ["lib/getscore.rb", | ||
"lib/getscore/check_one.rb", | ||
"lib/getscore/get_class.rb"] | ||
s.homepage = 'http://although2013.com' | ||
s.license = 'MIT' | ||
s.executables << 'getscore' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'minitest/autorun' | ||
require 'getscore' | ||
|
||
class GetscoreTest < Minitest::Test | ||
|
||
def test_all | ||
me = CheckOne.new("2012021712", "1") | ||
me.get_score.parse_html | ||
|
||
page = me.get_whole_page | ||
me.download_text(page) | ||
end | ||
|
||
end |