chapmanchri_quotemachine2 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/chapmanchri_quotemachine2.rb +5 -5
- data/lib/chapmanchri_quotemachine2/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1afbf72d19f9f6cd734843a83f0e46a79d7ce46f76a8525604c9bea9203a5f61
|
4
|
+
data.tar.gz: c02baa0e6210850fbc85c16154891204cedbc469b48a2ae83505e975089c2f5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8f756f1f9e3bf9ac72aac269ee1daa6bfe99faf2e0c4e384b6f31e0918277ec5437741ee6d6ee576486ca4afa003bf913d0c54e9dcf64458795fde4c012f05c
|
7
|
+
data.tar.gz: 27d93168d14360801959ccd293b29dbb328573ab20ca9a99aa45056582576449a5722492f81d2144b3e29a4f37a23f8ed07ee9e7cb62f56bd6f5b8c3c2ad38bf
|
data/Gemfile.lock
CHANGED
@@ -215,27 +215,27 @@ def build_display
|
|
215
215
|
if @phrase.length > 1
|
216
216
|
# current_phrase is first in stanza and the second pharse is also displayed
|
217
217
|
if @phrase[0] == 1 && @section_current == 1 && @phrase[1] == 2
|
218
|
-
result_text = show_current_section
|
218
|
+
result_text = "<p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'>-</div>"
|
219
219
|
end
|
220
220
|
# current_phrase is the last phrase in the stanza and the previous phrase is also displayed
|
221
221
|
if @phrase.last == @section_current && @phrase[@phrase.length - 2] == (@section_current - 1)
|
222
|
-
result_text = "<div class='minus-button'>-</div>#{show_previous_section}
|
222
|
+
result_text = "<div class='minus-button'>-</div><p>#{show_previous_section}</p><p>#{show_current_section}</p>"
|
223
223
|
end
|
224
224
|
# there are two phrases in array, current_phrase is not first or last stanza,
|
225
225
|
# and current_phrase > second phrase
|
226
226
|
if @phrase.length == 2 && @section_current != 1 && @section_current != @poem[@stanza_current].length - 1
|
227
|
-
result_text = "<div class='minus-button'>-</div>#{show_previous_section}
|
227
|
+
result_text = "<div class='minus-button'>-</div><p>#{show_previous_section}</p><p>#{show_current_section}</p><form id='plus_next' action='/plus_next' method='post'><button class='form-submit' type='submit'>+</button></form>"
|
228
228
|
end
|
229
229
|
# there are two phrases in array, current_phrase is not first or last,
|
230
230
|
# and current_phrase < second phrase
|
231
231
|
if @phrase.length == 2 && @section_current != 1 \
|
232
232
|
&& @section_current != @poem[@stanza_current].length - 1 \
|
233
233
|
&& @phrase.last > @section_current
|
234
|
-
result_text = "<div class='plus-button'>+</div>#{show_current_section}
|
234
|
+
result_text = "<div class='plus-button'>+</div><p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'>-</div>"
|
235
235
|
end
|
236
236
|
# three phrases in the phrase storage array
|
237
237
|
if @phrase.length == 3
|
238
|
-
result_text = "<div class='minus-button'>+</div>#{show_previous_section}
|
238
|
+
result_text = "<div class='minus-button'>+</div><p>#{show_previous_section}</p><p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'>-</div>"
|
239
239
|
end
|
240
240
|
end
|
241
241
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chapmanchri_quotemachine2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Chapman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|