game_words 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +15 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +62 -0
- data/Rakefile +12 -0
- data/assets/game_words/game_words.yaml +4748 -0
- data/game_words.gemspec +23 -0
- data/lib/game_words/version.rb +3 -0
- data/lib/game_words.rb +51 -0
- data/spec/lib/generator_spec.rb +167 -0
- data/spec/spec_helper.rb +1 -0
- metadata +101 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 06e275f1d6d87d38f4526fcb7cdce5eab44a6287
|
4
|
+
data.tar.gz: 1b640fc0c4bb473f20483bdb63284032f2aadd91
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 38c63a2ddaad3c5d61a30498470e5b5c1d33d79b609442ef31bbd53799eb8274422783e3d8748be8e222b45de36141b3681574fd1fbf5021d4f2aa0c8c2a76e8
|
7
|
+
data.tar.gz: 3bf229aa9570aa2ec738549b615b8e7538673ff91b21036ad0d415c350832252b0bfa09f9f484163250f9ae8ba90044015e8080ea5d215d703c412f88e38677b
|
data/.gitignore
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
game_words
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
ruby-2.1.1
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Nick Aschenbach
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
# Gamewords
|
2
|
+
|
3
|
+
Find words, phrases, songs, movies, characters, actions and sayings for
|
4
|
+
Pictionary, Catchphrase, Charades or the holidays. Each game has several
|
5
|
+
categories including difficulty levels. This library returns a list for
|
6
|
+
some or all categories.
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'game_words'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
> bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
> gem install game_words
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
Find a list of games:
|
27
|
+
|
28
|
+
```ruby
|
29
|
+
GameWords::Generator.new.games
|
30
|
+
```
|
31
|
+
|
32
|
+
Find the categories for a game:
|
33
|
+
```ruby
|
34
|
+
gen = GameWords::Generator.new
|
35
|
+
gen.game_categories 'pictionary'
|
36
|
+
```
|
37
|
+
|
38
|
+
Get all words for all categories for a game:
|
39
|
+
|
40
|
+
```ruby
|
41
|
+
gen.words 'catchphrase'
|
42
|
+
```
|
43
|
+
|
44
|
+
Get the words for a game and category:
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
gen.words 'charades', 'hard'
|
48
|
+
```
|
49
|
+
|
50
|
+
Easily generate a random word:
|
51
|
+
|
52
|
+
```ruby
|
53
|
+
gen.words('pictionary', 'easy').sample
|
54
|
+
```
|
55
|
+
|
56
|
+
## Contributing
|
57
|
+
|
58
|
+
1. Fork it ( https://github.com/[my-github-username]/gamewords/fork )
|
59
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
60
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
61
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
62
|
+
5. Create a new Pull Request
|