simplecov-tailwindcss 2.2.0 → 2.4.0

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.
@@ -3,7 +3,7 @@
3
3
  module SimpleCov
4
4
  module Formatter
5
5
  class TailwindFormatter
6
- VERSION = "2.2.0"
6
+ VERSION = "2.4.0"
7
7
  end
8
8
  end
9
9
  end
@@ -7,11 +7,13 @@ require "digest/sha1"
7
7
 
8
8
  # Ensure we are using a compatible version of SimpleCov
9
9
  major, minor, patch = SimpleCov::VERSION.scan(/\d+/).first(3).map(&:to_i)
10
- if major.negative? || minor < 9 || patch.negative?
10
+ if major.negative? || (major.zero? && minor < 9) || patch.negative?
11
11
  raise "The version of SimpleCov you are using is too old. " \
12
12
  "Please update with `gem install simplecov` or `bundle update simplecov`"
13
13
  end
14
14
 
15
+ SIMPLECOV_MODERN_API = major >= 1
16
+
15
17
  module SimpleCov
16
18
  module Formatter
17
19
  class TailwindFormatter # rubocop:disable Metrics/ClassLength
@@ -100,6 +102,10 @@ module SimpleCov
100
102
  template("file_detail").result(binding)
101
103
  end
102
104
 
105
+ def branch_covered_percent(file)
106
+ SIMPLECOV_MODERN_API ? file.covered_percent(:branch) : file.branches_coverage_percent
107
+ end
108
+
103
109
  # rubocop:disable Lint/SelfAssignment
104
110
  def generate_group_page(title, files, created_date)
105
111
  title_id = title.gsub(/^[^a-zA-Z]+/, "").gsub(/[^a-zA-Z0-9\-_]/, "")
data/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "simplecov-tailwind",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "HTML tailwind Design View for Simplecov formatter",
5
5
  "scripts": {
6
6
  "build": "npm-run-all build:*",
7
- "build:css": "npx tailwindcss -i dist/app.css -o public/application.css --minify",
7
+ "build:css": "npx @tailwindcss/cli -i dist/app.css -o public/application.css --minify",
8
8
  "build:js": "esbuild --bundle dist/app.js --outfile=public/application.js --minify",
9
9
  "test:start": "bundle exec rake test",
10
10
  "test:open": "open coverage/index.html",
11
11
  "test": "npm-run-all test:*",
12
12
  "lint": "./bin/lint",
13
- "lint:markdown": "markdownlint CHANGELOG.md README.md .github/**/*.md -c .markdownlint.yml",
14
13
  "lint:ruby": "rubocop",
15
- "lint:erb": "bundle exec erblint --lint-all",
14
+ "lint:erb": "bundle exec erb_lint --lint-all",
16
15
  "lint:javascript": "eslint dist",
17
16
  "gem:build": "gem build simplecov-tailwindcss.gemspec",
18
17
  "format": "prettier './**/*.{css,js,json,yml,md,erb}' -l",
@@ -47,21 +46,21 @@
47
46
  "homepage": "https://simplecov-tailwind.chiefpansancolt.dev/",
48
47
  "babel": {},
49
48
  "devDependencies": {
50
- "@babel/core": "^7.23.3",
51
- "@babel/eslint-parser": "^7.23.3",
49
+ "@babel/core": "^8.0.6",
50
+ "@babel/eslint-parser": "^8.0.6",
52
51
  "@hotwired/stimulus": "^3.2.2",
53
- "@prettier/plugin-ruby": "^4.0.2",
54
- "@tailwindcss/forms": "^0.5.7",
55
- "@tailwindcss/typography": "^0.5.10",
56
- "@trivago/prettier-plugin-sort-imports": "^4.3.0",
57
- "esbuild": "^0.19.7",
58
- "eslint": "^8.54.0",
59
- "markdownlint": "^0.32.1",
52
+ "@prettier/plugin-ruby": "^4.0.4",
53
+ "@tailwindcss/forms": "^0.5.11",
54
+ "@tailwindcss/typography": "^0.5.20",
55
+ "@trivago/prettier-plugin-sort-imports": "^6.0.2",
56
+ "esbuild": "^0.28.2",
57
+ "eslint": "^10.11.0",
58
+ "markdownlint": "^0.40.0",
60
59
  "npm-run-all": "^4.1.5",
61
- "prettier": "^3.1.0",
60
+ "prettier": "^3.9.8",
62
61
  "prettier-plugin-erb": "^0.4.0",
63
- "prettier-plugin-tailwindcss": "^0.5.7",
64
- "tailwindcss": "^3.3.5",
62
+ "prettier-plugin-tailwindcss": "^0.8.1",
63
+ "tailwindcss": "^4.3.3",
65
64
  "timeago.js": "^4.0.2"
66
65
  }
67
66
  }