diff --git a/Gemfile b/Gemfile index a6b8823..60a20a7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,33 +1,30 @@ source 'https://rubygems.org' -ruby "2.2.0" - -gem 'rails', '4.2.0' -gem 'pg' -gem 'sass-rails', '~> 5.0' -gem 'uglifier', '>= 1.3.0' -gem 'coffee-rails', '~> 4.1.0' +gem 'coffee-rails' +gem 'jbuilder' gem 'jquery-rails' +gem 'pg' +gem 'rack-cors' +gem 'rails' +gem 'sass-rails' +gem 'sidekiq' gem 'turbolinks' -gem 'jbuilder', '~> 2.0' -gem 'sdoc', '~> 0.4.0', group: :doc - -gem 'rack-cors', '~> 0.3', '>= 0.3.1' +gem 'uglifier' +gem 'virtus' -gem 'sidekiq', '~> 3.3', '>= 3.3.1' -gem 'sinatra', '~> 1.4', '>= 1.4.5', :require => nil +gem 'sdoc', group: :doc -gem 'virtus', '~> 1.0', '>= 1.0.4' +gem 'sinatra', :require => nil group :development, :test do gem 'byebug' - gem 'web-console', '~> 2.0' + gem 'foreman' + gem 'rspec-rails' gem 'spring' - gem 'rspec-rails', '~> 3.0', '>= 3.1.0' - gem 'foreman', '~> 0.77' + gem 'web-console' end group :production do - gem 'puma', '~> 2.11' + gem 'puma', '~> 3.12.1' gem 'rails_12factor', '~> 0.0', '>= 0.0.3' end diff --git a/Gemfile.lock b/Gemfile.lock index 2aff2e8..bab7b47 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,237 +1,245 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) + actioncable (5.2.3) + actionpack (= 5.2.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.3) + actionpack (= 5.2.3) + actionview (= 5.2.3) + activejob (= 5.2.3) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.0) - actionview (= 4.2.0) - activesupport (= 4.2.0) - rack (~> 1.6.0) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - actionview (4.2.0) - activesupport (= 4.2.0) + rails-dom-testing (~> 2.0) + actionpack (5.2.3) + actionview (= 5.2.3) + activesupport (= 5.2.3) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.2.3) + activesupport (= 5.2.3) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.1) - activejob (4.2.0) - activesupport (= 4.2.0) - globalid (>= 0.3.0) - activemodel (4.2.0) - activesupport (= 4.2.0) - builder (~> 3.1) - activerecord (4.2.0) - activemodel (= 4.2.0) - activesupport (= 4.2.0) - arel (~> 6.0) - activesupport (4.2.0) - i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.2.3) + activesupport (= 5.2.3) + globalid (>= 0.3.6) + activemodel (5.2.3) + activesupport (= 5.2.3) + activerecord (5.2.3) + activemodel (= 5.2.3) + activesupport (= 5.2.3) + arel (>= 9.0) + activestorage (5.2.3) + actionpack (= 5.2.3) + activerecord (= 5.2.3) + marcel (~> 0.3.1) + activesupport (5.2.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - arel (6.0.0) + arel (9.0.0) axiom-types (0.1.1) descendants_tracker (~> 0.0.4) ice_nine (~> 0.11.0) thread_safe (~> 0.3, >= 0.3.1) - binding_of_caller (0.7.2) - debug_inspector (>= 0.0.1) - builder (3.2.2) - byebug (3.5.1) - columnize (~> 0.8) - debugger-linecache (~> 1.2) - slop (~> 3.6) - celluloid (0.16.0) - timers (~> 4.0.0) + bindex (0.7.0) + builder (3.2.3) + byebug (11.0.1) coercible (1.0.0) descendants_tracker (~> 0.0.1) - coffee-rails (4.1.0) + coffee-rails (4.2.2) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.0) - coffee-script (2.3.0) + railties (>= 4.0.0) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.9.0) - columnize (0.9.0) - connection_pool (2.1.1) - debug_inspector (0.0.2) - debugger-linecache (1.2.0) + coffee-script-source (1.12.2) + concurrent-ruby (1.1.5) + connection_pool (2.2.2) + crass (1.0.4) descendants_tracker (0.0.4) thread_safe (~> 0.3, >= 0.3.1) - diff-lcs (1.2.5) - dotenv (1.0.2) - equalizer (0.0.9) - erubis (2.7.0) - execjs (2.3.0) - foreman (0.77.0) - dotenv (~> 1.0.2) + diff-lcs (1.3) + equalizer (0.0.11) + erubi (1.8.0) + execjs (2.7.0) + ffi (1.10.0) + foreman (0.85.0) thor (~> 0.19.1) - globalid (0.3.0) - activesupport (>= 4.1.0) - hike (1.2.3) - hitimes (1.2.2) - i18n (0.7.0) - ice_nine (0.11.1) - jbuilder (2.2.6) - activesupport (>= 3.0.0, < 5) - multi_json (~> 1.2) - jquery-rails (4.0.3) - rails-dom-testing (~> 1.0) + globalid (0.4.2) + activesupport (>= 4.2.0) + i18n (1.6.0) + concurrent-ruby (~> 1.0) + ice_nine (0.11.2) + jbuilder (2.8.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) + jquery-rails (4.3.3) + rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.2) - loofah (2.0.1) + loofah (2.2.3) + crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.4.3) - mini_portile (0.6.2) - minitest (5.5.1) - multi_json (1.10.1) - nokogiri (1.6.6.2) - mini_portile (~> 0.6.0) - pg (0.18.1) - puma (2.11.0) - rack (>= 1.1, < 2.0) - rack (1.6.0) - rack-cors (0.3.1) - rack-protection (1.5.3) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) + method_source (0.9.2) + mimemagic (0.3.3) + mini_mime (1.0.1) + mini_portile2 (2.4.0) + minitest (5.11.3) + multi_json (1.13.1) + mustermann (1.0.3) + nio4r (2.3.1) + nokogiri (1.10.2) + mini_portile2 (~> 2.4.0) + pg (1.1.4) + puma (3.12.1) + rack (2.0.7) + rack-cors (1.0.3) + rack-protection (2.0.5) rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.0) - actionmailer (= 4.2.0) - actionpack (= 4.2.0) - actionview (= 4.2.0) - activejob (= 4.2.0) - activemodel (= 4.2.0) - activerecord (= 4.2.0) - activesupport (= 4.2.0) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.0) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.5) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.1) - loofah (~> 2.0) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.3) + actioncable (= 5.2.3) + actionmailer (= 5.2.3) + actionpack (= 5.2.3) + actionview (= 5.2.3) + activejob (= 5.2.3) + activemodel (= 5.2.3) + activerecord (= 5.2.3) + activestorage (= 5.2.3) + activesupport (= 5.2.3) + bundler (>= 1.3.0) + railties (= 5.2.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.0.4) + loofah (~> 2.2, >= 2.2.2) rails_12factor (0.0.3) rails_serve_static_assets rails_stdout_logging - rails_serve_static_assets (0.0.4) - rails_stdout_logging (0.0.3) - railties (4.2.0) - actionpack (= 4.2.0) - activesupport (= 4.2.0) + rails_serve_static_assets (0.0.5) + rails_stdout_logging (0.0.5) + railties (5.2.3) + actionpack (= 5.2.3) + activesupport (= 5.2.3) + method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - rake (10.4.2) - rdoc (4.2.0) - json (~> 1.4) - redis (3.2.0) - redis-namespace (1.5.1) - redis (~> 3.0, >= 3.0.4) - rspec-core (3.1.7) - rspec-support (~> 3.1.0) - rspec-expectations (3.1.2) + thor (>= 0.19.0, < 2.0) + rake (12.3.2) + rb-fsevent (0.10.3) + rb-inotify (0.10.0) + ffi (~> 1.0) + rdoc (6.1.1) + redis (4.1.0) + rspec-core (3.8.0) + rspec-support (~> 3.8.0) + rspec-expectations (3.8.2) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.8.0) + rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.1.0) - rspec-mocks (3.1.3) - rspec-support (~> 3.1.0) - rspec-rails (3.1.0) + rspec-support (~> 3.8.0) + rspec-rails (3.8.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-core (~> 3.1.0) - rspec-expectations (~> 3.1.0) - rspec-mocks (~> 3.1.0) - rspec-support (~> 3.1.0) - rspec-support (3.1.2) - sass (3.4.11) - sass-rails (5.0.1) - railties (>= 4.0.0, < 5.0) + rspec-core (~> 3.8.0) + rspec-expectations (~> 3.8.0) + rspec-mocks (~> 3.8.0) + rspec-support (~> 3.8.0) + rspec-support (3.8.0) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) - tilt (~> 1.1) - sdoc (0.4.1) - json (~> 1.7, >= 1.7.7) - rdoc (~> 4.0) - sidekiq (3.3.1) - celluloid (>= 0.16.0) - connection_pool (>= 2.1.1) - json - redis (>= 3.0.6) - redis-namespace (>= 1.3.1) - sinatra (1.4.5) - rack (~> 1.4) - rack-protection (~> 1.4) - tilt (~> 1.3, >= 1.3.4) - slop (3.6.0) - spring (1.2.0) - sprockets (2.12.3) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.2.4) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - thor (0.19.1) - thread_safe (0.3.4) - tilt (1.4.1) - timers (4.0.1) - hitimes - turbolinks (2.5.3) - coffee-rails - tzinfo (1.2.2) + tilt (>= 1.1, < 3) + sdoc (1.0.0) + rdoc (>= 5.0) + sidekiq (5.2.5) + connection_pool (~> 2.2, >= 2.2.2) + rack (>= 1.5.0) + rack-protection (>= 1.5.0) + redis (>= 3.3.5, < 5) + sinatra (2.0.5) + mustermann (~> 1.0) + rack (~> 2.0) + rack-protection (= 2.0.5) + tilt (~> 2.0) + spring (2.0.2) + activesupport (>= 4.2) + sprockets (3.7.2) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + thor (0.19.4) + thread_safe (0.3.6) + tilt (2.0.9) + turbolinks (5.2.0) + turbolinks-source (~> 5.2) + turbolinks-source (5.2.0) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (2.7.0) - execjs (>= 0.3.0) - json (>= 1.8.0) - virtus (1.0.4) + uglifier (4.1.20) + execjs (>= 0.3.0, < 3) + virtus (1.0.5) axiom-types (~> 0.1) coercible (~> 1.0) descendants_tracker (~> 0.0, >= 0.0.3) equalizer (~> 0.0, >= 0.0.9) - web-console (2.0.0) - activemodel (~> 4.0) - binding_of_caller (>= 0.7.2) - railties (~> 4.0) - sprockets-rails (>= 2.0, < 4.0) + web-console (3.7.0) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + websocket-driver (0.7.0) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.3) PLATFORMS ruby DEPENDENCIES byebug - coffee-rails (~> 4.1.0) - foreman (~> 0.77) - jbuilder (~> 2.0) + coffee-rails + foreman + jbuilder jquery-rails pg - puma (~> 2.11) - rack-cors (~> 0.3, >= 0.3.1) - rails (= 4.2.0) + puma (~> 3.12.1) + rack-cors + rails rails_12factor (~> 0.0, >= 0.0.3) - rspec-rails (~> 3.0, >= 3.1.0) - sass-rails (~> 5.0) - sdoc (~> 0.4.0) - sidekiq (~> 3.3, >= 3.3.1) - sinatra (~> 1.4, >= 1.4.5) + rspec-rails + sass-rails + sdoc + sidekiq + sinatra spring turbolinks - uglifier (>= 1.3.0) - virtus (~> 1.0, >= 1.0.4) - web-console (~> 2.0) + uglifier + virtus + web-console + +BUNDLED WITH + 1.16.1 diff --git a/README.md b/README.md index 274bc5c..58b8e38 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# tech404 inviter +# tech256 Inviter -The application behind the [tech404 automatic invitation system](http://tech404.io) +The application behind the [tech256 automatic invitation system](http://tech256.com) ## Usage @@ -25,7 +25,7 @@ Pointing your web browser at the /sidekiq endpoint will give you access to Sidek Configuration items are stored in environment variables. -* SLACK_SUBDOMAIN: e.g., tech404 for tech404.slack.com +* SLACK_SUBDOMAIN: e.g., tech256 for tech256.slack.com * SLACK_TOKEN: an API token for an administrator of the organization ([more details](#slack_token)) * SIDEKIQ_USERNAME: username for the sidekiq administration area * SIDEKIQ_PASSWORD: password for the sidekiq administration area @@ -57,4 +57,4 @@ _Do not logout of the session where the token was generated._ If the token becom ## Deployment -Deployed on Heroku. Ask @alindeman for access. In production, we run a puma process in the same dyno as a sidekiq worker. It's a hack to keep it free. +Deployed on Heroku. Ask @iamvery for access. In production, we run a puma process in the same dyno as a sidekiq worker. It's a hack to keep it free. diff --git a/config/application.rb b/config/application.rb index 1643d3d..b3ac974 100644 --- a/config/application.rb +++ b/config/application.rb @@ -23,7 +23,7 @@ class Application < Rails::Application # Do not swallow errors in after_commit/after_rollback callbacks. config.active_record.raise_in_transactional_callbacks = true - config.middleware.insert_before 0, "Rack::Cors" do + config.middleware.insert_before 0, Rack::Cors do allow do origins "tech256.com", "tech256.github.io", "localhost:4000" resource "/invitations",