curly-templates 3.4.0 → 4.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: 9e5eb06d077da630f4906cd245364a5a41c4c15d832b33006ad5aa6c1306c20b
4
- data.tar.gz: c60710995405ccd191fb30e315c09d3e22b64ecb3ff73ee6793ef419770a10ff
3
+ metadata.gz: a3dbd9170c4968a2e5abb9164965b781e7e86a2b4ccf406f318d69f86dfe0302
4
+ data.tar.gz: e5e4642b9b88b89fb270d9733ac6e27ea097d301f1496391bac11ee3e5ade5fd
5
5
  SHA512:
6
- metadata.gz: '09959baad351b76a11fb036f51a512bf6bb300b85ba5ce1c104aaa1fcc07e73569fa7004f1fc257b1eaee08133dc8ca36a211e78122ceafafd842b69eade0fe7'
7
- data.tar.gz: 6d0ceb4389a05b517c3d935b0cfa4252f0fa843ebb9fbe5f8830f6a2d53cebb310867933ea9bba365c1c432b6243f96f36656f307f301abf6b911ba49f23ef42
6
+ metadata.gz: 4488fb907219b9cd2249863110067abc90ed6588f0165071d58c1a0f04bc494e9c1d94db5eb12f2c58743954efb872895eefb3622e89163e94bad2899efbbd10
7
+ data.tar.gz: 92361b3a5a2a3dfc718039c65acbb1ce52fddf36a44d6238a9f33c9650db6e84ce8dfc2c3673d171c7a74792b8504a49e4c584df0e4ca4250c8809758b877df0
@@ -0,0 +1,4 @@
1
+ # CODEOWNERS file
2
+ # This file defines who should review code changes in this repository.
3
+
4
+ * @zendesk/core-gem-owners
@@ -1,6 +1,10 @@
1
1
  name: CI
2
2
 
3
- on: push
3
+ on:
4
+ pull_request:
5
+ push:
6
+ branches:
7
+ - main
4
8
 
5
9
  jobs:
6
10
  specs:
@@ -12,16 +16,22 @@ jobs:
12
16
  fail-fast: false
13
17
  matrix:
14
18
  ruby:
15
- - '3.1'
16
19
  - '3.2'
17
20
  - '3.3'
21
+ - '3.4'
22
+ - '4.0'
18
23
  gemfile:
19
- - rails6.1
20
- - rails7.0
21
24
  - rails7.1
22
- - rails_main
25
+ - rails7.2
26
+ - rails8.0
27
+ - rails8.1
28
+ include:
29
+ - {ruby: '3.2', gemfile: rails6.1}
30
+ - {ruby: '3.2', gemfile: rails7.0}
31
+ - {ruby: '3.3', gemfile: rails6.1}
32
+ - {ruby: '3.3', gemfile: rails7.0}
23
33
  steps:
24
- - uses: actions/checkout@v4
34
+ - uses: actions/checkout@v6
25
35
  - uses: ruby/setup-ruby@v1
26
36
  with:
27
37
  ruby-version: ${{ matrix.ruby }}
@@ -1,12 +1,26 @@
1
- name: Publish Gem
1
+ name: Publish to RubyGems.org
2
2
 
3
3
  on:
4
4
  push:
5
- tags: v*
5
+ branches: main
6
+ paths: lib/curly/version.rb
7
+ workflow_dispatch:
6
8
 
7
9
  jobs:
8
- call-workflow:
9
- uses: zendesk/gw/.github/workflows/ruby-gem-publication.yml@main
10
- secrets:
11
- RUBY_GEMS_API_KEY: ${{ secrets.RUBY_GEMS_API_KEY }}
12
- RUBY_GEMS_TOTP_DEVICE: ${{ secrets.RUBY_GEMS_TOTP_DEVICE }}
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+ environment: rubygems-publish
13
+ if: github.repository_owner == 'zendesk'
14
+ permissions:
15
+ id-token: write
16
+ contents: write
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ bundler-cache: false
23
+ ruby-version: "3.4"
24
+ - name: Install dependencies
25
+ run: bundle install
26
+ - uses: rubygems/release-gem@v1
@@ -0,0 +1,21 @@
1
+ name: Test against Rails main
2
+
3
+ on:
4
+ pull_request:
5
+ schedule:
6
+ - cron: "0 0 * * *" # Run every day at 00:00 UTC
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ specs:
11
+ name: Test with Rails main
12
+ runs-on: ubuntu-latest
13
+ env:
14
+ BUNDLE_GEMFILE: gemfiles/rails_main.gemfile
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.4'
20
+ bundler-cache: true
21
+ - run: bundle exec rspec
data/.rspec CHANGED
@@ -1 +1,2 @@
1
1
  -r spec_helper
