redcarpet-form-extension 1.0.0 → 2.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc3a65c2dd392f454b4614c568eceed646a7f7a396ff0f896685775ea58613c4
4
- data.tar.gz: fc3f082662b41d85f843ac1ee204aeb5bb5c1af4bee760e84f3f130d4b5c7609
3
+ metadata.gz: fa6af9360550d02e92d521199c28855c43e3ba9bb10881b3466151f8bd6c9814
4
+ data.tar.gz: 85309724c2267a527bb6781100913e32f72f8b08068208052c0e9460917f8c13
5
5
  SHA512:
6
- metadata.gz: ffed0adb7e418fa9f330c5b63fe4fdac59150a65eb00476449000ff974332f91d40a008b15f2a5d5ebcd1bb7fdcc7224e5c6bbe8d20e44e0f7f1477a04e5cf73
7
- data.tar.gz: 29f0d3a7489faf3d1918deb3259a6faebb12679425b74190e5e9ca6678af4822c1a4ab7a27fb26ea646100e3653e26d3af162dc6229c8e6f21a6d2ac29341960
6
+ metadata.gz: 22b9f597070832253e276189d90b89a461b01d689f733232e71937e4b67d60ed5b70ac31c146f28a19db3fbdfeddc60368f9602d8376176d5b405d133e948c6d
7
+ data.tar.gz: 90790e3d273bd5ad215e7fcf37c30340591240c48efed844025352f6035d627383d96e9314e30fc4222648416c74d17b1d9724a075dc83cdaa8b1423ece0d5c5
@@ -0,0 +1,3 @@
1
+ # Make sure RUBY_VERSION matches the Ruby version in .ruby-version
2
+ ARG RUBY_VERSION=4.0.6
3
+ FROM ghcr.io/rails/devcontainer/images/ruby:${RUBY_VERSION}
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "redcarpet-form-extension",
3
+ "build": {
4
+ "dockerfile": "Dockerfile"
5
+ },
6
+
7
+ "runArgs": ["--name", "redcarpet-form-extension"],
8
+ "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
9
+ "postCreateCommand": "bash -lc 'bin/setup'",
10
+ "postStartCommand": "bash -lc 'ruby -v && bundle -v'",
11
+ "customizations": {
12
+ "vscode": {
13
+ "extensions": [
14
+ "Shopify.ruby-lsp",
15
+ "misogi.ruby-rubocop",
16
+ "GitHub.copilot",
17
+ "GitHub.copilot-chat"
18
+ ]
19
+ }
20
+ }
21
+ }
@@ -2,9 +2,9 @@ name: Ruby Gem
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ "master" ]
5
+ branches: [ "develop" ]
6
6
  pull_request:
7
- branches: [ "master" ]
7
+ branches: [ "develop" ]
8
8
 
9
9
  jobs:
10
10
  build:
@@ -19,7 +19,7 @@ jobs:
19
19
  - name: Set up Ruby
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
22
- # ruby-version: 3.1.x # Not needed with a .ruby-version file
22
+ # ruby-version: 4.0.x # Not needed with a .ruby-version file
23
23
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
24
24
 
25
25
  - name: Run lint
@@ -28,6 +28,9 @@ jobs:
28
28
  - name: Run tests
29
29
  run: bundle exec rspec
30
30
 
31
+ - name: Run bundle-audit
32
+ run: bundle exec bundle-audit check --update
33
+
31
34
  - name: Publish to GPR
32
35
  if: false # always skip job
33
36
  run: |
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
5
5
  AllCops:
6
6
  DisplayCopNames: true
7
- TargetRubyVersion: 3.1
7
+ TargetRubyVersion: 4.0
8
8
  NewCops: disable
9
9
  Exclude:
10
10
  - 'vendor/**/*'
@@ -13,7 +13,7 @@ AllCops:
13
13
  - '.git/**/*'
14
14
  - 'bin/*'
15
15
 
16
- Naming/PredicateName:
16
+ Naming/PredicatePrefix:
17
17
  # Method define macros for dynamically generated method.
18
18
  MethodDefinitionMacros:
19
19
  - define_method
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.4.2
1
+ 4.0.6
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in redcarpet-form-extension.gemspec
6
6
  gemspec
7
7
 
8
- gem 'rake', '~> 12.0'
8
+ gem 'rake', '~> 13.0'
9
9
 
10
10
  # Behaviour Driven Development for Ruby
11
11
  gem 'rspec'
@@ -27,3 +27,10 @@ gem 'simplecov', require: false, group: :test
27
27
 
28
28
  # A gem to bump versions of gems and chef-cookbooks.
29
29
  gem 'bump'
30
+
31
+ # Security scanners
32
+ gem 'bundler-audit', require: false
33
+
34
+ # stdlib gems no longer default in Ruby 3.4+
35
+ gem 'base64'
36
+ gem 'ostruct'
data/Gemfile.lock CHANGED
@@ -2,80 +2,102 @@ PATH
2
2
  remote: .
3
3
  specs:
