faker 1.9.4 → 1.9.5

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
  SHA256:
3
- metadata.gz: 4adc28503a1bd209dcf7c7bfea5794149f0b92bdb0869f67a920ce33fa96ce2a
4
- data.tar.gz: 3698e9ce24f8625591c49fd3e032f8768c8396c40d501a9a73ab70d5e3ec506e
3
+ metadata.gz: 164843e83c11118f4e9f7dff6d016f935dc17e0357b3e3eebd6154807d55080c
4
+ data.tar.gz: ab020d7e718c7296243261fc80ef23cd68f45b75bd25ebcf49d71f7762ff1f0f
5
5
  SHA512:
6
- metadata.gz: 36b7c6bce97ad335d681fb7cf509229f2dddb68fd0cf65ea0ecb5531babf049da3094f8a968b43b36ed88079811dca637fe1ee092796991e3abab57fe8d9e7e0
7
- data.tar.gz: 7792629c3ceff4a0c7d1e0efb38beb0c0a58ed6cd7ad3ddb5b7869c434dac72dede781400e768006a2db3d3f02fd67c7cc35c376069856839bf2b3f8128e4d6e
6
+ metadata.gz: cfa60132f324e695e61f0c407dcc889434bfc34c4650dd0f641a0cce915e342976bcc4d72572cc202f561df1c0c39ffff3f767d938654d2e5a18f96e81b56002
7
+ data.tar.gz: ee0a3fad7541ee50e6ca3bbb46c7190a5f60ace40f140bac63170ce676a82f408fc73b81f1034041921bfa28cc7ae75126cacecbb37dd926dac8b37cbd8f08d9
data/README.md CHANGED
@@ -20,7 +20,6 @@ development.
20
20
  - [NOTE](#note)
21
21
  - [Installing](#installing)
22
22
  - [Usage](#usage)
23
- - [CLI](#cli)
24
23
  - [Ensuring unique values](#ensuring-unique-values)
25
24
  - [Deterministic Random](#deterministic-random)
26
25
  - [Generators](#generators)
@@ -67,14 +66,6 @@ Faker::Name.name #=> "Christophe Bartell"
67
66
  Faker::Internet.email #=> "kirsten.greenholt@corkeryfisher.info"
68
67
  ```
69
68
 
70
- ### CLI
71
-
72
- Usage Instructions [available here](https://github.com/stympy/faker/blob/master/lib/cli/README.md)
73
-
74
- ```bash
75
- $ faker
76
- ```
77
-
78
69
  ### Ensuring unique values
79
70
  Prefix your method call with `unique`. For example:
80
71
  ```ruby
data/bin/faker CHANGED
@@ -3,17 +3,3 @@
3
3
 
4
4
  lib_path = File.expand_path('../lib', __dir__)
5
5
  $LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
6
-
7
- require 'cli'
8
-
9
- Signal.trap('INT') do
10
- warn("\n#{caller.join("\n")}: interrupted")
11
- exit(1)
12
- end
13
-
14
- begin
15
- Faker::CLI::Base.start
16
- rescue Faker::CLI::Base::Error => err
17
- puts "ERROR: #{err.message}"
18
- exit 1
19
- end
@@ -3,6 +3,15 @@
3
3
  module Faker
4
4
  class File < Base
5
5
  class << self
6
+ def dir(segment_count = 3, root = nil, directory_separator = '/')
7
+ Array
8
+ .new(segment_count) { Faker::Internet.slug }
9
+ .unshift(root)
10
+ .compact
11
+ .join(directory_separator)
12
+ .squeeze(directory_separator)
13
+ end
14
+
6
15
  def extension
7
16
  fetch('file.extension')
8
17
  end
@@ -12,7 +21,7 @@ module Faker
12
21
  end
13
22
 
14
23
  def file_name(dir = nil, name = nil, ext = nil, directory_separator = '/')
15
- dir ||= Faker::Internet.slug
24
+ dir ||= dir(1)
16
25
  name ||= Faker::Lorem.word.downcase
17
26
  ext ||= extension
18
27
 
@@ -3,6 +3,8 @@
3
3
  module Faker
4
4
  class Number < Base
5
5
  class << self
6
+ extend Gem::Deprecate
7
+
6
8
  def number(digits = 10)
7
9
  num = ''
8
10
 
@@ -92,6 +94,9 @@ module Faker
92
94
  number * -1
93
95
  end
94
96
  end
97
+
98
+ deprecate :decimal_part, nil, 2019, 06
99
+ deprecate :leading_zero_number, nil, 2019, 06
95
100
  end
96
101
  end
97
102
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Faker #:nodoc:
4
- VERSION = '1.9.4'
4
+ VERSION = '1.9.5'
5
5
  end
@@ -2,7 +2,7 @@ en:
2
2
  faker:
3
3
  verbs:
4
4
  base: ["abash", "abate", "abide", "absorb", "accept", "accompany", "ache", "achieve", "acquire", "act", "add", "address", "adjust", "admire", "admit", "advise", "afford", "agree", "alight", "allow", "animate", "announce", "answer", "apologize", "appear", "applaud", "apply", "approach", "approve", "argue", "arise", "arrange", "arrest", "ask", "assert", "assort", "astonish", "attack", "attend", "attract", "audit", "avoid", "awake", "bang", "banish", "bash", "bat", "be", "bear", "bear", "beat", "beautify", "become", "befall", "beg", "begin", "behave", "behold", "believe", "belong", "bend", "bereave", "beseech", "bet", "betray", "bid", "bid", "bind", "bite", "bleed", "bless", "blossom", "blow", "blur", "blush", "board", "boast", "boil", "bow", "box", "bray", "break", "breathe", "breed", "bring", "broadcast", "brush", "build", "burn", "burst", "bury", "bust", "buy", "buzz", "calculate", "call", "canvass", "capture", "caress", "carry", "carve", "cash", "cast", "catch", "cause", "cease", "celebrate", "challenge", "change", "charge", "chase", "chat", "check", "cheer", "chew", "chide", "chip", "choke", "choose", "classify", "clean", "cleave", "click", "climb", "cling", "close", "clothe", "clutch", "collapse", "collect", "colour", "come", "comment", "compare", "compel", "compete", "complain", "complete", "conclude", "conduct", "confess", "confine", "confiscate", "confuse", "congratulate", "connect", "connote", "conquer", "consecrate", "consent", "conserve", "consider", "consign", "consist", "console", "consort", "conspire", "constitute", "constrain", "construct", "construe", "consult", "contain", "contemn", "contend", "contest", "continue", "contract", "contradict", "contrast", "contribute", "contrive", "control", "convene", "converge", "converse", "convert", "convey", "convict", "convince", "coo", "cook", "cool", "co-operate", "cope", "copy", "correct", "correspond", "corrode", "corrupt", "cost", "cough", "counsel", "count", "course", "cover", "cower", "crack", "crackle", "crash", "crave", "create", "creep", "crib", "cross", "crowd", "crush", "cry", "curb", "cure", "curve", "cut", "cycle", "damage", "damp", "dance", "dare", "dash", "dazzle", "deal", "decay", "decide", "declare", "decorate", "decrease", "dedicate", "delay", "delete", "deny", "depend", "deprive", "derive", "describe", "desire", "destroy", "detach", "detect", "determine", "develop", "die", "differ", "dig", "digest", "dim", "diminish", "dine", "dip", "direct", "disappear", "discover", "discuss", "disobey", "display", "dispose", "distribute", "disturb", "disuse", "dive", "divide", "do", "donate", "download", "drag", "draw", "dream", "dress", "drill", "drink", "drive", "drop", "dry", "dump", "dwell", "dye", "earn", "eat", "educate", "empower", "empty", "encircle", "encourage", "encroach", "endanger", "endorse", "endure", "engrave", "enjoy", "enlarge", "enlighten", "enter", "envy", "erase", "escape", "evaporate", "exchange", "exclaim", "exclude", "exist", "expand", "expect", "explain", "explore", "express", "extend", "eye", "face", "fail", "faint", "fall", "fan", "fancy", "favour", "fax", "feed", "feel", "ferry", "fetch", "fight", "fill", "find", "finish", "fish", "fit", "fix", "fizz", "flap", "flash", "flee", "fling", "float", "flop", "fly", "fold", "follow", "forbid", "force", "forecast", "foretell", "forget", "forgive", "forlese", "form", "forsake", "found", "frame", "free", "freeze", "frighten", "fry", "fulfil", "gag", "gain", "gainsay", "gash", "gaze", "get", "give", "glance", "glitter", "glow", "go", "google", "govern", "grab", "grade", "grant", "greet", "grind", "grip", "grow", "guard", "guess", "guide", "handle", "hang", "happen", "harm", "hatch", "hate", "have", "heal", "hear", "heave", "help", "hew", "hide", "hinder", "hiss", "hit", "hoax", "hold", "hop", "hope", "horrify", "hug", "hum", "humiliate", "hunt", "hurl", "hurry", "hurt", "hush", "hustle", "hypnotize", "idealize", "identify", "idolize", "ignite", "ignore", "ill-treat", "illuminate", "illumine", "illustrate", "imagine", "imbibe", "imitate", "immerse", "immolate", "immure", "impair", "impart", "impeach", "impede", "impel", "impend", "imperil", "impinge", "implant", "implicate", "implode", "implore", "imply", "import", "impose", "impress", "imprint", "imprison", "improve", "inaugurate", "incise", "include", "increase", "inculcate", "indent", "indicate", "induce", "indulge", "infect", "infest", "inflame", "inflate", "inflect", "inform", "infringe", "infuse", "ingest", "inhabit", "inhale", "inherit", "initiate", "inject", "injure", "inlay", "innovate", "input", "inquire", "inscribe", "insert", "inspect", "inspire", "install", "insult", "insure", "integrate", "introduce", "invent", "invite", "join", "jump", "justify", "keep", "kick", "kid", "kill", "kiss", "kneel", "knit", "knock", "know", "lade", "land", "last", "latch", "laugh", "lay", "lead", "leak", "lean", "leap", "learn", "leave", "leer", "lend", "let", "lick", "lie", "lie", "lift", "light", "like", "limp", "listen", "live", "look", "lose", "love", "magnify", "maintain", "make", "manage", "march", "mark", "marry", "mash", "match", "matter", "mean", "measure", "meet", "melt", "merge", "mew", "migrate", "milk", "mind", "mislead", "miss", "mistake", "misuse", "mix", "moan", "modify", "moo", "motivate", "mould", "moult", "move", "mow", "multiply", "murmur", "nail", "nap", "need", "neglect", "nip", "nod", "note", "notice", "notify", "nourish", "nurse", "obey", "oblige", "observe", "obstruct", "obtain", "occupy", "occur", "offer", "offset", "omit", "ooze", "open", "operate", "opine", "oppress", "opt", "optimize", "order", "organize", "originate", "output", "overflow", "overtake", "owe", "own", "pacify", "paint", "pardon", "part", "partake", "participate", "pass", "paste", "pat", "patch", "pause", "pay", "peep", "perish", "permit", "persuade", "phone", "place", "plan", "play", "plead", "please", "plod", "plot", "pluck", "ply", "point", "polish", "pollute", "ponder", "pour", "pout", "practise", "praise", "pray", "preach", "prefer", "prepare", "prescribe", "present", "preserve", "preset", "preside", "press", "pretend", "prevent", "print", "proceed", "produce", "progress", "prohibit", "promise", "propose", "prosecute", "protect", "prove", "provide", "pull", "punish", "purify", "push", "put", "qualify", "quarrel", "question", "quit", "race", "rain", "rattle", "reach", "read", "realize", "rebuild", "recall", "recast", "receive", "recite", "recognize", "recollect", "recur", "redo", "reduce", "refer", "reflect", "refuse", "regard", "regret", "relate", "relax", "rely", "remain", "remake", "remove", "rend", "renew", "renounce", "repair", "repeat", "replace", "reply", "report", "request", "resell", "resemble", "reset", "resist", "resolve", "respect", "rest", "restrain", "retain", "retch", "retire", "return", "reuse", "review", "rewind", "rid", "ride", "ring", "rise", "roar", "rob", "roll", "rot", "rub", "rule", "run", "rush", "sabotage", "sack", "sacrifice", "sadden", "saddle", "sag", "sail", "sally", "salute", "salvage", "salve", "sample", "sanctify", "sanction", "sap", "saponify", "sash", "sashay", "sass", "sate", "satiate", "satirise", "satisfy", "saturate", "saunter", "save", "savor", "savvy", "saw", "say", "scab", "scabble", "scald", "scale", "scam", "scan", "scant", "scar", "scare", "scarify", "scarp", "scat", "scatter", "scold", "scorch", "scowl", "scrawl", "scream", "screw", "scrub", "search", "seat", "secure", "see", "seek", "seem", "seize", "select", "sell", "send", "sentence", "separate", "set", "sever", "sew", "shake", "shape", "share", "shatter", "shave", "shear", "shed", "shine", "shirk", "shit", "shiver", "shock", "shoe", "shoot", "shorten", "shout", "show", "shrink", "shun", "shut", "sight", "signal", "signify", "sing", "sink", "sip", "sit", "ski", "skid", "slam", "slay", "sleep", "slide", "slim", "sling", "slink", "slip", "slit", "smash", "smell", "smile", "smite", "smooth", "smother", "snap", "snatch", "sneak", "sneeze", "sniff", "soar", "sob", "solicit", "solve", "soothe", "sort", "sow", "sparkle", "speak", "speed", "spell", "spend", "spill", "spin", "spit", "split", "spoil", "spray", "spread", "spring", "sprout", "squeeze", "stand", "stare", "start", "state", "stay", "steal", "steep", "stem", "step", "sterilize", "stick", "stimulate", "sting", "stink", "stir", "stitch", "stoop", "stop", "store", "strain", "stray", "stress", "stretch", "strew", "stride", "strike", "string", "strive", "study", "submit", "subscribe", "subtract", "succeed", "suck", "suffer", "suggest", "summon", "supply", "support", "suppose", "surge", "surmise", "surpass", "surround", "survey", "survive", "swallow", "sway", "swear", "sweat", "sweep", "swell", "swim", "swing", "swot", "take", "talk", "tap", "taste", "tax", "teach", "tear", "tee", "tell", "tempt", "tend", "terminate", "terrify", "test", "thank", "think", "thrive", "throw", "thrust", "thump", "tie", "tire", "toss", "touch", "train", "trample", "transfer", "transform", "translate", "trap", "travel", "tread", "treasure", "treat", "tree", "tremble", "triumph", "trust", "try", "turn", "type", "typeset", "understand", "undo", "uproot", "upset", "urge", "use", "utter", "value", "vanish", "vary", "verify", "vex", "vie", "view", "violate", "vomit", "wake", "walk", "wander", "want", "warn", "waste", "watch", "water", "wave", "wax", "waylay", "wear", "weave", "wed", "weep", "weigh", "welcome", "wend", "wet", "whip", "whisper", "win", "wind", "wish", "withdraw", "work", "worry", "worship", "wring", "write", "yawn", "yell", "yield", "zinc", "zoom"]
5
- past: ["abashed", "abated", "abode", "absorbed", "accepted", "accompanied", "ached", "achieved", "acquired", "acted", "added", "addressed", "adjusted", "admired", "admitted", "advised", "afforded", "agreed", "alit", "allowed", "animated", "announced", "answered", "apologized", "appeared", "applauded", "applied", "approached", "approved", "argued", "arose", "arranged", "arrested", "asked", "asserted", "assorted", "astonished", "attacked", "attended", "attracted", "audited", "avoided", "awoke", "banged", "banished", "bashed", "batted", "was", "bore", "bore", "beat", "beautified", "became", "befell", "begged", "began", "behaved", "beheld", "believed", "belonged", "bent", "bereft", "besought", "bet", "betrayed", "bade", "bid", "bound", "bit", "bled", "blessed", "blossomed", "blew", "blurred", "blushed", "boarded", "boasted", "boiled", "bowed", "boxed", "brayed", "broke", "breathed", "bred", "brought", "broadcast", "brushed", "built", "burnt", "burst", "buried", "bust", "bought", "buzzed", "calculated", "called", "canvassed", "captured", "caressed", "carried", "carved", "cashed", "cast", "caught", "caused", "ceased", "celebrated", "challenged", "changed", "charged", "chased", "chatted", "checked", "cheered", "chewed", "chid", "chipped", "choked", "chose", "classified", "cleaned", "clove/cleft", "clicked", "climbed", "clung", "closed", "clad", "clutched", "collapsed", "collected", "coloured", "came", "commented", "compared", "compelled", "competed", "complained", "completed", "concluded", "conducted", "confessed", "confined", "confiscated", "confused", "congratulated", "connected", "connoted", "conquered", "consecrated", "consented", "conserved", "considered", "consigned", "consisted", "consoled", "consorted", "conspired", "constituted", "constrained", "constructed", "construed", "consulted", "contained", "contemned", "contended", "contested", "continued", "contracted", "contradicted", "contrasted", "contributed", "contrived", "controlled", "convened", "converged", "conversed", "converted", "conveyed", "convicted", "convinced", "cooed", "cooked", "cooled", "co-operated", "coped", "copied", "corrected", "corresponded", "corroded", "corrupted", "cost", "coughed", "counselled", "counted", "coursed", "covered", "cowered", "cracked", "crackled", "crashed", "craved", "created", "crept", "cribbed", "crossed", "crowded", "crushed", "cried", "curbed", "cured", "curved", "cut", "cycled", "damaged", "damped", "danced", "dared", "dashed", "dazzled", "dealt", "decayed", "decided", "declared", "decorated", "decreased", "dedicated", "delayed", "deleted", "denied", "depended", "deprived", "derived", "described", "desired", "destroyed", "detached", "detected", "determined", "developed", "died", "differed", "dug", "digested", "dimmed", "diminished", "dined", "dipped", "directed", "disappeared", "discovered", "discussed", "disobeyed", "displayed", "disposed", "distributed", "disturbed", "disused", "dived", "divided", "did", "donated", "downloaded", "dragged", "drew", "dreamt", "dressed", "drilled", "drank", "drove", "dropped", "dried", "dumped", "dwelt", "dyed", "earned", "ate", "educated", "empowered", "emptied", "encircled", "encouraged", "encroached", "endangered", "endorsed", "endured", "engraved", "enjoyed", "enlarged", "enlightened", "entered", "envied", "erased", "escaped", "evaporated", "exchanged", "exclaimed", "excluded", "existed", "expanded", "expected", "explained", "explored", "expressed", "extended", "eyed", "faced", "failed", "fainted", "fell", "fanned", "fancied", "favoured", "faxed", "fed", "felt", "ferried", "fetched", "fought", "filled", "found", "finished", "fished", "fit/fitted", "fixed", "fizzed", "flapped", "flashed", "fled", "flung", "floated", "flopped", "flew", "folded", "followed", "forbade", "forced", "forecast", "foretold", "forgot", "forgave", "forlore", "formed", "forsook", "founded", "framed", "freed", "froze", "frightened", "fried", "fulfilled", "gagged", "gained", "gainsaid", "gashed", "gazed", "got", "gave", "glanced", "glittered", "glowed", "went", "googled", "governed", "grabbed", "graded", "granted", "greeted", "ground", "gripped", "grew", "guarded", "guessed", "guided", "handled", "hung", "happened", "harmed", "hatched", "hated", "had", "healed", "heard", "hove", "helped", "hewed", "hid", "hindered", "hissed", "hit", "hoaxed", "held", "hopped", "hoped", "horrified", "hugged", "hummed", "humiliated", "hunted", "hurled", "hurried", "hurt", "hushed", "hustled", "hypnotized", "idealized", "identified", "idolized", "ignited", "ignored", "ill-treated", "illuminated", "illumined", "illustrated", "imagined", "imbibed", "imitated", "immersed", "immolated", "immured", "impaired", "imparted", "impeached", "impeded", "impelled", "impended", "imperilled", "impinged", "implanted", "implicated", "imploded", "implored", "implied", "imported", "imposed", "impressed", "imprinted", "imprisoned", "improved", "inaugurated", "incised", "included", "increased", "inculcated", "indented", "indicated", "induced", "indulged", "infected", "infested", "inflamed", "inflated", "inflected", "informed", "infringed", "infused", "ingested", "inhabited", "inhaled", "inherited", "initiated", "injected", "injured", "inlaid", "innovated", "input", "inquired", "inscribed", "inserted", "inspected", "inspired", "installed", "insulted", "insured", "integrated", "introduced", "invented", "invited", "joined", "jumped", "justified", "kept", "kicked", "kidded", "killed", "kissed", "knelt", "knit", "knocked", "knew", "laded", "landed", "lasted", "latched", "laughed", "laid", "led", "leaked", "leant", "leapt", "learnt", "left", "leered", "lent", "let", "licked", "lay", "lied", "lifted", "lit", "liked", "limped", "listened", "lived", "looked", "lost", "loved", "magnified", "maintained", "made", "managed", "marched", "marked", "married", "mashed", "matched", "mattered", "meant", "measured", "met", "melted", "merged", "mewed", "migrated", "milked", "minded", "misled", "missed", "mistook", "misused", "mixed", "moaned", "modified", "mooed", "motivated", "moulded", "moulted", "moved", "mowed", "multiplied", "murmured", "nailed", "napped", "needed", "neglected", "nipped", "nodded", "noted", "noticed", "notified", "nourished", "nursed", "obeyed", "obliged", "observed", "obstructed", "obtained", "occupied", "occurred", "offered", "offset", "omitted", "oozed", "opened", "operated", "opined", "oppressed", "opted", "optimized", "ordered", "organized", "originated", "output", "overflowed", "overtook", "owed", "owned", "pacified", "painted", "pardoned", "parted", "partook", "participated", "passed", "pasted", "patted", "patched", "paused", "paid", "peeped", "perished", "permitted", "persuaded", "phoned", "placed", "planned", "played", "pled", "pleased", "plodded", "plotted", "plucked", "plied", "pointed", "polished", "polluted", "pondered", "poured", "pouted", "practised", "praised", "prayed", "preached", "preferred", "prepared", "prescribed", "presented", "preserved", "preset", "presided", "pressed", "pretended", "prevented", "printed", "proceeded", "produced", "progressed", "prohibited", "promised", "proposed", "prosecuted", "protected", "proved", "provided", "pulled", "punished", "purified", "pushed", "put", "qualified", "quarrelled", "questioned", "quit", "raced", "rained", "rattled", "reached", "read", "realized", "rebuilt", "recalled", "recast", "received", "recited", "recognized", "recollected", "recurred", "redid", "reduced", "referred", "reflected", "refused", "regarded", "regretted", "related", "relaxed", "relied", "remained", "remade", "removed", "rent", "renewed", "renounced", "repaired", "repeated", "replaced", "replied", "reported", "requested", "resold", "resembled", "reset", "resisted", "resolved", "respected", "rested", "restrained", "retained", "retched", "retired", "returned", "reused", "reviewed", "rewound", "rid", "rode", "rang", "rose", "roared", "robbed", "rolled", "rotted", "rubbed", "ruled", "ran", "rushed", "sabotaged", "sacked", "sacrificed", "saddened", "saddled", "sagged", "sailed", "sallied", "saluted", "salvaged", "salved", "sampled", "sanctified", "sanctioned", "sapped", "saponified", "sashed", "sashayed", "sassed", "sated", "satiated", "satirised", "satisfied", "saturated", "sauntered", "saved", "savored", "savvied", "sawed", "said", "scabbed", "scabbled", "scalded", "scaled", "scammed", "scanned", "scanted", "scarred", "scared", "scarified", "scarped", "scatted", "scattered", "scolded", "scorched", "scowled", "scrawled", "screamed", "screwed", "scrubbed", "searched", "seated", "secured", "saw", "sought", "seemed", "seized", "selected", "sold", "sent", "sentenced", "separated", "set", "severed", "sewed", "shook", "shaped", "shared", "shattered", "shove", "shore", "shed", "shone", "shirked", "shit", "shivered", "shocked", "shod", "shot", "shortened", "shouted", "showed", "shrank", "shunned", "shut", "sighted", "signalled", "signified", "sang", "sank", "sipped", "sat", "skied", "skidded", "slammed", "slew", "slept", "slid", "slimmed", "slung", "slunk", "slipped", "slit", "smashed", "smelt", "smiled", "smote", "smoothed", "smothered", "snapped", "snatched", "snuck", "sneezed", "sniffed", "soared", "sobbed", "solicited", "solved", "soothed", "sorted", "sowed", "sparkled", "spoke", "sped", "spelt", "spent", "spilt", "span/spun", "spat/spit", "split", "spoilt", "sprayed", "spread", "sprang", "sprouted", "squeezed", "stood", "stared", "started", "stated", "stayed", "stole", "steeped", "stemmed", "stepped", "sterilized", "stuck", "stimulated", "stung", "stank", "stirred", "stitched", "stooped", "stopped", "stored", "strained", "strayed", "stressed", "stretched", "strewed", "strode", "struck", "strung", "strove", "studied", "submitted", "subscribed", "subtracted", "succeeded", "sucked", "suffered", "suggested", "summoned", "supplied", "supported", "supposed", "surged", "surmised", "surpassed", "surrounded", "surveyed", "survived", "swallowed", "swayed", "swore", "sweat", "swept", "swelled", "swam", "swung", "swotted", "took", "talked", "tapped", "tasted", "taxed", "taught", "tore", "teed", "told", "tempted", "tended", "terminated", "terrified", "tested", "thanked", "thought", "throve", "threw", "thrust", "thumped", "tied", "tired", "tossed", "touched", "trained", "trampled", "transferred", "transformed", "translated", "trapped", "travelled", "trod", "treasured", "treated", "treed", "trembled", "triumphed", "trusted", "tried", "turned", "typed", "typeset", "understood", "undid", "uprooted", "upset", "urged", "used", "uttered", "valued", "vanished", "varied", "verified", "vexed", "vied", "viewed", "violated", "vomited", "woke", "walked", "wandered", "wanted", "warned", "wasted", "watched", "watered", "waved", "waxed", "waylaid", "wore", "wove", "wed", "wept", "weighed", "welcomed", "went", "wet", "whipped", "whispered", "won", "wound", "wished", "withdrew", "worked", "worried", "worshipped", "wrung", "wrote", "yawned", "yelled", "yielded", "zincked", "zoomed"]
5
+ past: ["abashed", "abated", "abode", "absorbed", "accepted", "accompanied", "ached", "achieved", "acquired", "acted", "added", "addressed", "adjusted", "admired", "admitted", "advised", "afforded", "agreed", "alit", "allowed", "animated", "announced", "answered", "apologized", "appeared", "applauded", "applied", "approached", "approved", "argued", "arose", "arranged", "arrested", "asked", "asserted", "assorted", "astonished", "attacked", "attended", "attracted", "audited", "avoided", "awoke", "banged", "banished", "bashed", "batted", "was", "bore", "bore", "beat", "beautified", "became", "befell", "begged", "began", "behaved", "beheld", "believed", "belonged", "bent", "bereft", "besought", "bet", "betrayed", "bade", "bid", "bound", "bit", "bled", "blessed", "blossomed", "blew", "blurred", "blushed", "boarded", "boasted", "boiled", "bowed", "boxed", "brayed", "broke", "breathed", "bred", "brought", "broadcast", "brushed", "built", "burnt", "burst", "buried", "bust", "bought", "buzzed", "calculated", "called", "canvassed", "captured", "caressed", "carried", "carved", "cashed", "cast", "caught", "caused", "ceased", "celebrated", "challenged", "changed", "charged", "chased", "chatted", "checked", "cheered", "chewed", "chid", "chipped", "choked", "chose", "classified", "cleaned", "clove/cleft", "clicked", "climbed", "clung", "closed", "clad", "clutched", "collapsed", "collected", "coloured", "came", "commented", "compared", "compelled", "competed", "complained", "completed", "concluded", "conducted", "confessed", "confined", "confiscated", "confused", "congratulated", "connected", "connoted", "conquered", "consecrated", "consented", "conserved", "considered", "consigned", "consisted", "consoled", "consorted", "conspired", "constituted", "constrained", "constructed", "construed", "consulted", "contained", "contemned", "contended", "contested", "continued", "contracted", "contradicted", "contrasted", "contributed", "contrived", "controlled", "convened", "converged", "conversed", "converted", "conveyed", "convicted", "convinced", "cooed", "cooked", "cooled", "co-operated", "coped", "copied", "corrected", "corresponded", "corroded", "corrupted", "cost", "coughed", "counselled", "counted", "coursed", "covered", "cowered", "cracked", "crackled", "crashed", "craved", "created", "crept", "cribbed", "crossed", "crowded", "crushed", "cried", "curbed", "cured", "curved", "cut", "cycled", "damaged", "damped", "danced", "dared", "dashed", "dazzled", "dealt", "decayed", "decided", "declared", "decorated", "decreased", "dedicated", "delayed", "deleted", "denied", "depended", "deprived", "derived", "described", "desired", "destroyed", "detached", "detected", "determined", "developed", "died", "differed", "dug", "digested", "dimmed", "diminished", "dined", "dipped", "directed", "disappeared", "discovered", "discussed", "disobeyed", "displayed", "disposed", "distributed", "disturbed", "disused", "dived", "divided", "did", "donated", "downloaded", "dragged", "drew", "dreamt", "dressed", "drilled", "drank", "drove", "dropped", "dried", "dumped", "dwelt", "dyed", "earned", "ate", "educated", "empowered", "emptied", "encircled", "encouraged", "encroached", "endangered", "endorsed", "endured", "engraved", "enjoyed", "enlarged", "enlightened", "entered", "envied", "erased", "escaped", "evaporated", "exchanged", "exclaimed", "excluded", "existed", "expanded", "expected", "explained", "explored", "expressed", "extended", "eyed", "faced", "failed", "fainted", "fell", "fanned", "fancied", "favoured", "faxed", "fed", "felt", "ferried", "fetched", "fought", "filled", "found", "finished", "fished", "fit/fitted", "fixed", "fizzed", "flapped", "flashed", "fled", "flung", "floated", "flopped", "flew", "folded", "followed", "forbade", "forced", "forecast", "foretold", "forgot", "forgave", "forlore", "formed", "forsook", "founded", "framed", "freed", "froze", "frightened", "fried", "fulfilled", "gagged", "gained", "gainsaid", "gashed", "gazed", "got", "gave", "glanced", "glittered", "glowed", "went", "googled", "governed", "grabbed", "graded", "granted", "greeted", "ground", "gripped", "grew", "guarded", "guessed", "guided", "handled", "hung", "happened", "harmed", "hatched", "hated", "had", "healed", "heard", "hove", "helped", "hewed", "hid", "hindered", "hissed", "hit", "hoaxed", "held", "hopped", "hoped", "horrified", "hugged", "hummed", "humiliated", "hunted", "hurled", "hurried", "hurt", "hushed", "hustled", "hypnotized", "idealized", "identified", "idolized", "ignited", "ignored", "ill-treated", "illuminated", "illumined", "illustrated", "imagined", "imbibed", "imitated", "immersed", "immolated", "immured", "impaired", "imparted", "impeached", "impeded", "impelled", "impended", "imperilled", "impinged", "implanted", "implicated", "imploded", "implored", "implied", "imported", "imposed", "impressed", "imprinted", "imprisoned", "improved", "inaugurated", "incised", "included", "increased", "inculcated", "indented", "indicated", "induced", "indulged", "infected", "infested", "inflamed", "inflated", "inflected", "informed", "infringed", "infused", "ingested", "inhabited", "inhaled", "inherited", "initiated", "injected", "injured", "inlaid", "innovated", "input", "inquired", "inscribed", "inserted", "inspected", "inspired", "installed", "insulted", "insured", "integrated", "introduced", "invented", "invited", "joined", "jumped", "justified", "kept", "kicked", "kidded", "killed", "kissed", "knelt", "knit", "knocked", "knew", "laded", "landed", "lasted", "latched", "laughed", "laid", "led", "leaked", "leant", "leapt", "learnt", "left", "leered", "lent", "let", "licked", "lay", "lied", "lifted", "lit", "liked", "limped", "listened", "lived", "looked", "lost", "loved", "magnified", "maintained", "made", "managed", "marched", "marked", "married", "mashed", "matched", "mattered", "meant", "measured", "met", "melted", "merged", "mewed", "migrated", "milked", "minded", "misled", "missed", "mistook", "misused", "mixed", "moaned", "modified", "mooed", "motivated", "moulded", "moulted", "moved", "mowed", "multiplied", "murmured", "nailed", "napped", "needed", "neglected", "nipped", "nodded", "noted", "noticed", "notified", "nourished", "nursed", "obeyed", "obliged", "observed", "obstructed", "obtained", "occupied", "occurred", "offered", "offset", "omitted", "oozed", "opened", "operated", "opined", "oppressed", "opted", "optimized", "ordered", "organized", "originated", "output", "overflowed", "overtook", "owed", "owned", "pacified", "painted", "pardoned", "parted", "partook", "participated", "passed", "pasted", "patted", "patched", "paused", "paid", "peeped", "perished", "permitted", "persuaded", "phoned", "placed", "planned", "played", "pled", "pleased", "plodded", "plotted", "plucked", "plied", "pointed", "polished", "polluted", "pondered", "poured", "pouted", "practised", "praised", "prayed", "preached", "preferred", "prepared", "prescribed", "presented", "preserved", "preset", "presided", "pressed", "pretended", "prevented", "printed", "proceeded", "produced", "progressed", "prohibited", "promised", "proposed", "prosecuted", "protected", "proved", "provided", "pulled", "punished", "purified", "pushed", "put", "qualified", "quarrelled", "questioned", "quit", "raced", "rained", "rattled", "reached", "read", "realized", "rebuilt", "recalled", "recast", "received", "recited", "recognized", "recollected", "recurred", "redid", "reduced", "referred", "reflected", "refused", "regarded", "regretted", "related", "relaxed", "relied", "remained", "remade", "removed", "rent", "renewed", "renounced", "repaired", "repeated", "replaced", "replied", "reported", "requested", "resold", "resembled", "reset", "resisted", "resolved", "respected", "rested", "restrained", "retained", "retched", "retired", "returned", "reused", "reviewed", "rewound", "rid", "rode", "rang", "rose", "roared", "robbed", "rolled", "rotted", "rubbed", "ruled", "ran", "rushed", "sabotaged", "sacked", "sacrificed", "saddened", "saddled", "sagged", "sailed", "sallied", "saluted", "salvaged", "salved", "sampled", "sanctified", "sanctioned", "sapped", "saponified", "sashed", "sashayed", "sassed", "sated", "satiated", "satirised", "satisfied", "saturated", "sauntered", "saved", "savored", "savvied", "sawed", "said", "scabbed", "scabbled", "scalded", "scaled", "scammed", "scanned", "scanted", "scarred", "scared", "scarified", "scarped", "scatted", "scattered", "scolded", "scorched", "scowled", "scrawled", "screamed", "screwed", "scrubbed", "searched", "seated", "secured", "saw", "sought", "seemed", "seized", "selected", "sold", "sent", "sentenced", "separated", "set", "severed", "sewed", "shook", "shaped", "shared", "shattered", "shove", "shore", "shed", "shone", "shirked", "shit", "shivered", "shocked", "shod", "shot", "shortened", "shouted", "showed", "shrank", "shunned", "shut", "sighted", "signalled", "signified", "sang", "sank", "sipped", "sat", "skied", "skidded", "slammed", "slew", "slept", "slid", "slimmed", "slung", "slunk", "slipped", "slit", "smashed", "smelt", "smiled", "smote", "smoothed", "smothered", "snapped", "snatched", "snuck", "sneezed", "sniffed", "soared", "sobbed", "solicited", "solved", "soothed", "sorted", "sowed", "sparkled", "spoke", "sped", "spelt", "spent", "spilt", "span/spun", "spat/spit", "split", "spoilt", "sprayed", "spread", "sprang", "sprouted", "squeezed", "stood", "stared", "started", "stated", "stayed", "stole", "steeped", "stemmed", "stepped", "sterilized", "stuck", "stimulated", "stung", "stank", "stirred", "stitched", "stooped", "stopped", "stored", "strained", "strayed", "stressed", "stretched", "strewed", "strode", "struck", "strung", "strove", "studied", "submitted", "subscribed", "subtracted", "succeeded", "sucked", "suffered", "suggested", "summoned", "supplied", "supported", "supposed", "surged", "surmised", "surpassed", "surrounded", "surveyed", "survived", "swallowed", "swayed", "swore", "sweat", "swept", "swelled", "swam", "swung", "swotted", "took", "talked", "tapped", "tasted", "taxed", "taught", "tore", "teed", "told", "tempted", "tended", "terminated", "terrified", "tested", "thanked", "thought", "throve", "threw", "thrust", "thumped", "tied", "tired", "tossed", "touched", "trained", "trampled", "transferred", "transformed", "translated", "trapped", "travelled", "trod", "treasured", "treated", "treed", "trembled", "triumphed", "trusted", "tried", "turned", "typed", "typeset", "understood", "undid", "uprooted", "upset", "urged", "used", "uttered", "valued", "vanished", "varied", "verified", "vexed", "vied", "viewed", "violated", "vomited", "woke", "walked", "wandered", "wanted", "warned", "wasted", "watched", "watered", "waved", "waxed", "waylaid", "wore", "wove", "wed", "wept", "weighed", "welcomed", "went", "wet", "whipped", "whispered", "won", "wound", "wished", "withdrew", "worked", "worried", "worshipped", "wrung", "wrote", "yawned", "yelled", "yielded", "zincked", "zoomed"]
6
6
  past_participle: ["abashed", "abated", "abode", "absorbed", "accepted", "accompanied", "ached", "achieved", "acquired", "acted", "added", "addressed", "adjusted", "admired", "admitted", "advised", "afforded", "agreed", "alit", "allowed", "animated", "announced", "answered", "apologized", "appeared", "applauded", "applied", "approached", "approved", "argued", "arisen", "arranged", "arrested", "asked", "asserted", "assorted", "astonished", "attacked", "attended", "attracted", "audited", "avoided", "awoken", "banged", "banished", "bashed", "batted", "been", "born", "borne", "beaten", "beautified", "become", "befallen", "begged", "begun", "behaved", "beheld", "believed", "belonged", "bent", "bereft", "besought", "bet", "betrayed", "bidden", "bid", "bound", "bitten", "bled", "blessed", "blossomed", "blown", "blurred", "blushed", "boarded", "boasted", "boiled", "bowed", "boxed", "brayed", "broken", "breathed", "bred", "brought", "broadcast", "brushed", "built", "burnt", "burst", "buried", "bust", "bought", "buzzed", "calculated", "called", "canvassed", "captured", "caressed", "carried", "carved", "cashed", "cast", "caught", "caused", "ceased", "celebrated", "challenged", "changed", "charged", "chased", "chatted", "checked", "cheered", "chewed", "chid/chidden", "chipped", "choked", "chosen", "classified", "cleaned", "cloven/cleft", "clicked", "climbed", "clung", "closed", "clad", "clutched", "collapsed", "collected", "coloured", "come", "commented", "compared", "compelled", "competed", "complained", "completed", "concluded", "conducted", "confessed", "confined", "confiscated", "confused", "congratulated", "connected", "connoted", "conquered", "consecrated", "consented", "conserved", "considered", "consigned", "consisted", "consoled", "consorted", "conspired", "constituted", "constrained", "constructed", "construed", "consulted", "contained", "contemned", "contended", "contested", "continued", "contracted", "contradicted", "contrasted", "contributed", "contrived", "controlled", "convened", "converged", "conversed", "converted", "conveyed", "convicted", "convinced", "cooed", "cooked", "cooled", "co-operated", "cope", "copied", "corrected", "corresponded", "corroded", "corrupted", "cost", "coughed", "counselled", "counted", "coursed", "covered", "cowered", "cracked", "crackled", "crashed", "craved", "created", "crept", "cribbed", "crossed", "crowded", "crushed", "cried", "curbed", "cured", "curved", "cut", "cycled", "damaged", "damped", "danced", "dared", "dashed", "dazzled", "dealt", "decayed", "decided", "declared", "decorated", "decreased", "dedicated", "delayed", "deleted", "denied", "depended", "deprived", "derived", "described", "desired", "destroyed", "detached", "detected", "determined", "developed", "died", "differed", "dug", "digested", "dimmed", "diminished", "dined", "dipped", "directed", "disappeared", "discovered", "discussed", "disobeyed", "displayed", "disposed", "distributed", "disturbed", "disused", "dived", "divided", "done", "donated", "downloaded", "dragged", "drawn", "dreamt", "dressed", "drilled", "drunk", "driven", "dropped", "dried", "dumped", "dwelt", "dyed", "earned", "eaten", "educated", "empowered", "emptied", "encircled", "encouraged", "encroached", "endangered", "endorsed", "endured", "engraved", "enjoyed", "enlarged", "enlightened", "entered", "envied", "erased", "escaped", "evaporated", "exchanged", "exclaimed", "excluded", "existed", "expanded", "expected", "explained", "explored", "expressed", "extended", "eyed", "faced", "failed", "fainted", "fallen", "fanned", "fancied", "favoured", "faxed", "fed", "felt", "ferried", "fetched", "fought", "filled", "found", "finished", "fished", "fit/fitted", "fixed", "fizzed", "flapped", "flashed", "fled", "flung", "floated", "flopped", "flown", "folded", "followed", "forbidden", "forced", "forecast", "foretold", "forgotten", "forgiven", "forlorn", "formed", "forsaken", "founded", "framed", "freed", "frozen", "frightened", "fried", "fulfilled", "gagged", "gained", "gainsaid", "gashed", "gazed", "got", "given", "glanced", "glittered", "glowed", "gone", "googled", "governed", "grabbed", "graded", "granted", "greeted", "ground", "gripped", "grown", "guarded", "guessed", "guided", "handled", "hung", "happened", "harmed", "hatched", "hated", "had", "healed", "heard", "hove", "helped", "hewn", "hidden", "hindered", "hissed", "hit", "hoaxed", "held", "hopped", "hoped", "horrified", "hugged", "hummed", "humiliated", "hunted", "hurled", "hurried", "hurt", "hushed", "hustled", "hypnotized", "idealized", "identified", "idolized", "ignited"]
7
7
  simple_present: ["abashes", "abates", "abides", "absorbs", "accepts", "accompanies", "aches", "achieves", "acquires", "acts", "adds", "addresses", "adjusts", "admires", "admits", "advises", "affords", "agrees", "alights", "allows", "animates", "announces", "answers", "apologizes", "appears", "applauds", "applies", "approaches", "approves", "argues", "arises", "arranges", "arrests", "asks", "asserts", "assorts", "astonishes", "attacks", "attends", "attracts", "audits", "avoids", "awakes", "bangs", "banishes", "bashes", "bats", "is", "bears", "bears", "beats", "beautifies", "becomes", "befalls", "begs", "begins", "behaves", "beholds", "believes", "belongs", "bends", "bereaves", "beseeches", "bets", "betrays", "bids", "bids", "binds", "bites", "bleeds", "blesses", "blossoms", "blows", "blurs", "blushes", "boards", "boasts", "boils", "bows", "boxes", "brays", "breaks", "breathes", "breeds", "brings", "broadcasts", "brushes", "builds", "burns", "bursts", "buries", "busts", "buys", "buzzes", "calculates", "calls", "canvasses", "captures", "caresses", "carries", "carves", "cashes", "casts", "catches", "causes", "ceases", "celebrates", "challenges", "changes", "charges", "chases", "chats", "checks", "cheers", "chews", "chides", "chips", "chokes", "chooses", "classifies", "cleans", "cleaves", "clicks", "climbs", "clings", "closes", "clothes", "clutches", "collapses", "collects", "colours", "comes", "comments", "compares", "compels", "competes", "complains", "completes", "concludes", "conducts", "confesses", "confines", "confiscates", "confuses", "congratulates", "connects", "connotes", "conquers", "consecrates", "consents", "conserves", "considers", "consigns", "consists", "consoles", "consorts", "conspires", "constitutes", "constrains", "constructs", "construes", "consults", "contains", "contemns", "contends", "contests", "continues", "contracts", "contradicts", "contrasts", "contributes", "contrives", "controls", "convenes", "converges", "converses", "converts", "conveys", "convicts", "convinces", "coos", "cooks", "cools", "co-operates", "copes", "copies", "corrects", "corresponds", "corrodes", "corrupts", "costs", "coughs", "counsels", "counts", "courses", "covers", "cowers", "cracks", "crackles", "crashes", "craves", "creates", "creeps", "cribs", "crosses", "crowds", "crushes", "cries", "curbs", "cures", "curves", "cuts", "cycles", "damages", "damps", "dances", "dares", "dashes", "dazzles", "deals", "decays", "decides", "declares", "decorates", "decreases", "dedicates", "delays", "deletes", "denies", "depends", "deprives", "derives", "describes", "desires", "destroys", "detaches", "detects", "determines", "develops", "dies", "differs", "digs", "digests", "dims", "diminishes", "dines", "dips", "directs", "disappears", "discovers", "discusses", "disobeys", "displays", "disposes", "distributes", "disturbs", "disuses", "dives", "divides", "does", "donates", "downloads", "drags", "draws", "dreams", "dresses", "drills", "drinks", "drives", "drops", "dries", "dumps", "dwells", "dyes", "earns", "eats", "educates", "empowers", "empties", "encircles", "encourages", "encroaches", "endangers", "endorses", "endures", "engraves", "enjoys", "enlarges", "enlightens", "enters", "envies", "erases", "escapes", "evaporates", "exchanges", "exclaims", "excludes", "exists", "expands", "expects", "explains", "explores", "expresses", "extends", "eyes", "faces", "fails", "faints", "falls", "fans", "fancies", "favours", "faxes", "feeds", "feels", "ferries", "fetches", "fights", "fills", "finds", "finishes", "fishes", "fits", "fixes", "fizzes", "flaps", "flashes", "flees", "flings", "floats", "flops", "flies", "folds", "follows", "forbids", "forces", "forecasts", "foretells", "forgets", "forgives", "forlese", "forms", "forsakes", "founds", "frames", "frees", "freezes", "frightens", "fries", "fulfils", "gags", "gains", "gainsays", "gashes", "gazes", "gets", "gives", "glances", "glitters", "glows", "goes", "googles", "governs", "grabs", "grades", "grants", "greets", "grinds", "grips", "grows", "guards", "guesses", "guides", "handles", "hangs", "happens", "harms", "hatches", "hates", "has", "heals", "hears", "heaves", "helps", "hews", "hides", "hinders", "hisses", "hits", "hoaxes", "holds", "hops", "hopes", "horrifies", "hugs", "hums", "humiliates", "hunts", "hurls", "hurries", "hurts", "hushes", "hustles", "hypnotizes", "idealizes", "identifies", "idolizes", "ignites"]
8
- ing_form: ["abashing", "abating", "abiding", "absorbing", "accepting", "accompanying", "aching", "achieving", "acquiring", "acting", "adding", "addressing", "adjusting", "admiring", "admitting", "advising", "affording", "agreeing", "alighting", "allowing", "animating", "announcing", "answering", "apologizing", "appearing", "applauding", "applying", "approaching", "approving", "arguing", "arising", "arranging", "arresting", "asking", "asserting", "assorting", "astonishing", "attacking", "attending", "attracting", "auditing", "avoiding", "awaking", "banging", "banishing", "bashing", "batting", "being", "bearing", "bearing", "beating", "beautifying", "becoming", "befalling", "begging", "beginning", "behaving", "beholding", "believing", "belonging", "bending", "bereaving", "beseeching", "betting", "betraying", "bidding", "bidding", "binding", "biting", "bleeding", "blessing", "blossoming", "blowing", "blurring", "blushing", "boarding", "boasting", "boiling", "bowing", "boxing", "braying", "breaking", "breathing", "breeding", "bringing", "broadcasting", "brushing", "building", "burning", "bursting", "burying", "busting", "buying", "buzzing", "calculating", "calling", "canvassing", "capturing", "caressing", "carrying", "carving", "cashing", "casting", "catching", "causing", "ceasing", "celebrating", "challenging", "changing", "charging", "chasing", "chatting", "checking", "cheering", "chewing", "chiding", "chipping", "choking", "choosing", "classifying", "cleaning", "cleaving", "clicking", "climbing", "clinging", "closing", "clothing", "clutching", "collapsing", "collecting", "colouring", "coming", "commenting", "comparing", "compelling", "competing", "complaining", "completing", "concluding", "conducting", "confessing", "confining", "confiscating", "confusing", "congratulating", "connecting", "connoting", "conquering", "consecrating", "consenting", "conserving", "considering", "consigning", "consisting", "consoling", "consorting", "conspiring", "constituting", "constraining", "constructing", "construing", "consulting", "containing", "contemning", "contending", "contesting", "continuing", "contracting", "contradicting", "contrasting", "contributing", "contriving", "controlling", "convening", "converging", "conversing", "converting", "conveying", "convicting", "convincing", "cooing", "cooking", "cooling", "co-operating", "coping", "copying", "correcting", "corresponding", "corroding", "corrupting", "costing", "coughing", "counselling", "counting", "coursing", "covering", "cowering", "cracking", "crackling", "crashing", "craving", "creating", "creeping", "cribbing", "crossing", "crowding", "crushing", "crying", "curbing", "curing", "curving", "cutting", "cycling", "damaging", "damping", "dancing", "daring", "dashing", "dazzling", "dealing", "decaying", "deciding", "declaring", "decorating", "decreasing", "dedicating", "delaying", "deleting", "denying", "depending", "depriving", "deriving", "describing", "desiring", "destroying", "detaching", "detecting", "determining", "developing", "dying", "differing", "digging", "digesting", "dimming", "diminishing", "dining", "dipping", "directing", "disappearing", "discovering", "discussing", "disobeying", "displaying", "disposing", "distributing", "disturbing", "disusing", "diving", "dividing", "doing", "donating", "downloading", "dragging", "drawing", "dreaming", "dressing", "drilling", "drinking", "driving", "dropping", "drying", "dumping", "dwelling", "dyeing", "earning", "eating", "educating", "empowering", "emptying", "encircling", "encouraging", "encroaching", "entangling", "endorsing", "enduring", "engraving", "enjoying", "enlarging", "enlightening", "entering", "envying", "erasing", "escaping", "evaporating", "exchanging", "exclaiming", "excluding", "existing", "expanding", "expecting", "explaining", "exploring", "expressing", "extending", "eyeing", "facing", "failing", "fainting", "falling", "fanning", "fancying", "favouring", "faxing", "feeding", "feeling", "ferrying", "fetching", "fighting", "filling", "finding", "finishing", "fishing", "fitting", "fixing", "fizzing", "flapping", "flashing", "fleeing", "flinging", "floating", "flopping", "flying", "folding", "following", "forbidding", "forcing", "forecasting", "foretelling", "forgetting", "forgiving", "forlesing", "forming", "forsaking", "founding", "framing", "freeing", "freezing", "frightening", "frying", "fulfilling", "gagging", "gaining", "gainsaying", "gashing", "gazing", "getting", "giving", "glancing", "glittering", "glowing", "going", "googling", "governing", "grabbing", "grading", "granting", "greeting", "grinding", "gripping", "growing", "guarding", "guessing", "guiding", "handling", "hanging", "happening", "harming", "hatching", "hating", "having", "healing", "hearing", "heaving", "helping", "hewing", "hiding", "hindering", "hissing", "hitting", "hoaxing", "holding", "hopping", "hoping", "horrifying", "hugging", "humming", "humiliating", "hunting", "hurling", "hurrying", "hurting", "hushing", "hustling", "hypnotizing", "idealizing", "identifying", "idolizing", "igniting"]
8
+ ing_form: ["abashing", "abating", "abiding", "absorbing", "accepting", "accompanying", "aching", "achieving", "acquiring", "acting", "adding", "addressing", "adjusting", "admiring", "admitting", "advising", "affording", "agreeing", "alighting", "allowing", "animating", "announcing", "answering", "apologizing", "appearing", "applauding", "applying", "approaching", "approving", "arguing", "arising", "arranging", "arresting", "asking", "asserting", "assorting", "astonishing", "attacking", "attending", "attracting", "auditing", "avoiding", "awaking", "banging", "banishing", "bashing", "batting", "being", "bearing", "bearing", "beating", "beautifying", "becoming", "befalling", "begging", "beginning", "behaving", "beholding", "believing", "belonging", "bending", "bereaving", "beseeching", "betting", "betraying", "bidding", "bidding", "binding", "biting", "bleeding", "blessing", "blossoming", "blowing", "blurring", "blushing", "boarding", "boasting", "boiling", "bowing", "boxing", "braying", "breaking", "breathing", "breeding", "bringing", "broadcasting", "brushing", "building", "burning", "bursting", "burying", "busting", "buying", "buzzing", "calculating", "calling", "canvassing", "capturing", "caressing", "carrying", "carving", "cashing", "casting", "catching", "causing", "ceasing", "celebrating", "challenging", "changing", "charging", "chasing", "chatting", "checking", "cheering", "chewing", "chiding", "chipping", "choking", "choosing", "classifying", "cleaning", "cleaving", "clicking", "climbing", "clinging", "closing", "clothing", "clutching", "collapsing", "collecting", "colouring", "coming", "commenting", "comparing", "compelling", "competing", "complaining", "completing", "concluding", "conducting", "confessing", "confining", "confiscating", "confusing", "congratulating", "connecting", "connoting", "conquering", "consecrating", "consenting", "conserving", "considering", "consigning", "consisting", "consoling", "consorting", "conspiring", "constituting", "constraining", "constructing", "construing", "consulting", "containing", "contemning", "contending", "contesting", "continuing", "contracting", "contradicting", "contrasting", "contributing", "contriving", "controlling", "convening", "converging", "conversing", "converting", "conveying", "convicting", "convincing", "cooing", "cooking", "cooling", "co-operating", "coping", "copying", "correcting", "corresponding", "corroding", "corrupting", "costing", "coughing", "counselling", "counting", "coursing", "covering", "cowering", "cracking", "crackling", "crashing", "craving", "creating", "creeping", "cribbing", "crossing", "crowding", "crushing", "crying", "curbing", "curing", "curving", "cutting", "cycling", "damaging", "damping", "dancing", "daring", "dashing", "dazzling", "dealing", "decaying", "deciding", "declaring", "decorating", "decreasing", "dedicating", "delaying", "deleting", "denying", "depending", "depriving", "deriving", "describing", "desiring", "destroying", "detaching", "detecting", "determining", "developing", "dying", "differing", "digging", "digesting", "dimming", "diminishing", "dining", "dipping", "directing", "disappearing", "discovering", "discussing", "disobeying", "displaying", "disposing", "distributing", "disturbing", "disusing", "diving", "dividing", "doing", "donating", "downloading", "dragging", "drawing", "dreaming", "dressing", "drilling", "drinking", "driving", "dropping", "drying", "dumping", "dwelling", "dyeing", "earning", "eating", "educating", "empowering", "emptying", "encircling", "encouraging", "encroaching", "entangling", "endorsing", "enduring", "engraving", "enjoying", "enlarging", "enlightening", "entering", "envying", "erasing", "escaping", "evaporating", "exchanging", "exclaiming", "excluding", "existing", "expanding", "expecting", "explaining", "exploring", "expressing", "extending", "eyeing", "facing", "failing", "fainting", "falling", "fanning", "fancying", "favouring", "faxing", "feeding", "feeling", "ferrying", "fetching", "fighting", "filling", "finding", "finishing", "fishing", "fitting", "fixing", "fizzing", "flapping", "flashing", "fleeing", "flinging", "floating", "flopping", "flying", "folding", "following", "forbidding", "forcing", "forecasting", "foretelling", "forgetting", "forgiving", "forlesing", "forming", "forsaking", "founding", "framing", "freeing", "freezing", "frightening", "frying", "fulfilling", "gagging", "gaining", "gainsaying", "gashing", "gazing", "getting", "giving", "glancing", "glittering", "glowing", "going", "googling", "governing", "grabbing", "grading", "granting", "greeting", "grinding", "gripping", "growing", "guarding", "guessing", "guiding", "handling", "hanging", "happening", "harming", "hatching", "hating", "having", "healing", "hearing", "heaving", "helping", "hewing", "hiding", "hindering", "hissing", "hitting", "hoaxing", "holding", "hopping", "hoping", "horrifying", "hugging", "humming", "humiliating", "hunting", "hurling", "hurrying", "hurting", "hushing", "hustling", "hypnotizing", "idealizing", "identifying", "idolizing", "igniting", "ignoring", "illuminating", "illustrating", "imagining", "imbibing", "imitating", "immersing", "immolating", "impairing", "imparting", "impeaching", "impeding", "impinging", "implanting", "implicating", "imploding", "imploring", "implying", "importing", "imposing", "impressing", "imprinting", "imprisoning", "improving", "inaugurating", "including", "increasing", "inculcating", "indenting", "indicating", "inducing", "indulging", "infecting", "infesting", "inflaming", "inflating", "inflecting", "informing", "infringing", "infusing", "ingesting", "inhabiting", "inhaling", "inheriting", "initiating", "injecting", "injuring", "innovating", "inputting", "inquiring", "inscribing", "inserting", "inspecting", "inspiring", "installing", "insulting", "integrating", "introducing", "inventing", "inviting", "joining", "jumping", "justifying", "keeping", "kicking", "kidding", "killing", "kissing", "kneeling", "knitting", "knocking", "landing", "lasting", "latching", "laughing", "laying", "leading", "leaking", "leaning", "leaping", "learning", "leaving", "leering", "lending", "letting", "licking", "lying", "lifting", "lighting", "liking", "limping", "listening", "living", "looking", "losing", "loving", "magnifying", "maintaining", "making", "managing", "marching", "marking", "marrying", "mashing", "matching", "measuring", "meeting", "melting", "merging", "mewing", "migrating", "milking", "minding", "misleading", "missing", "mistaking", "misusing", "mixing", "moaning", "modifying", "mooing", "motivating", "moulding", "moving", "mowing", "multiplying", "murmuring", "nailing", "napping", "needing", "neglecting", "nipping", "nodding", "noting", "noticing", "notifying", "nourishing", "nursing", "obeying", "obliging", "observing", "obstructing", "obtaining", "occupying", "offering", "offsetting", "omitting", "oozing", "opening", "operating", "opining", "oppressing", "opting", "optimizing", "ordering", "organizing", "originating", "outputting", "overflowing", "overtaking", "owing", "owning", "pacifying", "painting", "pardoning", "parting", "partaking", "participating", "passing", "pasting", "patting", "patching", "pausing", "paying", "peeping", "perishing", "permitting", "persuading", "phoning", "placing", "planning", "playing", "pleading", "pleasing", "plodding", "plotting", "plucking", "plying", "pointing", "polishing", "polluting", "pondering", "pouring", "pouting", "practicing", "praising", "praying", "preaching", "preparing", "prescribing", "presenting", "preserving", "presiding", "pressing", "pretending", "preventing", "printing", "proceeding", "producing", "progressing", "prohibiting", "promising", "proposing", "prosecuting", "protecting", "proving", "providing", "pulling", "punishing", "purifying", "pushing", "putting", "qualifying", "quarreling", "questioning", "quitting", "racing", "raining", "rattling", "reaching", "reading", "realizing", "rebuilding", "recalling", "recasting", "receiving", "reciting", "recognizing", "recollecting", "recurring", "redoing", "reducing", "referring", "reflecting", "refusing", "regarding", "regretting", "relating", "relaxing", "relying", "remaining", "remaking", "removing", "rending", "renewing", "renouncing", "repairing", "repeating", "replacing", "replying", "reporting", "requesting", "reselling", "resembling", "resetting", "resisting", "resolving", "respecting", "resting", "restraining", "retaining", "retching", "retiring", "returning", "reusing", "reviewing", "rewinding", "ridding", "riding", "ringing", "rising", "roaring", "robbing", "rolling", "rotting", "rubbing", "ruling", "running", "rushing", "sabotaging", "sacking", "sacrificing", "saddening", "saddling", "sagging", "sailing", "saluting", "salvaging", "sampling", "sanctifying", "sanctioning", "sapping", "sashaying", "sassing", "sating", "satiating", "satirizing", "satisfying", "saturating", "sauntering", "saving", "savoring", "sawing", "saying", "scabbing", "scalding", "scaling", "scamming", "scanning", "scarring", "scaring", "scarping", "scatting", "scattering", "scolding", "scorching", "scowling", "scrawling", "screaming", "screwing", "scrubbing", "searching", "seating", "securing", "seeing", "seeking", "seeming", "seizing", "selecting", "selling", "sending", "sentencing", "separating", "setting", "severing", "sewing", "shaking", "shaping", "sharing", "shattering", "shaving", "shearing", "shedding", "shining", "shirking", "shitting", "shivering", "shocking", "shooting", "shortening", "shouting", "showing", "shrinking", "shunning", "shutting", "signaling", "signifying", "singing", "sinking", "sipping", "sitting", "skiing", "skidding", "slamming", "slaying", "sleeping", "sliding", "slimming", "slinging", "slinking", "slipping", "slitting", "smashing", "smelling", "smiling", "smiting", "smoothing", "smothering", "snapping", "snatching", "sneaking", "sneezing", "sniffing", "soaring", "sobbing", "soliciting", "solving", "soothing", "sorting", "sowing", "sparkling", "speaking", "speeding", "spelling", "spending", "spilling", "spinning", "spitting", "splitting", "spoiling", "spraying", "spreading", "springing", "sprouting", "squeezing", "standing", "staring", "starting", "stating", "staying", "stealing", "steeping", "stemming", "stepping", "sterilizing", "sticking", "stimulating", "stinging", "stinking", "stirring", "stitching", "stooping", "stopping", "storing", "straining", "straying", "stressing", "stretching", "strewing", "striding", "striking", "stringing", "striving", "studying", "submitting", "subscribing", "subtracting", "succeeding", "sucking", "suffering", "suggesting", "summoning", "supplying", "supporting", "supposing", "surging", "surmising", "surpassing", "surrounding", "surveying", "surviving", "swallowing", "swaying", "swearing", "sweating", "sweeping", "swelling", "swimming", "swinging", "taking", "talking", "tapping", "tasting", "taxing", "teaching", "tearing", "teeing", "telling", "tempting", "tending", "terminating", "terrifying", "testing", "thanking", "thinking", "thriving", "throwing", "thrusting", "thumping", "tying", "tiring", "tossing", "touching", "training", "trampling", "transferring", "transforming", "translating", "trapping", "traveling", "treading", "treasuring", "treating", "trembling", "trusting", "trying", "turning", "typing", "understanding", "undoing", "uprooting", "upsetting", "urging", "using", "uttering", "valuing", "vanishing", "varying", "verifying", "vexing", "vying", "viewing", "violating", "vomiting", "waking", "walking", "wandering", "wanting", "warning", "wasting", "watching", "watering", "waving", "waxing", "waylaying", "wearing", "weaving", "wedding", "weeping", "weighing", "welcoming", "wending", "wetting", "whipping", "whispering", "winning", "winding", "wishing", "withdrawing", "working", "worrying", "worshipping", "wringing", "writing", "yawning", "yelling", "yielding", "zooming"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.4
4
+ version: 1.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benjamin Curtis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-06-20 00:00:00.000000000 Z
12
+ date: 2019-07-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: i18n
@@ -25,76 +25,6 @@ dependencies:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '0.7'
28
- - !ruby/object:Gem::Dependency
29
- name: pastel
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: 0.7.2
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: 0.7.2
42
- - !ruby/object:Gem::Dependency
43
- name: thor
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: 0.20.0
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: 0.20.0
56
- - !ruby/object:Gem::Dependency
57
- name: tty-pager
58
- requirement: !ruby/object:Gem::Requirement
59
- requirements:
60
- - - "~>"
61
- - !ruby/object:Gem::Version
62
- version: 0.12.0
63
- type: :runtime
64
- prerelease: false
65
- version_requirements: !ruby/object:Gem::Requirement
66
- requirements:
67
- - - "~>"
68
- - !ruby/object:Gem::Version
69
- version: 0.12.0
70
- - !ruby/object:Gem::Dependency
71
- name: tty-screen
72
- requirement: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - "~>"
75
- - !ruby/object:Gem::Version
76
- version: 0.6.5
77
- type: :runtime
78
- prerelease: false
79
- version_requirements: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - "~>"
82
- - !ruby/object:Gem::Version
83
- version: 0.6.5
84
- - !ruby/object:Gem::Dependency
85
- name: tty-tree
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - "~>"
89
- - !ruby/object:Gem::Version
90
- version: 0.3.0
91
- type: :runtime
92
- prerelease: false
93
- version_requirements: !ruby/object:Gem::Requirement
94
- requirements:
95
- - - "~>"
96
- - !ruby/object:Gem::Version
97
- version: 0.3.0
98
28
  - !ruby/object:Gem::Dependency
99
29
  name: minitest
100
30
  requirement: !ruby/object:Gem::Requirement
@@ -208,15 +138,6 @@ files:
208
138
  - License.txt
209
139
  - README.md
210
140
  - bin/faker
211
- - lib/cli.rb
212
- - lib/cli/README.md
213
- - lib/cli/command.rb
214
- - lib/cli/commands/list.rb
215
- - lib/cli/commands/search.rb
216
- - lib/cli/reflector.rb
217
- - lib/cli/reflectors/list.rb
218
- - lib/cli/reflectors/search.rb
219
- - lib/cli/renderer.rb
220
141
  - lib/faker.rb
221
142
  - lib/faker/blockchain/bitcoin.rb
222
143
  - lib/faker/blockchain/ethereum.rb
data/lib/cli.rb DELETED
@@ -1,53 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'thor'
4
-
5
- require 'cli/commands/list'
6
- require 'cli/commands/search'
7
- require 'faker/version'
8
-
9
- module Faker
10
- module CLI
11
- class Base < Thor
12
- Error = Class.new(StandardError)
13
- # Skip default deprecation warning output; the CLI will display that.
14
- Gem::Deprecate.skip_during do
15
- desc 'version', 'Faker version'
16
- def version
17
- puts "v#{Faker::VERSION}"
18
- end
19
- map %w[--version -v] => :version
20
-
21
- desc 'list', 'List all Faker constants'
22
- method_option :help, aliases: '-h', type: :boolean,
23
- desc: 'Display usage information'
24
- method_option :show_methods, aliases: '-m', type: :boolean, default: true,
25
- desc: 'Display Faker constants with methods'
26
- method_option :verbose, aliases: '-v', type: :boolean,
27
- desc: 'Include sample Faker output'
28
- def list(*)
29
- if options[:help]
30
- invoke :help, ['list']
31
- else
32
- Faker::CLI::Commands::List.new(options).execute
33
- end
34
- end
35
-
36
- desc 'search [Faker]', 'Search Faker method(s)'
37
- method_option :help, aliases: '-h', type: :boolean,
38
- desc: 'Display usage information'
39
- method_option :show_methods, aliases: '-m', type: :boolean, default: true,
40
- desc: 'Display Faker constants with methods'
41
- method_option :verbose, aliases: '-v', type: :boolean,
42
- desc: 'Include sample Faker output'
43
- def search(query)
44
- if options[:help]
45
- invoke :help, ['search']
46
- else
47
- Faker::CLI::Commands::Search.new(options).execute(query)
48
- end
49
- end
50
- end
51
- end
52
- end
53
- end
@@ -1,55 +0,0 @@
1
- # faker (cli)
2
-
3
- ## Usage
4
-
5
- 1.) Run a quick lookup
6
-
7
- ```bash
8
- $ faker search name
9
- # Faker::SwordArtOnline
10
- # └── real_name
11
- # └── game_name
12
- # Faker::Superhero
13
- # └── name
14
- # ....
15
- ```
16
-
17
- 2.) List methods
18
-
19
- ```sh
20
- $ faker list
21
- # Faker::BackToTheFuture
22
- # ├── quote
23
- # ├── date
24
- # └── character
25
- # Faker::Finance
26
- # └── credit_card
27
- # ....
28
- ```
29
-
30
- `faker` also includes an option to display sample output via the `--verbose` or `-v` flag. :wink:
31
-
32
- 3.)
33
-
34
- ```sh
35
- $ faker list -v
36
- # Faker::Appliance
37
- # ├── brand=> Whirlpool
38
- # └── equipment=> Sump pump
39
- # Faker::UmphreysMcgee
40
- # └── song=> Headphones & Snowcones
41
- $ faker search name -v
42
- # Faker::App
43
- # └── name=> Subin
44
- # Faker::Address
45
- # └── street_name=> Percy Landing
46
- # ....
47
- ```
48
-
49
- ## Features! :sunglasses: :dancers:
50
-
51
- - [x] List classes with methods E.g. Faker::FunnyName is displayed with `.name`,`.first_name` e.t.c.
52
- - [x] Expand search to Faker::Base sub classes
53
- - [x] Paginate results :book:
54
-
55
- ![screenshot 2019-01-05 at 03 02 08](https://user-images.githubusercontent.com/17295175/50717135-59d85780-1096-11e9-8d0d-eca95646644d.jpg)
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'forwardable'
4
-
5
- require_relative 'renderer'
6
-
7
- module Faker
8
- module CLI
9
- class Command
10
- extend Forwardable
11
-
12
- def_delegators :command, :run
13
- attr_reader :options
14
-
15
- def initialize(options)
16
- @options = options
17
- end
18
-
19
- def render(result, output)
20
- Renderer.call(result, options, output)
21
- end
22
- end
23
- end
24
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../command'
4
- require_relative '../reflectors/list'
5
-
6
- module Faker
7
- module CLI
8
- module Commands
9
- class List < Command
10
- def execute(output: $stdout)
11
- result = Reflectors::List.call(options)
12
- render(result, output)
13
- end
14
- end
15
- end
16
- end
17
- end
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../command'
4
- require_relative '../reflectors/search'
5
-
6
- module Faker
7
- module CLI
8
- module Commands
9
- class Search < Command
10
- def execute(input, output: $stdout)
11
- result = Reflectors::Search.call(input)
12
- render(result, output)
13
- end
14
-
15
- private
16
-
17
- def render(result, output)
18
- return not_found(output) if result.empty?
19
-
20
- super(result, output)
21
- end
22
-
23
- def not_found(output)
24
- output.puts "\nSorry, we couldn't find a match 😢", "\n"
25
- end
26
- end
27
- end
28
- end
29
- end
@@ -1,48 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'faker'
4
-
5
- module Faker
6
- module CLI
7
- # Abstract `Faker` Reflector - introspects the `Faker` module
8
- #
9
- # @api private
10
- # @abstract
11
- #
12
- class Reflector
13
- Faker::Base.class_eval do
14
- # Select `Faker` subclasses
15
- # @return [Array] `Faker::Base` sub classes
16
- def self.descendants
17
- @descendants ||= ObjectSpace.each_object(Class).select do |klass|
18
- klass < self
19
- end
20
- end
21
-
22
- # Select public class methods
23
- # @return [Array] public methods
24
- def self.my_singleton_methods
25
- singleton_methods(false).select { |m| respond_to?(m) }
26
- end
27
- end
28
-
29
- attr_reader :descendants_with_methods
30
-
31
- def initialize(*)
32
- @descendants_with_methods = Hash.new { |h, k| h[k] = [] }
33
- end
34
-
35
- protected
36
-
37
- def store(descendant, methods)
38
- return if methods.empty?
39
-
40
- descendants_with_methods[descendant].concat(methods)
41
- end
42
-
43
- def faker_descendants
44
- @faker_descendants ||= Faker::Base.descendants
45
- end
46
- end
47
- end
48
- end
@@ -1,39 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../reflector'
4
-
5
- module Faker
6
- module CLI
7
- module Reflectors
8
- # List command reflector
9
- # @api private
10
- #
11
- class List < Reflector
12
- attr_reader :show_methods
13
-
14
- def self.call(options)
15
- new(options).call
16
- end
17
-
18
- def initialize(options = {})
19
- @show_methods = options[:show_methods]
20
-
21
- super
22
- end
23
-
24
- def call
25
- show_methods ? all_descendants_with_methods : faker_descendants
26
- end
27
-
28
- private
29
-
30
- def all_descendants_with_methods
31
- faker_descendants.each do |descendant|
32
- store(descendant, descendant.my_singleton_methods)
33
- end
34
- descendants_with_methods
35
- end
36
- end
37
- end
38
- end
39
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../reflector'
4
-
5
- module Faker
6
- module CLI
7
- module Reflectors
8
- # Find command reflector
9
- # @api private
10
- #
11
- class Search < Reflector
12
- attr_reader :query
13
-
14
- def self.call(query)
15
- new(query).call
16
- end
17
-
18
- def initialize(query)
19
- @query = query
20
-
21
- super
22
- end
23
-
24
- def call
25
- search_descendants_matching_query
26
- descendants_with_methods
27
- end
28
-
29
- private
30
-
31
- def search_descendants_matching_query
32
- faker_descendants.each do |descendant|
33
- methods = descendant.my_singleton_methods
34
- matching = methods.select { |method| query_matches?(method.to_s) }
35
- store(descendant, matching)
36
- end
37
- end
38
-
39
- def query_matches?(method_name)
40
- method_name_parts = method_name.split(/_/).reject(&:empty?)
41
- query.match(/#{method_name_parts.join('|')}/)
42
- end
43
- end
44
- end
45
- end
46
- end
@@ -1,93 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'pastel'
4
- require 'tty/pager'
5
- require 'tty/screen'
6
- require 'tty/tree'
7
-
8
- module Faker
9
- module CLI
10
- class Renderer
11
- attr_reader :crayon, :hash, :options, :output, :pager
12
-
13
- def self.call(*args)
14
- new(*args).call
15
- end
16
-
17
- def initialize(hash, options, output)
18
- @hash = hash
19
- @options = options
20
- @output = output
21
- @crayon = Pastel.new(enabled: output.tty?)
22
- @pager = TTY::Pager.new(command: 'less -R')
23
- end
24
-
25
- def call
26
- if paginable?
27
- pager.page(render)
28
- else
29
- output.puts(render)
30
- end
31
- end
32
-
33
- def render
34
- tree.render
35
- end
36
-
37
- def tree
38
- @tree ||= TTY::Tree.new(build_tree)
39
- end
40
-
41
- def paginable?
42
- gt_screen_height? && output.tty?
43
- end
44
-
45
- def gt_screen_height?
46
- tree.nodes.size > TTY::Screen.height
47
- end
48
-
49
- private
50
-
51
- def build_tree
52
- results = hash.reduce({}) do |h, (const, methods)|
53
- h.merge! node(const, methods&.sort)
54
- end
55
-
56
- results.sort_by(&:to_s).to_h
57
- end
58
-
59
- def node(const, methods)
60
- {
61
- crayon.green(const.to_s) => leaf(const, methods)
62
- }
63
- end
64
-
65
- def leaf(const, methods)
66
- (methods || []).map { |m| crayon.cyan(*leaf_args(m, const)) }
67
- end
68
-
69
- def leaf_args(method, const)
70
- [method.to_s].tap { |arr| verbose_output(method, const, arr) if verbose? }
71
- end
72
-
73
- def verbose?
74
- options[:verbose]
75
- end
76
-
77
- def verbose_output(method, const, arr)
78
- fake, message = faker_method(method, const)
79
- arr << crayon.dim.white("=> #{fake}") << crayon.dim.magenta.bold(message.to_s)
80
- end
81
-
82
- def faker_method(method, const)
83
- [const.public_send(method), ensure_method_is_supported(method, const)]
84
- rescue ArgumentError => _exception
85
- ['N/A', '']
86
- end
87
-
88
- def ensure_method_is_supported(method, const)
89
- const.respond_to?(:"_deprecated_#{method}") ? ' ( WILL BE DEPRECATED )' : ''
90
- end
91
- end
92
- end
93
- end