ovto 0.4.1 → 0.5.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 +4 -4
- data/.gitignore +1 -1
- data/CHANGELOG.md +5 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +21 -21
- data/README.md +2 -2
- data/book/SUMMARY.md +1 -1
- data/book/api/fetch.md +3 -3
- data/book/api/pure_component.md +27 -0
- data/book/guides/install.md +76 -0
- data/book/guides/tutorial.md +3 -3
- data/book/ovtologo.png +0 -0
- data/docs/api/Ovto.html +18 -18
- data/docs/api/Ovto/Actions.html +1 -1
- data/docs/api/Ovto/App.html +1 -1
- data/docs/api/Ovto/Component.html +18 -10
- data/docs/api/Ovto/Component/MoreThanOneNode.html +1 -1
- data/docs/api/Ovto/PureComponent.html +368 -0
- data/docs/api/Ovto/PureComponent/StateIsNotAvailable.html +124 -0
- data/docs/api/Ovto/Runtime.html +1 -1
- data/docs/api/Ovto/State.html +1 -1
- data/docs/api/Ovto/State/MissingValue.html +1 -1
- data/docs/api/Ovto/State/UnknownKey.html +1 -1
- data/docs/api/Ovto/WiredActions.html +1 -1
- data/docs/api/_index.html +26 -4
- data/docs/api/actions.html +8 -8
- data/docs/api/app.html +8 -8
- data/docs/api/class_list.html +1 -1
- data/docs/api/component.html +8 -8
- data/docs/api/fetch.html +11 -11
- data/docs/api/file.README.html +75 -79
- data/docs/api/index.html +75 -79
- data/docs/api/method_list.html +43 -19
- data/docs/api/pure_component.md +27 -0
- data/docs/api/state.html +8 -8
- data/docs/api/top-level-namespace.html +1 -1
- data/docs/gitbook/gitbook.js +2 -2
- data/docs/gitbook/theme.js +1 -1
- data/docs/guides/debugging.html +8 -8
- data/docs/guides/development.html +8 -8
- data/docs/guides/install.html +426 -0
- data/docs/guides/tutorial.html +74 -65
- data/docs/index.html +10 -16
- data/docs/ovtologo.png +0 -0
- data/docs/search_index.json +1 -1
- data/examples/sinatra/Gemfile.lock +2 -2
- data/examples/static/Gemfile.lock +6 -10
- data/lib/ovto.rb +1 -0
- data/lib/ovto/component.rb +25 -12
- data/lib/ovto/fetch.rb +1 -1
- data/lib/ovto/pure_component.rb +22 -0
- data/lib/ovto/version.rb +1 -1
- data/ovto.gemspec +1 -1
- metadata +21 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4b96687f3ed63679cd1390c78a55ccc070bcd696fae6ea398869deb48ec89e1
|
|
4
|
+
data.tar.gz: 80bc3fb5dd02ddb6f49d7cb30d79189512a6a970dc5a48131819b3f976765cb4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e5111857b2b9072efdf43e006fef98c06eede869d333ec1fa95171d708c6299f7ac2a2aa84aee2e81219e0e8e02be3b2a3039da908796ea0640e2f43b1c2e8d9
|
|
7
|
+
data.tar.gz: d99fbee3030cc11b4b6186f4b61d134fdb7c983a62d4dab37a115c1fe021f41a0ed0f7e7b1081ac00292c893e90bf4f0934bfa27f4eb83551c4fc0127b90e776
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
ovto (0.
|
|
5
|
-
opal (
|
|
4
|
+
ovto (0.5.0)
|
|
5
|
+
opal (>= 0.11, < 2)
|
|
6
6
|
rack (~> 2.0)
|
|
7
7
|
thor (~> 0.20)
|
|
8
8
|
|
|
@@ -10,43 +10,43 @@ GEM
|
|
|
10
10
|
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
12
|
ast (2.4.0)
|
|
13
|
+
c_lexer (2.6.4.1.1)
|
|
14
|
+
ast (~> 2.4.0)
|
|
15
|
+
parser (= 2.6.4.1)
|
|
13
16
|
concurrent-ruby (1.1.5)
|
|
14
|
-
|
|
15
|
-
opal (0.11.4)
|
|
17
|
+
opal (1.0.2)
|
|
16
18
|
ast (>= 2.3.0)
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
opal-rspec (0.7.1)
|
|
21
|
-
opal (>= 0.11, < 0.12)
|
|
19
|
+
parser (~> 2.6)
|
|
20
|
+
opal-rspec (0.8.0.alpha2)
|
|
21
|
+
opal (>= 0.11, < 1.1)
|
|
22
22
|
opal-sprockets
|
|
23
23
|
rake (~> 12.0)
|
|
24
|
-
opal-sprockets (0.4.
|
|
25
|
-
opal (~> 0.
|
|
24
|
+
opal-sprockets (0.4.8.1.0.3.7)
|
|
25
|
+
opal (~> 1.0.0)
|
|
26
26
|
sprockets (~> 3.7)
|
|
27
27
|
tilt (>= 1.4)
|
|
28
|
-
parser (2.
|
|
29
|
-
ast (~> 2.
|
|
30
|
-
rack (2.0.
|
|
31
|
-
rake (12.3.
|
|
32
|
-
sourcemap (0.1.1)
|
|
28
|
+
parser (2.6.4.1)
|
|
29
|
+
ast (~> 2.4.0)
|
|
30
|
+
rack (2.0.8)
|
|
31
|
+
rake (12.3.3)
|
|
33
32
|
sprockets (3.7.2)
|
|
34
33
|
concurrent-ruby (~> 1.0)
|
|
35
34
|
rack (> 1, < 3)
|
|
36
35
|
thor (0.20.3)
|
|
37
|
-
tilt (2.0.
|
|
38
|
-
yard (0.9.
|
|
36
|
+
tilt (2.0.10)
|
|
37
|
+
yard (0.9.20)
|
|
39
38
|
|
|
40
39
|
PLATFORMS
|
|
41
40
|
ruby
|
|
42
41
|
|
|
43
42
|
DEPENDENCIES
|
|
44
|
-
|
|
45
|
-
opal
|
|
43
|
+
c_lexer
|
|
44
|
+
opal (>= 1.0.0)
|
|
45
|
+
opal-rspec (>= 0.8.0.alpha1)
|
|
46
46
|
opal-sprockets
|
|
47
47
|
ovto!
|
|
48
48
|
rake
|
|
49
49
|
yard
|
|
50
50
|
|
|
51
51
|
BUNDLED WITH
|
|
52
|
-
2.0.
|
|
52
|
+
2.0.2
|
data/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Client-side web framework for Opal
|
|
|
6
6
|
|
|
7
7
|
## Documents
|
|
8
8
|
|
|
9
|
-
- [Book](https://yhara.github.io/ovto/)
|
|
9
|
+
- [Book](https://yhara.github.io/ovto/docs/)
|
|
10
10
|
- [yardoc](https://yhara.github.io/ovto/api/)
|
|
11
11
|
|
|
12
12
|
## Example
|
|
@@ -59,7 +59,7 @@ end
|
|
|
59
59
|
MyApp.run(id: 'ovto')
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
See the [book](https://yhara.github.io/ovto/guides/tutorial.html) for details.
|
|
62
|
+
See the [book](https://yhara.github.io/ovto/docs/guides/tutorial.html) for details.
|
|
63
63
|
|
|
64
64
|
## Setup
|
|
65
65
|
|
data/book/SUMMARY.md
CHANGED
data/book/api/fetch.md
CHANGED
|
@@ -9,7 +9,7 @@ Ovto provides wrapper of [Fetch API](https://developer.mozilla.org/en-US/docs/We
|
|
|
9
9
|
GET
|
|
10
10
|
|
|
11
11
|
```rb
|
|
12
|
-
Ovto.fetch('/api/tasks'){|json_data|
|
|
12
|
+
Ovto.fetch('/api/tasks').then{|json_data|
|
|
13
13
|
p json_data
|
|
14
14
|
}.fail{|e| # Network error, 404 Not Found, JSON parse error, etc.
|
|
15
15
|
p e
|
|
@@ -19,7 +19,7 @@ Ovto.fetch('/api/tasks'){|json_data|
|
|
|
19
19
|
POST
|
|
20
20
|
|
|
21
21
|
```rb
|
|
22
|
-
Ovto.fetch('/api/new_task', 'POST', {title: "do something"}){|json_data|
|
|
22
|
+
Ovto.fetch('/api/new_task', 'POST', {title: "do something"}).then{|json_data|
|
|
23
23
|
p json_data
|
|
24
24
|
}.fail{|e| # Network error, 404 Not Found, JSON parse error, etc.
|
|
25
25
|
p e
|
|
@@ -30,7 +30,7 @@ Ovto.fetch('/api/new_task', 'POST', {title: "do something"}){|json_data|
|
|
|
30
30
|
PUT
|
|
31
31
|
|
|
32
32
|
```rb
|
|
33
|
-
Ovto.fetch('/api/tasks/1', 'PUT', {title: "do something"}){|json_data|
|
|
33
|
+
Ovto.fetch('/api/tasks/1', 'PUT', {title: "do something"}).then{|json_data|
|
|
34
34
|
p json_data
|
|
35
35
|
}.fail{|e| # Network error, 404 Not Found, JSON parse error, etc.
|
|
36
36
|
p e
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Ovto::PureComponent
|
|
2
|
+
|
|
3
|
+
It almost the same as `Ovto::Component`, but it caches the `render` method calling with arguments of the method.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Cache strategy
|
|
7
|
+
|
|
8
|
+
It compares `render` method arguments and the previous arguments.
|
|
9
|
+
|
|
10
|
+
```rb
|
|
11
|
+
def render
|
|
12
|
+
o 'div' do
|
|
13
|
+
o Pure, foo: state.foo
|
|
14
|
+
o NotPure bar: state.bar
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
In this case, `NotPure` component's render method is called even if `state.foo` is changed.
|
|
20
|
+
Whereas `Pure` component's render method is called only if `state.foo` is changed.
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## State
|
|
24
|
+
|
|
25
|
+
`state` method is not available in `PureComponent`, because `PureComponent` does not treat state as the cache key.
|
|
26
|
+
If you'd like to use state in `PureComponent`, pass the state from the parent component.
|
|
27
|
+
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Install
|
|
2
|
+
|
|
3
|
+
## Use Ovto with static files
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
$ gem i ovto
|
|
7
|
+
$ ovto new myapp --static
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Use Ovto with Sinatra
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
$ gem i ovto
|
|
14
|
+
$ ovto new myapp --sinatra
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Install Ovto into Rails apps
|
|
18
|
+
|
|
19
|
+
Edit `Gemfile`
|
|
20
|
+
|
|
21
|
+
```rb
|
|
22
|
+
gem 'opal-rails'
|
|
23
|
+
gem 'ovto'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Run `bundle install`
|
|
27
|
+
|
|
28
|
+
Remove `app/assets/javascripts/application.js`
|
|
29
|
+
|
|
30
|
+
Create `app/assets/javascripts/application.js.rb`
|
|
31
|
+
|
|
32
|
+
```rb
|
|
33
|
+
require 'opal'
|
|
34
|
+
require 'rails-ujs'
|
|
35
|
+
require 'activestorage'
|
|
36
|
+
require 'turbolinks'
|
|
37
|
+
require_tree '.'
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Create `app/assets/javascripts/foo.js.rb` (file name is arbitrary)
|
|
41
|
+
|
|
42
|
+
```rb
|
|
43
|
+
require 'ovto'
|
|
44
|
+
|
|
45
|
+
class Foo < Ovto::App
|
|
46
|
+
class State < Ovto::State
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
class Actions < Ovto::Actions
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
class MainComponent < Ovto::Component
|
|
53
|
+
def render(state:)
|
|
54
|
+
o 'h1', "HELLO"
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Edit `app/views/<some controller/<some view>.html.erb`
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
<div id='foo-app'></div>
|
|
64
|
+
<%= opal_tag do %>
|
|
65
|
+
Foo.run(id: 'foo-app')
|
|
66
|
+
<% end %>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This should render `HELLO` in the browser.
|
|
70
|
+
|
|
71
|
+
You also need to edit config/environments/production.rb like this before deploy it to production.
|
|
72
|
+
|
|
73
|
+
```rb
|
|
74
|
+
#config.assets.js_compressor = :uglifier
|
|
75
|
+
config.assets.js_compressor = Uglifier.new(harmony: true)
|
|
76
|
+
```
|
data/book/guides/tutorial.md
CHANGED
|
@@ -5,7 +5,7 @@ but you can embed Ovto apps into a Rails or Sinatra app (See `./examples/*`).
|
|
|
5
5
|
|
|
6
6
|
This is the final Ruby code.
|
|
7
7
|
|
|
8
|
-
```
|
|
8
|
+
```rb
|
|
9
9
|
require 'ovto'
|
|
10
10
|
|
|
11
11
|
class MyApp < Ovto::App
|
|
@@ -62,7 +62,7 @@ Let's take a look step-by-step.
|
|
|
62
62
|
|
|
63
63
|
Make a Gemfile:
|
|
64
64
|
|
|
65
|
-
```
|
|
65
|
+
```rb
|
|
66
66
|
source "https://rubygems.org"
|
|
67
67
|
gem "ovto", github: 'yhara/ovto' # Use git master because ovto gem is not released yet
|
|
68
68
|
gem 'rake'
|
|
@@ -197,7 +197,7 @@ convert.
|
|
|
197
197
|
|
|
198
198
|
Now you can know the value by `state.fahrenheit`. Update `MainComponent` to show the value too.
|
|
199
199
|
|
|
200
|
-
```
|
|
200
|
+
```rb
|
|
201
201
|
class MainComponent < Ovto::Component
|
|
202
202
|
def render
|
|
203
203
|
o 'div' do
|
data/book/ovtologo.png
ADDED
|
Binary file
|
data/docs/api/Ovto.html
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
<dl>
|
|
80
80
|
<dt>Defined in:</dt>
|
|
81
81
|
<dd>lib/ovto.rb<span class="defines">,<br />
|
|
82
|
-
lib/ovto/app.rb,<br /> lib/ovto/fetch.rb,<br /> lib/ovto/state.rb,<br /> lib/ovto/actions.rb,<br /> lib/ovto/runtime.rb,<br /> lib/ovto/version.rb,<br /> lib/ovto/component.rb,<br /> lib/ovto/wired_actions.rb</span>
|
|
82
|
+
lib/ovto/app.rb,<br /> lib/ovto/fetch.rb,<br /> lib/ovto/state.rb,<br /> lib/ovto/actions.rb,<br /> lib/ovto/runtime.rb,<br /> lib/ovto/version.rb,<br /> lib/ovto/component.rb,<br /> lib/ovto/wired_actions.rb,<br /> lib/ovto/pure_component.rb</span>
|
|
83
83
|
</dd>
|
|
84
84
|
</dl>
|
|
85
85
|
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Ovto/Actions.html" title="Ovto::Actions (class)">Actions</a></span>, <span class='object_link'><a href="Ovto/App.html" title="Ovto::App (class)">App</a></span>, <span class='object_link'><a href="Ovto/Component.html" title="Ovto::Component (class)">Component</a></span>, <span class='object_link'><a href="Ovto/Runtime.html" title="Ovto::Runtime (class)">Runtime</a></span>, <span class='object_link'><a href="Ovto/State.html" title="Ovto::State (class)">State</a></span>, <span class='object_link'><a href="Ovto/WiredActions.html" title="Ovto::WiredActions (class)">WiredActions</a></span>
|
|
94
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Ovto/Actions.html" title="Ovto::Actions (class)">Actions</a></span>, <span class='object_link'><a href="Ovto/App.html" title="Ovto::App (class)">App</a></span>, <span class='object_link'><a href="Ovto/Component.html" title="Ovto::Component (class)">Component</a></span>, <span class='object_link'><a href="Ovto/PureComponent.html" title="Ovto::PureComponent (class)">PureComponent</a></span>, <span class='object_link'><a href="Ovto/Runtime.html" title="Ovto::Runtime (class)">Runtime</a></span>, <span class='object_link'><a href="Ovto/State.html" title="Ovto::State (class)">State</a></span>, <span class='object_link'><a href="Ovto/WiredActions.html" title="Ovto::WiredActions (class)">WiredActions</a></span>
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
</p>
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
<dt id="VERSION-constant" class="">VERSION =
|
|
108
108
|
|
|
109
109
|
</dt>
|
|
110
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.4.
|
|
110
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.4.1</span><span class='tstring_end'>'</span></span></pre></dd>
|
|
111
111
|
|
|
112
112
|
</dl>
|
|
113
113
|
|
|
@@ -385,10 +385,10 @@
|
|
|
385
385
|
<pre class="lines">
|
|
386
386
|
|
|
387
387
|
|
|
388
|
-
|
|
388
|
+
20</pre>
|
|
389
389
|
</td>
|
|
390
390
|
<td>
|
|
391
|
-
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line
|
|
391
|
+
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line 20</span>
|
|
392
392
|
|
|
393
393
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_debug_trace'>debug_trace</span><span class='semicolon'>;</span> <span class='ivar'>@debug_trace</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
|
394
394
|
</td>
|
|
@@ -411,10 +411,10 @@
|
|
|
411
411
|
<pre class="lines">
|
|
412
412
|
|
|
413
413
|
|
|
414
|
-
|
|
414
|
+
21</pre>
|
|
415
415
|
</td>
|
|
416
416
|
<td>
|
|
417
|
-
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line
|
|
417
|
+
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line 21</span>
|
|
418
418
|
|
|
419
419
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_debug_trace='>debug_trace=</span><span class='lparen'>(</span><span class='id identifier rubyid_bool'>bool</span><span class='rparen'>)</span><span class='semicolon'>;</span> <span class='ivar'>@debug_trace</span> <span class='op'>=</span> <span class='id identifier rubyid_bool'>bool</span><span class='semicolon'>;</span> <span class='kw'>end</span></pre>
|
|
420
420
|
</td>
|
|
@@ -437,12 +437,12 @@
|
|
|
437
437
|
<pre class="lines">
|
|
438
438
|
|
|
439
439
|
|
|
440
|
-
21
|
|
441
440
|
22
|
|
442
|
-
23
|
|
441
|
+
23
|
|
442
|
+
24</pre>
|
|
443
443
|
</td>
|
|
444
444
|
<td>
|
|
445
|
-
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line
|
|
445
|
+
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line 22</span>
|
|
446
446
|
|
|
447
447
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_debug_trace_log'>debug_trace_log</span><span class='lparen'>(</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span>
|
|
448
448
|
<span class='id identifier rubyid_console'><span class='object_link'><a href="top-level-namespace.html#console-instance_method" title="#console (method)">console</a></span></span><span class='period'>.</span><span class='id identifier rubyid_log'>log</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Ovto: </span><span class='tstring_end'>"</span></span><span class='op'>+</span><span class='id identifier rubyid_msg'>msg</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='ivar'>@debug_trace</span>
|
|
@@ -468,7 +468,7 @@
|
|
|
468
468
|
|
|
469
469
|
<p>Example:</p>
|
|
470
470
|
|
|
471
|
-
<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="" title="Ovto (module)">Ovto</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/api/new_task</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>POST</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>title:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>do something</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_json_data'>json_data</span><span class='op'>|</span>
|
|
471
|
+
<pre class="code ruby"><code class="ruby"><span class='const'><span class='object_link'><a href="" title="Ovto (module)">Ovto</a></span></span><span class='period'>.</span><span class='id identifier rubyid_fetch'>fetch</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/api/new_task</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>POST</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='lbrace'>{</span><span class='label'>title:</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>do something</span><span class='tstring_end'>"</span></span><span class='rbrace'>}</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_then'>then</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_json_data'>json_data</span><span class='op'>|</span>
|
|
472
472
|
<span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_json_data'>json_data</span>
|
|
473
473
|
<span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_fail'>fail</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_e'>e</span><span class='op'>|</span> <span class='comment'># Network error, 404 Not Found, JSON parse error, etc.
|
|
474
474
|
</span> <span class='id identifier rubyid_p'>p</span> <span class='id identifier rubyid_e'>e</span>
|
|
@@ -556,16 +556,16 @@
|
|
|
556
556
|
<pre class="lines">
|
|
557
557
|
|
|
558
558
|
|
|
559
|
-
26
|
|
560
559
|
27
|
|
561
560
|
28
|
|
562
561
|
29
|
|
563
562
|
30
|
|
564
563
|
31
|
|
565
|
-
32
|
|
564
|
+
32
|
|
565
|
+
33</pre>
|
|
566
566
|
</td>
|
|
567
567
|
<td>
|
|
568
|
-
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line
|
|
568
|
+
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line 27</span>
|
|
569
569
|
|
|
570
570
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
|
|
571
571
|
<span class='kw'>if</span> <span class='backtick'>`</span><span class='tstring_content'>obj.$inspect</span><span class='tstring_end'>`</span></span>
|
|
@@ -606,7 +606,6 @@
|
|
|
606
606
|
<pre class="lines">
|
|
607
607
|
|
|
608
608
|
|
|
609
|
-
36
|
|
610
609
|
37
|
|
611
610
|
38
|
|
612
611
|
39
|
|
@@ -627,10 +626,11 @@
|
|
|
627
626
|
54
|
|
628
627
|
55
|
|
629
628
|
56
|
|
630
|
-
57
|
|
629
|
+
57
|
|
630
|
+
58</pre>
|
|
631
631
|
</td>
|
|
632
632
|
<td>
|
|
633
|
-
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line
|
|
633
|
+
<pre class="code"><span class="info file"># File 'lib/ovto.rb', line 37</span>
|
|
634
634
|
|
|
635
635
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_error'>log_error</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
636
636
|
<span class='kw'>return</span> <span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
|
@@ -664,7 +664,7 @@
|
|
|
664
664
|
</div>
|
|
665
665
|
|
|
666
666
|
<div id="footer">
|
|
667
|
-
Generated on
|
|
667
|
+
Generated on Thu Aug 8 01:14:40 2019 by
|
|
668
668
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
669
669
|
0.9.19 (ruby-2.5.5).
|
|
670
670
|
</div>
|
data/docs/api/Ovto/Actions.html
CHANGED
|
@@ -345,7 +345,7 @@
|
|
|
345
345
|
</div>
|
|
346
346
|
|
|
347
347
|
<div id="footer">
|
|
348
|
-
Generated on
|
|
348
|
+
Generated on Thu Aug 8 01:14:40 2019 by
|
|
349
349
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
350
350
|
0.9.19 (ruby-2.5.5).
|
|
351
351
|
</div>
|
data/docs/api/Ovto/App.html
CHANGED
|
@@ -610,7 +610,7 @@
|
|
|
610
610
|
</div>
|
|
611
611
|
|
|
612
612
|
<div id="footer">
|
|
613
|
-
Generated on
|
|
613
|
+
Generated on Thu Aug 8 01:14:40 2019 by
|
|
614
614
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
615
615
|
0.9.19 (ruby-2.5.5).
|
|
616
616
|
</div>
|