4
4
  redcarpet-form-extension (1.0.0)
5
- loofah (~> 2.24.0)
5
+ loofah (~> 2.25.0)
6
6
  redcarpet (~> 3.6.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.2)
11
+ ast (2.4.3)
12
+ base64 (0.3.0)
12
13
  bump (0.10.0)
13
- byebug (11.1.3)
14
- crass (1.0.6)
15
- diff-lcs (1.5.0)
16
- docile (1.4.0)
17
- loofah (2.24.0)
14
+ bundler-audit (0.9.3)
15
+ bundler (>= 1.2.0)
16
+ thor (~> 1.0)
17
+ byebug (13.0.0)
18
+ reline (>= 0.6.0)
19
+ crass (1.0.7)
20
+ diff-lcs (1.6.2)
21
+ io-console (0.8.2)
22
+ json (2.21.2)
23
+ language_server-protocol (3.17.0.6)
24
+ lint_roller (1.1.0)
25
+ loofah (2.25.2)
18
26
  crass (~> 1.0.2)
19
27
  nokogiri (>= 1.12.0)
20
- nokogiri (1.18.7-x86_64-darwin)
28
+ nokogiri (1.19.4-aarch64-linux-gnu)
21
29
  racc (~> 1.4)
22
- nokogiri (1.18.7-x86_64-linux-gnu)
30
+ nokogiri (1.19.4-x86_64-darwin)
23
31
  racc (~> 1.4)
24
- parallel (1.22.1)
25
- parser (3.1.2.0)
32
+ nokogiri (1.19.4-x86_64-linux-gnu)
33
+ racc (~> 1.4)
34
+ ostruct (0.6.3)
35
+ parallel (2.1.0)
36
+ parser (3.3.12.0)
26
37
  ast (~> 2.4.1)
38
+ racc
39
+ prism (1.9.0)
27
40
  racc (1.8.1)
28
41
  rainbow (3.1.1)
29
- rake (12.3.3)
42
+ rake (13.4.2)
30
43
  redcarpet (3.6.1)
31
- regexp_parser (2.5.0)
32
- rexml (3.2.5)
33
- rspec (3.11.0)
34
- rspec-core (~> 3.11.0)
35
- rspec-expectations (~> 3.11.0)
36
- rspec-mocks (~> 3.11.0)
37
- rspec-core (3.11.0)
38
- rspec-support (~> 3.11.0)
39
- rspec-expectations (3.11.0)
44
+ regexp_parser (2.12.0)
45
+ reline (0.6.3)
46
+ io-console (~> 0.5)
47
+ rspec (3.13.2)
48
+ rspec-core (~> 3.13.0)
49
+ rspec-expectations (~> 3.13.0)
50
+ rspec-mocks (~> 3.13.0)
51
+ rspec-core (3.13.6)
52
+ rspec-support (~> 3.13.0)
53
+ rspec-expectations (3.13.5)
40
54
  diff-lcs (>= 1.2.0, < 2.0)
41
- rspec-support (~> 3.11.0)
42
- rspec-mocks (3.11.1)
55
+ rspec-support (~> 3.13.0)
56
+ rspec-mocks (3.13.8)
43
57
  diff-lcs (>= 1.2.0, < 2.0)
44
- rspec-support (~> 3.11.0)
45
- rspec-support (3.11.0)
46
- rubocop (1.30.1)
47
- parallel (~> 1.10)
48
- parser (>= 3.1.0.0)
58
+ rspec-support (~> 3.13.0)
59
+ rspec-support (3.13.7)
60
+ rubocop (1.89.0)
61
+ json (~> 2.3)
62
+ language_server-protocol (~> 3.17.0.2)
63
+ lint_roller (~> 1.1.0)
64
+ parallel (>= 1.10)
65
+ parser (>= 3.3.0.2)
49
66
  rainbow (>= 2.2.2, < 4.0)
50
- regexp_parser (>= 1.8, < 3.0)
51
- rexml (>= 3.2.5, < 4.0)
52
- rubocop-ast (>= 1.18.0, < 2.0)
67
+ regexp_parser (>= 2.9.3, < 3.0)
68
+ rubocop-ast (>= 1.49.0, < 2.0)
53
69
  ruby-progressbar (~> 1.7)
