madlibber 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84e2d914e3522e7ce8d1709efe8eb2d1233ca50d
4
- data.tar.gz: 1ebea58664957f3681f4ab5a2e8bffd4032016af
3
+ metadata.gz: 9011d53decdc221949e1d652ff9b96e1bebe671c
4
+ data.tar.gz: e60e326318f5e3af2cf1beb41c5da930103b19a9
5
5
  SHA512:
6
- metadata.gz: 32dea54037f33a16ceabfe472270aa94f4977a9b3c45d7f7ffa06ba0ead858186bbe93a93ed87ae0e1d784fcc40851ef8adb4647d0d8d97d74e31b7e5105d5a2
7
- data.tar.gz: 4dd53337a64c130dcc2318680f1ced56b05a8f31ba8a408adb2c14f613e7006f4c019ebeff5106ad0337ae7a680aab266a753dda908c34df8b0239dd5937c8a2
6
+ metadata.gz: 39f1027b46d663b0e53360c70924eefed3ab638bd85638f0a00a6c4be68f4d34790e387bdc9b41fcad05f0e5f2c968657166cf2647a747fb11a1e6d8eaacaa8e
7
+ data.tar.gz: 8bf071adc5cd82f23a4de8615c0bf6ac933feb267c7aa7f8af42e2232f2d2c328698e5ba3424ba86a0710e956532973a75e7cdfcae2669af306ef000ff44be4b
data/README.md CHANGED
@@ -47,7 +47,13 @@ love our dogs , good food , <noun> , and post-it notes ! <plural_noun>
47
47
  of post-it notes !
48
48
  ```
49
49
 
50
- By default, it generates a Mad Lib with 10 fillable fields if 10 fillable fields are available. The following example illustrates how you could specify how many fillable fields that you would like:
50
+ ###OPTIONS
51
+ ```
52
+ num_of_blanks (defaults to 10)
53
+ html_form (defaults to false)
54
+ ```
55
+
56
+ The following example illustrates how you could specify how many fillable fields that you would like and that you want response as an HTML form:
51
57
 
52
58
  ```ruby
53
59
  require 'madlibber'
@@ -63,20 +69,30 @@ text = "At Indiegogo you’ll find a welcoming, supportive community
63
69
  work. We love our dogs, good food, coffee, and post-it notes!
64
70
  Lots of post-it notes!"
65
71
 
66
- MadLibber.libberfy text, { num_of_blanks: 15 }
72
+ MadLibber.libberfy text, { num_of_blanks: 15, html_form: 1 }
67
73
  ```
68
74
  EXAMPLE OUTPUT:
69
75
  ```
70
- At Indiegogo you'll <verb> a welcoming , supportive community that
71
- embraces collaboration , fearlessness and <noun> . We are a
72
- <adverb> growing organization and our platform is used by people
73
- all over the <noun> to <verb> <noun> for their <adjective> ,
74
- <adjective> , or entrepreneurial ideas . Our <plural_noun> are
75
- passionate about their funding campaigns , and <adverb> are we !
76
- We are a team of passionate , <adjective> , <noun> who are lucky
77
- enough to be able to call helping people achieve their dream work .
78
- We love our dogs , good food , <noun> , and post-it <plural_noun> !
79
- Lots of post-it <plural_noun> !
76
+ <form id='madlib-form'>
77
+ At Indiegogo you'll <input type='text' placeholder=''verb> a
78
+ welcoming , supportive community that embraces collaboration ,
79
+ fearlessness and <input type='text' placeholder='noun'> . We are a
80
+ <input type='text' placeholder='adverb'> growing organization and
81
+ our platform is used by people all over the <input type='text'
82
+ placeholder='noun'> to <input type='text' placeholder='verb'>
83
+ <input type='text' placeholder='noun'> for their <input type='text'
84
+ placeholder='adjective'> , <input type='text' placeholder='adjective'> ,
85
+ or entrepreneurial ideas . Our <input type='text'
86
+ placeholder='plural_noun'> are passionate about their funding
87
+ campaigns , and <input type='text' placeholder='adverb'> are we !
88
+ We are a team of passionate , <input type='text'
89
+ placeholder='adjective'> , <input type='text' placeholder='noun'> who
90
+ are lucky enough to be able to call helping people achieve their dream
91
+ work . We love our dogs , good food , <input type='text'
92
+ placeholder='noun'> , and post-it <input type='text'
93
+ placeholder='plural_noun'> ! Lots of post-it <input type='text'
94
+ placeholder='plural_noun'> !
95
+ </form>
80
96
  ```
81
97
 
82
98
  ## Available fillable fields
data/lib/madlibber.rb CHANGED
@@ -22,15 +22,15 @@ module MadLibber
22
22
  }
23
23
 
24
24
  TAGS_HTML = {
25
- "NN" => "<input type='text' placeholder='noun'>",
26
- "NNS" => "<input type='text' placeholder='plural_noun'>",
27
- "NNP" => "<input type='text' placeholder='proper_noun'>",
28
- "VB" => "<input type='text' placeholder='verb'>",
29
- "VBD" => "<input type='text' placeholder='verb_past_tense'>",
30
- "VBG" => "<input type='text' placeholder='verb_ending_with_ing'>",
31
- "JJ" => "<input type='text' placeholder='adjective'>",
32
- "RB" => "<input type='text' placeholder='adverb'>",
33
- "UH" => "<input type='text' placeholder='interjection'>"
25
+ "NN" => "<input type='text' placeholder='noun' required>",
26
+ "NNS" => "<input type='text' placeholder='plural_noun' required>",
27
+ "NNP" => "<input type='text' placeholder='proper_noun' required>",
28
+ "VB" => "<input type='text' placeholder='verb' required>",
29
+ "VBD" => "<input type='text' placeholder='verb_past_tense' required>",
30
+ "VBG" => "<input type='text' placeholder='verb_ending_with_ing' required>",
31
+ "JJ" => "<input type='text' placeholder='adjective' required>",
32
+ "RB" => "<input type='text' placeholder='adverb' required>",
33
+ "UH" => "<input type='text' placeholder='interjection' required>"
34
34
  }
35
35
 
36
36
  def libberfy text, options = OPTIONS
@@ -1,3 +1,3 @@
1
1
  module Madlibber
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: madlibber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Samskies