rspec_css_validator 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ .DS_Store
2
+ *.gem
data/.rspec ADDED
File without changes
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "http://rubygems.org"
2
+ gemspec
data/README.rdoc ADDED
File without changes
data/Rakefile ADDED
File without changes
File without changes
@@ -0,0 +1,35 @@
1
+ RSpec::Matchers.define :be_valid_css_uri do
2
+ validator = nil
3
+ match do |body|
4
+ validator = CSSValidator.new
5
+ validator.validate_uri(body)
6
+ validator.valid?
7
+ end
8
+ failure_message_for_should do |actual|
9
+ validator.inspect
10
+ end
11
+ end
12
+
13
+ RSpec::Matchers.define :be_valid_css_file do
14
+ validator = nil
15
+ match do |body|
16
+ validator = CSSValidator.new
17
+ validator.validate_file(body)
18
+ validator.valid?
19
+ end
20
+ failure_message_for_should do |actual|
21
+ validator.inspect
22
+ end
23
+ end
24
+
25
+ RSpec::Matchers.define :be_valid_css do
26
+ validator = nil
27
+ match do |body|
28
+ validator = CSSValidator.new
29
+ validator.validate_text(body)
30
+ validator.valid?
31
+ end
32
+ failure_message_for_should do |actual|
33
+ validator.inspect
34
+ end
35
+ end
@@ -0,0 +1,3 @@
1
+ module RSpecCSSValidator
2
+ VERSION = "0.0.3"
3
+ end
@@ -0,0 +1,25 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "rspec_css_validator/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "rspec_css_validator"
7
+ s.version = RSpecCSSValidator::VERSION
8
+ s.authors = ["Matias Niemela"]
9
+ s.email = ["matias@yearofmoo.com"]
10
+ s.homepage = "http://yearofmoo.com/rspec-css-validator"
11
+ s.summary = "RSpec matcher for CSS validation"
12
+ s.description = %q{A RSpec matcher plugin for validating CSS within tests. Both CSS content and URI files can be matched"}
13
+
14
+ s.rubyforge_project = "rspec_css_validator"
15
+
16
+ s.platform = "ruby"
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.add_dependency "json"
21
+ s.add_dependency "rest-client"
22
+ s.add_dependency "rspec"
23
+ s.add_dependency "w3c_validators"
24
+ s.require_paths = ["lib"]
25
+ end
File without changes
metadata ADDED
@@ -0,0 +1,119 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_css_validator
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 3
9
+ version: 0.0.3
10
+ platform: ruby
11
+ authors:
12
+ - Matias Niemela
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2012-05-20 00:00:00 -04:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: json
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :runtime
31
+ version_requirements: *id001
32
+ - !ruby/object:Gem::Dependency
33
+ name: rest-client
34
+ prerelease: false
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ segments:
40
+ - 0
41
+ version: "0"
42
+ type: :runtime
43
+ version_requirements: *id002
44
+ - !ruby/object:Gem::Dependency
45
+ name: rspec
46
+ prerelease: false
47
+ requirement: &id003 !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ segments:
52
+ - 0
53
+ version: "0"
54
+ type: :runtime
55
+ version_requirements: *id003
56
+ - !ruby/object:Gem::Dependency
57
+ name: w3c_validators
58
+ prerelease: false
59
+ requirement: &id004 !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ segments:
64
+ - 0
65
+ version: "0"
66
+ type: :runtime
67
+ version_requirements: *id004
68
+ description: A RSpec matcher plugin for validating CSS within tests. Both CSS content and URI files can be matched"
69
+ email:
70
+ - matias@yearofmoo.com
71
+ executables: []
72
+
73
+ extensions: []
74
+
75
+ extra_rdoc_files: []
76
+
77
+ files:
78
+ - .gitignore
79
+ - .rspec
80
+ - Gemfile
81
+ - README.rdoc
82
+ - Rakefile
83
+ - lib/rspec_css_validator.rb
84
+ - lib/rspec_css_validator/rspec.rb
85
+ - lib/rspec_css_validator/version.rb
86
+ - rspec_css_validator.gemspec
87
+ - spec/rspec_css_validator_spec.rb
88
+ has_rdoc: true
89
+ homepage: http://yearofmoo.com/rspec-css-validator
90
+ licenses: []
91
+
92
+ post_install_message:
93
+ rdoc_options: []
94
+
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ segments:
102
+ - 0
103
+ version: "0"
104
+ required_rubygems_version: !ruby/object:Gem::Requirement
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ segments:
109
+ - 0
110
+ version: "0"
111
+ requirements: []
112
+
113
+ rubyforge_project: rspec_css_validator
114
+ rubygems_version: 1.3.6
115
+ signing_key:
116
+ specification_version: 3
117
+ summary: RSpec matcher for CSS validation
118
+ test_files:
119
+ - spec/rspec_css_validator_spec.rb