Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Genie app #1

Open
wants to merge 31 commits into
base: base_app_branch
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
a69cb70
the app is now able to recommend jobs
niuage Nov 20, 2016
0ab0038
move some stuff to env vars
niuage Nov 20, 2016
bab2856
removes envrc
niuage Nov 20, 2016
4074736
ignore envrc
niuage Nov 20, 2016
a2831ad
exclude local dbs
niuage Nov 21, 2016
4de6dfb
add genie scope
niuage Nov 21, 2016
a89d0f5
add genie scope
niuage Nov 21, 2016
4f2b20c
change ruby and rails version + config neo4j in staging and prod
niuage Nov 29, 2016
5e442e2
adds honeybadger
niuage Nov 29, 2016
bf3a64b
support bulk import
niuage Nov 29, 2016
ff8abf7
support "removing" jobs // order jobs that have the same score by the…
niuage Dec 1, 2016
df9f64f
update procfile to use puma
niuage Dec 1, 2016
bd4a372
actually set the user to the logged in user in jobs_controller
niuage Dec 1, 2016
2ab3e5a
sync the job dev_type // sync a job when updated
niuage Dec 1, 2016
03bbcdb
adds tests! which helped me find a bug in the query :)
niuage Dec 2, 2016
5ae3c0b
test that the dev_type is matching
niuage Dec 2, 2016
4de0213
nothing interesting
niuage Dec 2, 2016
827b966
adds some comments
niuage Dec 2, 2016
7ea0bc5
update query to look nicer
niuage Dec 2, 2016
f76a780
uses with, instead of break
niuage Dec 2, 2016
4f79bbb
adds a test testing the controller response
niuage Dec 2, 2016
8c76b7a
no authorization for now
niuage Dec 5, 2016
ed334b5
use double * instead of a trick with : in the routing key
niuage Dec 7, 2016
7a148b9
update figleaf env
niuage Dec 8, 2016
8a355d3
adds support for job state
niuage Dec 9, 2016
ccb3a47
uses rel_class instead of giving the options to the has_many method, …
niuage Dec 9, 2016
ced4a5f
fixes the cypher query. Cant have the conditions in the same where_no…
niuage Dec 9, 2016
7ad7670
update the tests to make sure draft jobs are not recommended // uses …
niuage Dec 9, 2016
9886bb1
adds factories
niuage Dec 9, 2016
3779154
Merge branch 'jobs_state'
niuage Dec 13, 2016
8a39768
fixes tests
niuage Dec 13, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .envrc-example
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export OMNIAUTH_PROVIDER_KEY=provider_key_from_doorkeeper_admin
export OMNIAUTH_PROVIDER_SECRET=provider_secret_from_doorkeeper_admin
export OMNIAUTH_TOKEN_URL="https://oauth.devpost.dev/oauth/token"
export OMNIAUTH_AUTHORIZE_URL="https://oauth.devpost.dev/oauth/authorize"
export OMNIAUTH_PROVIDER_SITE="https://devpost.dev"

export JWT_SECRET_KEY_BASE="somesecretkey"

