link-checker 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/link-checker.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "link-checker"
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Alyn Porter"]
@@ -368,7 +368,7 @@ Gem::Specification.new do |s|
368
368
  s.homepage = "https://github.com/endymion/link-checker"
369
369
  s.licenses = ["MIT"]
370
370
  s.require_paths = ["lib"]
371
- s.rubygems_version = "1.8.24"
371
+ s.rubygems_version = "1.8.15"
372
372
  s.summary = "Check the links in a web site before deploying."
373
373
 
374
374
  if s.respond_to? :specification_version then
@@ -64,12 +64,12 @@ describe LinkChecker do
64
64
  describe "prints output" do
65
65
 
66
66
  it "prints green when the links are all good." do
67
- LinkChecker.stub(:check_link) { true }
67
+ LinkChecker.stub(:check_link) { LinkChecker::Good.new }
68
68
  $stdout.should_receive(:puts).with(/Checked/i).exactly(3).times
69
69
  LinkChecker.new(@site_path).check_links
70
70
  end
71
71
 
72
- it "prints green when the links are all bad." do
72
+ it "prints red when the links are all bad." do
73
73
  LinkChecker.stub(:check_link).and_raise LinkChecker::Error.new('blah')
74
74
  $stdout.should_receive(:puts).with(/Problem/i).exactly(3).times
75
75
  $stdout.should_receive(:puts).with(/Link/i).at_least(3).times
@@ -77,6 +77,14 @@ describe LinkChecker do
77
77
  LinkChecker.new(@site_path).check_links
78
78
  end
79
79
 
80
+ it "prints yellow warnings when the links redirect." do
81
+ LinkChecker.stub(:check_link) { LinkChecker::Redirect.new('http://somewhere') }
82
+ $stdout.should_receive(:puts).with(/Checked/i).exactly(3).times
83
+ $stdout.should_receive(:puts).with(/Warning/i).at_least(3).times
84
+ $stdout.should_receive(:puts).with(/Redirected/i).at_least(3).times
85
+ LinkChecker.new(@site_path).check_links
86
+ end
87
+
80
88
  end
81
89
 
82
90
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: link-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &70311308806200 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,15 +21,10 @@ dependencies:
21
21
  version: 1.5.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 1.5.5
24
+ version_requirements: *70311308806200
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: colorize
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &70311308804920 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ~>
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: 0.5.8
38
33
  type: :runtime
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: 0.5.8
35
+ version_requirements: *70311308804920
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: rspec
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &70311308803400 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ~>
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: 2.11.0
54
44
  type: :development
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ~>
60
- - !ruby/object:Gem::Version
61
- version: 2.11.0
46
+ version_requirements: *70311308803400
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: jeweler
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &70311308372900 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ~>
@@ -69,15 +54,10 @@ dependencies:
69
54
  version: 1.8.4
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ~>
76
- - !ruby/object:Gem::Version
77
- version: 1.8.4
57
+ version_requirements: *70311308372900
78
58
  - !ruby/object:Gem::Dependency
79
59
  name: simplecov
80
- requirement: !ruby/object:Gem::Requirement
60
+ requirement: &70311308371820 !ruby/object:Gem::Requirement
81
61
  none: false
82
62
  requirements:
83
63
  - - ~>
@@ -85,15 +65,10 @@ dependencies:
85
65
  version: 0.6.4
86
66
  type: :development
87
67
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
91
- - - ~>
92
- - !ruby/object:Gem::Version
93
- version: 0.6.4
68
+ version_requirements: *70311308371820
94
69
  - !ruby/object:Gem::Dependency
95
70
  name: fakeweb
96
- requirement: !ruby/object:Gem::Requirement
71
+ requirement: &70311308370940 !ruby/object:Gem::Requirement
97
72
  none: false
98
73
  requirements:
99
74
  - - ~>
@@ -101,15 +76,10 @@ dependencies:
101
76
  version: 1.3.0
102
77
  type: :development
103
78
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
107
- - - ~>
108
- - !ruby/object:Gem::Version
109
- version: 1.3.0
79
+ version_requirements: *70311308370940
110
80
  - !ruby/object:Gem::Dependency
111
81
  name: debugger
112
- requirement: !ruby/object:Gem::Requirement
82
+ requirement: &70311308370100 !ruby/object:Gem::Requirement
113
83
  none: false
114
84
  requirements:
115
85
  - - ! '>='
@@ -117,12 +87,7 @@ dependencies:
117
87
  version: '0'
118
88
  type: :development
119
89
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
125
- version: '0'
90
+ version_requirements: *70311308370100
126
91
  description: Check the links in a web site before deploying, using Nokogiri.
127
92
  email:
128
93
  executables:
@@ -494,7 +459,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
494
459
  version: '0'
495
460
  segments:
496
461
  - 0
497
- hash: 3227380414018538119
462
+ hash: -2791079843695935158
498
463
  required_rubygems_version: !ruby/object:Gem::Requirement
499
464
  none: false
500
465
  requirements:
@@ -503,7 +468,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
503
468
  version: '0'
504
469
  requirements: []
505
470
  rubyforge_project:
506
- rubygems_version: 1.8.24
471
+ rubygems_version: 1.8.15
507
472
  signing_key:
508
473
  specification_version: 3
509
474
  summary: Check the links in a web site before deploying.