54
- unicode-display_width (>= 1.4.0, < 3.0)
55
- rubocop-ast (1.18.0)
56
- parser (>= 3.1.1.0)
57
- rubocop-rake (0.6.0)
58
- rubocop (~> 1.0)
59
- rubocop-rspec (2.11.1)
60
- rubocop (~> 1.19)
61
- ruby-progressbar (1.11.0)
62
- simplecov (0.21.2)
63
- docile (~> 1.1)
64
- simplecov-html (~> 0.11)
65
- simplecov_json_formatter (~> 0.1)
66
- simplecov-html (0.12.3)
67
- simplecov_json_formatter (0.1.4)
68
- unicode-display_width (2.1.0)
70
+ unicode-display_width (>= 2.4.0, < 4.0)
71
+ rubocop-ast (1.50.0)
72
+ parser (>= 3.3.7.2)
73
+ prism (~> 1.7)
74
+ rubocop-rake (0.7.1)
75
+ lint_roller (~> 1.1)
76
+ rubocop (>= 1.72.1)
77
+ rubocop-rspec (3.10.2)
78
+ lint_roller (~> 1.1)
79
+ regexp_parser (>= 2.0)
80
+ rubocop (~> 1.86, >= 1.86.2)
81
+ ruby-progressbar (1.13.0)
82
+ simplecov (1.0.3)
83
+ thor (1.5.0)
84
+ unicode-display_width (3.2.0)
85
+ unicode-emoji (~> 4.1)
86
+ unicode-emoji (4.2.0)
69
87
 
70
88
  PLATFORMS
89
+ aarch64-linux
71
90
  x86_64-darwin-20
72
91
  x86_64-darwin-22
73
92
  x86_64-linux
74
93
 
75
94
  DEPENDENCIES
95
+ base64
76
96
  bump
97
+ bundler-audit
77
98
  byebug
78
- rake (~> 12.0)
99
+ ostruct
100
+ rake (~> 13.0)
79
101
  redcarpet-form-extension!
80
102
  rspec
81
103
  rubocop
data/README.md CHANGED
@@ -104,13 +104,27 @@ The HTML result is:
104
104
 
105
105
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
106
106
 
107
- 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).
108
-
109
- bundle exec bump patch --tag
107
+ ### VS Code Dev Container
108
+
109
+ This repository includes a dev container configuration in `.devcontainer/` using Ruby 4.0.6.
110
+
111
+ 1. Open the project in VS Code.
112
+ 2. Run **Dev Containers: Reopen in Container** from the Command Palette.
113
+ 3. Wait for the container build to complete. The `postCreateCommand` runs `bin/setup` automatically.
114
+ 4. On container start, `postStartCommand` verifies the environment with `ruby -v && bundle -v`.
115
+ 5. Recommended extensions are installed for this workspace: `Shopify.ruby-lsp`, `misogi.ruby-rubocop`, `GitHub.copilot`, and `GitHub.copilot-chat`.
116
+ 6. Run tests and linting inside the container:
117
+
118
+ ```bash
119
+ bundle exec rspec
120
+ bundle exec rubocop
121
+ bundle exec bundle-audit check --update
122
+ bundle exec rake
123
+ ```
110
124
 
111
- gem build redcarpet-form-extension.gemspec
125
+ If you change `.devcontainer/devcontainer.json` or `.devcontainer/Dockerfile`, rebuild with **Dev Containers: Rebuild Container**.
112
126
 
113
- gem push redcarpet-form-extension-0.4.0.gem
127
+ 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).
114
128
 
115
129
  ## Contributing
116
130
 
@@ -3,7 +3,7 @@
3
3
  module Redcarpet
4
4
  module Form
5
5
  module Extension
6
- VERSION = '1.0.0'
6
+ VERSION = '2.0.0'
7
7
  end
8
8
  end
9
9
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = 'A Redcarpet extension with a custom HTML render to handle custom Markdown rules for tags like inputs and textareas'
13
13
  spec.homepage = 'https://github.com/SofiaSousa/redcarpet-form-extension'
14
14
  spec.license = 'MIT'
15
- spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
15
+ spec.required_ruby_version = Gem::Requirement.new('>= 4.0.0')
16
16
 
17
17
  # spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
18
18
 
@@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ['lib']
31
31
 
32
- spec.add_dependency 'loofah', '~> 2.24.0'
32
+ spec.add_dependency 'loofah', '~> 2.25.0'
33
33
  spec.add_dependency 'redcarpet', '~> 3.6.1'
34
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redcarpet-form-extension
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sofia Sousa
8
8
  bindir: exe
9
9
  cert_chain: []
10
- date: 2025-04-08 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: loofah
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.24.0
18
+ version: 2.25.0
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
- version: 2.24.0
25
+ version: 2.25.0
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: redcarpet
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -45,6 +45,8 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
+ - ".devcontainer/Dockerfile"
49
+ - ".devcontainer/devcontainer.json"
48
50
  - ".github/workflows/gem-push.yml"
49
51
  - ".gitignore"
50
52
  - ".rspec"
@@ -82,14 +84,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
84
  requirements:
83
85
  - - ">="
84
86
  - !ruby/object:Gem::Version
85
- version: 3.1.0
87
+ version: 4.0.0
86
88
  required_rubygems_version: !ruby/object:Gem::Requirement
87
89
  requirements:
88
90
  - - ">="
89
91
  - !ruby/object:Gem::Version
90
92
  version: '0'
91
93
  requirements: []
92
- rubygems_version: 3.6.2
94
+ rubygems_version: 4.0.16
93
95
  specification_version: 4
94
96
  summary: A Redcarpet extension with a custom HTML render to handle custom Markdown
95
97
  rules for tags like inputs and textareas