Coder Social home page Coder Social logo

sottenad / jservice Goto Github PK

View Code? Open in Web Editor NEW
488.0 488.0 94.0 17.77 MB

A set of simple trivia service that serves the answers/questions pulled from jArchive

Home Page: http://jservice.io

License: MIT License

Ruby 68.73% JavaScript 1.30% CSS 3.22% HTML 26.70% Procfile 0.05%

jservice's People

Contributors

aarontam avatar akump avatar bbodenmiller avatar coleww avatar desmondw avatar djds23 avatar ilkermutlu avatar kailanjian avatar paradise1 avatar pfroud avatar sottenad avatar yanigisawa avatar yawan-1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jservice's Issues

Handle clues with <br> tags in clue_text

Clues with a <br> tag in the clue_text aren't captured properly, since it's not part of the text().

For example, in Show #6934, the first clue_text is captured as charmeck.orgis the site for this city & Mecklenburg County (note the missing space between .org and is).

Feature Request: Generate multiple incorrect answers for questions

Hello, I'm building a relatively extensive study platform and am going to be building a data scraping API to gather and generate correct and incorrect answers to questions.

I was wondering if you have any thoughts on this and whether or not your service could be modified to provide 1 correct answer per question as well as a few incorrect ones as well (based on the context of the question).

API Response for 'Invalid' Endpoint

Is there an example payload that's returned from the /api/invalid endpoint? I don't want to mark a clue invalid just to see what the APIs response is. Or if there's a specific clue id that we can mark invalid solely for testing purposes?

PG::ConnectionBad: FATAL: database "jarchive_development" does not exist

Hi,

I am new to rails and postgres, and I am trying to setup jService and stuck at the following error:

$ noglob bundle exec rake get_clues[1,4]
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activesupport-4.0.2/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:76: warning: circular argument reference - reflection
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:80: warning: circular argument reference - reflection
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:84: warning: circular argument reference - reflection
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:103: warning: circular argument reference - reflection
rake aborted!
PG::ConnectionBad: FATAL:  database "jarchive_development" does not exist
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `initialize'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `new'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:831:in `connect'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:548:in `initialize'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `new'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/postgresql_adapter.rb:41:in `postgresql_connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:440:in `new_connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:450:in `checkout_new_connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:421:in `acquire_connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:356:in `block in checkout'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:355:in `checkout'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:265:in `block in connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:264:in `connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:546:in `retrieve_connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:79:in `retrieve_connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/connection_handling.rb:53:in `connection'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/model_schema.rb:208:in `columns'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/model_schema.rb:217:in `columns_hash'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/dynamic_matchers.rb:60:in `block in valid?'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/dynamic_matchers.rb:60:in `each'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/dynamic_matchers.rb:60:in `all?'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/dynamic_matchers.rb:60:in `valid?'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/activerecord-4.0.2/lib/active_record/dynamic_matchers.rb:18:in `method_missing'
/home/ubuntu/jService-master/lib/tasks/get_latest.rake:48:in `block (3 levels) in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.6.5/lib/nokogiri/xml/node_set.rb:237:in `block in each'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.6.5/lib/nokogiri/xml/node_set.rb:236:in `upto'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/nokogiri-1.6.5/lib/nokogiri/xml/node_set.rb:236:in `each'
/home/ubuntu/jService-master/lib/tasks/get_latest.rake:46:in `block (2 levels) in <top (required)>'
/home/ubuntu/jService-master/lib/tasks/get_latest.rake:28:in `each'
/home/ubuntu/jService-master/lib/tasks/get_latest.rake:28:in `block in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/home/ubuntu/.rvm/gems/ruby-2.3.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/bin/bundle:23:in `load'
/home/ubuntu/.rvm/gems/ruby-2.3.0/bin/bundle:23:in `<main>'
/home/ubuntu/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/home/ubuntu/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => get_clues
(See full trace by running task with --trace)

Thank you!

FEB 11th: DNS DOWN

To anyone trying to use jservice right now - we are experiencing a DNS issue with our managed DNS provider. We are working to get more information.

jservice.io is down

This is currently down, might be the DNS. I was using this for a school project for my students, and it was up not that long ago, but now I can't finish marking. Hopefully this is an easy fix

Stop using whiny_nils

DEPRECATION WARNING: config.whiny_nils option is deprecated and no longer works. (called from block in <top (required)> at /Users/myuser/Projects/jService/config/environments/test.rb:15)

I received this error when trying to run RAILS_ENV=test rake db:migrate

rake 'get_clues[n,m]' fails with error

When you attempt to get_clues, you get an error:

NoMethodError: undefined method `captures' for nil:NilClass

	  			var_answer = answermatch.captures[0].to_s
	  			                        ^^^^^^^^^

This is because the answermatch might be nil. I fixed it by placing that into an if block checking for nil answermatch and skipping if not - and then it works - but it doesn't.

Now it doesn't make ANY clues. It correctly gets categories, but never gets a single clue.

Unable to run 'rake get_clues[30,31]' - returns error

I haven't imported the whole database (as I'm not totally sure how), but I figured I could just use questions/categories from a certain season, as suggested in the Readme.

I've bundle installed everything successfully, and I'm able to make calls to the (empty) api/clues/ on my local host. However, when I try to populate the database using rake get_clues[30,31], I get the following error:

/usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.0.2/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now
/usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:76: warning: circular argument reference - reflection
/usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:80: warning: circular argument reference - reflection
/usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:84: warning: circular argument reference - reflection
/usr/local/var/rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activerecord-4.0.2/lib/active_record/associations/has_many_association.rb:103: warning: circular argument reference - reflection
rake aborted!
NoMethodError: undefined method `sanitize_forbidden_attributes' for #<PgSearch::Document:0x007f840d756fc8>
Did you mean?  sanitize_for_mass_assignment
/Users/tuckyeah/wdi/projects/jService/lib/tasks/get_latest.rake:48:in `block (3 levels) in <top (required)>'
/Users/tuckyeah/wdi/projects/jService/lib/tasks/get_latest.rake:46:in `block (2 levels) in <top (required)>'
/Users/tuckyeah/wdi/projects/jService/lib/tasks/get_latest.rake:28:in `each'
/Users/tuckyeah/wdi/projects/jService/lib/tasks/get_latest.rake:28:in `block in <top (required)>'
Tasks: TOP => get_clues
(See full trace by running task with --trace)

It looks like it's an issue with pgsearch, but I'm afraid I'm not really sure where to start... any advice would be greatly appreciated! Thanks!

FATAL: Peer authentication failed for user "steveo"

Hi there,

I am total newbie to ruby and i am getting Peer Authentication error for user steveo on server when i request http://localhost:3000/
I think it's configuration error but i am not able to track it down. It would be great if can get any sort of help.

This is how my database.yml looks like:
development:
adapter: postgresql
encoding: unicode
database: jarchive_development
pool: 5
username: steveo
password: stepheno

.# Warning: The database defined as "test" will be erased and
.# re-generated from your development database when you run "rake".
.# Do not set this db to the same as development or production.
test:
adapter: postgresql
encoding: unicode
database: jarchive_test
pool: 5
username: steveo
password: stepheno

production:
adapter: postgresql
encoding: unicode
database: jarchive_production
pool: 5
username: steveo
password: stepheno

Unable to run bundle install

I tried running the string in normal windows terminal and in VS code terminal and neither of them worked, both were cd'd into the correct location, but it still returned the error bundle: the term "bundle" is not recognized as the name of a cmdlet...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.