dekiru 1.0.0 → 1.2.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: cbaa70f2e21a8c7a8f3d195cad66a43c0686ea113ac6deeaa14eeb4f67582bd6
4
+ data.tar.gz: bbf84775235084dab608e5f1450225cc0fb3764fda64bae6527e65a5f3fbdeca
5
5
  SHA512:
6
- metadata.gz: 6c6ad53a0f07879ddcaed43927406cc58dbc176d346655f400539fc27685f1470239358c2cea4a29ec4c9c2f375fce40fed98cc2cb521e2a0e8b382026357e7a
7
- data.tar.gz: 3d9074d7047a77b7089cc7b9d4e4bdacd8e6c9273dd03649227e073d0c84e7c5f8286bc03cba48072c121f8c244d7e87d6e358260aed5ada59c73ccdc70d208c
6
+ metadata.gz: 59669c83988e682e841cffe5dc077380a0002fdcc9cdf69a362f14bde3c2dd87f32249c5b2ed512459866e0adaf2b51293d14411c86ee4b7b47ef1b04d819093
7
+ data.tar.gz: c856fbfb999ba923da4a6e64b666673b0888390a8092afacf6a030861e3c1d0d5431a062ed8a5782d610807f8aaa1e02b3ac0db70a0da3d632be07b61342f8e4
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,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Dekiru
2
- VERSION = '1.0.0'
4
+ VERSION = '1.2.0'
3
5
  end
data/lib/dekiru.rb CHANGED
@@ -3,6 +3,7 @@ require 'dekiru/railtie' if defined?(::Rails)
3
3
  require 'dekiru/helper'
4
4
  require 'dekiru/mail_security_interceptor'
5
5
  require 'dekiru/camelize_hash'
6
+ require 'dekiru/data_migration'
6
7
 
7
8
  require 'active_support'
8
9
  require 'active_support/all'
@@ -16,13 +17,23 @@ module Dekiru
16
17
  def configuration
17
18
  @configuration ||= Configuration.new
18
19
  end
20
+
21
+ def deprecator
22
+ @deprecator ||= ActiveSupport::Deprecation.new('1.2', 'Dekiru')
23
+ end
19
24
  end
20
25
 
21
26
  class Configuration
22
- attr_accessor :mail_security_hook
27
+ attr_reader :mail_security_hook
23
28
 
24
29
  def initialize
25
30
  @mail_security_hook = false # default
26
31
  end
32
+
33
+ def mail_security_hook=(value)
34
+ Dekiru.deprecator.warn('Dekiru.configuration.mail_security_hook is deprecated. If necessary, implement it yourself using after_action.')
35
+
36
+ @mail_security_hook = value
37
+ end
27
38
  end
28
39
  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.2.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-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails