web47core 3.2.66 → 3.2.67
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.
- checksums.yaml +4 -4
- data/bin/coverage +19 -0
- data/lib/web47core/version.rb +1 -1
- data/scripts/coverage_merge.rb +28 -0
- data/scripts/update_icons.rb +48 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83e1af51b16b659494f27fd422ae9f4874e8b5fc2cf72b6f3d0e3ed4c811d423
|
4
|
+
data.tar.gz: 3e5dc4262dcb66f78b39d1541c7fdf45201a5354a89a614b016bbecb01af9ea6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4107df076bbc2cecb87487e4c947055ab3535fa77a441799bf569c283d79211dc6b8b48f007f13d1b1fae8afed45fda3efd394934ef79f3ef6a9fbef0dbaff9
|
7
|
+
data.tar.gz: 33af2191b465658b708233c395dcb8a3b1a7782c74c4db3c590ca80f4a322416daafdca67b574b927385487b142a5e716ef33238629288f1fc1afa7bedf091b4
|
data/bin/coverage
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
script = File.expand_path('../scripts/coverage.rb', __dir__)
|
5
|
+
|
6
|
+
unless File.exist?(script)
|
7
|
+
warn "Cannot find script: #{script}"
|
8
|
+
exit 1
|
9
|
+
end
|
10
|
+
|
11
|
+
# Optionally set up Bundler if available (safe no-op if not)
|
12
|
+
begin
|
13
|
+
require 'bundler/setup'
|
14
|
+
rescue LoadError
|
15
|
+
puts 'Unable to load Bundler'
|
16
|
+
end
|
17
|
+
|
18
|
+
# Execute the script in the current process so ARGV is preserved
|
19
|
+
load script
|
data/lib/web47core/version.rb
CHANGED
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'simplecov'
|
4
|
+
require 'simplecov_lcov_formatter'
|
5
|
+
|
6
|
+
# Load up the files in the workspace and merge or collate them together.
|
7
|
+
# This should kick out a single coverage file out
|
8
|
+
SimpleCov::Formatter::LcovFormatter.config do |c|
|
9
|
+
c.single_report_path = 'coverage/final.lcov'
|
10
|
+
c.report_with_single_file = true
|
11
|
+
end
|
12
|
+
SimpleCov.collate Dir['/tmp/workspace/lcov/*.json'], 'rails' do
|
13
|
+
add_filter '/spec/'
|
14
|
+
add_filter '/config/'
|
15
|
+
add_filter '/lib/'
|
16
|
+
add_filter '/test/'
|
17
|
+
add_filter '/vendor/'
|
18
|
+
add_filter '/config/'
|
19
|
+
add_filter '/db/'
|
20
|
+
add_filter '/public/'
|
21
|
+
add_filter '/coverage_merge.rb'
|
22
|
+
add_filter '/Gemfile'
|
23
|
+
add_filter '/Rakefile'
|
24
|
+
add_filter '/Gemfile.lock'
|
25
|
+
add_filter '/rubocop.yml'
|
26
|
+
enable_coverage :branch
|
27
|
+
formatter SimpleCov::Formatter::LcovFormatter
|
28
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# save as script/extract_svg_paths.rb and run: ruby script/extract_svg_paths.rb
|
2
|
+
# Optionally provide custom paths:
|
3
|
+
# ruby script/extract_svg_paths.rb tabler/icons app/views/icons
|
4
|
+
|
5
|
+
require 'fileutils'
|
6
|
+
|
7
|
+
SOURCE_DIR = (ARGV[0] || 'tabler/icons').to_s
|
8
|
+
DEST_ROOT = (ARGV[1] || 'app/views/icons').to_s
|
9
|
+
|
10
|
+
def extract_paths(svg_path)
|
11
|
+
xml = File.read(svg_path)
|
12
|
+
|
13
|
+
require 'nokogiri'
|
14
|
+
doc = Nokogiri::XML(xml) { |cfg| cfg.noblanks }
|
15
|
+
doc.remove_namespaces!
|
16
|
+
doc.xpath('//path').map(&:to_xml)
|
17
|
+
rescue LoadError => error
|
18
|
+
puts error.inspect
|
19
|
+
end
|
20
|
+
|
21
|
+
def process
|
22
|
+
unless Dir.exist?(SOURCE_DIR)
|
23
|
+
warn "Source directory not found: #{SOURCE_DIR}"
|
24
|
+
exit 1
|
25
|
+
end
|
26
|
+
|
27
|
+
FileUtils.mkdir_p(DEST_ROOT)
|
28
|
+
|
29
|
+
# Only iterate first-level subdirectories under SOURCE_DIR
|
30
|
+
Dir.children(SOURCE_DIR).each do |sub|
|
31
|
+
src_subdir = File.join(SOURCE_DIR, sub)
|
32
|
+
next unless File.directory?(src_subdir)
|
33
|
+
|
34
|
+
dest_subdir = File.join(DEST_ROOT, sub)
|
35
|
+
FileUtils.mkdir_p(dest_subdir)
|
36
|
+
|
37
|
+
Dir.glob(File.join(src_subdir, '*.svg')).each do |svg_file|
|
38
|
+
paths = extract_paths(svg_file)
|
39
|
+
basename = File.basename(svg_file, '.svg')
|
40
|
+
dest_file = File.join(dest_subdir, "_#{basename}.html.erb")
|
41
|
+
|
42
|
+
File.write(dest_file, paths.join("\n"))
|
43
|
+
puts "Wrote #{dest_file} (#{paths.size} path element#{paths.size == 1 ? '' : 's'})"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
process
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web47core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.67
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Schroeder
|
@@ -520,6 +520,7 @@ email:
|
|
520
520
|
executables:
|
521
521
|
- cron_server
|
522
522
|
- delayed_job
|
523
|
+
- coverage
|
523
524
|
extensions: []
|
524
525
|
extra_rdoc_files: []
|
525
526
|
files:
|
@@ -6514,6 +6515,7 @@ files:
|
|
6514
6515
|
- app/views/status/index.html.haml
|
6515
6516
|
- app/views/system_configurations/edit.html.haml
|
6516
6517
|
- app/views/system_configurations/show.html.haml
|
6518
|
+
- bin/coverage
|
6517
6519
|
- bin/cron_server
|
6518
6520
|
- bin/delayed_job
|
6519
6521
|
- bin/rails
|
@@ -6610,6 +6612,8 @@ files:
|
|
6610
6612
|
- lib/web47core/config.rb
|
6611
6613
|
- lib/web47core/engine.rb
|
6612
6614
|
- lib/web47core/version.rb
|
6615
|
+
- scripts/coverage_merge.rb
|
6616
|
+
- scripts/update_icons.rb
|
6613
6617
|
homepage: https://app47.com
|
6614
6618
|
licenses:
|
6615
6619
|
- MIT
|