isomorfeus-redux 4.0.18 → 4.0.19
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 +4 -4
- data/README.md +2 -2
- data/lib/isomorfeus/core_ext/hash/deep_merge.rb +2 -3
- data/lib/isomorfeus/execution_environment.rb +51 -11
- data/lib/redux/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0eabc9771d1a6cd01277a34a779def3b54053a6cf18d81ed659a39cdbce6e84b
|
4
|
+
data.tar.gz: 8474fbbb10aa537d2136484e36938d66a6c3ba118854ee7db441d0cd6ab7678a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e1bbc10687e598ba74712425f84165ca3a89ad373a62f1ccd21381b3420f5f9d2d60a8dc953b30dddfe9d830fa3dbd443c575c81d30f75b98c6aad3a531bbc4
|
7
|
+
data.tar.gz: 2a720626c51e0c24764c0afb8bcaa825a39e929ac45475ddec90b7a933a982b54f718908b6cf2343e375dc3fba3dfe7b12d21bd4cae6a5efe3dec801bfb59702
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Isomorfeus-redux 4.0.x implements features and the API of Redux 4.0 and should b
|
|
12
12
|
## Installation
|
13
13
|
To install redux with the matching version:
|
14
14
|
```
|
15
|
-
yarn add redux@4.0.
|
15
|
+
yarn add redux@4.0.5
|
16
16
|
```
|
17
17
|
then add to the Gemfile:
|
18
18
|
```ruby
|
@@ -110,4 +110,4 @@ Redux::Store.init! # initializes the global store
|
|
110
110
|
```
|
111
111
|
|
112
112
|
### Development Tools
|
113
|
-
The Redux Development Tools allow for detailed debugging of store/state changes: https://github.com/zalmoxisus/redux-devtools-extension
|
113
|
+
The Redux Development Tools allow for detailed debugging of store/state changes: https://github.com/zalmoxisus/redux-devtools-extension
|
@@ -1,5 +1,4 @@
|
|
1
|
-
#
|
2
|
-
# taken from: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
|
1
|
+
# originally taken from: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/hash/deep_merge.rb
|
3
2
|
|
4
3
|
class Hash
|
5
4
|
# Returns a new hash with +self+ and +other_hash+ merged recursively.
|
@@ -32,4 +31,4 @@ class Hash
|
|
32
31
|
end
|
33
32
|
end
|
34
33
|
end
|
35
|
-
end
|
34
|
+
end
|
@@ -3,34 +3,74 @@ module Isomorfeus
|
|
3
3
|
class << self
|
4
4
|
attr_accessor :on_browser
|
5
5
|
attr_accessor :on_ssr
|
6
|
+
attr_accessor :on_server
|
7
|
+
attr_accessor :on_desktop
|
8
|
+
attr_accessor :on_ios
|
9
|
+
attr_accessor :on_android
|
10
|
+
attr_accessor :on_mobile
|
11
|
+
attr_accessor :on_database
|
6
12
|
|
7
13
|
def on_browser?
|
14
|
+
# true if running on browser
|
8
15
|
@on_browser
|
9
16
|
end
|
10
17
|
|
11
18
|
def on_ssr?
|
19
|
+
# true if running in server side rendering in restricted node js vm
|
12
20
|
@on_ssr
|
13
21
|
end
|
14
22
|
|
15
23
|
def on_server?
|
16
|
-
|
24
|
+
# true if running on server
|
25
|
+
@on_server
|
17
26
|
end
|
18
|
-
end
|
19
27
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
class << self
|
24
|
-
def on_browser?
|
25
|
-
false
|
28
|
+
def on_desktop?
|
29
|
+
# true if running in electron
|
30
|
+
@on_desktop
|
26
31
|
end
|
27
32
|
|
28
|
-
def
|
29
|
-
|
33
|
+
def on_ios?
|
34
|
+
# true if running in react-native on ios
|
35
|
+
@on_ios
|
36
|
+
end
|
37
|
+
|
38
|
+
def on_android?
|
39
|
+
# true if running in react-native on android
|
40
|
+
@on_android
|
30
41
|
end
|
31
42
|
|
43
|
+
def on_mobile?
|
44
|
+
# true if running in react-native
|
45
|
+
@on_mobile
|
46
|
+
end
|
47
|
+
|
48
|
+
def on_database?
|
49
|
+
# true if running in database context
|
50
|
+
@on_database
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
self.on_ssr = `(typeof process === 'object' && typeof process.release === 'object' && typeof process.release.name === 'string' && process.release.name === 'node') ? true : false`
|
55
|
+
self.on_desktop = `(typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.toLowerCase().indexOf(' electron/') > -1) ? true : false`
|
56
|
+
self.on_ios = `(typeof Platform === 'object' && typeof Platform.OS === 'string' && Platform.OS.toLowerCase().includes?('ios')) ? true : false`
|
57
|
+
self.on_android = `(typeof Platform === 'object' && typeof Platform.OS === 'string' && Platform.OS.toLowerCase().includes?('android')) ? true : false`
|
58
|
+
self.on_mobile = self.on_ios? || self.on_android?
|
59
|
+
self.on_database = false
|
60
|
+
self.on_browser = !self.on_ssr? && !self.on_desktop? && !self.on_mobile? && !self.on_database?
|
61
|
+
self.on_server = false
|
62
|
+
else
|
63
|
+
class << self
|
64
|
+
def on_ssr?; false; end
|
65
|
+
def on_desktop?; false; end
|
66
|
+
def on_ios?; false; end
|
67
|
+
def on_android?; false; end
|
68
|
+
def on_mobile?; false; end
|
69
|
+
def on_database?; false; end
|
70
|
+
def on_browser?; false; end
|
71
|
+
|
32
72
|
def on_server?
|
33
|
-
true
|
73
|
+
true # so true ...
|
34
74
|
end
|
35
75
|
end
|
36
76
|
end
|
data/lib/redux/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isomorfeus-redux
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Biedermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opal
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Use a global store and write reducers for it in Opal Ruby.
|
28
42
|
email:
|
29
43
|
- jan@kursator.com
|