metatag_cop 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +122 -0
- data/.rspec +2 -0
- data/.rubocop.yml +5 -0
- data/.ruby-version +1 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +39 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/metatag_cop +5 -0
- data/bin/setup +8 -0
- data/lib/metatag_cop/builders/csv.rb +22 -0
- data/lib/metatag_cop/cops/cop.rb +35 -0
- data/lib/metatag_cop/handler.rb +27 -0
- data/lib/metatag_cop/models/csv.rb +19 -0
- data/lib/metatag_cop/parser.rb +53 -0
- data/lib/metatag_cop/version.rb +5 -0
- data/lib/metatag_cop.rb +8 -0
- data/metatag_cop.gemspec +30 -0
- metadata +124 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3b699a58b7d2c344ba5162cc93dd6fa00627e4d9
|
4
|
+
data.tar.gz: 961c0ca29e2fcc37aeec5ba42c4fe44a878ef814
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b1d83924b720e8f865ffd8ddcb6e2293f580714bcc2d0108a93bbff5816ad04efc412b06171c3422ba63d7a11a99c0ef3bdc1ec7902baa6ac5fd07dc7e0e9227
|
7
|
+
data.tar.gz: 197316a16bf961c78a8c5306c659954bdf67ca59c3c4bd5882b3ffa96880f3ec3224a43c96dc9a7cc1042cb7d7882813c982afda4b5a0cd996ae77768d587ba0
|
data/.gitignore
ADDED
@@ -0,0 +1,122 @@
|
|
1
|
+
### https://raw.github.com/github/gitignore/f57304e9762876ae4c9b02867ed0cb887316387e/Ruby.gitignore
|
2
|
+
*.DS_store
|
3
|
+
*.gem
|
4
|
+
*.rbc
|
5
|
+
/.config
|
6
|
+
/coverage/
|
7
|
+
/InstalledFiles
|
8
|
+
/pkg/
|
9
|
+
/spec/reports/
|
10
|
+
/spec/examples.txt
|
11
|
+
/test/tmp/
|
12
|
+
/test/version_tmp/
|
13
|
+
/tmp/
|
14
|
+
|
15
|
+
# Used by dotenv library to load environment variables.
|
16
|
+
.env
|
17
|
+
|
18
|
+
# for a library or gem, you might want to ignore these files since the code is
|
19
|
+
# intended to run in multiple environments; otherwise, check them in:
|
20
|
+
# Gemfile.lock
|
21
|
+
# .ruby-version
|
22
|
+
# .ruby-gemset
|
23
|
+
|
24
|
+
### https://raw.github.com/github/gitignore/f57304e9762876ae4c9b02867ed0cb887316387e/Global/JetBrains.gitignore
|
25
|
+
|
26
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
27
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
28
|
+
|
29
|
+
# User-specific stuff:
|
30
|
+
.idea/**/workspace.xml
|
31
|
+
.idea/**/tasks.xml
|
32
|
+
.idea/dictionaries
|
33
|
+
|
34
|
+
# Sensitive or high-churn files:
|
35
|
+
.idea/**/dataSources/
|
36
|
+
.idea/**/dataSources.ids
|
37
|
+
.idea/**/dataSources.xml
|
38
|
+
.idea/**/dataSources.local.xml
|
39
|
+
.idea/**/sqlDataSources.xml
|
40
|
+
.idea/**/dynamic.xml
|
41
|
+
.idea/**/uiDesigner.xml
|
42
|
+
|
43
|
+
# Gradle:
|
44
|
+
.idea/**/gradle.xml
|
45
|
+
.idea/**/libraries
|
46
|
+
|
47
|
+
# Mongo Explorer plugin:
|
48
|
+
.idea/**/mongoSettings.xml
|
49
|
+
|
50
|
+
## File-based project format:
|
51
|
+
*.iws
|
52
|
+
|
53
|
+
## Plugin-specific files:
|
54
|
+
|
55
|
+
# IntelliJ
|
56
|
+
/out/
|
57
|
+
|
58
|
+
# mpeltonen/sbt-idea plugin
|
59
|
+
.idea_modules/
|
60
|
+
|
61
|
+
# JIRA plugin
|
62
|
+
atlassian-ide-plugin.xml
|
63
|
+
|
64
|
+
# Cursive Clojure plugin
|
65
|
+
.idea/replstate.xml
|
66
|
+
|
67
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
68
|
+
com_crashlytics_export_strings.xml
|
69
|
+
crashlytics.properties
|
70
|
+
crashlytics-build.properties
|
71
|
+
fabric.properties
|
72
|
+
|
73
|
+
### https://raw.github.com/github/gitignore/f57304e9762876ae4c9b02867ed0cb887316387e/Global/SublimeText.gitignore
|
74
|
+
|
75
|
+
# cache files for sublime text
|
76
|
+
*.tmlanguage.cache
|
77
|
+
*.tmPreferences.cache
|
78
|
+
*.stTheme.cache
|
79
|
+
|
80
|
+
# workspace files are user-specific
|
81
|
+
*.sublime-workspace
|
82
|
+
|
83
|
+
# project files should be checked into the repository, unless a significant
|
84
|
+
# proportion of contributors will probably not be using SublimeText
|
85
|
+
# *.sublime-project
|
86
|
+
|
87
|
+
# sftp configuration file
|
88
|
+
sftp-config.json
|
89
|
+
|
90
|
+
# Package control specific files
|
91
|
+
Package Control.last-run
|
92
|
+
Package Control.ca-list
|
93
|
+
Package Control.ca-bundle
|
94
|
+
Package Control.system-ca-bundle
|
95
|
+
Package Control.cache/
|
96
|
+
Package Control.ca-certs/
|
97
|
+
Package Control.merged-ca-bundle
|
98
|
+
Package Control.user-ca-bundle
|
99
|
+
oscrypto-ca-bundle.crt
|
100
|
+
bh_unicode_properties.cache
|
101
|
+
|
102
|
+
# Sublime-github package stores a github token in this file
|
103
|
+
# https://packagecontrol.io/packages/sublime-github
|
104
|
+
GitHub.sublime-settings
|
105
|
+
|
106
|
+
|
107
|
+
### https://raw.github.com/github/gitignore/f57304e9762876ae4c9b02867ed0cb887316387e/Global/vim.gitignore
|
108
|
+
|
109
|
+
# swap
|
110
|
+
[._]*.s[a-v][a-z]
|
111
|
+
[._]*.sw[a-p]
|
112
|
+
[._]s[a-v][a-z]
|
113
|
+
[._]sw[a-p]
|
114
|
+
# session
|
115
|
+
Session.vim
|
116
|
+
# temporary
|
117
|
+
.netrwhist
|
118
|
+
*~
|
119
|
+
|
120
|
+
# auto-generated tag files
|
121
|
+
tags
|
122
|
+
.tags
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at mailto.takita.yusuke@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
metatag_cop (0.1.0)
|
5
|
+
nokogiri (~> 1.7)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
diff-lcs (1.3)
|
11
|
+
mini_portile2 (2.1.0)
|
12
|
+
nokogiri (1.7.1)
|
13
|
+
mini_portile2 (~> 2.1.0)
|
14
|
+
rake (10.5.0)
|
15
|
+
rspec (3.5.0)
|
16
|
+
rspec-core (~> 3.5.0)
|
17
|
+
rspec-expectations (~> 3.5.0)
|
18
|
+
rspec-mocks (~> 3.5.0)
|
19
|
+
rspec-core (3.5.4)
|
20
|
+
rspec-support (~> 3.5.0)
|
21
|
+
rspec-expectations (3.5.0)
|
22
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
23
|
+
rspec-support (~> 3.5.0)
|
24
|
+
rspec-mocks (3.5.0)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.5.0)
|
27
|
+
rspec-support (3.5.0)
|
28
|
+
|
29
|
+
PLATFORMS
|
30
|
+
ruby
|
31
|
+
|
32
|
+
DEPENDENCIES
|
33
|
+
bundler (~> 1.14)
|
34
|
+
metatag_cop!
|
35
|
+
rake (~> 10.0)
|
36
|
+
rspec (~> 3.0)
|
37
|
+
|
38
|
+
BUNDLED WITH
|
39
|
+
1.14.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 tackeyy
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# MetatagCop
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/metatag_cop`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'metatag_cop'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install metatag_cop
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/metatag_cop. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "metatag_cop"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/metatag_cop
ADDED
data/bin/setup
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetatagCop
|
4
|
+
module Builders
|
5
|
+
#
|
6
|
+
class Csv
|
7
|
+
def self.build(file_path)
|
8
|
+
records = []
|
9
|
+
CSV.table(file_path).each do |row|
|
10
|
+
records.push MetatagCop::Models::Csv.new(
|
11
|
+
url: row[:url],
|
12
|
+
title: row[:title],
|
13
|
+
description: row[:description],
|
14
|
+
keywords: row[:keywords],
|
15
|
+
h1: row[:h1]
|
16
|
+
)
|
17
|
+
end
|
18
|
+
records
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetatagCop
|
4
|
+
module Cops
|
5
|
+
#
|
6
|
+
class Cop
|
7
|
+
attr_reader :records
|
8
|
+
|
9
|
+
def initialize(records)
|
10
|
+
@records = records
|
11
|
+
end
|
12
|
+
|
13
|
+
def run
|
14
|
+
error_msgs = []
|
15
|
+
records.each do |record|
|
16
|
+
error_msg = []
|
17
|
+
parser = MetatagCop::Parser.new(record.url)
|
18
|
+
error_msg.push error_msg(:title, record.title, parser.title) unless parser.title == record.title
|
19
|
+
error_msg.push error_msg(:description, record.description, parser.description) unless parser.description == record.description
|
20
|
+
error_msg.push error_msg(:keywords, record.keywords, parser.keywords) unless parser.keywords == record.keywords
|
21
|
+
error_msg.push error_msg(:h1, record.h1, parser.h1) unless parser.h1 == record.h1
|
22
|
+
error_msg.unshift "url: #{record.url}" unless error_msg.empty?
|
23
|
+
error_msgs.push error_msg unless error_msg.empty?
|
24
|
+
end
|
25
|
+
error_msgs
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
def error_msg(tag, expected, actual)
|
31
|
+
"[#{tag}] expected: #{expected}, actual: #{actual}"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'csv'
|
4
|
+
require 'nokogiri'
|
5
|
+
|
6
|
+
require_relative 'parser'
|
7
|
+
require_relative 'cops/cop'
|
8
|
+
require_relative 'models/csv'
|
9
|
+
require_relative 'builders/csv'
|
10
|
+
|
11
|
+
module MetatagCop
|
12
|
+
#
|
13
|
+
class Handler
|
14
|
+
def self.execute
|
15
|
+
file_path = ARGV[0]
|
16
|
+
|
17
|
+
return print 'Require file path as a first argument.' if file_path.nil?
|
18
|
+
|
19
|
+
records = MetatagCop::Builders::Csv.build(file_path)
|
20
|
+
MetatagCop::Cops::Cop.new(records).run
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
if __FILE__ == $0
|
26
|
+
MetatagCop::Handler.execute
|
27
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module MetatagCop
|
4
|
+
module Models
|
5
|
+
#
|
6
|
+
class Csv
|
7
|
+
attr_reader :url, :title, :description, :keywords, :h1
|
8
|
+
|
9
|
+
def initialize(url: nil, title: nil,
|
10
|
+
description: nil, keywords: nil, h1: nil)
|
11
|
+
@url = url
|
12
|
+
@title = title
|
13
|
+
@description = description
|
14
|
+
@keywords = keywords
|
15
|
+
@h1 = h1
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'open-uri'
|
4
|
+
require 'nokogiri'
|
5
|
+
require 'pry-byebug'
|
6
|
+
|
7
|
+
module MetatagCop
|
8
|
+
#
|
9
|
+
class Parser
|
10
|
+
attr_accessor :document
|
11
|
+
|
12
|
+
def initialize(url)
|
13
|
+
@document = parse(url)
|
14
|
+
end
|
15
|
+
|
16
|
+
def title
|
17
|
+
document.css('head title').inner_text
|
18
|
+
end
|
19
|
+
|
20
|
+
def description
|
21
|
+
document.at('meta[name=description]')['content']
|
22
|
+
end
|
23
|
+
|
24
|
+
def keywords
|
25
|
+
document.at('meta[name=keywords]')['content']
|
26
|
+
end
|
27
|
+
|
28
|
+
def h1
|
29
|
+
h1 = document.at('h1')
|
30
|
+
return h1['content'] unless h1['content'].nil?
|
31
|
+
|
32
|
+
# it regards alt as h1 content if h1 content is blank.
|
33
|
+
a = find_tag_by(h1, 'a')
|
34
|
+
img = find_tag_by(a, 'img')
|
35
|
+
img.attributes['alt'].value
|
36
|
+
end
|
37
|
+
|
38
|
+
private
|
39
|
+
|
40
|
+
def find_tag_by(parent, tag)
|
41
|
+
parent.children.find { |child| child.name == tag }
|
42
|
+
end
|
43
|
+
|
44
|
+
def parse(url)
|
45
|
+
charset = nil
|
46
|
+
html = open(url) do |f|
|
47
|
+
charset = f.charset
|
48
|
+
f.read
|
49
|
+
end
|
50
|
+
Nokogiri::HTML.parse(html, nil, charset)
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/lib/metatag_cop.rb
ADDED
data/metatag_cop.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
require 'metatag_cop/version'
|
6
|
+
|
7
|
+
Gem::Specification.new do |spec|
|
8
|
+
spec.name = 'metatag_cop'
|
9
|
+
spec.version = MetatagCop::VERSION
|
10
|
+
spec.authors = ['tackeyy']
|
11
|
+
spec.email = ['mailto.takita.yusuke@gmail.com']
|
12
|
+
|
13
|
+
spec.summary = 'metatag_cop loads csv file and checks whether meta tags is set proper value.'
|
14
|
+
spec.description = 'metatag_cop loads csv file and checks whether meta tags is set proper value.'
|
15
|
+
spec.homepage = 'http://tackeyy.com/'
|
16
|
+
spec.license = 'MIT'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
19
|
+
f.match(%r{^(test|spec|features)/})
|
20
|
+
end
|
21
|
+
spec.bindir = 'bin'
|
22
|
+
spec.executables = ['metatag_cop']
|
23
|
+
spec.require_paths = ['lib']
|
24
|
+
|
25
|
+
spec.add_dependency 'nokogiri', '~> 1.7'
|
26
|
+
|
27
|
+
spec.add_development_dependency 'bundler', '~> 1.14'
|
28
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
29
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,124 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: metatag_cop
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- tackeyy
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: nokogiri
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.14'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.14'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '3.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
description: metatag_cop loads csv file and checks whether meta tags is set proper
|
70
|
+
value.
|
71
|
+
email:
|
72
|
+
- mailto.takita.yusuke@gmail.com
|
73
|
+
executables:
|
74
|
+
- metatag_cop
|
75
|
+
extensions: []
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- ".gitignore"
|
79
|
+
- ".rspec"
|
80
|
+
- ".rubocop.yml"
|
81
|
+
- ".ruby-version"
|
82
|
+
- ".travis.yml"
|
83
|
+
- CODE_OF_CONDUCT.md
|
84
|
+
- Gemfile
|
85
|
+
- Gemfile.lock
|
86
|
+
- LICENSE.txt
|
87
|
+
- README.md
|
88
|
+
- Rakefile
|
89
|
+
- bin/console
|
90
|
+
- bin/metatag_cop
|
91
|
+
- bin/setup
|
92
|
+
- lib/metatag_cop.rb
|
93
|
+
- lib/metatag_cop/builders/csv.rb
|
94
|
+
- lib/metatag_cop/cops/cop.rb
|
95
|
+
- lib/metatag_cop/handler.rb
|
96
|
+
- lib/metatag_cop/models/csv.rb
|
97
|
+
- lib/metatag_cop/parser.rb
|
98
|
+
- lib/metatag_cop/version.rb
|
99
|
+
- metatag_cop.gemspec
|
100
|
+
homepage: http://tackeyy.com/
|
101
|
+
licenses:
|
102
|
+
- MIT
|
103
|
+
metadata: {}
|
104
|
+
post_install_message:
|
105
|
+
rdoc_options: []
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '0'
|
113
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
requirements: []
|
119
|
+
rubyforge_project:
|
120
|
+
rubygems_version: 2.5.1
|
121
|
+
signing_key:
|
122
|
+
specification_version: 4
|
123
|
+
summary: metatag_cop loads csv file and checks whether meta tags is set proper value.
|
124
|
+
test_files: []
|