web-puc 0.4.2 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/web-puc.rb +11 -40
  3. metadata +3 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 340505a85ca7da37714a19c89ee124f58b48f7da8c5c1490cb729cf6d1b56160
4
- data.tar.gz: d7d7efa0a100905caf47476887be91184645e3e3c2f8f32c96f5887557ae9b76
3
+ metadata.gz: 1cf4dec93eaaca199a532e18f5af6ba2b1aac5d9818e58576646b5a8dec5ce91
4
+ data.tar.gz: eef7d51757f43f1914ab5c53b3fb2b8a7f74a5f3fadca68f04aa01633687db5d
5
5
  SHA512:
6
- metadata.gz: 318dd140ae45e73a5f5d73d4a75c79670779b0a2cec426be23c9b1f875f023b631668e294e1025ab9a8388b559f9fd4bb47fa3be862a9095086c455b959c2baa
7
- data.tar.gz: 33d9dae6e2ae85a954bb2b01dd403a6545ceb7e0a99a5f828f9bca8ccadc87538ff8b094a0c8c815319449a508ff356177a6a27fe724e4e5e872f8456f54a64a
6
+ metadata.gz: 7674e18b3e5e3b845902ce9133dd174d1aa67d048460787c93f6609e9371ab2da6663b1c19afd778f851d7df4d973dd642513d425e4a158ba6156a6879491b87
7
+ data.tar.gz: ccd7b67f24ea5bee6a8e094b848ca1047fdb88a9b8d85bff9f28b79b156ab04ebbc3a234e6921e94683e49b29f17f4121f553264030874d41ef5d946f5c0f0af
data/lib/web-puc.rb CHANGED
@@ -2,7 +2,6 @@
2
2
  require "ostruct"
3
3
  require "optparse"
4
4
  require "yaml"
5
- require "structured-acceptance-test"
6
5
  require "net/http"
7
6
  require 'shellwords'
8
7
  #require "gemrake"
@@ -19,7 +18,6 @@ class Optparse
19
18
  options.exclude = []
20
19
  options.libs = []
21
20
  options.clear = false
22
- options.stat = false
23
21
 
24
22
  opt_parser = OptionParser.new do |opts|
25
23
  opts.banner = 'Usage: web-puc [options] <files>'
@@ -32,10 +30,6 @@ class Optparse
32
30
  options.clear = true
33
31
  end
34
32
 
35
- opts.on('--stat', 'Output in STAT format') do
36
- options.stat = true
37
- end
38
-
39
33
  opts.on('-h', '--help', 'Show this message') do
40
34
  puts opts
41
35
  exit
@@ -45,12 +39,12 @@ class Optparse
45
39
  options.libs = list
46
40
  end
47
41
 
48
- # TODO:
49
- #opts.on_tail('-v', '--version', 'Show version') do
50
- # spec = Gem::Specification::load(File.expand_path('../web-puc.gemspec', __FILE__))
51
- # puts "web-puc #{spec.version}"
42
+ # TODO: make this work
43
+ #opts.on('-v', '--version', 'Show version') do
44
+ # puts Gem::Specification::load(File.expand_path('../web-puc.gemspec', __FILE__)).version
52
45
  # exit
53
46
  #end
47
+
54
48
  end
55
49
 
56
50
  opt_parser.parse!(args)
@@ -121,16 +115,11 @@ options.libs.each { |lib|
121
115
  }
122
116
  File.write(DATA_STORE_FILENAME, libs_cached.merge(libs_versions).to_yaml)
123
117
 
124
- process = StatModule::Process.new('WebPuc')
125
- # TODO: process.version = ...
126
- process.description = 'Validate your web project uses the latest CSS & JS includes.'
127
- process.maintainer = 'William Entriken'
128
- process.email = 'github.com@phor.net'
129
- process.website = 'https://github.com/fulldecent/web-puc'
130
- process.repeatability = 'Volatile'
131
- stat = StatModule::Stat.new(process)
118
+ puts "web-puc"
119
+ # Make this work:
120
+ # puts "web-puc #{Gem::Specification::load(File.expand_path('../web-puc.gemspec', __FILE__)).version}"
132
121
 
133
- stat.print_header if options.stat
122
+ return_status = 0
134
123
  files.each { |file|
135
124
  file = file.shellescape
136
125
  libs_versions.each { |lib, val|
@@ -141,29 +130,11 @@ files.each { |file|
141
130
  matches.each { |match|
142
131
  description = match[match.index(':') + 1, match.length]
143
132
  line = match[0, match.index(':')].to_i
144
- location = StatModule::Location.new(file)
145
- location.begin_line = line
146
- location.end_line = line
147
-
148
- finding = StatModule::Finding.new(true, description, 'Old version')
149
- finding.location = location
150
-
151
- stat.findings.push(finding)
152
-
153
- stat.print_finding if options.stat
133
+ puts "#{file}:#{line}:#{description}"
134
+ return_status = 1
154
135
  }
155
136
  }
156
137
  }
157
138
  }
158
139
 
159
- if options.stat
160
- stat.print_footer
161
- else
162
- if stat.findings.length > 0
163
- stat.findings.each { |finding|
164
- puts finding.print true
165
- }
166
- abort stat.summary_print true
167
- end
168
- puts stat.summary_print true
169
- end
140
+ exit return_status
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web-puc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Entriken
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-28 00:00:00.000000000 Z
11
+ date: 2023-01-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
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.7
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.7
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: http
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -80,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
80
66
  - !ruby/object:Gem::Version
81
67
  version: '0'
82
68
  requirements: []
83
- rubygems_version: 3.3.11
69
+ rubygems_version: 3.3.7
84
70
  signing_key:
85
71
  specification_version: 4
86
72
  summary: Web Package Update Checker