2
+ --order random
data/CHANGELOG.md CHANGED
@@ -1,4 +1,10 @@
1
- ### Unreleased
1
+ ### 4.0.0
2
+ * Curly 4.0.0 will be the final released version. This gem is not used in Zendesk services anymore and won’t be updated.
3
+ * Add tests with Rails 7.2, 8.0, 8.1
4
+ * Add tests with Ruby 3.4 and 4.0
5
+ * Drop support for Ruby < 3.2
6
+ * Curly::Presenter#dependencies now return an Array instead of a SortedSet. Entries in this array will still be sorted.
7
+ * Drops dependency on sorted_set
2
8
 
3
9
  ### Curly 3.4.0 (July 2, 2024)
4
10
  * Drop upper limit on Rails, test with Rails main.
data/CONTRIBUTING.md CHANGED
@@ -10,8 +10,22 @@ In order to keep the Curly code base nice and tidy, please observe these best pr
10
10
  > In order to avoid nasty errors when doing stuff, make the Curly compiler
11
11
  > fail early when an invalid reference is encountered.
12
12
 
13
-
14
13
  Before making a contribution, you should make sure to understand what Curly is and isn't:
15
14
 
16
15
  - The template language will never be super advanced: one of the primary use cases for Curly is to allow end users to mess around with Curly templates and have them safely compiled and rendered on a server. As such, the template language will always be as simple as possible.
17
16
  - The template language is declarative, and is going to stay that way.
