copy_tuner_client 0.16.3 → 0.17.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ec2291128893fab1a165cd4566605c86006fb0180ceaa4bf647d27a868aa838
4
- data.tar.gz: 8d6b910e1f7c3bf72c5a51ed13f45757a05cf33e068518f9959973576b742128
3
+ metadata.gz: 387528f7427d7cc41117899444a50220fe5592acb66f335a1631dff4af05e557
4
+ data.tar.gz: 6eecdd3ba6cd2bda1e4bbc87826a6adacf8cf256171faab7bbcf53828e91b382
5
5
  SHA512:
6
- metadata.gz: 3273fb00eb37001abe028d8e1d16ce6f44270d70411fe6c9b33fb07a77a3f256ee4b9d4f406403ae01a0e1050094a9191d461e389ef8dd778e8288d9c72752f2
7
- data.tar.gz: 07ebfbb46b756142eb846359b4597c43bdeaee36089bfa070a6dd3162e8bdfeffd42fe5388f02a96ce01a34ef8c7f8b36818b239856a034349f8c79e696669fc
6
+ metadata.gz: cc3f90e4dcba9bf60ae3713c157a98bb05c01dd77e0938784b31843c2a006d118a5a0a3b0043a6cf4c0ff0d3c74792dc0c161338aa40e79aa1f6c47d2b49b57b
7
+ data.tar.gz: 0d64b9fa930e3e3604a67d2721291e93226c6507c689af5ed18af9c2e17f3b6013d466afb2d4739dbc0acce359c1fbf494a1ce821e9a39261b3389c8ab696bd8
@@ -22,13 +22,17 @@ jobs:
22
22
  strategy:
23
23
  fail-fast: false
24
24
  matrix:
25
- ruby: ["3.0", 3.1, 3.2]
26
- gemfile: ["6.1", "7.0", "main"]
25
+ ruby: ["3.0", 3.1, 3.2, 3,3]
26
+ gemfile: ["6.1", "7.0", "7.1", "main"]
27
27
  exclude:
28
+ - ruby: "3.0"
29
+ gemfile: "main"
28
30
  - ruby: "3.1"
29
31
  gemfile: "6.1"
30
32
  - ruby: "3.2"
31
33
  gemfile: "6.1"
34
+ - ruby: "3.3"
35
+ gemfile: "6.1"
32
36
  steps:
33
37
  - name: Install packages
34
38
  run: |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "editor.codeActionsOnSave": {
3
- "source.fixAll.eslint": true,
3
+ "source.fixAll.eslint": "explicit"
4
4
  },
5
5
  "typescript.tsdk": "node_modules/typescript/lib",
6
6
  "typescript.preferences.importModuleSpecifier": "non-relative",
@@ -0,0 +1,5 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "rails", "~> 7.1"
4
+
5
+ gemspec :path => "../"
@@ -157,13 +157,20 @@ module CopyTunerClient
157
157
  self.upload_disabled_environments = %w[production staging]
158
158
  self.s3_host = 'copy-tuner-data-prod.s3.amazonaws.com'
159
159
  self.disable_copyray_comment_injection = false
160
- self.html_escape = false
160
+ # TODO: 0.18.0以降のバージョンで初期値をtrueにしたい
161
+ self.html_escape = nil
161
162
  self.ignored_keys = []
162
163
  self.ignored_key_handler = -> (e) { raise e }
163
164
 
164
165
  @applied = false
165
166
  end
166
167
 
168
+ def html_escape
169
+ raise 'CopyTunerClient.configuration.html_escape is required' if @html_escape.nil?
170
+
171
+ @html_escape
172
+ end
173
+
167
174
  # Allows config options to be read like a hash
168
175
  #
169
176
  # @param [Symbol] option Key for a given attribute
@@ -121,7 +121,7 @@ module CopyTunerClient
121
121
  # you have to pass a binding to this (a proc) so that ERB can have
122
122
  # access to helper functions and local variables
123
123
  def render_without_layout(view, binding)
124
- ERB.new(File.read(File.join(VIEW_PATH, 'copytuner', view.to_s + '.html.erb')), nil, nil, 'frobnitz').result(binding)
124
+ ERB.new(File.read(File.join(VIEW_PATH, 'copytuner', view.to_s + '.html.erb')), eoutvar: 'frobnitz').result(binding)
125
125
  end
126
126
 
127
127
  def cancel_sync?(env)
@@ -1,6 +1,6 @@
1
1
  module CopyTunerClient
2
2
  # Client version
3
- VERSION = '0.16.3'.freeze
3
+ VERSION = '0.17.1'.freeze
4
4
 
5
5
  # API version being used to communicate with the server
6
6
  API_VERSION = '2.0'.freeze
@@ -111,10 +111,10 @@ describe CopyTunerClient::I18nBackend do
111
111
  expect(cache['en.test.key']).to eq 'default %{interpolate}'
112
112
  end
113
113
 
114
- it "marks strings as html safe" do
114
+ it "dose not mark strings as html safe" do
115
115
  cache['en.test.key'] = FakeHtmlSafeString.new("Hello")
116
116
  backend = build_backend
117
- expect(backend.translate('en', 'test.key')).to be_html_safe
117
+ expect(backend.translate('en', 'test.key')).to_not be_html_safe
118
118
  end
119
119
 
120
120
  it "looks up an array of defaults" do
@@ -4,6 +4,7 @@ module ClientSpecHelpers
4
4
  CopyTunerClient.configure(false) do |config|
5
5
  config.api_key = 'abc123'
6
6
  config.s3_host = 'copy-tuner.com'
7
+ config.html_escape = true
7
8
  end
8
9
  end
9
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copy_tuner_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.3
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - SonicGarden
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-20 00:00:00.000000000 Z
11
+ date: 2024-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -203,6 +203,7 @@ files:
203
203
  - copy_tuner_client.gemspec
204
204
  - gemfiles/6.1.gemfile
205
205
  - gemfiles/7.0.gemfile
206
+ - gemfiles/7.1.gemfile
206
207
  - gemfiles/main.gemfile
207
208
  - index.html
208
209
  - lib/copy_tuner_client.rb