export MQ_PASSWORD=some_mq_password
export MQ_USERNAME=""
export MQ_VHOST=""
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
/log/*
!/log/.keep
/tmp

.envrc

/db/neo4j
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--require spec_helper
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.1.10
27 changes: 24 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
source 'https://rubygems.org'

ruby "2.1.10"

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.5.1'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem "rails", "~> 4.2.6"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.2.7.1 ?

# Use Postgres as the database for Active Record
gem 'pg'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need pg if we are using active nodes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just to keep heroku happy. I would have had to create the app with the option to exclude the ORM fully I think. I didn't bother with that, because I thought we might want it later as well, if we want to have an admin or something like that.

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
Expand All @@ -26,6 +27,18 @@ gem 'sdoc', '~> 0.4.0', group: :doc
gem 'neo4j'
gem 'hutch'

gem 'figleaf'

gem 'puma'

gem 'jwt'

gem "satellite", github: "challengepost/satellite", branch: "master"
gem "omniauth-devpost", github: "challengepost/omniauth-devpost", branch: "master"
gem "addressable", "~> 2.4"

gem "honeybadger", "~> 2.0"

# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'

Expand All @@ -38,6 +51,10 @@ gem 'hutch'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'

gem "rspec"
gem "rspec-rails", "~> 3.5"
gem "factory_girl_rails", "~> 4.0"
end

group :development do
Expand All @@ -48,3 +65,7 @@ group :development do
gem 'spring'
end

group :test do
gem "capybara", "~> 2.7"
gem "launchy"
end
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments of what gems are for would be nice, Im thinking of a junior coming in and not knowing anything about the gems.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Versions need to be properly filled as well, otherwise, as it's the case on platform it's gonna be impossible to properly update the gems with bundle update

184 changes: 137 additions & 47 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,49 +1,76 @@
GIT
remote: git://github.com/challengepost/omniauth-devpost.git
revision: f7c2a6b6ae15bcf73140d37cf2c15cc5c31c4469
branch: master
specs:
omniauth-devpost (0.0.3)
omniauth-oauth2 (~> 1.1)

GIT
remote: git://github.com/challengepost/satellite.git
revision: f382f65fc2946b5c593fe5dd0f2b7db0c7437781
branch: master
specs:
satellite (1.0.1)
hashie
rails (~> 4.2)
warden

GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.5.1)
actionpack (= 4.2.5.1)
actionview (= 4.2.5.1)
activejob (= 4.2.5.1)
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.5.1)
actionview (= 4.2.5.1)
activesupport (= 4.2.5.1)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.5.1)
activesupport (= 4.2.5.1)
actionview (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (4.2.5.1)
activesupport (= 4.2.5.1)
activejob (4.2.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.5.1)
activesupport (= 4.2.5.1)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
activerecord (4.2.5.1)
activemodel (= 4.2.5.1)
activesupport (= 4.2.5.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.5.1)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
amq-protocol (2.0.1)
arel (6.0.3)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
bunny (2.6.1)
amq-protocol (>= 2.0.1)
byebug (9.0.5)
byebug (9.0.6)
capybara (2.10.1)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carrot-top (0.0.7)
json
coffee-rails (4.1.1)
Expand All @@ -52,21 +79,32 @@ GEM
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
coffee-script-source (1.11.1)
colored (1.2)
concurrent-ruby (1.0.2)
debug_inspector (0.0.2)
diff-lcs (1.2.5)
erubis (2.7.0)
execjs (2.7.0)
factory_girl (4.7.0)
activesupport (>= 3.0.0)
factory_girl_rails (4.7.0)
factory_girl (~> 4.7.0)
railties (>= 3.0.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.10.1)
faraday (>= 0.7.4, < 1.0)
faraday_middleware-multi_json (0.0.6)
faraday_middleware
multi_json
figleaf (0.2.0)
activesupport (>= 4)
hashie (>= 2)
globalid (0.3.7)
activesupport (>= 4.1.0)
hashie (3.4.6)
honeybadger (2.7.0)
httparty (0.14.0)
multi_xml (>= 0.5.2)
httpclient (2.8.2.4)
Expand All @@ -76,14 +114,17 @@ GEM
carrot-top (~> 0.0.7)
multi_json (~> 1.12)
i18n (0.7.0)
jbuilder (2.6.0)
jbuilder (2.6.1)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jquery-rails (4.1.1)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
jwt (1.5.6)
launchy (2.4.3)
addressable (~> 2.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
Expand Down Expand Up @@ -121,25 +162,38 @@ GEM
ruby-progressbar
rubyzip (>= 1.1.7)
net-http-persistent (2.9.4)
nokogiri (1.6.8)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
oauth2 (1.2.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (>= 1.2, < 3)
omniauth (1.3.1)
hashie (>= 1.2, < 4)
rack (>= 1.0, < 3)
omniauth-oauth2 (1.4.0)
oauth2 (~> 1.0)
omniauth (~> 1.2)
orm_adapter (0.5.0)
os (0.9.6)
pkg-config (1.1.7)
rack (1.6.4)
pg (0.19.0)
public_suffix (2.0.4)
puma (3.6.2)
rack (1.6.5)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.5.1)
actionmailer (= 4.2.5.1)
actionpack (= 4.2.5.1)
actionview (= 4.2.5.1)
activejob (= 4.2.5.1)
activemodel (= 4.2.5.1)
activerecord (= 4.2.5.1)
activesupport (= 4.2.5.1)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.5.1)
railties (= 4.2.7.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
Expand All @@ -149,14 +203,34 @@ GEM
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
railties (4.2.5.1)
actionpack (= 4.2.5.1)
activesupport (= 4.2.5.1)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (11.3.0)
rdoc (4.2.2)
json (~> 1.4)
rdoc (4.3.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby-progressbar (1.8.1)
rubyzip (1.2.0)
sass (3.4.22)
Expand All @@ -166,45 +240,61 @@ GEM
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sdoc (0.4.1)
sdoc (0.4.2)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
spring (1.7.2)
spring (2.0.0)
activesupport (>= 4.2)
sprockets (3.7.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.1.1)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
thor (0.19.1)
thor (0.19.4)
thread_safe (0.3.5)
tilt (2.0.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (3.0.1)
uglifier (3.0.3)
execjs (>= 0.3.0, < 3)
warden (1.2.6)
rack (>= 1.0)
web-console (2.3.0)
activemodel (>= 4.0)
binding_of_caller (>= 0.7.2)
railties (>= 4.0)
sprockets-rails (>= 2.0, < 4.0)
xpath (2.0.0)
nokogiri (~> 1.3)

PLATFORMS
ruby

DEPENDENCIES
addressable (~> 2.4)
byebug
capybara (~> 2.7)
coffee-rails (~> 4.1.0)
factory_girl_rails (~> 4.0)
figleaf
honeybadger (~> 2.0)
hutch
jbuilder (~> 2.0)
jquery-rails
jwt
launchy
neo4j
rails (= 4.2.5.1)
omniauth-devpost!
pg
puma
rails (~> 4.2.6)
rspec
rspec-rails (~> 3.5)
sass-rails (~> 5.0)
satellite!
sdoc (~> 0.4.0)
spring
sqlite3
uglifier (>= 1.3.0)
web-console (~> 2.0)
2 changes: 2 additions & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: bundle exec puma -C config/puma.rb
hutch: bundle exec hutch -v
2 changes: 2 additions & 0 deletions Procfile.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
web: bundle exec puma -C config/puma.rb -p 5501
hutch: bundle exec hutch -v
Loading