reativo 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +68 -0
  3. data/lib/reativo/version.rb +1 -1
  4. metadata +32 -32
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca2acc8095a64327496ebd9251d017cc8e73e19e9912f1eaab1975ff1f0a84c4
4
- data.tar.gz: 6ad098644314730509fddcfdb191e9a175806ef5a281fb018c67a44742546b5e
3
+ metadata.gz: 1f227c6598190f2b89332383cd77833df4b5aff8face94deeeaa95edcf9baded
4
+ data.tar.gz: 45937e6bd5b11b9805326e93f02df5523dfbeb53cb65f2c9415e0cfeeb19a5e2
5
5
  SHA512:
6
- metadata.gz: 9b25b1dce0313894dad8a3f54944e69a42ccb0124c545ef7a0888e54213c90ecddcd2deddcce421eb3fa44c826b6bdc68a8ee6a8c5bbbc1cc76daa5c1c29e56f
7
- data.tar.gz: 9d0a98422bd8da257fa57d257050d7c058e2e63d2ac618cafc3b941cfc32bbd67438bb28a7fa69c5ceea60fbb94ec4fe8d0a4301dcda6753a49cceec13b3b2a4
6
+ metadata.gz: 01ef2c87ef220361f773fe4be8b5ee11816e767a8a998b2a47cbe3cc7c5ee22bb243fd8e80df72594017db9e3ae94875981b57facc634e20bf9c6870a7d7c992
7
+ data.tar.gz: 7d101b2a7cc28be983ccfc06ca9d68647a880a30b392ec6bd04923299b1f584f75ee2dcc944d98c32b620343bdc6f33def809bda6bb8d84180fbbcea9d4fcd7f
data/README.md CHANGED
@@ -42,6 +42,74 @@ def result_model
42
42
  end
43
43
  ```
44
44
 
45
+ ### Snackbar
46
+
47
+ Reativo comes with a Snackbar based on [notistack](https://github.com/iamhosseindhv/notistack), if you'd like to use, create your own Snackbar, based on the library's one, like this:
48
+
49
+ ```js
50
+ import React from 'react';
51
+ import { Snackbar as SnackbarOriginal } from "reativo"
52
+
53
+ function Snackbar({messages}) {
54
+ return <SnackbarOriginal messages={messages} />
55
+ }
56
+
57
+ export default Snackbar
58
+ ```
59
+
60
+ This is needed so the Notistack Context works correctly.
61
+
62
+ ## JS
63
+
64
+ Reativo now bundles with a JS library! (this is my first one, so if you try and it's broken, please, don't blame me hahah)
65
+
66
+ The most complete example would be a form, that uses the `AppContainer`, and the `RailsForm` classes:
67
+
68
+ ```js
69
+ import { hot } from 'react-hot-loader/root'
70
+ import { wrapper, RailsForm } from "reativo"
71
+ import { Form as FinalForm } from 'react-final-form'
72
+ import Form from './Form'
73
+
74
+ function New() {
75
+ return (
76
+ <div style={{ padding: 16, margin: 'auto', maxWidth: 600 }}>
77
+ <RailsForm
78
+ component={FinalForm}
79
+ action='create'
80
+ url='/todos'
81
+ render={(props) => (
82
+ <Form {...props} />
83
+ )}
84
+ />
85
+ </div>
86
+ )
87
+ }
88
+
89
+ export default hot(
90
+ wrapper(New)
91
+ )
92
+ ```
93
+
94
+ And to use a redux store and your own theme, don't forget to do the following on your pack:
95
+
96
+ ```js
97
+ import store from '../src/store' // this is a normal redux store, check
98
+ // https://github.com/fernandes/reativo/blob/master/test/dummy/app/javascript/src/store.js
99
+ // for an example
100
+ window.store = store
101
+ // and keep on window.store, so during page changes (using Turbolinks), we don't loose
102
+ // the state of our store
103
+ // now that we have our own JS library, maybe this can change in the future
104
+
105
+ import theme from '../src/theme' // this is a normal, Material UI theme, check
106
+ // https://github.com/fernandes/reativo/blob/master/test/dummy/app/javascript/src/theme.js
107
+ // for an example
108
+
109
+ import { setTheme } from 'reativo'
110
+ setTheme(theme)
111
+ ```
112
+
45
113
  ## Generator
46
114
 
47
115
  It comes with a generator for Trailblazer, so, yeah!, you can generate the operations, contracts and representers!
@@ -1,3 +1,3 @@
1
1
  module Reativo
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,181 +1,181 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reativo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Celso Fernandes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-26 00:00:00.000000000 Z
11
+ date: 2019-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '5'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: cells-erb
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0.1'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '0.1'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: cells-rails
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0.0'
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
54
  version: '0.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: multi_json
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: react-rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '2'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - "~>"
80
+ - - ">"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: reform-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 0.2.0.rc1
89
+ version: '0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - "~>"
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
- version: 0.2.0.rc1
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: reform
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - "~>"
101
+ - - ">"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '2'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - "~>"
108
+ - - ">"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '2'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: trailblazer-cells
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0.0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: trailblazer-rails
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
129
+ - - ">"
130
130
  - !ruby/object:Gem::Version
131
- version: '2'
131
+ version: '1'
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - "~>"
136
+ - - ">"
137
137
  - !ruby/object:Gem::Version
138
- version: '2'
138
+ version: '1'
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: trailblazer
141
141
  requirement: !ruby/object:Gem::Requirement
142
142
  requirements:
143
- - - "~>"
143
+ - - ">"
144
144
  - !ruby/object:Gem::Version
145
145
  version: '2'
146
146
  type: :runtime
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
149
149
  requirements:
150
- - - "~>"
150
+ - - ">"
151
151
  - !ruby/object:Gem::Version
152
152
  version: '2'
153
153
  - !ruby/object:Gem::Dependency
154
154
  name: turbolinks
155
155
  requirement: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - "~>"
157
+ - - ">"
158
158
  - !ruby/object:Gem::Version
159
159
  version: '5'
160
160
  type: :runtime
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
163
163
  requirements:
164
- - - "~>"
164
+ - - ">"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '5'
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: webpacker
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
- - - "~>"
171
+ - - ">"
172
172
  - !ruby/object:Gem::Version
173
173
  version: '4'
174
174
  type: :runtime
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
- - - "~>"
178
+ - - ">"
179
179
  - !ruby/object:Gem::Version
180
180
  version: '4'
181
181
  - !ruby/object:Gem::Dependency