diff --git a/Gemfile b/Gemfile index fa75df1..7f4f5e9 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source 'https://rubygems.org' gemspec diff --git a/LICENSE.txt b/LICENSE.txt index 32b5fd4..c0662d4 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ questiongenerator -Copyright (c) 2014 nilsding +Copyright (c) 2014-2021 nilsding MIT License diff --git a/README.md b/README.md index d07b675..d5b4fc0 100644 --- a/README.md +++ b/README.md @@ -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). @@ -10,7 +10,7 @@ Add this line to your application's Gemfile: 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 @@ -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`) -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`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) diff --git a/lib/questiongenerator.rb b/lib/questiongenerator.rb index 0344bad..d42013f 100644 --- a/lib/questiongenerator.rb +++ b/lib/questiongenerator.rb @@ -1,9 +1,11 @@ +# frozen_string_literal: true + require 'yaml' # Generates some questions. module QuestionGenerator # Version of QuestionGenerator - VERSION = "0.1.0" + VERSION = "1.0.0" class << self # The base path to the questions (e.g. +'/home/nilsding/questions'+). diff --git a/lib/questions/en.yml b/lib/questions/en.yml index e7340fe..e647017 100644 --- a/lib/questions/en.yml +++ b/lib/questions/en.yml @@ -61,12 +61,17 @@ Do: What: - was: the: + best: + - day of your life like last: + song: + - you listened on repeat thing: you: have: - - eaten + - bought - done + - eaten your: favourite: song: @@ -94,21 +99,25 @@ What: - the: - weekend like: - more: + more,: - dogs or cats - shower or bath - tea or coffee think: about: - the: - - internet + - Internet - Bad Dragon - dragons - '"fact" accounts' - society - cats - surveillance - - feminists + - coyotes + - raccoons + - foxes + - dogs + - lizards - activity: &activity do: you: @@ -136,20 +145,25 @@ What: - sports team - activity - beverage - - internet browser + - Internet browser - piece of music - console - snack - food + - animal - programming language: - '' - and why is it: - PHP + - Rust + - C++ + - Lisp + - Pascal + - Swift + - Ruby - website: - '' - and why is it: - - 4chan - - 9gag - Reddit - Twitter - Facebook @@ -159,7 +173,7 @@ What: thing: - about: the: - - internet + - Internet your: - favourite: - series @@ -190,6 +204,8 @@ What: - "you've eaten so far" worst: *was_the_best - languages do you know + - apps do you use daily + - 'is heavier: a kilogram of steel, or a kilogram of feathers' Can: you: - swim @@ -207,6 +223,8 @@ Can: - ski - cook - dance + - yodel + - draw Are: you: - religious @@ -241,6 +259,7 @@ Have: - "from the 80's" - dubstep - nightcore + - metal - had: - an: - accident @@ -256,10 +275,14 @@ How: old: are: - you + many: + - open tabs do you currently have + - followers is too many Where: do: you: - work + - live Which: food: do: @@ -272,8 +295,14 @@ Who: - most famous person you have met your: - favourite: - - retrospring developer - - retrospring moderator + - Retrospring user + - actor + - artist + - comedian + - musician +Why: + do: + - they call it oven when you of in the cold food of out hot eat the food Would: you: rather: diff --git a/questiongenerator.gemspec b/questiongenerator.gemspec index 322ef1a..39a3110 100644 --- a/questiongenerator.gemspec +++ b/questiongenerator.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) 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 "rspec" end diff --git a/spec/questiongenerator_spec.rb b/spec/questiongenerator_spec.rb index 4838c3c..f575c0e 100644 --- a/spec/questiongenerator_spec.rb +++ b/spec/questiongenerator_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + describe QuestionGenerator do it 'applies a prefix to a question' do prefix = "¿" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b598abe..d15b522 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause