hyper-operation 0.5.2 → 0.5.3

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
  SHA1:
3
- metadata.gz: ae0c4ee46f852a8120a9116a6e90ca9198f131ac
4
- data.tar.gz: 6cb26e37bcbe79c1a6c639f5a6f50c5f6c3dfa95
3
+ metadata.gz: b7c4cecfbe9d2c6353f4d797a743220eb7475b56
4
+ data.tar.gz: 837467c2f158e76ff03669d4765383a8f3713714
5
5
  SHA512:
6
- metadata.gz: 7834032b2c71bcdcb0f295aecc7aa9878f276cd9770e6a9e04754a93b9e3c89d8871129a929901f52a0a0b7ecc4a9000e15e258f34fe8d9ca3888d2c8c23199b
7
- data.tar.gz: b8ee589621f040707daff0c1d70117f5e495727409b746aa2d8e919470ac3d736ee9fb6dee2ead40cfc5e407816f48e597bc635da1c3caaacb7d7e89b51e6621
6
+ metadata.gz: 690c6f512bea18092eaff36f3e2d2dcf126719ba52ac392053d9d386c771a8fba0bec48e15adca62b37d4dc8e5501c8d8b1a5189b02ba039acd144de32d32c04
7
+ data.tar.gz: 2b4811133557e9cc2c17b139dca97a302a2e77d45aadae02f269e7afdd1d68b93cf318747d65f836c9137d9b9f1f196310d57db421d2dbd933aa333965f35012
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hyper-operation (0.5.1)
4
+ hyper-operation (0.5.3)
5
5
  activerecord (>= 0.3.0)
6
6
  hyper-component (>= 0.12.2)
7
- hyperloop-config (>= 0.9.2)
7
+ hyperloop-config (>= 0.9.7)
8
8
  mutations
9
9
  opal-activesupport
10
10
  pusher
@@ -110,9 +110,9 @@ GEM
110
110
  hyperloop-config (>= 0.9.2)
111
111
  opal-rails (~> 0.9.0)
112
112
  react-rails (< 1.10.0)
113
- hyper-react (0.12.3)
113
+ hyper-react (0.12.5)
114
114
  hyper-store (>= 0.2.1)
115
- hyperloop-config (>= 0.9.2)
115
+ hyperloop-config (>= 0.9.7)
116
116
  opal (>= 0.8.0)
117
117
  opal-activesupport (>= 0.2.0)
118
118
  hyper-spec (0.1.0)
@@ -127,8 +127,9 @@ GEM
127
127
  unparser (= 0.2.5)
128
128
  hyper-store (0.2.1)
129
129
  hyperloop-config (>= 0.9.2)
130
- hyperloop-config (0.9.2)
130
+ hyperloop-config (0.9.7)
131
131
  opal
132
+ opal-browser
132
133
  i18n (0.8.1)
133
134
  ice_nine (0.11.2)
134
135
  jquery-rails (4.3.1)
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_dependency 'mutations'
22
22
  spec.add_dependency 'hyper-component', '>= 0.12.2'
23
- spec.add_dependency 'hyperloop-config', '>= 0.9.2'
23
+ spec.add_dependency 'hyperloop-config', '>= 0.9.7'
24
24
  spec.add_dependency 'opal-activesupport'
25
25
  spec.add_dependency 'activerecord', '>= 0.3.0'
26
26
  spec.add_dependency 'pusher'
@@ -127,7 +127,7 @@ module Hyperloop
127
127
  end
128
128
 
129
129
  child.singleton_class.define_singleton_method(:_Railway) do
130
- @_railway ||= begin
130
+ Hyperloop::Context.set_var(self, :@_railway) do
131
131
  # overcomes a bug in Opal 0.9 which returns nil for singleton superclass
132
132
  my_super = superclass || `self.$$singleton_of`.superclass.singleton_class
133
133
  if my_super == Operation.singleton_class
@@ -8,7 +8,9 @@ module Hyperloop
8
8
 
9
9
  class << self
10
10
  def receivers
11
- @receivers ||= []
11
+ # use the force: true option so that system code needing to receive
12
+ # boot will NOT be erased on the next Hyperloop::Context.reset!
13
+ Hyperloop::Context.set_var(self, :@receivers, force: true) { [] }
12
14
  end
13
15
 
14
16
  def add_receiver(&block)
@@ -108,7 +108,7 @@ module Hyperloop
108
108
  end
109
109
 
110
110
  def self.params_wrapper
111
- @params_wrapper ||= begin
111
+ Hyperloop::Context.set_var(self, :@params_wrapper) do
112
112
  if Railway == superclass
113
113
  Class.new(ParamsWrapper)
114
114
  else
@@ -1,5 +1,5 @@
1
1
  module Hyperloop
2
2
  class Operation
3
- VERSION = '0.5.2'
3
+ VERSION = '0.5.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyper-operation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - catmando
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-25 00:00:00.000000000 Z
11
+ date: 2017-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mutations
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.9.2
47
+ version: 0.9.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.9.2
54
+ version: 0.9.7
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: opal-activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -584,7 +584,6 @@ files:
584
584
  - lib/hyper-operation/promise.rb
585
585
  - lib/hyper-operation/railway.rb
586
586
  - lib/hyper-operation/railway/dispatcher.rb
587
- - lib/hyper-operation/railway/operation_wrapper.rb
588
587
  - lib/hyper-operation/railway/params_wrapper.rb
589
588
  - lib/hyper-operation/railway/run.rb
590
589
  - lib/hyper-operation/railway/validations.rb
@@ -1,106 +0,0 @@
1
- # module Hyperloop
2
- # class Operation
3
- # class Railway
4
- #
5
- # class Exit < StandardError
6
- # attr_reader :state
7
- # attr_reader :result
8
- # def initialize(state, result)
9
- # @state = state
10
- # @result = result
11
- # end
12
- # end
13
- #
14
- # class << self
15
- # def add_param(*args, &block)
16
- # Hyperloop::Operation::ParamsWrapper.add_param(hash_filter, *args, &block)
17
- # end
18
- #
19
- # def add_validation(*args, &block)
20
- # validations << [args, block]
21
- # end
22
- #
23
- # def add_error(param, symbol, message, *args, &block)
24
- # add_validation do
25
- # add_error(param, symbol, message) if call_block_with_context(args, block)
26
- # end
27
- # end
28
- #
29
- # def add_step(*args, &block)
30
- # railway << [:step, args, block]
31
- # end
32
- #
33
- # def add_failed(*args, &block)
34
- # railway << [:failed, args, block]
35
- # end
36
- #
37
- # def add_async(*args, &block)
38
- # railway << [:async, args, block]
39
- # end
40
- #
41
- # def apply(op, state, result, args, block)
42
- # if block.arity == 0
43
- # [state, op.instance_eval &block]
44
- # elsif result.is_a? Array && block.arity == result.count
45
- # [state, op.instance_exec(*result, &block)]
46
- # else
47
- # [state, op.instance_exec(result, block)]
48
- # end
49
- # rescue Exception => e
50
- # [:failed, e]
51
- # end
52
- #
53
- # def run(op)
54
- # state = :success # or :failed if @errors
55
- # result = nil
56
- # railway.each do |tie|
57
- # case tie[0]
58
- # when :step
59
- # if result.is_a? Promise
60
- # result = result.then { |*result| apply(op, :success, result, *tie[1..2]) }
61
- # elsif state == :success
62
- # state, result = apply(op, state, result, tie[1], tie[2])
63
- # end
64
- # when :failed
65
- # if result.is_a? Promise
66
- # result = result.fail { |*result| apply(op, :failed, result, *tie[1..2]) }
67
- # elsif state == :failed
68
- # state, result = apply(op, state, result, tie[1], tie[2])
69
- # end
70
- # when :async
71
- # state, result = apply(op, state, result, tie[1], tie[2]) if state != :failed
72
- # end
73
- # end
74
- # rescue Hyperloop::Operation::Wrapper::Exit => e
75
- # result, state = [e.result, e.state]
76
- # ensure
77
- # if result.is_a? Promise
78
- # result
79
- # elsif state == :failed
80
- # Promise.new.reject(result)
81
- # else
82
- # Promise.new.resolve(result)
83
- # end
84
- # end
85
- #
86
- #
87
- #
88
- #
89
- # # THIS SHOULD BE ADDED ONLY IN ServerOps
90
- # def dispatch_to(*args, &block)
91
- # dispatches << [args, block]
92
- # end
93
- #
94
- # def hash_filter
95
- # @hash_filter ||= Mutations::HashFilter.new
96
- # end
97
- #
98
- # def validations
99
- # @validations ||= []
100
- # end
101
- #
102
- #
103
- #
104
- # def dispatches
105
- # @dispatches ||= []
106
- # end