17
+
18
+ ### Releasing a new version
19
+ A new version is published to RubyGems.org every time a change to `version.rb` is pushed to the `main` branch.
20
+ In short, follow these steps:
21
+ 1. Update `version.rb`,
22
+ 2. update version in all `Gemfile.lock` files,
23
+ 3. merge this change into `main`, and
24
+ 4. look at [the action](https://github.com/zendesk/curly/actions/workflows/publish.yml) for output.
25
+
26
+ To create a pre-release from a non-main branch:
27
+ 1. change the version in `version.rb` to something like `1.2.0.pre.1` or `2.0.0.beta.2`,
28
+ 2. push this change to your branch,
29
+ 3. go to [Actions → “Publish to RubyGems.org” on GitHub](https://github.com/zendesk/curly/actions/workflows/publish.yml),
30
+ 4. click the “Run workflow” button,
31
+ 5. pick your branch from a dropdown.
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
1
  Curly
2
2
  =======
3
3
 
4
+ > [!WARNING]
5
+ > This gem is not used in Zendesk services anymore and won’t be updated. Curly 4.0.0 will be the final released version.
6
+
4
7
  Curly is a template language that completely separates structure and logic.
5
8
  Instead of interspersing your HTML with snippets of Ruby, all logic is moved
6
9
  to a presenter class.
data/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ require 'bundler/setup'
1
2
  require 'bundler/gem_tasks'
2
3
  require 'rspec/core/rake_task'
3
4
 
@@ -16,10 +16,9 @@ Gem::Specification.new do |s|
16
16
 
17
17
  s.rdoc_options = ["--charset=UTF-8"]
18
18
 
19
- s.required_ruby_version = ">= 3.1"
19
+ s.required_ruby_version = ">= 3.2"
20
20
 
21
21
  s.add_dependency("actionpack", ">= 6.1")
22
- s.add_dependency("sorted_set")
23
22
 
24
23
  s.add_development_dependency("rake")
25
24
  s.add_development_dependency("rspec", ">= 3")
@@ -2,3 +2,6 @@ eval_gemfile 'common.rb'
2
2
 
3
3
  gem 'rails', '~> 6.1.0'
4
4
  gem 'genspec', github: 'zendesk/genspec', branch: 'rails-7'
5
+ gem 'logger'
6
+ gem 'bigdecimal'
7
+ gem 'mutex_m'
@@ -10,200 +10,208 @@ GIT
10
10
  PATH
11
11
  remote: ..
12
12
  specs:
13
- curly-templates (3.4.0)
13
+ curly-templates (4.0.0)
14
14
  actionpack (>= 6.1)
15
- sorted_set
16
15
 
17
16
  GEM
18
17
  remote: https://rubygems.org/
19
18
  specs:
20
- actioncable (6.1.7.6)
21
- actionpack (= 6.1.7.6)
22
- activesupport (= 6.1.7.6)
19
+ actioncable (6.1.7.10)
20
+ actionpack (= 6.1.7.10)
21
+ activesupport (= 6.1.7.10)
23
22
  nio4r (~> 2.0)
24
23
  websocket-driver (>= 0.6.1)
25
- actionmailbox (6.1.7.6)
26
- actionpack (= 6.1.7.6)
27
- activejob (= 6.1.7.6)
28
- activerecord (= 6.1.7.6)
29
- activestorage (= 6.1.7.6)
30
- activesupport (= 6.1.7.6)
24
+ actionmailbox (6.1.7.10)
25
+ actionpack (= 6.1.7.10)
26
+ activejob (= 6.1.7.10)
27
+ activerecord (= 6.1.7.10)
28
+ activestorage (= 6.1.7.10)
29
+ activesupport (= 6.1.7.10)
31
30
  mail (>= 2.7.1)
32
- actionmailer (6.1.7.6)
33
- actionpack (= 6.1.7.6)
34
- actionview (= 6.1.7.6)
35
- activejob (= 6.1.7.6)
36
- activesupport (= 6.1.7.6)
31
+ actionmailer (6.1.7.10)
32
+ actionpack (= 6.1.7.10)
33
+ actionview (= 6.1.7.10)
34
+ activejob (= 6.1.7.10)
35
+ activesupport (= 6.1.7.10)
37
36
  mail (~> 2.5, >= 2.5.4)
38
37
  rails-dom-testing (~> 2.0)
39
- actionpack (6.1.7.6)
40
- actionview (= 6.1.7.6)
41
- activesupport (= 6.1.7.6)
38
+ actionpack (6.1.7.10)
39
+ actionview (= 6.1.7.10)
40
+ activesupport (= 6.1.7.10)
42
41
  rack (~> 2.0, >= 2.0.9)
43
42
  rack-test (>= 0.6.3)
44
43
  rails-dom-testing (~> 2.0)
45
44
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
46
- actiontext (6.1.7.6)
47
- actionpack (= 6.1.7.6)
48
- activerecord (= 6.1.7.6)
49
- activestorage (= 6.1.7.6)
50
- activesupport (= 6.1.7.6)
45
+ actiontext (6.1.7.10)
46
+ actionpack (= 6.1.7.10)
47
+ activerecord (= 6.1.7.10)
48
+ activestorage (= 6.1.7.10)
49
+ activesupport (= 6.1.7.10)
51
50
  nokogiri (>= 1.8.5)
52
- actionview (6.1.7.6)
53
- activesupport (= 6.1.7.6)
51
+ actionview (6.1.7.10)
52
+ activesupport (= 6.1.7.10)
54
53
  builder (~> 3.1)
55
54
  erubi (~> 1.4)
56
55
  rails-dom-testing (~> 2.0)
57
56
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
58
- activejob (6.1.7.6)
59
- activesupport (= 6.1.7.6)
57
+ activejob (6.1.7.10)
58
+ activesupport (= 6.1.7.10)
60
59
  globalid (>= 0.3.6)
61
- activemodel (6.1.7.6)
62
- activesupport (= 6.1.7.6)
63
- activerecord (6.1.7.6)
64
- activemodel (= 6.1.7.6)
65
- activesupport (= 6.1.7.6)
66
- activestorage (6.1.7.6)
67
- actionpack (= 6.1.7.6)
68
- activejob (= 6.1.7.6)
69
- activerecord (= 6.1.7.6)
70
- activesupport (= 6.1.7.6)
60
+ activemodel (6.1.7.10)
61
+ activesupport (= 6.1.7.10)
62
+ activerecord (6.1.7.10)
63
+ activemodel (= 6.1.7.10)
64
+ activesupport (= 6.1.7.10)
65
+ activestorage (6.1.7.10)
66
+ actionpack (= 6.1.7.10)
67
+ activejob (= 6.1.7.10)
68
+ activerecord (= 6.1.7.10)
69
+ activesupport (= 6.1.7.10)
71
70
  marcel (~> 1.0)
72
71
  mini_mime (>= 1.1.0)
73
- activesupport (6.1.7.6)
72
+ activesupport (6.1.7.10)
74
73
  concurrent-ruby (~> 1.0, >= 1.0.2)
75
74
  i18n (>= 1.6, < 2)
76
75
  minitest (>= 5.1)
77
76
  tzinfo (~> 2.0)
78
77
  zeitwerk (~> 2.3)
79
- benchmark-ips (2.12.0)
80
- builder (3.2.4)
81
- concurrent-ruby (1.2.2)
78
+ base64 (0.3.0)
79
+ benchmark-ips (2.14.0)
80
+ bigdecimal (4.0.1)
81
+ builder (3.3.0)
82
+ concurrent-ruby (1.3.6)
82
83
  crass (1.0.6)
83
- date (3.3.4)
84
- diff-lcs (1.5.0)
85
- erubi (1.12.0)
86
- github-markup (4.0.2)
87
- globalid (1.2.1)
84
+ date (3.5.1)
85
+ diff-lcs (1.6.2)
86
+ drb (2.2.3)
87
+ erubi (1.13.1)
88
+ github-markup (5.0.1)
89
+ globalid (1.3.0)
88
90
  activesupport (>= 6.1)
89
- i18n (1.14.1)
91
+ i18n (1.14.8)
90
92
  concurrent-ruby (~> 1.0)
91
- loofah (2.21.4)
93
+ logger (1.7.0)
94
+ loofah (2.25.0)
92
95
  crass (~> 1.0.2)
93
96
  nokogiri (>= 1.12.0)
94
- mail (2.8.1)
97
+ mail (2.9.0)
98
+ logger
95
99
  mini_mime (>= 0.1.1)
96
100
  net-imap
97
101
  net-pop
98
102
  net-smtp
99
- marcel (1.0.2)
100
- method_source (1.0.0)
103
+ marcel (1.1.0)
104
+ method_source (1.1.0)
101
105
  mini_mime (1.1.5)
102
- mini_portile2 (2.8.5)
103
- minitest (5.20.0)
104
- net-imap (0.4.5)
106
+ mini_portile2 (2.8.9)
107
+ minitest (6.0.2)
108
+ drb (~> 2.0)
109
+ prism (~> 1.5)
110
+ mutex_m (0.3.0)
111
+ net-imap (0.6.3)
105
112
  date
106
113
  net-protocol
107
114
  net-pop (0.1.2)
108
115
  net-protocol
109
116
  net-protocol (0.2.2)
110
117
  timeout
111
- net-smtp (0.4.0)
118
+ net-smtp (0.5.1)
112
119
  net-protocol
113
- nio4r (2.5.9)
114
- nokogiri (1.15.4)
120
+ nio4r (2.7.5)
121
+ nokogiri (1.19.1)
115
122
  mini_portile2 (~> 2.8.2)
116
123
  racc (~> 1.4)
117
- racc (1.7.3)
118
- rack (2.2.8)
119
- rack-test (2.1.0)
124
+ prism (1.9.0)
125
+ racc (1.8.1)
126
+ rack (2.2.22)
127
+ rack-test (2.2.0)
120
128
  rack (>= 1.3)
121
- rails (6.1.7.6)
122
- actioncable (= 6.1.7.6)
123
- actionmailbox (= 6.1.7.6)
124
- actionmailer (= 6.1.7.6)
125
- actionpack (= 6.1.7.6)
126
- actiontext (= 6.1.7.6)
127
- actionview (= 6.1.7.6)
128
- activejob (= 6.1.7.6)
129
- activemodel (= 6.1.7.6)
130
- activerecord (= 6.1.7.6)
131
- activestorage (= 6.1.7.6)
132
- activesupport (= 6.1.7.6)
129
+ rails (6.1.7.10)
130
+ actioncable (= 6.1.7.10)
131
+ actionmailbox (= 6.1.7.10)
132
+ actionmailer (= 6.1.7.10)
133
+ actionpack (= 6.1.7.10)
134
+ actiontext (= 6.1.7.10)
135
+ actionview (= 6.1.7.10)
136
+ activejob (= 6.1.7.10)
137
+ activemodel (= 6.1.7.10)
138
+ activerecord (= 6.1.7.10)
139
+ activestorage (= 6.1.7.10)
140
+ activesupport (= 6.1.7.10)
133
141
  bundler (>= 1.15.0)
134
- railties (= 6.1.7.6)
142
+ railties (= 6.1.7.10)
135
143
  sprockets-rails (>= 2.0.0)
136
- rails-dom-testing (2.2.0)
144
+ rails-dom-testing (2.3.0)
137
145
  activesupport (>= 5.0.0)
138
146
  minitest
139
147
  nokogiri (>= 1.6)
140
- rails-html-sanitizer (1.6.0)
141
- loofah (~> 2.21)
142
- nokogiri (~> 1.14)
143
- railties (6.1.7.6)
144
- actionpack (= 6.1.7.6)
145
- activesupport (= 6.1.7.6)
148
+ rails-html-sanitizer (1.7.0)
149
+ loofah (~> 2.25)
150
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
151
+ railties (6.1.7.10)
152
+ actionpack (= 6.1.7.10)
153
+ activesupport (= 6.1.7.10)
146
154
  method_source
147
155
  rake (>= 12.2)
148
156
  thor (~> 1.0)
149
- rake (13.1.0)
150
- rbtree (0.4.6)
151
- redcarpet (3.6.0)
152
- rspec (3.12.0)
153
- rspec-core (~> 3.12.0)
154
- rspec-expectations (~> 3.12.0)
155
- rspec-mocks (~> 3.12.0)
156
- rspec-core (3.12.2)
157
- rspec-support (~> 3.12.0)
158
- rspec-expectations (3.12.3)
157
+ rake (13.3.1)
158
+ redcarpet (3.6.1)
159
+ rspec (3.13.2)
160
+ rspec-core (~> 3.13.0)
161
+ rspec-expectations (~> 3.13.0)
162
+ rspec-mocks (~> 3.13.0)
163
+ rspec-core (3.13.6)
164
+ rspec-support (~> 3.13.0)
165
+ rspec-expectations (3.13.5)
159
166
  diff-lcs (>= 1.2.0, < 2.0)
160
- rspec-support (~> 3.12.0)
161
- rspec-mocks (3.12.6)
167
+ rspec-support (~> 3.13.0)
168
+ rspec-mocks (3.13.8)
162
169
  diff-lcs (>= 1.2.0, < 2.0)
163
- rspec-support (~> 3.12.0)
164
- rspec-rails (6.0.3)
170
+ rspec-support (~> 3.13.0)
171
+ rspec-rails (6.1.5)
165
172
  actionpack (>= 6.1)
166
173
  activesupport (>= 6.1)
167
174
  railties (>= 6.1)
168
- rspec-core (~> 3.12)
169
- rspec-expectations (~> 3.12)
170
- rspec-mocks (~> 3.12)
171
- rspec-support (~> 3.12)
172
- rspec-support (3.12.1)
173
- set (1.0.3)
174
- sorted_set (1.0.3)
175
- rbtree
176
- set (~> 1.0)
177
- sprockets (4.2.1)
175
+ rspec-core (~> 3.13)
176
+ rspec-expectations (~> 3.13)
177
+ rspec-mocks (~> 3.13)
178
+ rspec-support (~> 3.13)
179
+ rspec-support (3.13.7)
180
+ sprockets (4.2.2)
178
181
  concurrent-ruby (~> 1.0)
182
+ logger
179
183
  rack (>= 2.2.4, < 4)
180
- sprockets-rails (3.4.2)
181
- actionpack (>= 5.2)
182
- activesupport (>= 5.2)
184
+ sprockets-rails (3.5.2)
185
+ actionpack (>= 6.1)
186
+ activesupport (>= 6.1)
183
187
  sprockets (>= 3.0.0)
184
- stackprof (0.2.25)
185
- thor (1.3.0)
186
- timeout (0.4.1)
188
+ stackprof (0.2.28)
189
+ thor (1.5.0)
190
+ timeout (0.6.0)
187
191
  tomparse (0.4.2)
188
192
  tzinfo (2.0.6)
189
193
  concurrent-ruby (~> 1.0)
190
- websocket-driver (0.7.6)
194
+ websocket-driver (0.8.0)
195
+ base64
191
196
  websocket-extensions (>= 0.1.0)
192
197
  websocket-extensions (0.1.5)
193
- yard (0.9.34)
198
+ yard (0.9.38)
194
199
  yard-tomdoc (0.7.1)
195
200
  tomparse (>= 0.4.0)
196
201
  yard
197
- zeitwerk (2.6.12)
202
+ zeitwerk (2.7.5)
198
203
 
199
204
  PLATFORMS
200
205
  ruby
201
206
 
202
207
  DEPENDENCIES
203
208
  benchmark-ips
209
+ bigdecimal
204
210
  curly-templates!
205
211
  genspec!
206
212
  github-markup
213
+ logger
214
+ mutex_m
207
215
  rails (~> 6.1.0)
208
216
  rake
209
217
  redcarpet