dekiru 1.0.0 → 1.1.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: 54931a9e4393d521550361c655a87e561e548691c3be644cb2b881e4a9c55aa9
4
- data.tar.gz: 663476875859ca0dcd5a5fa755f1b48c26eadbeca4df848f717ed8cde5aea9be
3
+ metadata.gz: ea560e613866c36d918f1e7763b674849138baa2b9381b5819b541fb01fff6a4
4
+ data.tar.gz: d3e10fcf03e8e3a57d09633485c15003c88ce92307425bed815d941e44bbb8d0
5
5
  SHA512:
6
- metadata.gz: 6c6ad53a0f07879ddcaed43927406cc58dbc176d346655f400539fc27685f1470239358c2cea4a29ec4c9c2f375fce40fed98cc2cb521e2a0e8b382026357e7a
7
- data.tar.gz: 3d9074d7047a77b7089cc7b9d4e4bdacd8e6c9273dd03649227e073d0c84e7c5f8286bc03cba48072c121f8c244d7e87d6e358260aed5ada59c73ccdc70d208c
6
+ metadata.gz: cb151dab4df58504e36fb9e34ba52d5f1f0fbf427fb66d25a9c30680b8cc371e0df8e94a222851ed72cc1aee0202a0afe32686f616723915592f58ed9315a380
7
+ data.tar.gz: ae92e39580b616e53235dac71c59bfa74b9234a3925c07debd75950a5b89bca8ef2c46cc2bdeaefed64e3416103c8cc369966a3460bc79095e2da10ffae9c4be
data/README.md CHANGED
@@ -109,19 +109,6 @@ Rails.application.load_tasks
109
109
  Rake::Task['db:migrate'].enhance(['db:migrate:check_conflict']) if Rails.env.development?
110
110
  ```
111
111
 
112
- ## Mail Security Hook
113
-
114
- 以下の設定をすると、宛先を指定しないメールを配信しようとした時に`Dekiru::MailSecurityInterceptor::NoToAdreessError`例外を発生させる。
115
-
116
- ※ to に空文字や空配列を指定してメールを配信しようとすると、bcc 内のアドレスが to に転記されるといった問題がある。これを未然に防ぐことができる。
117
-
118
- ```ruby
119
- # config/initializer/dekiru.rb
120
- Dekiru.configure do |config|
121
- config.mail_security_hook = true # default: false
122
- end
123
- ```
124
-
125
112
  ## Data Migration Operator
126
113
 
127
114
  For data migration operations, please use the separate [`dekiru-data_migration` gem](https://github.com/SonicGarden/dekiru-data_migration) which provides the `Dekiru::DataMigrationOperator` functionality.
@@ -3,6 +3,10 @@ module Dekiru
3
3
  module LegacyHelpers
4
4
  class Error < StandardError; end
5
5
 
6
+ def self.included(base)
7
+ Dekiru.deprecator.warn("#{self} is deprecated. If necessary, copy it to your project and use it.")
8
+ end
9
+
6
10
  def wait_for_event(event)
7
11
  page.execute_script(<<~"EOS")
8
12
  (function(){
data/lib/dekiru/helper.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  module Dekiru
2
2
  module Helper
3
3
  def null_check_localization(object, **options)
4
+ Dekiru.deprecator.warn('nl helper is deprecated. Use l(object, default: nil) instead.')
5
+
4
6
  localize(object, **options) if object.present?
5
7
  end
6
8
  alias nl null_check_localization
@@ -13,6 +13,7 @@ module TaskWithLogger
13
13
  end
14
14
 
15
15
  def echo(str)
16
+ Dekiru.deprecator.warn("TaskWithLogger is deprecated. If necessary, copy it to your project and use it.")
16
17
  Rails.logger.info(str)
17
18
  puts(str)
18
19
  end
@@ -1,3 +1,3 @@
1
1
  module Dekiru
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
data/lib/dekiru.rb CHANGED
@@ -16,13 +16,23 @@ module Dekiru
16
16
  def configuration
17
17
  @configuration ||= Configuration.new
18
18
  end
19
+
20
+ def deprecator
21
+ @deprecator ||= ActiveSupport::Deprecation.new('1.2', 'Dekiru')
22
+ end
19
23
  end
20
24
 
21
25
  class Configuration
22
- attr_accessor :mail_security_hook
26
+ attr_reader :mail_security_hook
23
27
 
24
28
  def initialize
25
29
  @mail_security_hook = false # default
26
30
  end
31
+
32
+ def mail_security_hook=(value)
33
+ Dekiru.deprecator.warn('Dekiru.configuration.mail_security_hook is deprecated. If necessary, implement it yourself using after_action.')
34
+
35
+ @mail_security_hook = value
36
+ end
27
37
  end
28
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dekiru
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akihiro Matsumura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-06-23 00:00:00.000000000 Z
11
+ date: 2025-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails