mime_actor 0.6.1.rc1 → 0.6.1

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: 21ee0c18bb4a165c41bc6f583407eed1c79290dd4e63d99be14165b233b43104
4
- data.tar.gz: 9f590546538dacb9f4179168c6e9180fbb012efae5ba7b9c4ba33117316d70bf
3
+ metadata.gz: f5a67bb80dd83c069ea2f06a4afea5e241987d8b9a2a30f0a3eb0d01748b3759
4
+ data.tar.gz: acb0cd8b89e39ea3962c0949bff4666c96c36f6c15eae5a3709775daa5ef2516
5
5
  SHA512:
6
- metadata.gz: dab37a418fb045fe18c19a5c851706eefe558eebf1d8c247703c5248a2f355765981f9ec29c7053ba40b2b3799551340c0dad6c33048c64fca1b947337442346
7
- data.tar.gz: 919de90346b9cea32d464aade78ab6aaaa1af5ab87dd473e1347b32595cf1756cae9f1ceaed37278a8deb3f7fe215fd67076b9c3627535c31ba4a1672a5dcd99
6
+ metadata.gz: e64c6a62feb248b76672d75ef4cf9bc0f822b0f2fd57311f879874e910377b80549b133c85b148fd61d44d91259c780299770d7fae4792dbab094c01676df201
7
+ data.tar.gz: 2577dc3d03d3fa233ba136613e63d0c18a3e59f51bac690b582b18f424cc4ee7e5fee736eafc76393a94af20e3fcf930cd953b4eec07f21282fa9b5dd7be552d
data/.rubocop.yml CHANGED
@@ -16,9 +16,6 @@ Style/BlockComments:
16
16
  Exclude:
17
17
  - spec/*_helper.rb
18
18
 
19
- Style/RegexpLiteral:
20
- EnforcedStyle: percent_r
21
-
22
19
  Metrics/AbcSize:
23
20
  Enabled: false
24
21
 
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # :markup: markdown
4
-
5
3
  require "mime_actor/scene"
6
4
  require "mime_actor/stage"
7
5
  require "mime_actor/rescue"
@@ -56,7 +54,7 @@ module MimeActor
56
54
 
57
55
  respond_to do |collector|
58
56
  formats.each do |format, actor|
59
- dispatch = self.class.dispatch_act(action: action, format: format, context: self) do
57
+ dispatch = self.class.dispatch_cue(action: action, format: format, context: self) do
60
58
  cue_actor(actor.presence || "#{action}_#{format}")
61
59
  end
62
60
  collector.public_send(format, &dispatch)
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # :markup: markdown
4
-
5
3
  require "set"
6
4
 
7
5
  module MimeActor
@@ -6,6 +6,7 @@ require "mime_actor/errors"
6
6
  require "mime_actor/validator"
7
7
 
8
8
  require "active_support/concern"
9
+ require "active_support/core_ext/array/extract_options"
9
10
  require "active_support/core_ext/array/wrap"
10
11
  require "active_support/core_ext/module/attribute_accessors"
11
12
  require "active_support/core_ext/object/blank"
@@ -106,7 +107,6 @@ module MimeActor
106
107
  end
107
108
  end
108
109
 
109
- # TODO: remove on next breaking change release
110
110
  alias act_on_format respond_act_to
111
111
 
112
112
  private
@@ -122,7 +122,7 @@ module MimeActor
122
122
  end
123
123
 
124
124
  def define_scene(action)
125
- module_eval(
125
+ class_eval(
126
126
  # def index
127
127
  # self.respond_to?(:start_scene) && self.start_scene(:index)
128
128
  # end
@@ -46,13 +46,13 @@ module MimeActor
46
46
  # @param block the `block` to be evaluated
47
47
  #
48
48
  # @example Dispatch a cue that prints out a text
49
- # dispatch = self.class.dispatch_act(action: :create, format: :json, context: self) do
49
+ # dispatch = self.class.dispatch_cue(action: :create, format: :json, context: self) do
50
50
  # puts "completed the dispatch"
51
51
  # end
52
52
  #
53
53
  # dispatch.call == "completed the dispatch" # true
54
54
  #
55
- def dispatch_act(action: nil, format: nil, context: self, &block)
55
+ def dispatch_cue(action: nil, format: nil, context: self, &block)
56
56
  raise ArgumentError, "block must be provided" unless block_given?
57
57
 
58
58
  lambda do
@@ -61,9 +61,6 @@ module MimeActor
61
61
  (respond_to?(:rescue_actor) && rescue_actor(e, action:, format:, context:)) || raise
62
62
  end
63
63
  end
64
-
65
- # TODO: remove on next breaking change release
66
- alias dispatch_cue dispatch_act
67
64
  end
68
65
 
69
66
  # Calls the `actor` and passing arguments to it.
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # :markup: markdown
4
-
5
3
  module MimeActor
6
4
  def self.version
7
5
  gem_version
@@ -15,7 +13,7 @@ module MimeActor
15
13
  MAJOR = 0
16
14
  MINOR = 6
17
15
  BUILD = 1
18
- PRE = "rc1"
16
+ PRE = nil
19
17
 
20
18
  STRING = [MAJOR, MINOR, BUILD, PRE].compact.join(".")
21
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mime_actor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1.rc1
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Chang
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-13 00:00:00.000000000 Z
11
+ date: 2024-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack