faker-fantasy 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 2bbcadf9eb3bf80a6cf888db80436a1e19faf6b4
4
+ data.tar.gz: d3fd6230c91a7b3520fd066161f03da011a24ea9
5
+ SHA512:
6
+ metadata.gz: ff1f7aa29bfc10b5afada552d70086ce989fe6ac88a3c9886970abf1043e4a9bf755d33474baea29b4a1f9cb96ccbf61b161895369ac716ef18e018d733719db
7
+ data.tar.gz: 59eb212081cbbf96ea9cf8c9d4a6ba6b375ca1bfdb10cb0662160dc0d99899d12102c696b86232ae1a9b157dabf050c4ea195436d73c79d3da324ae5e1075407
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.0
4
+ before_install: gem install bundler -v 1.11.2
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in faker-fantasy.gemspec
4
+ gemspec
@@ -0,0 +1,359 @@
1
+ Creative Commons Legal Code
2
+
3
+ Attribution-ShareAlike 3.0 Unported
4
+
5
+ CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
6
+ LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
7
+ ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
8
+ INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
9
+ REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
10
+ DAMAGES RESULTING FROM ITS USE.
11
+
12
+ License
13
+
14
+ THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
15
+ COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
16
+ COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
17
+ AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
18
+
19
+ BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
20
+ TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
21
+ BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
22
+ CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
23
+ CONDITIONS.
24
+
25
+ 1. Definitions
26
+
27
+ a. "Adaptation" means a work based upon the Work, or upon the Work and
28
+ other pre-existing works, such as a translation, adaptation,
29
+ derivative work, arrangement of music or other alterations of a
30
+ literary or artistic work, or phonogram or performance and includes
31
+ cinematographic adaptations or any other form in which the Work may be
32
+ recast, transformed, or adapted including in any form recognizably
33
+ derived from the original, except that a work that constitutes a
34
+ Collection will not be considered an Adaptation for the purpose of
35
+ this License. For the avoidance of doubt, where the Work is a musical
36
+ work, performance or phonogram, the synchronization of the Work in
37
+ timed-relation with a moving image ("synching") will be considered an
38
+ Adaptation for the purpose of this License.
39
+ b. "Collection" means a collection of literary or artistic works, such as
40
+ encyclopedias and anthologies, or performances, phonograms or
41
+ broadcasts, or other works or subject matter other than works listed
42
+ in Section 1(f) below, which, by reason of the selection and
43
+ arrangement of their contents, constitute intellectual creations, in
44
+ which the Work is included in its entirety in unmodified form along
45
+ with one or more other contributions, each constituting separate and
46
+ independent works in themselves, which together are assembled into a
47
+ collective whole. A work that constitutes a Collection will not be
48
+ considered an Adaptation (as defined below) for the purposes of this
49
+ License.
50
+ c. "Creative Commons Compatible License" means a license that is listed
51
+ at https://creativecommons.org/compatiblelicenses that has been
52
+ approved by Creative Commons as being essentially equivalent to this
53
+ License, including, at a minimum, because that license: (i) contains
54
+ terms that have the same purpose, meaning and effect as the License
55
+ Elements of this License; and, (ii) explicitly permits the relicensing
56
+ of adaptations of works made available under that license under this
57
+ License or a Creative Commons jurisdiction license with the same
58
+ License Elements as this License.
59
+ d. "Distribute" means to make available to the public the original and
60
+ copies of the Work or Adaptation, as appropriate, through sale or
61
+ other transfer of ownership.
62
+ e. "License Elements" means the following high-level license attributes
63
+ as selected by Licensor and indicated in the title of this License:
64
+ Attribution, ShareAlike.
65
+ f. "Licensor" means the individual, individuals, entity or entities that
66
+ offer(s) the Work under the terms of this License.
67
+ g. "Original Author" means, in the case of a literary or artistic work,
68
+ the individual, individuals, entity or entities who created the Work
69
+ or if no individual or entity can be identified, the publisher; and in
70
+ addition (i) in the case of a performance the actors, singers,
71
+ musicians, dancers, and other persons who act, sing, deliver, declaim,
72
+ play in, interpret or otherwise perform literary or artistic works or
73
+ expressions of folklore; (ii) in the case of a phonogram the producer
74
+ being the person or legal entity who first fixes the sounds of a
75
+ performance or other sounds; and, (iii) in the case of broadcasts, the
76
+ organization that transmits the broadcast.
77
+ h. "Work" means the literary and/or artistic work offered under the terms
78
+ of this License including without limitation any production in the
79
+ literary, scientific and artistic domain, whatever may be the mode or
80
+ form of its expression including digital form, such as a book,
81
+ pamphlet and other writing; a lecture, address, sermon or other work
82
+ of the same nature; a dramatic or dramatico-musical work; a
83
+ choreographic work or entertainment in dumb show; a musical
84
+ composition with or without words; a cinematographic work to which are
85
+ assimilated works expressed by a process analogous to cinematography;
86
+ a work of drawing, painting, architecture, sculpture, engraving or
87
+ lithography; a photographic work to which are assimilated works
88
+ expressed by a process analogous to photography; a work of applied
89
+ art; an illustration, map, plan, sketch or three-dimensional work
90
+ relative to geography, topography, architecture or science; a
91
+ performance; a broadcast; a phonogram; a compilation of data to the
92
+ extent it is protected as a copyrightable work; or a work performed by
93
+ a variety or circus performer to the extent it is not otherwise
94
+ considered a literary or artistic work.
95
+ i. "You" means an individual or entity exercising rights under this
96
+ License who has not previously violated the terms of this License with
97
+ respect to the Work, or who has received express permission from the
98
+ Licensor to exercise rights under this License despite a previous
99
+ violation.
100
+ j. "Publicly Perform" means to perform public recitations of the Work and
101
+ to communicate to the public those public recitations, by any means or
102
+ process, including by wire or wireless means or public digital
103
+ performances; to make available to the public Works in such a way that
104
+ members of the public may access these Works from a place and at a
105
+ place individually chosen by them; to perform the Work to the public
106
+ by any means or process and the communication to the public of the
107
+ performances of the Work, including by public digital performance; to
108
+ broadcast and rebroadcast the Work by any means including signs,
109
+ sounds or images.
110
+ k. "Reproduce" means to make copies of the Work by any means including
111
+ without limitation by sound or visual recordings and the right of
112
+ fixation and reproducing fixations of the Work, including storage of a
113
+ protected performance or phonogram in digital form or other electronic
114
+ medium.
115
+
116
+ 2. Fair Dealing Rights. Nothing in this License is intended to reduce,
117
+ limit, or restrict any uses free from copyright or rights arising from
118
+ limitations or exceptions that are provided for in connection with the
119
+ copyright protection under copyright law or other applicable laws.
120
+
121
+ 3. License Grant. Subject to the terms and conditions of this License,
122
+ Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
123
+ perpetual (for the duration of the applicable copyright) license to
124
+ exercise the rights in the Work as stated below:
125
+
126
+ a. to Reproduce the Work, to incorporate the Work into one or more
127
+ Collections, and to Reproduce the Work as incorporated in the
128
+ Collections;
129
+ b. to create and Reproduce Adaptations provided that any such Adaptation,
130
+ including any translation in any medium, takes reasonable steps to
131
+ clearly label, demarcate or otherwise identify that changes were made
132
+ to the original Work. For example, a translation could be marked "The
133
+ original work was translated from English to Spanish," or a
134
+ modification could indicate "The original work has been modified.";
135
+ c. to Distribute and Publicly Perform the Work including as incorporated
136
+ in Collections; and,
137
+ d. to Distribute and Publicly Perform Adaptations.
138
+ e. For the avoidance of doubt:
139
+
140
+ i. Non-waivable Compulsory License Schemes. In those jurisdictions in
141
+ which the right to collect royalties through any statutory or
142
+ compulsory licensing scheme cannot be waived, the Licensor
143
+ reserves the exclusive right to collect such royalties for any
144
+ exercise by You of the rights granted under this License;
145
+ ii. Waivable Compulsory License Schemes. In those jurisdictions in
146
+ which the right to collect royalties through any statutory or
147
+ compulsory licensing scheme can be waived, the Licensor waives the
148
+ exclusive right to collect such royalties for any exercise by You
149
+ of the rights granted under this License; and,
150
+ iii. Voluntary License Schemes. The Licensor waives the right to
151
+ collect royalties, whether individually or, in the event that the
152
+ Licensor is a member of a collecting society that administers
153
+ voluntary licensing schemes, via that society, from any exercise
154
+ by You of the rights granted under this License.
155
+
156
+ The above rights may be exercised in all media and formats whether now
157
+ known or hereafter devised. The above rights include the right to make
158
+ such modifications as are technically necessary to exercise the rights in
159
+ other media and formats. Subject to Section 8(f), all rights not expressly
160
+ granted by Licensor are hereby reserved.
161
+
162
+ 4. Restrictions. The license granted in Section 3 above is expressly made
163
+ subject to and limited by the following restrictions:
164
+
165
+ a. You may Distribute or Publicly Perform the Work only under the terms
166
+ of this License. You must include a copy of, or the Uniform Resource
167
+ Identifier (URI) for, this License with every copy of the Work You
168
+ Distribute or Publicly Perform. You may not offer or impose any terms
169
+ on the Work that restrict the terms of this License or the ability of
170
+ the recipient of the Work to exercise the rights granted to that
171
+ recipient under the terms of the License. You may not sublicense the
172
+ Work. You must keep intact all notices that refer to this License and
173
+ to the disclaimer of warranties with every copy of the Work You
174
+ Distribute or Publicly Perform. When You Distribute or Publicly
175
+ Perform the Work, You may not impose any effective technological
176
+ measures on the Work that restrict the ability of a recipient of the
177
+ Work from You to exercise the rights granted to that recipient under
178
+ the terms of the License. This Section 4(a) applies to the Work as
179
+ incorporated in a Collection, but this does not require the Collection
180
+ apart from the Work itself to be made subject to the terms of this
181
+ License. If You create a Collection, upon notice from any Licensor You
182
+ must, to the extent practicable, remove from the Collection any credit
183
+ as required by Section 4(c), as requested. If You create an
184
+ Adaptation, upon notice from any Licensor You must, to the extent
185
+ practicable, remove from the Adaptation any credit as required by
186
+ Section 4(c), as requested.
187
+ b. You may Distribute or Publicly Perform an Adaptation only under the
188
+ terms of: (i) this License; (ii) a later version of this License with
189
+ the same License Elements as this License; (iii) a Creative Commons
190
+ jurisdiction license (either this or a later license version) that
191
+ contains the same License Elements as this License (e.g.,
192
+ Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible
193
+ License. If you license the Adaptation under one of the licenses
194
+ mentioned in (iv), you must comply with the terms of that license. If
195
+ you license the Adaptation under the terms of any of the licenses
196
+ mentioned in (i), (ii) or (iii) (the "Applicable License"), you must
197
+ comply with the terms of the Applicable License generally and the
198
+ following provisions: (I) You must include a copy of, or the URI for,
199
+ the Applicable License with every copy of each Adaptation You
200
+ Distribute or Publicly Perform; (II) You may not offer or impose any
201
+ terms on the Adaptation that restrict the terms of the Applicable
202
+ License or the ability of the recipient of the Adaptation to exercise
203
+ the rights granted to that recipient under the terms of the Applicable
204
+ License; (III) You must keep intact all notices that refer to the
205
+ Applicable License and to the disclaimer of warranties with every copy
206
+ of the Work as included in the Adaptation You Distribute or Publicly
207
+ Perform; (IV) when You Distribute or Publicly Perform the Adaptation,
208
+ You may not impose any effective technological measures on the
209
+ Adaptation that restrict the ability of a recipient of the Adaptation
210
+ from You to exercise the rights granted to that recipient under the
211
+ terms of the Applicable License. This Section 4(b) applies to the
212
+ Adaptation as incorporated in a Collection, but this does not require
213
+ the Collection apart from the Adaptation itself to be made subject to
214
+ the terms of the Applicable License.
215
+ c. If You Distribute, or Publicly Perform the Work or any Adaptations or
216
+ Collections, You must, unless a request has been made pursuant to
217
+ Section 4(a), keep intact all copyright notices for the Work and
218
+ provide, reasonable to the medium or means You are utilizing: (i) the
219
+ name of the Original Author (or pseudonym, if applicable) if supplied,
220
+ and/or if the Original Author and/or Licensor designate another party
221
+ or parties (e.g., a sponsor institute, publishing entity, journal) for
222
+ attribution ("Attribution Parties") in Licensor's copyright notice,
223
+ terms of service or by other reasonable means, the name of such party
224
+ or parties; (ii) the title of the Work if supplied; (iii) to the
225
+ extent reasonably practicable, the URI, if any, that Licensor
226
+ specifies to be associated with the Work, unless such URI does not
227
+ refer to the copyright notice or licensing information for the Work;
228
+ and (iv) , consistent with Ssection 3(b), in the case of an
229
+ Adaptation, a credit identifying the use of the Work in the Adaptation
230
+ (e.g., "French translation of the Work by Original Author," or
231
+ "Screenplay based on original Work by Original Author"). The credit
232
+ required by this Section 4(c) may be implemented in any reasonable
233
+ manner; provided, however, that in the case of a Adaptation or
234
+ Collection, at a minimum such credit will appear, if a credit for all
235
+ contributing authors of the Adaptation or Collection appears, then as
236
+ part of these credits and in a manner at least as prominent as the
237
+ credits for the other contributing authors. For the avoidance of
238
+ doubt, You may only use the credit required by this Section for the
239
+ purpose of attribution in the manner set out above and, by exercising
240
+ Your rights under this License, You may not implicitly or explicitly
241
+ assert or imply any connection with, sponsorship or endorsement by the
242
+ Original Author, Licensor and/or Attribution Parties, as appropriate,
243
+ of You or Your use of the Work, without the separate, express prior
244
+ written permission of the Original Author, Licensor and/or Attribution
245
+ Parties.
246
+ d. Except as otherwise agreed in writing by the Licensor or as may be
247
+ otherwise permitted by applicable law, if You Reproduce, Distribute or
248
+ Publicly Perform the Work either by itself or as part of any
249
+ Adaptations or Collections, You must not distort, mutilate, modify or
250
+ take other derogatory action in relation to the Work which would be
251
+ prejudicial to the Original Author's honor or reputation. Licensor
252
+ agrees that in those jurisdictions (e.g. Japan), in which any exercise
253
+ of the right granted in Section 3(b) of this License (the right to
254
+ make Adaptations) would be deemed to be a distortion, mutilation,
255
+ modification or other derogatory action prejudicial to the Original
256
+ Author's honor and reputation, the Licensor will waive or not assert,
257
+ as appropriate, this Section, to the fullest extent permitted by the
258
+ applicable national law, to enable You to reasonably exercise Your
259
+ right under Section 3(b) of this License (right to make Adaptations)
260
+ but not otherwise.
261
+
262
+ 5. Representations, Warranties and Disclaimer
263
+
264
+ UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
265
+ OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
266
+ KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
267
+ INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
268
+ FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
269
+ LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
270
+ WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
271
+ OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
272
+
273
+ 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
274
+ LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
275
+ ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
276
+ ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
277
+ BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
278
+
279
+ 7. Termination
280
+
281
+ a. This License and the rights granted hereunder will terminate
282
+ automatically upon any breach by You of the terms of this License.
283
+ Individuals or entities who have received Adaptations or Collections
284
+ from You under this License, however, will not have their licenses
285
+ terminated provided such individuals or entities remain in full
286
+ compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
287
+ survive any termination of this License.
288
+ b. Subject to the above terms and conditions, the license granted here is
289
+ perpetual (for the duration of the applicable copyright in the Work).
290
+ Notwithstanding the above, Licensor reserves the right to release the
291
+ Work under different license terms or to stop distributing the Work at
292
+ any time; provided, however that any such election will not serve to
293
+ withdraw this License (or any other license that has been, or is
294
+ required to be, granted under the terms of this License), and this
295
+ License will continue in full force and effect unless terminated as
296
+ stated above.
297
+
298
+ 8. Miscellaneous
299
+
300
+ a. Each time You Distribute or Publicly Perform the Work or a Collection,
301
+ the Licensor offers to the recipient a license to the Work on the same
302
+ terms and conditions as the license granted to You under this License.
303
+ b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
304
+ offers to the recipient a license to the original Work on the same
305
+ terms and conditions as the license granted to You under this License.
306
+ c. If any provision of this License is invalid or unenforceable under
307
+ applicable law, it shall not affect the validity or enforceability of
308
+ the remainder of the terms of this License, and without further action
309
+ by the parties to this agreement, such provision shall be reformed to
310
+ the minimum extent necessary to make such provision valid and
311
+ enforceable.
312
+ d. No term or provision of this License shall be deemed waived and no
313
+ breach consented to unless such waiver or consent shall be in writing
314
+ and signed by the party to be charged with such waiver or consent.
315
+ e. This License constitutes the entire agreement between the parties with
316
+ respect to the Work licensed here. There are no understandings,
317
+ agreements or representations with respect to the Work not specified
318
+ here. Licensor shall not be bound by any additional provisions that
319
+ may appear in any communication from You. This License may not be
320
+ modified without the mutual written agreement of the Licensor and You.
321
+ f. The rights granted under, and the subject matter referenced, in this
322
+ License were drafted utilizing the terminology of the Berne Convention
323
+ for the Protection of Literary and Artistic Works (as amended on
324
+ September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
325
+ Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
326
+ and the Universal Copyright Convention (as revised on July 24, 1971).
327
+ These rights and subject matter take effect in the relevant
328
+ jurisdiction in which the License terms are sought to be enforced
329
+ according to the corresponding provisions of the implementation of
330
+ those treaty provisions in the applicable national law. If the
331
+ standard suite of rights granted under applicable copyright law
332
+ includes additional rights not granted under this License, such
333
+ additional rights are deemed to be included in the License; this
334
+ License is not intended to restrict the license of any rights under
335
+ applicable law.
336
+
337
+
338
+ Creative Commons Notice
339
+
340
+ Creative Commons is not a party to this License, and makes no warranty
341
+ whatsoever in connection with the Work. Creative Commons will not be
342
+ liable to You or any party on any legal theory for any damages
343
+ whatsoever, including without limitation any general, special,
344
+ incidental or consequential damages arising in connection to this
345
+ license. Notwithstanding the foregoing two (2) sentences, if Creative
346
+ Commons has expressly identified itself as the Licensor hereunder, it
347
+ shall have all rights and obligations of Licensor.
348
+
349
+ Except for the limited purpose of indicating to the public that the
350
+ Work is licensed under the CCPL, Creative Commons does not authorize
351
+ the use by either party of the trademark "Creative Commons" or any
352
+ related trademark or logo of Creative Commons without the prior
353
+ written consent of Creative Commons. Any permitted use will be in
354
+ compliance with Creative Commons' then-current trademark usage
355
+ guidelines, as may be published on its website or otherwise made
356
+ available upon request from time to time. For the avoidance of doubt,
357
+ this trademark restriction does not form part of the License.
358
+
359
+ Creative Commons may be contacted at https://creativecommons.org/.
@@ -0,0 +1,32 @@
1
+ # Faker::Fantasy
2
+
3
+ This gem adds the Random Place and Random Region tables from [The Perilous Wilds](https://www.kickstarter.com/projects/1735046512/perilous-journeys) to Faker in the Faker::Fantasy module.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'faker-fantasy'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install faker-fantasy
20
+
21
+ ## Usage
22
+
23
+ TODO: Write usage instructions here
24
+
25
+ ## Contributing
26
+
27
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rickenharp/faker-fantasy.
28
+
29
+
30
+ ## License
31
+
32
+ The gem is available as open source under the terms of the [Creative Commons Attribution-ShareAlike 3.0 Unported License](https://creativecommons.org/licenses/by-sa/3.0/).
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "faker/fantasy"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,25 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'faker/fantasy/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'faker-fantasy'
8
+ spec.version = Faker::Fantasy::VERSION
9
+ spec.authors = ['Alexander Graefe']
10
+ spec.email = ['alexander.graefe@googlemail.com']
11
+
12
+ spec.summary = 'Random place and regions names for Faker'
13
+ spec.homepage = 'https://github.com/rickenharp/faker-fantasy'
14
+ spec.license = 'CC BY-SA 3.0'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = 'exe'
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.11'
22
+ spec.add_development_dependency 'rake', '~> 10.0'
23
+ spec.add_development_dependency 'rspec', '~> 3.0'
24
+ spec.add_runtime_dependency 'faker', '~> 1.6.0'
25
+ end
@@ -0,0 +1,48 @@
1
+ require 'faker'
2
+
3
+ mydir = File.expand_path(File.dirname(__FILE__) + '/..')
4
+ I18n.load_path += Dir[File.join(mydir, 'locales', '*.yml')]
5
+
6
+ module Faker
7
+ class Fantasy < Base
8
+ flexible :fantasy
9
+
10
+ class << self
11
+ def region_name
12
+ parse('fantasy.region.format')
13
+ end
14
+
15
+ def place_name
16
+ parse('fantasy.place.format')
17
+ end
18
+
19
+ def terrain
20
+ fetch('fantasy.region.terrain')
21
+ end
22
+
23
+ def region_adjective
24
+ fetch('fantasy.region.adjective')
25
+ end
26
+
27
+ def region_noun
28
+ fetch('fantasy.region.noun')
29
+ end
30
+
31
+ def place_place
32
+ fetch('fantasy.place.place')
33
+ end
34
+
35
+ def place_adjective
36
+ fetch('fantasy.place.adjective')
37
+ end
38
+
39
+ def place_noun
40
+ fetch('fantasy.place.noun')
41
+ end
42
+
43
+ def the
44
+ 'The'
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,7 @@
1
+ require 'faker'
2
+
3
+ module Faker
4
+ class Fantasy < Base
5
+ VERSION = '0.1.0'.freeze
6
+ end
7
+ end
@@ -0,0 +1,25 @@
1
+ en:
2
+ faker:
3
+ fantasy:
4
+ region:
5
+ format:
6
+ - "#{region_adjective} #{terrain}"
7
+ - "#{terrain} of (the) #{region_noun}"
8
+ - "#{the} #{region_adjective} #{terrain}"
9
+ - "#{region_noun} #{terrain}"
10
+ - "#{region_noun}'s #{region_adjective} #{terrain}"
11
+ - "#{region_adjective} #{terrain} of (the) #{region_noun}"
12
+ terrain: [Bay, Bluffs, Bog, Cliffs, Desert, Downs, Dunes, Expanse, Fells, Fen, Flats, Foothills, Forest, Groves, Heath, Heights, Hills, Hollows, Jungle, Lake, Lowland, March, Marsh, Meadows, Moor, Morass, Mounds, Mountains, Peaks, Plains, Prairie, Quagmire, Range, Reach, Sands, Savanna, Scarps, Sea, Slough, Sound, Steppe, Swamp, Sweep, Teeth, Thicket, Upland, Wall, Waste, Wasteland, Woods]
13
+ adjective: [Ageless, Ashen, Black, Blessed, Blighted, Blue, Broken, Burning, Cold, Cursed, Dark, Dead, Deadly, Deep, Desolate, Diamond, Dim, Dismal, Dun, Eerie, Endless, Fallen, Far, Fell, Flaming, Forgotten, Forsaken, Frozen, Glittering, Golden, Green, Grim, Holy, Impassable, Jagged, Light, Long, Misty, Perilous, Purple, Red, Savage, Shadowy, Shattered, Shifting, Shining, Silver, White, Wicked, Yellow]
14
+ noun: [Ash, Bone, Darkness, Dead, Death, Desolation, Despair, Devil, Doom, Dragon, Fate, Fear, Fire, Fury, Ghost, Giant, God, Gold, Heaven, Hell, Honor, Hope, Horror, King, Life, Light, Lord, Mist, Peril, Queen, Rain, Refuge, Regret, Savior, Shadow, Silver, Skull, Sky, Smoke, Snake, Sorrow, Storm, Sun, Thorn, Thunder, Traitor, Troll, Victory, Witch]
15
+ place:
16
+ format:
17
+ - "#{the} #{place_place}"
18
+ - "#{the} #{place_adjective} #{place_place}"
19
+ - "#{the} #{place_place} of (the) #{place_noun}"
20
+ - "#{the} #{place_noun}'s #{place_place}"
21
+ - "#{place_place} of the #{place_adjective} #{place_noun}"
22
+ - "#{the} #{place_adjective} #{place_noun}"
23
+ place: [Barrier, Beach, Bowl, Camp, Cave, Circle, City, Cliff, Crater, Crossing, Crypt, Den, Ditch, Falls, Fence, Field, Fort, Gate, Grove, Hill, Hole, Hut, Keep, Lake, Marsh, Meadow, Mountain, Pit, Post, Ridge, Ring, Rise, Road, Rock, Ruin, Shrine, Spire, Spring, Stone, Tangle, Temple, Throne, Tomb, Tower, Town, Tree, Vale, Valley, Village, Wall]
24
+ adjective: [Ancient, Ashen, Black, Bloody, Blue, Bright, Broken, Burning, Clouded, Copper, Cracked, Dark, Dead, Doomed, Endless, Fallen, Far, Fearsome, Floating, Forbidden, Frozen, Ghostly, Gloomy, Golden, Grim, Hidden, High, Iron, Jagged, Lonely, Lost, Low, Near, Petrified, Red, Screaming, Sharp, Shattered, Shifting, Shining, Shivering, Shrouded, Silver, Stalwart, Stoney, Sunken, Thorny, Thundering, White, Withered]
25
+ noun: [Arm, Ash, Blood, Child, Cinder, Corpse, Crystal, Dagger, Death, Demon, Devil, Doom, Eye, Fear, Finger, Fire, Foot, Ghost, Giant, Goblin, God, Gold, Hand, Head, Heart, Hero, Hope, King, Knave, Knight, Muck, Mud, Priest, Queen, Sailor, Silver, Skull, Smoke, Souls, Spear, Spirit, Stone, Sword, Thief, Troll, Warrior, Water, Witch, Wizard]
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: faker-fantasy
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexander Graefe
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-03-15 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.11'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.11'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: faker
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 1.6.0
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 1.6.0
69
+ description:
70
+ email:
71
+ - alexander.graefe@googlemail.com
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - LICENSE.txt
81
+ - README.md
82
+ - Rakefile
83
+ - bin/console
84
+ - bin/setup
85
+ - faker-fantasy.gemspec
86
+ - lib/faker/fantasy.rb
87
+ - lib/faker/fantasy/version.rb
88
+ - lib/locales/en.yml
89
+ homepage: https://github.com/rickenharp/faker-fantasy
90
+ licenses:
91
+ - CC BY-SA 3.0
92
+ metadata: {}
93
+ post_install_message:
94
+ rdoc_options: []
95
+ require_paths:
96
+ - lib
97
+ required_ruby_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ required_rubygems_version: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ version: '0'
107
+ requirements: []
108
+ rubyforge_project:
109
+ rubygems_version: 2.5.1
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: Random place and regions names for Faker
113
+ test_files: []