new questions, new bundler, new version

This commit is contained in:
Georg Gadinger 2021-12-26 18:59:48 +01:00
parent c5f8362ff7
commit c826d9d2c8
8 changed files with 53 additions and 16 deletions

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
source 'https://rubygems.org' source 'https://rubygems.org'
gemspec gemspec

View File

@ -1,5 +1,5 @@
questiongenerator questiongenerator
Copyright (c) 2014 nilsding Copyright (c) 2014-2021 nilsding
MIT License MIT License

View File

@ -1,4 +1,4 @@
# questiongenerator [![Build Status](https://travis-ci.org/Retrospring/questiongenerator.svg?branch=master)](https://travis-ci.org/Retrospring/questiongenerator) # questiongenerator
A simple question generator, used by Retrospring (formerly justask). A simple question generator, used by Retrospring (formerly justask).
@ -10,7 +10,7 @@ Add this line to your application's Gemfile:
If you're feeling _edgy_, you can add this line instead: If you're feeling _edgy_, you can add this line instead:
gem 'questiongenerator', git: 'https://github.com/retrospring/questiongenerator.git' gem 'questiongenerator', git: 'https://github.com/nilsding/questiongenerator.git'
## Usage ## Usage
@ -87,7 +87,7 @@ The files for questions are located in `lib/questions/`
If you want to add a new language, create a new file and name it with the [ISO-639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of it (just like `en.yml`) If you want to add a new language, create a new file and name it with the [ISO-639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of it (just like `en.yml`)
1. Fork it ( https://github.com/retrospring/questiongenerator/fork ) 1. Fork it ( https://github.com/nilsding/questiongenerator/fork )
2. Create your feature branch (`git checkout -b my-new-feature`) 2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`) 3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`) 4. Push to the branch (`git push origin my-new-feature`)

View File

@ -1,9 +1,11 @@
# frozen_string_literal: true
require 'yaml' require 'yaml'
# Generates some questions. # Generates some questions.
module QuestionGenerator module QuestionGenerator
# Version of QuestionGenerator # Version of QuestionGenerator
VERSION = "0.1.0" VERSION = "1.0.0"
class << self class << self
# The base path to the questions (e.g. +'/home/nilsding/questions'+). # The base path to the questions (e.g. +'/home/nilsding/questions'+).

View File

@ -61,12 +61,17 @@ Do:
What: What:
- was: - was:
the: the:
best:
- day of your life like
last: last:
song:
- you listened on repeat
thing: thing:
you: you:
have: have:
- eaten - bought
- done - done
- eaten
your: your:
favourite: favourite:
song: song:
@ -94,21 +99,25 @@ What:
- the: - the:
- weekend - weekend
like: like:
more: more,:
- dogs or cats - dogs or cats
- shower or bath - shower or bath
- tea or coffee - tea or coffee
think: think:
about: about:
- the: - the:
- internet - Internet
- Bad Dragon - Bad Dragon
- dragons - dragons
- '"fact" accounts' - '"fact" accounts'
- society - society
- cats - cats
- surveillance - surveillance
- feminists - coyotes
- raccoons
- foxes
- dogs
- lizards
- activity: &activity - activity: &activity
do: do:
you: you:
@ -136,20 +145,25 @@ What:
- sports team - sports team
- activity - activity
- beverage - beverage
- internet browser - Internet browser
- piece of music - piece of music
- console - console
- snack - snack
- food - food
- animal
- programming language: - programming language:
- '' - ''
- and why is it: - and why is it:
- PHP - PHP
- Rust
- C++
- Lisp
- Pascal
- Swift
- Ruby
- website: - website:
- '' - ''
- and why is it: - and why is it:
- 4chan
- 9gag
- Reddit - Reddit
- Twitter - Twitter
- Facebook - Facebook
@ -159,7 +173,7 @@ What:
thing: thing:
- about: - about:
the: the:
- internet - Internet
your: your:
- favourite: - favourite:
- series - series
@ -190,6 +204,8 @@ What:
- "you've eaten so far" - "you've eaten so far"
worst: *was_the_best worst: *was_the_best
- languages do you know - languages do you know
- apps do you use daily
- 'is heavier: a kilogram of steel, or a kilogram of feathers'
Can: Can:
you: you:
- swim - swim
@ -207,6 +223,8 @@ Can:
- ski - ski
- cook - cook
- dance - dance
- yodel
- draw
Are: Are:
you: you:
- religious - religious
@ -241,6 +259,7 @@ Have:
- "from the 80's" - "from the 80's"
- dubstep - dubstep
- nightcore - nightcore
- metal
- had: - had:
- an: - an:
- accident - accident
@ -256,10 +275,14 @@ How:
old: old:
are: are:
- you - you
many:
- open tabs do you currently have
- followers is too many
Where: Where:
do: do:
you: you:
- work - work
- live
Which: Which:
food: food:
do: do:
@ -272,8 +295,14 @@ Who:
- most famous person you have met - most famous person you have met
your: your:
- favourite: - favourite:
- retrospring developer - Retrospring user
- retrospring moderator - actor
- artist
- comedian
- musician
Why:
do:
- they call it oven when you of in the cold food of out hot eat the food
Would: Would:
you: you:
rather: rather:

View File

@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"] spec.require_paths = ["lib"]
spec.add_development_dependency "bundler", "~> 1.6" spec.add_development_dependency "bundler", ">= 1.6", "< 3"
spec.add_development_dependency "rake" spec.add_development_dependency "rake"
spec.add_development_dependency "rspec" spec.add_development_dependency "rspec"
end end

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
describe QuestionGenerator do describe QuestionGenerator do
it 'applies a prefix to a question' do it 'applies a prefix to a question' do
prefix = "¿" prefix = "¿"

View File

@ -1,3 +1,5 @@
# frozen_string_literal: true
# This file was generated by the `rspec --init` command. Conventionally, all # This file was generated by the `rspec --init` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause # The generated `.rspec` file contains `--require spec_helper` which will cause