web-puc 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/web-puc +2 -0
- data/lib/package-spiders/bootstrap-maxcdn.sh +29 -0
- data/lib/package-spiders/fontawesome-maxcdn.sh +29 -0
- data/lib/packages/bootstrap.bad +94 -0
- data/lib/packages/bootstrap.good +1 -0
- data/lib/packages/font-awesome.bad +61 -0
- data/lib/packages/font-awesome.good +1 -0
- data/lib/version.rb +3 -0
- data/lib/web-puc.rb +114 -0
- metadata +95 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 808f8614c71bdb979fe9b5355d569cac3abc17bb
|
4
|
+
data.tar.gz: 9b291b3790aa85c249449a1d8981c5fb781db1f4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6950ba87ebb8e444469c7e4d9dbe202d4a6f96c5d584b0d2c96fbb11e5abbac37e8ee3c6230171626afaeaea7533b37588106b1027e9d64d1d814351ee9fbd98
|
7
|
+
data.tar.gz: bc2e07eee174a2aafa164977be69688634ef1821826ca4aab7ed3a38b5dcfe41fa6d87062ef1a9d969e80d3d8e4b63a35db983db6ed1988cf33911d9f034815f
|
data/bin/web-puc
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
echo "Creating package files for bootstrap"
|
4
|
+
|
5
|
+
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
6
|
+
BASEDIR="$(dirname "$BASEDIR")"
|
7
|
+
GOODFILE=$BASEDIR/packages/bootstrap.good
|
8
|
+
BADFILE=$BASEDIR/packages/bootstrap.bad
|
9
|
+
|
10
|
+
# Clone or pull
|
11
|
+
[ ! -d "$BASEDIR/package-spiders/maxcdn-bootstrap/.git" ] &&
|
12
|
+
git clone https://github.com/MaxCDN/bootstrap-cdn.git "$BASEDIR/package-spiders/maxcdn-bootstrap" ||
|
13
|
+
cd "$BASEDIR/package-spiders/maxcdn-bootstrap/" && git pull
|
14
|
+
|
15
|
+
cd "$BASEDIR/package-spiders/maxcdn-bootstrap/public/twitter-bootstrap/"
|
16
|
+
for VER in $(ls); do
|
17
|
+
[ -L $VER ] && continue
|
18
|
+
[ -f $VER ] && continue
|
19
|
+
if [ "$(readlink latest)" = "$VER" ]
|
20
|
+
then
|
21
|
+
echo '//netdna.bootstrapcdn.com/bootstrap/'$VER'/css/bootstrap.min.css' > $GOODFILE
|
22
|
+
else
|
23
|
+
echo '//netdna.bootstrapcdn.com/bootstrap/'$VER'/css/bootstrap.min.css' >> $BADFILE
|
24
|
+
echo "Bootstrap v$VER (http://getbootstrap.com)" >> $BADFILE
|
25
|
+
fi
|
26
|
+
echo '//netdna.bootstrapcdn.com/bootstrap/'$VER'/css/bootstrap.css' >> $BADFILE
|
27
|
+
done
|
28
|
+
|
29
|
+
sort -u -o $BADFILE $BADFILE
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
echo "Creating package files for font-awesome"
|
4
|
+
|
5
|
+
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
6
|
+
BASEDIR="$(dirname "$BASEDIR")"
|
7
|
+
GOODFILE=$BASEDIR/packages/font-awesome.good
|
8
|
+
BADFILE=$BASEDIR/packages/font-awesome.bad
|
9
|
+
|
10
|
+
# Clone or pull
|
11
|
+
[ ! -d "$BASEDIR/package-spiders/maxcdn-bootstrap/.git" ] &&
|
12
|
+
git clone https://github.com/MaxCDN/bootstrap-cdn.git "$BASEDIR/package-spiders/maxcdn-bootstrap" ||
|
13
|
+
cd "$BASEDIR/package-spiders/maxcdn-bootstrap/" && git pull
|
14
|
+
|
15
|
+
cd "$BASEDIR/package-spiders/maxcdn-bootstrap/public/font-awesome/"
|
16
|
+
for VER in $(ls); do
|
17
|
+
[ -L $VER ] && continue
|
18
|
+
[ -f $VER ] && continue
|
19
|
+
if [ "$(readlink latest)" = "$VER/" ]
|
20
|
+
then
|
21
|
+
echo '//netdna.bootstrapcdn.com/font-awesome/'$VER'/css/font-awesome.min.css' > $GOODFILE
|
22
|
+
else
|
23
|
+
echo '//netdna.bootstrapcdn.com/font-awesome/'$VER'/css/font-awesome.min.css' >> $BADFILE
|
24
|
+
echo "Font Awesome $VER by @davegandy" >> $BADFILE
|
25
|
+
fi
|
26
|
+
echo '//netdna.bootstrapcdn.com/font-awesome/'$VER'/css/font-awesome.css' >> $BADFILE
|
27
|
+
done
|
28
|
+
|
29
|
+
sort -u -o $BADFILE $BADFILE
|
@@ -0,0 +1,94 @@
|
|
1
|
+
Bootstrap v2.0.4 (http://getbootstrap.com)
|
2
|
+
Bootstrap v2.1.0 (http://getbootstrap.com)
|
3
|
+
Bootstrap v2.1.1 (http://getbootstrap.com)
|
4
|
+
Bootstrap v2.2.0 (http://getbootstrap.com)
|
5
|
+
Bootstrap v2.2.1 (http://getbootstrap.com)
|
6
|
+
Bootstrap v2.2.2 (http://getbootstrap.com)
|
7
|
+
Bootstrap v2.3.0 (http://getbootstrap.com)
|
8
|
+
Bootstrap v2.3.1 (http://getbootstrap.com)
|
9
|
+
Bootstrap v2.3.2 (http://getbootstrap.com)
|
10
|
+
Bootstrap v3.0.0 (http://getbootstrap.com)
|
11
|
+
Bootstrap v3.0.0-rc1 (http://getbootstrap.com)
|
12
|
+
Bootstrap v3.0.0-rc2 (http://getbootstrap.com)
|
13
|
+
Bootstrap v3.0.0-wip (http://getbootstrap.com)
|
14
|
+
Bootstrap v3.0.1 (http://getbootstrap.com)
|
15
|
+
Bootstrap v3.0.2 (http://getbootstrap.com)
|
16
|
+
Bootstrap v3.0.3 (http://getbootstrap.com)
|
17
|
+
Bootstrap v3.1.0 (http://getbootstrap.com)
|
18
|
+
Bootstrap v3.1.1 (http://getbootstrap.com)
|
19
|
+
Bootstrap v3.2.0 (http://getbootstrap.com)
|
20
|
+
Bootstrap v3.3.0 (http://getbootstrap.com)
|
21
|
+
Bootstrap v3.3.1 (http://getbootstrap.com)
|
22
|
+
Bootstrap v3.3.2 (http://getbootstrap.com)
|
23
|
+
Bootstrap v3.3.4 (http://getbootstrap.com)
|
24
|
+
Bootstrap v3.3.5 (http://getbootstrap.com)
|
25
|
+
Bootstrap v3.3.6 (http://getbootstrap.com)
|
26
|
+
Bootstrap v4.0.0-alpha.2 (http://getbootstrap.com)
|
27
|
+
Bootstrap v4.0.0-alpha.3 (http://getbootstrap.com)
|
28
|
+
Bootstrap v4.0.0-alpha.4 (http://getbootstrap.com)
|
29
|
+
Bootstrap v4.0.0-alpha.5 (http://getbootstrap.com)
|
30
|
+
Bootstrap v4.0.0-alpha.6 (http://getbootstrap.com)
|
31
|
+
Bootstrap v4.0.0-alpha (http://getbootstrap.com)
|
32
|
+
//netdna.bootstrapcdn.com/bootstrap/2.0.4/css/bootstrap.css
|
33
|
+
//netdna.bootstrapcdn.com/bootstrap/2.0.4/css/bootstrap.min.css
|
34
|
+
//netdna.bootstrapcdn.com/bootstrap/2.1.0/css/bootstrap.css
|
35
|
+
//netdna.bootstrapcdn.com/bootstrap/2.1.0/css/bootstrap.min.css
|
36
|
+
//netdna.bootstrapcdn.com/bootstrap/2.1.1/css/bootstrap.css
|
37
|
+
//netdna.bootstrapcdn.com/bootstrap/2.1.1/css/bootstrap.min.css
|
38
|
+
//netdna.bootstrapcdn.com/bootstrap/2.2.0/css/bootstrap.css
|
39
|
+
//netdna.bootstrapcdn.com/bootstrap/2.2.0/css/bootstrap.min.css
|
40
|
+
//netdna.bootstrapcdn.com/bootstrap/2.2.1/css/bootstrap.css
|
41
|
+
//netdna.bootstrapcdn.com/bootstrap/2.2.1/css/bootstrap.min.css
|
42
|
+
//netdna.bootstrapcdn.com/bootstrap/2.2.2/css/bootstrap.css
|
43
|
+
//netdna.bootstrapcdn.com/bootstrap/2.2.2/css/bootstrap.min.css
|
44
|
+
//netdna.bootstrapcdn.com/bootstrap/2.3.0/css/bootstrap.css
|
45
|
+
//netdna.bootstrapcdn.com/bootstrap/2.3.0/css/bootstrap.min.css
|
46
|
+
//netdna.bootstrapcdn.com/bootstrap/2.3.1/css/bootstrap.css
|
47
|
+
//netdna.bootstrapcdn.com/bootstrap/2.3.1/css/bootstrap.min.css
|
48
|
+
//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.css
|
49
|
+
//netdna.bootstrapcdn.com/bootstrap/2.3.2/css/bootstrap.min.css
|
50
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.css
|
51
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css
|
52
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.css
|
53
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc1/css/bootstrap.min.css
|
54
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc2/css/bootstrap.css
|
55
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0-rc2/css/bootstrap.min.css
|
56
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.css
|
57
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.0-wip/css/bootstrap.min.css
|
58
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.css
|
59
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css
|
60
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.css
|
61
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css
|
62
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.css
|
63
|
+
//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css
|
64
|
+
//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.css
|
65
|
+
//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css
|
66
|
+
//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.css
|
67
|
+
//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css
|
68
|
+
//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.css
|
69
|
+
//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css
|
70
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.css
|
71
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css
|
72
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.css
|
73
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css
|
74
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.css
|
75
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css
|
76
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.css
|
77
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css
|
78
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css
|
79
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css
|
80
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css
|
81
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css
|
82
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css
|
83
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.css
|
84
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.2/css/bootstrap.min.css
|
85
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.css
|
86
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.3/css/bootstrap.min.css
|
87
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.css
|
88
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css
|
89
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.css
|
90
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css
|
91
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.css
|
92
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css
|
93
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.css
|
94
|
+
//netdna.bootstrapcdn.com/bootstrap/4.0.0-alpha/css/bootstrap.min.css
|
@@ -0,0 +1 @@
|
|
1
|
+
//netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css
|
@@ -0,0 +1,61 @@
|
|
1
|
+
Font Awesome 2.0 by @davegandy
|
2
|
+
Font Awesome 3.0.2 by @davegandy
|
3
|
+
Font Awesome 3.0 by @davegandy
|
4
|
+
Font Awesome 3.1.0 by @davegandy
|
5
|
+
Font Awesome 3.1.1 by @davegandy
|
6
|
+
Font Awesome 3.2.0 by @davegandy
|
7
|
+
Font Awesome 3.2.1 by @davegandy
|
8
|
+
Font Awesome 4.0.0 by @davegandy
|
9
|
+
Font Awesome 4.0.1 by @davegandy
|
10
|
+
Font Awesome 4.0.2 by @davegandy
|
11
|
+
Font Awesome 4.0.3 by @davegandy
|
12
|
+
Font Awesome 4.1.0 by @davegandy
|
13
|
+
Font Awesome 4.2.0 by @davegandy
|
14
|
+
Font Awesome 4.3.0 by @davegandy
|
15
|
+
Font Awesome 4.4.0 by @davegandy
|
16
|
+
Font Awesome 4.5.0 by @davegandy
|
17
|
+
Font Awesome 4.6.0 by @davegandy
|
18
|
+
Font Awesome 4.6.1 by @davegandy
|
19
|
+
Font Awesome 4.6.2 by @davegandy
|
20
|
+
Font Awesome 4.6.3 by @davegandy
|
21
|
+
//netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.css
|
22
|
+
//netdna.bootstrapcdn.com/font-awesome/2.0/css/font-awesome.min.css
|
23
|
+
//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css
|
24
|
+
//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.min.css
|
25
|
+
//netdna.bootstrapcdn.com/font-awesome/3.0/css/font-awesome.css
|
26
|
+
//netdna.bootstrapcdn.com/font-awesome/3.0/css/font-awesome.min.css
|
27
|
+
//netdna.bootstrapcdn.com/font-awesome/3.1.0/css/font-awesome.css
|
28
|
+
//netdna.bootstrapcdn.com/font-awesome/3.1.0/css/font-awesome.min.css
|
29
|
+
//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.css
|
30
|
+
//netdna.bootstrapcdn.com/font-awesome/3.1.1/css/font-awesome.min.css
|
31
|
+
//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.css
|
32
|
+
//netdna.bootstrapcdn.com/font-awesome/3.2.0/css/font-awesome.min.css
|
33
|
+
//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css
|
34
|
+
//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css
|
35
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.css
|
36
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.0/css/font-awesome.min.css
|
37
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.css
|
38
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.min.css
|
39
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.2/css/font-awesome.css
|
40
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.2/css/font-awesome.min.css
|
41
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css
|
42
|
+
//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css
|
43
|
+
//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.css
|
44
|
+
//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css
|
45
|
+
//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css
|
46
|
+
//netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css
|
47
|
+
//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.css
|
48
|
+
//netdna.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css
|
49
|
+
//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.css
|
50
|
+
//netdna.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css
|
51
|
+
//netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.css
|
52
|
+
//netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css
|
53
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.css
|
54
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css
|
55
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.css
|
56
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css
|
57
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.css
|
58
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.2/css/font-awesome.min.css
|
59
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.css
|
60
|
+
//netdna.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css
|
61
|
+
//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.css
|
@@ -0,0 +1 @@
|
|
1
|
+
//netdna.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css
|
data/lib/version.rb
ADDED
data/lib/web-puc.rb
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'rake'
|
3
|
+
require 'stat'
|
4
|
+
require_relative 'version'
|
5
|
+
|
6
|
+
class Optparse
|
7
|
+
|
8
|
+
def self.parse(args)
|
9
|
+
options = OpenStruct.new
|
10
|
+
options.exclude = []
|
11
|
+
options.update = false
|
12
|
+
options.stat = false
|
13
|
+
|
14
|
+
opt_parser = OptionParser.new do |opts|
|
15
|
+
opts.banner = 'Usage: web-puc [options] <files>'
|
16
|
+
|
17
|
+
opts.on('-e', '--exclude GLOB', Array, 'Exclude from consideration all files matching GLOB') do |list|
|
18
|
+
options.exclude = list
|
19
|
+
end
|
20
|
+
|
21
|
+
opts.on('-s', '--allow-supported', 'Allow supported versions even if not latest') do
|
22
|
+
end
|
23
|
+
|
24
|
+
opts.on('-u', '--update', 'Update web package database') do
|
25
|
+
options.update = true
|
26
|
+
end
|
27
|
+
|
28
|
+
opts.on('--stat', 'Output in STAT format') do
|
29
|
+
options.stat = true
|
30
|
+
end
|
31
|
+
|
32
|
+
opts.on('-h', '--help', 'Show this message') do
|
33
|
+
puts opts
|
34
|
+
exit
|
35
|
+
end
|
36
|
+
|
37
|
+
opts.on_tail('-v', '--version', 'Show version') do
|
38
|
+
puts "web-puc #{WebPuc::VERSION}"
|
39
|
+
exit
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
opt_parser.parse!(args)
|
44
|
+
options
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
|
49
|
+
ARGV << '-h' if ARGV.empty?
|
50
|
+
|
51
|
+
options = Optparse.parse(ARGV)
|
52
|
+
|
53
|
+
if options.update
|
54
|
+
FileUtils.rm_r Dir[File.expand_path File.dirname(__FILE__) + '/packages/*']
|
55
|
+
|
56
|
+
Dir[File.expand_path File.dirname(__FILE__) + '/package-spiders/*.sh'].each { |file|
|
57
|
+
puts "UPDATING #{file}"
|
58
|
+
puts %x[ bash #{file} ]
|
59
|
+
$stdout.flush
|
60
|
+
}
|
61
|
+
exit
|
62
|
+
end
|
63
|
+
|
64
|
+
files = ARGV
|
65
|
+
|
66
|
+
if options.exclude.length > 0
|
67
|
+
exclude_files = `find #{options.exclude.join(' ')} -type f`.split
|
68
|
+
exclude_block = "-and ! \\( -path #{exclude_files.join(' -or -path ')} -or -false \\)"
|
69
|
+
else
|
70
|
+
exclude_block = ''
|
71
|
+
end
|
72
|
+
|
73
|
+
cmd = "find #{files.join(' ')} -type f #{exclude_block}"
|
74
|
+
files = %x[ #{cmd}].split
|
75
|
+
good_files = Dir[File.expand_path File.dirname(__FILE__) + '/packages/*.good']
|
76
|
+
bad_files = good_files.map { |good_file| good_file[0, good_file.length - 'good'.length] + 'bad' }
|
77
|
+
|
78
|
+
process = StatModule::Process.new('WebPuc')
|
79
|
+
process.version = "#{WebPuc::VERSION}"
|
80
|
+
process.description = 'Validate your web project uses the latest CSS & JS includes.'
|
81
|
+
process.maintainer = 'William Entriken'
|
82
|
+
process.email = 'github.com@phor.net'
|
83
|
+
process.website = 'https://github.com/fulldecent/web-puc'
|
84
|
+
process.repeatability = 'Volatile'
|
85
|
+
stat = StatModule::Stat.new(process)
|
86
|
+
|
87
|
+
files.each { |file|
|
88
|
+
bad_files.each { |bad_file|
|
89
|
+
matches = %x[ grep -o -nh -F -f #{bad_file} #{file}].split
|
90
|
+
matches.each { |match|
|
91
|
+
description = match[match.index(':') + 1, match.length]
|
92
|
+
line = match[0, match.index(':')].to_i
|
93
|
+
location = StatModule::Location.new(file)
|
94
|
+
location.begin_line = line
|
95
|
+
location.end_line = line
|
96
|
+
|
97
|
+
finding = StatModule::Finding.new(true, description, 'Old version')
|
98
|
+
finding.location = location
|
99
|
+
|
100
|
+
stat.findings.push(finding)
|
101
|
+
}
|
102
|
+
}
|
103
|
+
}
|
104
|
+
|
105
|
+
if options.stat
|
106
|
+
puts stat.to_json
|
107
|
+
else
|
108
|
+
if stat.findings.length > 0
|
109
|
+
stat.findings.each { |finding|
|
110
|
+
puts finding.print true
|
111
|
+
}
|
112
|
+
end
|
113
|
+
puts stat.summary_print(true)
|
114
|
+
end
|
metadata
ADDED
@@ -0,0 +1,95 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: web-puc
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- William Entriken
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-05-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '12'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: structured-acceptance-test
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.0.6
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.0.6
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.5'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.5'
|
55
|
+
description: Validate your web project uses the latest CSS & JS includes
|
56
|
+
email: github.com@phor.net
|
57
|
+
executables:
|
58
|
+
- web-puc
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- bin/web-puc
|
63
|
+
- lib/package-spiders/bootstrap-maxcdn.sh
|
64
|
+
- lib/package-spiders/fontawesome-maxcdn.sh
|
65
|
+
- lib/packages/bootstrap.bad
|
66
|
+
- lib/packages/bootstrap.good
|
67
|
+
- lib/packages/font-awesome.bad
|
68
|
+
- lib/packages/font-awesome.good
|
69
|
+
- lib/version.rb
|
70
|
+
- lib/web-puc.rb
|
71
|
+
homepage: https://github.com/fulldecent/web-puc
|
72
|
+
licenses:
|
73
|
+
- MIT
|
74
|
+
metadata: {}
|
75
|
+
post_install_message:
|
76
|
+
rdoc_options: []
|
77
|
+
require_paths:
|
78
|
+
- lib
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
89
|
+
requirements: []
|
90
|
+
rubyforge_project:
|
91
|
+
rubygems_version: 2.6.11
|
92
|
+
signing_key:
|
93
|
+
specification_version: 4
|
94
|
+
summary: Web Package Update Checker
|
95
|
+
test_files: []
|