nicorepo 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: e69cda5670a0c001d0683c3879ec4a513d399e69
4
- data.tar.gz: 632dd4545dd0798eb7067f95ff76cd2b989f2f2a
3
+ metadata.gz: 77bc420c0f28c252e64072f5327ee79df42c52f2
4
+ data.tar.gz: eeb940e3c0f7bce3837c5ad4140f4c051e88618f
5
5
  SHA512:
6
- metadata.gz: ab7793b6f85e1567274ab1605b849116518af0dff0f4ecf4316004930b3cfebb100c05dc1b221490194d8c76c83264be02ae696837b41d3c28dc19a3fa196c99
7
- data.tar.gz: 5b7c1a4f70748ddd4dd9f7272cb78174f3bb098b0dce617f1d20b4193fa3637ade902864dd93398e94b1581aee0580259c9acd3e2442374d4e589e0a2cc4cb4f
6
+ metadata.gz: 9aa9cec6aec5ebaaa589a2911c71aa37488117657fdeca31e5ee773b6093536d888946959a2198846eab3125317c0e14dbc4c406128a300a2c8b623955678982
7
+ data.tar.gz: 2a10ba1150d48817bc994a00b38f3a2cd2255b4e17f8c3a748991b25d95a8a7f040c5ffca853dde77d4d8e289a48071601315cdfea822ab73f897a00ea573fb0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.0.6 (2014/10/18)
2
+
3
+ * Disable SSLv3 and use TLSv1 because of POODLE vulnerability
4
+ * Support rspec3
5
+
1
6
  ## 0.0.5 (2014/05/11)
2
7
 
3
8
  ### Features
@@ -1,3 +1,3 @@
1
1
  class Nicorepo
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/nicorepo.rb CHANGED
@@ -12,7 +12,7 @@ class Nicorepo
12
12
 
13
13
  def initialize
14
14
  @agent = Mechanize.new
15
- @agent.ssl_version = 'SSLv3'
15
+ @agent.ssl_version = 'TLSv1'
16
16
  @agent.request_headers = { 'accept-language' => 'ja-JP', 'content-language' => 'ja-JP' }
17
17
  @parser = Parser.new(@agent)
18
18
  @logined = false
@@ -4,7 +4,7 @@ describe Nicorepo::Cli::Configuration do
4
4
  let(:conf) { Nicorepo::Cli::Configuration.new }
5
5
 
6
6
  before do
7
- Nicorepo::Cli::Configuration.any_instance.stub(:load_config).and_return(config_values)
7
+ allow_any_instance_of(Nicorepo::Cli::Configuration).to receive(:load_config).and_return(config_values)
8
8
  end
9
9
 
10
10
  describe "#request_num" do
@@ -15,7 +15,7 @@ describe Nicorepo::Cli::Configuration do
15
15
 
16
16
  it "should return default request_num" do
17
17
  default_request_num = conf.send(:defaults)["request_num"]["general"]
18
- conf.request_num("all").should eq(default_request_num)
18
+ expect(conf.request_num("all")).to eq(default_request_num)
19
19
  end
20
20
  end
21
21
 
@@ -24,7 +24,7 @@ describe Nicorepo::Cli::Configuration do
24
24
  let(:config_values) { { "request_num" => { "general" => general_request_num } } }
25
25
 
26
26
  it "should return defined 'general' request_num" do
27
- conf.request_num("all").should eq(general_request_num)
27
+ expect(conf.request_num("all")).to eq(general_request_num)
28
28
  end
29
29
  end
30
30
  end
@@ -35,7 +35,7 @@ describe Nicorepo::Cli::Configuration do
35
35
  let(:config_values) { { "request_num" => { "all" => all_request_num } } }
36
36
 
37
37
  it "should return defined 'all' request_num" do
38
- conf.request_num("all").should eq(all_request_num)
38
+ expect(conf.request_num("all")).to eq(all_request_num)
39
39
  end
40
40
  end
41
41
 
@@ -45,7 +45,7 @@ describe Nicorepo::Cli::Configuration do
45
45
  let(:config_values) { { "request_num" => { "all" => all_request_num, "general" => general_request_num } } }
46
46
 
47
47
  it "should return defined 'all' request_num" do
48
- conf.request_num("all").should eq(all_request_num)
48
+ expect(conf.request_num("all")).to eq(all_request_num)
49
49
  end
50
50
  end
51
51
  end
@@ -61,7 +61,7 @@ describe Nicorepo::Cli::Configuration do
61
61
  let(:config_values) { { "limit_page" => { "all" => all_limit_page, "general" => general_limit_page } } }
62
62
 
63
63
  it "should return defined 'all' limit_page" do
64
- conf.limit_page("all").should eq(all_limit_page)
64
+ expect(conf.limit_page("all")).to eq(all_limit_page)
65
65
  end
66
66
  end
67
67
  end
@@ -10,7 +10,7 @@ describe Nicorepo do
10
10
  describe "#login" do
11
11
  context "with right account" do
12
12
  it "should be success" do
13
- @nicorepo.agent.should be_true
13
+ expect(@nicorepo.agent).to be_truthy
14
14
  end
15
15
  end
16
16
 
@@ -25,13 +25,13 @@ describe Nicorepo do
25
25
  describe "#all" do
26
26
  context "with 5" do
27
27
  it "should return 5 reports" do
28
- @nicorepo.all(5).should have(5).reports
28
+ expect(@nicorepo.all(5).size).to eq(5)
29
29
  end
30
30
  end
31
31
 
32
32
  context "with 50" do
33
33
  it "should return 50 reports" do
34
- @nicorepo.all(50).should have(50).reports
34
+ expect(@nicorepo.all(50).size).to eq(50)
35
35
  end
36
36
  end
37
37
  end
@@ -41,11 +41,11 @@ describe Nicorepo do
41
41
  it "should return only video reports" do
42
42
  videos = @nicorepo.videos
43
43
  not_videos = videos.reject{ |v| v.kind =~ /video/ }
44
- not_videos.size.should eq 0
44
+ expect(not_videos.size).to eq(0)
45
45
  end
46
46
 
47
47
  it "should return 5 reports at the most" do
48
- @nicorepo.videos(5, 3).should have_at_most(5).reports
48
+ expect(@nicorepo.videos(5, 3).size).to be <= 5
49
49
  end
50
50
  end
51
51
  end
@@ -54,7 +54,7 @@ describe Nicorepo do
54
54
  it "should return only live reports" do
55
55
  lives = @nicorepo.lives
56
56
  not_lives = lives.reject{ |l| l.kind =~ /live/ }
57
- not_lives.size.should eq 0
57
+ expect(not_lives.size).to eq(0)
58
58
  end
59
59
  end
60
60
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nicorepo
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
  - upinetree
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-10 00:00:00.000000000 Z
11
+ date: 2014-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize