snarl-snp 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +86 -4
- data/Rakefile +4 -3
- data/VERSION +1 -1
- data/YAML.rdoc +197 -0
- data/bin/snarl_snp +112 -0
- data/{GUIDE.rdoc.ja → doc-ja/GUIDE.rdoc.ja} +0 -0
- data/{README.rdoc.ja → doc-ja/README.rdoc.ja} +94 -29
- data/doc-ja/YAML.rdoc.ja +200 -0
- data/exsample/yahoo_weather.rb +18 -4
- data/lib/snarl/autotest.rb +7 -77
- data/lib/snarl/snp.rb +4 -4
- data/lib/snarl/snp/action.rb +15 -11
- data/lib/snarl/snp/autosnp.rb +69 -0
- data/lib/snarl/snp/config.rb +109 -17
- data/lib/snarl/snp/error.rb +7 -6
- data/lib/snarl/snp/request.rb +31 -21
- data/lib/snarl/snp/response.rb +1 -0
- data/lib/snarl/snp/snp.rb +56 -41
- data/lib/snarl/snp/snp_procedure.rb +105 -0
- data/snarl-snp.gemspec +21 -15
- data/spec/bin/snarl_snp_spec.rb +91 -0
- data/spec/snp/action_spec.rb +149 -86
- data/spec/snp/config_spec.rb +181 -37
- data/spec/snp/real_connection_spec.rb +295 -0
- data/spec/snp/request_spec.rb +40 -10
- data/spec/snp/snp_procedure_spec.rb +226 -0
- data/spec/snp/snp_spec.rb +216 -193
- data/spec/spec_helper.rb +6 -4
- metadata +22 -27
- data/spec/exsample/data/weather_yahoo_co_jp.html +0 -608
- data/spec/exsample/yahoo_weather_spec.rb +0 -22
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- coding:utf-8 -*-
|
2
|
-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
|
3
|
-
require 'snarl/snp'
|
4
|
-
require 'rubygems'
|
5
|
-
require 'webmock'
|
6
|
-
|
7
|
-
html = File.open(File.join(File.dirname(__FILE__), 'data', 'weather_yahoo_co_jp.html')){|f| f.read}
|
8
|
-
WebMock.stub_request(:get, 'http://weather.yahoo.co.jp/weather/jp/1b/1400.html').to_return(:body => html)
|
9
|
-
|
10
|
-
require 'open-uri'
|
11
|
-
#p open('http://weather.yahoo.co.jp/weather/jp/1b/1400.html').read
|
12
|
-
describe "Show weathercast of Sapporo, Japan" do
|
13
|
-
it "do" do
|
14
|
-
lambda{
|
15
|
-
argv = ARGV.dup
|
16
|
-
ARGV.clear # spec -fs -v yahoo_weather_spec.rb #=> ARGV[0] == '-fs'
|
17
|
-
ARGV[0] = Snarl::SNP::Config.host
|
18
|
-
load File.expand_path(File.dirname(__FILE__) + '../../../exsample/yahoo_weather.rb')
|
19
|
-
ARGV.concat(argv)
|
20
|
-
}.should_not raise_error
|
21
|
-
end
|
22
|
-
end
|