chapmanchri_quotemachine2 0.3.2 → 0.3.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/chapmanchri_quotemachine2.rb +10 -10
- 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: b726a10a5cb022502840c4a9a9e81180f932457d4807b9d27700809abaae06a0
|
4
|
+
data.tar.gz: 2645ccd58cde1a7650502d9add22de944e5fbad4b0dc7bad1386ee50cf7791e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4371d9c15dc656c08b5655d3cf90e2b9affcef0b4da0384484baf4a85cc9bcb4bc4958dfbb6cfebc5f300dfc05a6c746f3af21dffd2de82ea73f5e4647542807
|
7
|
+
data.tar.gz: f080d8a1c6df3924467c236acaf7536eae4e4049a08661e0cde9b27fe7966dd52f733182107adc48eb265738f1d881b209db69b6791d51a811121b68e179e50a
|
data/Gemfile.lock
CHANGED
@@ -197,10 +197,10 @@ def build_display
|
|
197
197
|
if @phrase.length == 1
|
198
198
|
#the phrase if the first phrase of the stanza
|
199
199
|
if @phrase[0] == 1
|
200
|
-
result_text = "<p>#{show_current_section}</p>" + "<form id='plus_next' action='/plus_next' method='
|
200
|
+
result_text = "<p>#{show_current_section}</p>" + "<form id='plus_next' action='/plus_next' method='get'><button class='form-submit' type='submit'>more...</button></form>"
|
201
201
|
#the phrase is the second phrase of the stanza
|
202
202
|
elsif @phrase[0] == 2
|
203
|
-
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='
|
203
|
+
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='get'><button class='form-submit' type='submit'>more...</button></form></div>#{show_current_section}"
|
204
204
|
end
|
205
205
|
end
|
206
206
|
end
|
@@ -209,11 +209,11 @@ def build_display
|
|
209
209
|
if @poem[@stanza_current].length > 3
|
210
210
|
if @phrase.length == 1
|
211
211
|
if @phrase[0] == 1
|
212
|
-
result_text = "<p>#{show_current_section}</p>" + "<form id='plus_next' action='/plus_next' method='
|
212
|
+
result_text = "<p>#{show_current_section}</p>" + "<form id='plus_next' action='/plus_next' method='get'><button class='form-submit' type='submit'>more...</button></form>"
|
213
213
|
elsif (@phrase[0] >= 2) && @phrase[0] < @poem[@stanza_current].length - 1
|
214
|
-
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='
|
214
|
+
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='get'><button class='form-submit' type='submit'>more...</button></form></div>" + "<p>#{show_current_section}</p>" + "<form id='plus_next' action='/plus_next' method='get'><button class='form-submit' type='submit'>more...</button></form>"
|
215
215
|
elsif @phrase[0] == @poem[@stanza_current].length - 1
|
216
|
-
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='
|
216
|
+
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='get'><button class='form-submit' type='submit'>more...</button></form></div>#{show_current_section}"
|
217
217
|
end
|
218
218
|
end
|
219
219
|
end
|
@@ -223,27 +223,27 @@ def build_display
|
|
223
223
|
if @phrase.length > 1
|
224
224
|
# current_phrase is first in stanza and the second phrase is also displayed
|
225
225
|
if @phrase[0] == 1 && @section_current == 1 && @phrase[1] == 2
|
226
|
-
result_text = "<p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'><form id='minus_next' action='/minus_next' method='
|
226
|
+
result_text = "<p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'><form id='minus_next' action='/minus_next' method='get'><button class='form-submit' type='submit'>less...</button></form></div>"
|
227
227
|
end
|
228
228
|
# current_phrase is the last phrase in the stanza and the previous phrase is also displayed
|
229
229
|
if @phrase.last == @section_current && @phrase[@phrase.length - 2] == (@section_current - 1)
|
230
|
-
result_text = "<div class='minus-button'><form id='minus_previous' action='/minus_previous' method='
|
230
|
+
result_text = "<div class='minus-button'><form id='minus_previous' action='/minus_previous' method='get'><button class='form-submit' type='submit'>less...</button></form></div><p>#{show_previous_section}</p><p>#{show_current_section}</p>"
|
231
231
|
end
|
232
232
|
# there are two phrases in array, current_phrase is not first or last stanza,
|
233
233
|
# and current_phrase > second phrase
|
234
234
|
if @phrase.length == 2 && @section_current != 1 && @section_current != @poem[@stanza_current].length - 1
|
235
|
-
result_text = "<div class='minus-button'><form id='minus_previous' action='/minus_previous' method='
|
235
|
+
result_text = "<div class='minus-button'><form id='minus_previous' action='/minus_previous' method='get'><button class='form-submit' type='submit'>less...</button></form></div><p>#{show_previous_section}</p><p>#{show_current_section}</p><form id='plus_next' action='/plus_next' method='get'><button class='form-submit' type='submit'>more...</button></form>"
|
236
236
|
end
|
237
237
|
# there are two phrases in array, current_phrase is not first or last,
|
238
238
|
# and current_phrase < second phrase
|
239
239
|
if @phrase.length == 2 && @section_current != 1 \
|
240
240
|
&& @section_current != @poem[@stanza_current].length - 1 \
|
241
241
|
&& @phrase.last > @section_current
|
242
|
-
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='
|
242
|
+
result_text = "<div class='plus-minus'><form id='plus_previous' action='/plus_previous' method='get'><button class='form-submit' type='submit'>more...</button></form></div><p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'><form id='minus_next' action='/minus_next' method='get'><button class='form-submit' type='submit'>less...</button></form></div>"
|
243
243
|
end
|
244
244
|
# three phrases in the phrase storage array
|
245
245
|
if @phrase.length == 3
|
246
|
-
result_text = "<div class='minus-button'><form id='minus_previous' action='/minus_previous' method='
|
246
|
+
result_text = "<div class='minus-button'><form id='minus_previous' action='/minus_previous' method='get'><button class='form-submit' type='submit'>less...</button></form></div><p>#{show_previous_section}</p><p>#{show_current_section}</p><p>#{show_next_section}</p><div class='minus-button'><form id='minus_next' action='/minus_next' method='get'><button class='form-submit' type='submit'>less...</button></form></div>"
|
247
247
|
end
|
248
248
|
end
|
249
249
|
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Chapman
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|