Compare commits
2 Commits
develop
...
feature/ra
| Author | SHA1 | Date |
|---|---|---|
|
|
010c68037d | |
|
|
1d71dba75b |
|
|
@ -37,7 +37,7 @@ ActiveAdmin.register JamRuby::ScoreHistory, :as => 'Score History' do
|
||||||
filter :to_latitude
|
filter :to_latitude
|
||||||
filter :to_longitude
|
filter :to_longitude
|
||||||
|
|
||||||
before_filter only: :index do
|
before_action only: :index do
|
||||||
@per_page = 1_000_000 if request.format == 'text/csv'
|
@per_page = 1_000_000 if request.format == 'text/csv'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ ActiveAdmin.register JamRuby::User, :as => 'Students' do
|
||||||
config.filters = true
|
config.filters = true
|
||||||
|
|
||||||
def booked_anything(scope)
|
def booked_anything(scope)
|
||||||
scope.joins(:student_lesson_bookings).where('lesson_bookings.active = true').uniq
|
scope.joins(:student_lesson_bookings).where('lesson_bookings.active = true').distinct
|
||||||
end
|
end
|
||||||
|
|
||||||
filter :jamuser_full_name_or_email_cont, label: 'Name Or Email', as: :string
|
filter :jamuser_full_name_or_email_cont, label: 'Name Or Email', as: :string
|
||||||
|
|
@ -69,4 +69,4 @@ ActiveAdmin.register JamRuby::User, :as => 'Students' do
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
before_filter :prepare_gon
|
before_action :prepare_gon
|
||||||
|
|
||||||
def prepare_gon
|
def prepare_gon
|
||||||
@olark_enabled = false
|
@olark_enabled = false
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
require 'date'
|
require 'date'
|
||||||
|
|
||||||
class Cohort < ActiveRecord::Base
|
class Cohort < ApplicationRecord
|
||||||
|
|
||||||
EARLIEST_DATE = Time.parse('2014-03-01')
|
EARLIEST_DATE = Time.parse('2014-03-01')
|
||||||
TOTAL_COHORT_DATE = Time.at(0)
|
TOTAL_COHORT_DATE = Time.at(0)
|
||||||
|
|
@ -75,7 +75,7 @@ class Cohort < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.generate_monthly_cohorts(monthly_start, monthly_end)
|
def self.generate_monthly_cohorts(monthly_start, monthly_end)
|
||||||
Cohort.delete_all(['all_time = ?',false])
|
Cohort.where(['all_time = ?',false]).delete_all()
|
||||||
self.cohort_group_ranges.collect do |range|
|
self.cohort_group_ranges.collect do |range|
|
||||||
next if range.first > monthly_end
|
next if range.first > monthly_end
|
||||||
cc = Cohort.new
|
cc = Cohort.new
|
||||||
|
|
@ -90,7 +90,7 @@ class Cohort < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.generate_all_time_cohorts
|
def self.generate_all_time_cohorts
|
||||||
Cohort.delete_all("all_time = 't'")
|
Cohort.where("all_time = 't'").delete_all()
|
||||||
self.cohort_group_ranges.collect do |range|
|
self.cohort_group_ranges.collect do |range|
|
||||||
unless cc = Cohort.where(group_start: range.first).where(all_time: true).limit(1).first
|
unless cc = Cohort.where(group_start: range.first).where(all_time: true).limit(1).first
|
||||||
cc = Cohort.new
|
cc = Cohort.new
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
class ImageUploader < CarrierWave::Uploader::Base
|
class ImageUploader < CarrierWave::Uploader::Base
|
||||||
include CarrierWaveDirect::Uploader
|
include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
#include CarrierWave::MimeTypes
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
|
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ JamAdmin::Application.configure do
|
||||||
# Raise exception on mass assignment protection for Active Record models
|
# Raise exception on mass assignment protection for Active Record models
|
||||||
config.active_record.mass_assignment_sanitizer = :strict
|
config.active_record.mass_assignment_sanitizer = :strict
|
||||||
|
|
||||||
|
config.assets.quiet = true
|
||||||
|
|
||||||
# Do not compress assets
|
# Do not compress assets
|
||||||
config.assets.compress = false
|
config.assets.compress = false
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ ActiveAdmin.setup do |config|
|
||||||
# You can add before, after and around filters to all of your
|
# You can add before, after and around filters to all of your
|
||||||
# Active Admin resources and pages from here.
|
# Active Admin resources and pages from here.
|
||||||
#
|
#
|
||||||
# config.before_filter :do_something_awesome
|
# config.before_action :do_something_awesome
|
||||||
|
|
||||||
|
|
||||||
# == Register Stylesheets & Javascripts
|
# == Register Stylesheets & Javascripts
|
||||||
|
|
|
||||||
22
ruby/Gemfile
22
ruby/Gemfile
|
|
@ -22,14 +22,16 @@ end
|
||||||
|
|
||||||
|
|
||||||
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
|
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
|
||||||
gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw]
|
gem 'pg' #, '0.17.1', :platform => [:mri, :mswin, :mingw]
|
||||||
#gem 'jdbc_postgres', :platform => [:jruby]
|
#gem 'jdbc_postgres', :platform => [:jruby]
|
||||||
|
|
||||||
gem 'activerecord', '= 4.2.8'
|
gem 'activerecord', '= 5.1.7'
|
||||||
gem 'railties', '= 4.2.8'
|
#gem 'railties', '= 5.2.5'
|
||||||
gem 'actionmailer', '= 4.2.8'
|
gem 'actionmailer', '= 5.1.7'
|
||||||
gem 'rails-observers', '0.1.2'
|
gem 'rails-observers'
|
||||||
gem 'protected_attributes' # needed to support attr_accessible
|
#gem 'rails-observers', '0.1.2'
|
||||||
|
#gem 'protected_attributes' # needed to support attr_accessible
|
||||||
|
gem 'protected_attributes_continued'
|
||||||
|
|
||||||
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
|
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
|
||||||
# This should be the same in ruby/admin/web/websocket-gateway
|
# This should be the same in ruby/admin/web/websocket-gateway
|
||||||
|
|
@ -61,13 +63,13 @@ gem 'kickbox'
|
||||||
gem 'will_paginate'
|
gem 'will_paginate'
|
||||||
gem 'sendgrid', '1.2.0'
|
gem 'sendgrid', '1.2.0'
|
||||||
gem 'aws-sdk', '~> 1'
|
gem 'aws-sdk', '~> 1'
|
||||||
gem 'carrierwave', '0.9.0'
|
gem 'carrierwave'#, '0.9.0'
|
||||||
gem 'aasm'
|
gem 'aasm'
|
||||||
gem 'devise', '3.3.0' # 3.4.0 causes: uninitialized constant ActionController::Metal (NameError)
|
gem 'devise' #'3.3.0' # 3.4.0 causes: uninitialized constant ActionController::Metal (NameError)
|
||||||
gem 'postgres-copy'
|
gem 'postgres-copy'
|
||||||
gem 'geokit'
|
gem 'geokit'
|
||||||
gem 'geokit-rails'
|
gem 'geokit-rails'
|
||||||
gem 'postgres_ext'
|
#gem 'postgres_ext'
|
||||||
gem 'resque'
|
gem 'resque'
|
||||||
gem 'resque-retry'
|
gem 'resque-retry'
|
||||||
gem 'resque-failed-job-mailer' #, :path => "/Users/seth/workspace/resque_failed_job_mailer"
|
gem 'resque-failed-job-mailer' #, :path => "/Users/seth/workspace/resque_failed_job_mailer"
|
||||||
|
|
@ -96,7 +98,7 @@ group :test do
|
||||||
gem 'factory_girl', '4.5.0'
|
gem 'factory_girl', '4.5.0'
|
||||||
gem "rspec", "2.11"
|
gem "rspec", "2.11"
|
||||||
gem 'spork', '0.9.0'
|
gem 'spork', '0.9.0'
|
||||||
gem 'database_cleaner', '1.4.1'
|
gem 'database_cleaner' #, '1.4.1'
|
||||||
gem 'faker', '1.3.0'
|
gem 'faker', '1.3.0'
|
||||||
gem 'resque_spec' #, :path => "/home/jam/src/resque_spec/"
|
gem 'resque_spec' #, :path => "/home/jam/src/resque_spec/"
|
||||||
gem 'timecop'
|
gem 'timecop'
|
||||||
|
|
|
||||||
|
|
@ -13,43 +13,46 @@ GEM
|
||||||
remote: https://jamjam:blueberryjam@int.jamkazam.com/gems/
|
remote: https://jamjam:blueberryjam@int.jamkazam.com/gems/
|
||||||
specs:
|
specs:
|
||||||
CFPropertyList (2.3.6)
|
CFPropertyList (2.3.6)
|
||||||
aasm (5.1.1)
|
aasm (5.2.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
actionmailer (4.2.8)
|
actioncable (5.1.7)
|
||||||
actionpack (= 4.2.8)
|
actionpack (= 5.1.7)
|
||||||
actionview (= 4.2.8)
|
nio4r (~> 2.0)
|
||||||
activejob (= 4.2.8)
|
websocket-driver (~> 0.6.1)
|
||||||
|
actionmailer (5.1.7)
|
||||||
|
actionpack (= 5.1.7)
|
||||||
|
actionview (= 5.1.7)
|
||||||
|
activejob (= 5.1.7)
|
||||||
mail (~> 2.5, >= 2.5.4)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
rails-dom-testing (~> 2.0)
|
||||||
actionpack (4.2.8)
|
actionpack (5.1.7)
|
||||||
actionview (= 4.2.8)
|
actionview (= 5.1.7)
|
||||||
activesupport (= 4.2.8)
|
activesupport (= 5.1.7)
|
||||||
rack (~> 1.6)
|
rack (~> 2.0)
|
||||||
rack-test (~> 0.6.2)
|
rack-test (>= 0.6.3)
|
||||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
||||||
actionview (4.2.8)
|
actionview (5.1.7)
|
||||||
activesupport (= 4.2.8)
|
activesupport (= 5.1.7)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
erubis (~> 2.7.0)
|
erubi (~> 1.4)
|
||||||
rails-dom-testing (~> 1.0, >= 1.0.5)
|
rails-dom-testing (~> 2.0)
|
||||||
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
||||||
activejob (4.2.8)
|
activejob (5.1.7)
|
||||||
activesupport (= 4.2.8)
|
activesupport (= 5.1.7)
|
||||||
globalid (>= 0.3.0)
|
globalid (>= 0.3.6)
|
||||||
activemodel (4.2.8)
|
activemodel (5.1.7)
|
||||||
activesupport (= 4.2.8)
|
activesupport (= 5.1.7)
|
||||||
builder (~> 3.1)
|
activerecord (5.1.7)
|
||||||
activerecord (4.2.8)
|
activemodel (= 5.1.7)
|
||||||
activemodel (= 4.2.8)
|
activesupport (= 5.1.7)
|
||||||
activesupport (= 4.2.8)
|
arel (~> 8.0)
|
||||||
arel (~> 6.0)
|
|
||||||
activerecord-import (0.4.1)
|
activerecord-import (0.4.1)
|
||||||
activerecord (>= 3.0)
|
activerecord (>= 3.0)
|
||||||
activesupport (4.2.8)
|
activesupport (5.1.7)
|
||||||
i18n (~> 0.7)
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
|
i18n (>= 0.7, < 2)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.7.0)
|
addressable (2.7.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
|
|
@ -64,7 +67,7 @@ GEM
|
||||||
amq-client (~> 1.0.2)
|
amq-client (~> 1.0.2)
|
||||||
amq-protocol (>= 1.3.0)
|
amq-protocol (>= 1.3.0)
|
||||||
eventmachine
|
eventmachine
|
||||||
arel (6.0.4)
|
arel (8.0.0)
|
||||||
auto_strip_attributes (2.6.0)
|
auto_strip_attributes (2.6.0)
|
||||||
activerecord (>= 4.0)
|
activerecord (>= 4.0)
|
||||||
aws-sdk (1.67.0)
|
aws-sdk (1.67.0)
|
||||||
|
|
@ -76,22 +79,31 @@ GEM
|
||||||
bcrypt-ruby (3.1.5)
|
bcrypt-ruby (3.1.5)
|
||||||
bcrypt (>= 3.1.3)
|
bcrypt (>= 3.1.3)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
carrierwave (0.9.0)
|
carrierwave (2.2.1)
|
||||||
activemodel (>= 3.2.0)
|
activemodel (>= 5.0.0)
|
||||||
activesupport (>= 3.2.0)
|
activesupport (>= 5.0.0)
|
||||||
json (>= 1.7)
|
addressable (~> 2.6)
|
||||||
|
image_processing (~> 1.1)
|
||||||
|
marcel (~> 1.0.0)
|
||||||
|
mini_mime (>= 0.1.3)
|
||||||
|
ssrf_filter (~> 1.0)
|
||||||
coderay (1.1.3)
|
coderay (1.1.3)
|
||||||
concurrent-ruby (1.1.8)
|
concurrent-ruby (1.1.8)
|
||||||
crack (0.4.5)
|
crack (0.4.5)
|
||||||
rexml
|
rexml
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
dante (0.2.0)
|
dante (0.2.0)
|
||||||
database_cleaner (1.4.1)
|
database_cleaner (2.0.1)
|
||||||
devise (3.3.0)
|
database_cleaner-active_record (~> 2.0.0)
|
||||||
|
database_cleaner-active_record (2.0.1)
|
||||||
|
activerecord (>= 5.a)
|
||||||
|
database_cleaner-core (~> 2.0.0)
|
||||||
|
database_cleaner-core (2.0.1)
|
||||||
|
devise (4.8.0)
|
||||||
bcrypt (~> 3.0)
|
bcrypt (~> 3.0)
|
||||||
orm_adapter (~> 0.1)
|
orm_adapter (~> 0.1)
|
||||||
railties (>= 3.2.6, < 5)
|
railties (>= 4.1.0)
|
||||||
thread_safe (~> 0.1)
|
responders
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
diff-lcs (1.1.3)
|
diff-lcs (1.1.3)
|
||||||
domain_name (0.5.20190701)
|
domain_name (0.5.20190701)
|
||||||
|
|
@ -106,17 +118,18 @@ GEM
|
||||||
multi_json
|
multi_json
|
||||||
email_validator (1.6.0)
|
email_validator (1.6.0)
|
||||||
activemodel
|
activemodel
|
||||||
erubis (2.7.0)
|
erubi (1.10.0)
|
||||||
et-orbi (1.2.4)
|
et-orbi (1.2.4)
|
||||||
tzinfo
|
tzinfo
|
||||||
eventmachine (1.0.4)
|
eventmachine (1.0.4)
|
||||||
excon (0.78.1)
|
excon (0.81.0)
|
||||||
factory_girl (4.5.0)
|
factory_girl (4.5.0)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
faker (1.3.0)
|
faker (1.3.0)
|
||||||
i18n (~> 0.5)
|
i18n (~> 0.5)
|
||||||
faraday (0.9.2)
|
faraday (0.9.2)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
|
ffi (1.15.0)
|
||||||
fission (0.5.0)
|
fission (0.5.0)
|
||||||
CFPropertyList (~> 2.2)
|
CFPropertyList (~> 2.2)
|
||||||
fog (1.41.0)
|
fog (1.41.0)
|
||||||
|
|
@ -267,7 +280,7 @@ GEM
|
||||||
fog-core
|
fog-core
|
||||||
nokogiri (>= 1.5.11, < 2.0.0)
|
nokogiri (>= 1.5.11, < 2.0.0)
|
||||||
formatador (0.2.5)
|
formatador (0.2.5)
|
||||||
fugit (1.4.2)
|
fugit (1.4.5)
|
||||||
et-orbi (~> 1.1, >= 1.1.8)
|
et-orbi (~> 1.1, >= 1.1.8)
|
||||||
raabro (~> 1.4)
|
raabro (~> 1.4)
|
||||||
geokit (1.13.1)
|
geokit (1.13.1)
|
||||||
|
|
@ -286,6 +299,9 @@ GEM
|
||||||
i18n (0.9.5)
|
i18n (0.9.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
icalendar (2.4.0)
|
icalendar (2.4.0)
|
||||||
|
image_processing (1.12.1)
|
||||||
|
mini_magick (>= 4.9.5, < 5)
|
||||||
|
ruby-vips (>= 2.0.17, < 3)
|
||||||
inflecto (0.0.2)
|
inflecto (0.0.2)
|
||||||
ipaddress (0.8.3)
|
ipaddress (0.8.3)
|
||||||
iso-639 (0.3.5)
|
iso-639 (0.3.5)
|
||||||
|
|
@ -296,76 +312,75 @@ GEM
|
||||||
little-plugger (1.1.4)
|
little-plugger (1.1.4)
|
||||||
logging (1.7.2)
|
logging (1.7.2)
|
||||||
little-plugger (>= 1.1.3)
|
little-plugger (>= 1.1.3)
|
||||||
loofah (2.9.0)
|
loofah (2.9.1)
|
||||||
crass (~> 1.0.2)
|
crass (~> 1.0.2)
|
||||||
nokogiri (>= 1.5.9)
|
nokogiri (>= 1.5.9)
|
||||||
mail (2.7.1)
|
mail (2.7.1)
|
||||||
mini_mime (>= 0.1.1)
|
mini_mime (>= 0.1.1)
|
||||||
|
marcel (1.0.1)
|
||||||
method_source (1.0.0)
|
method_source (1.0.0)
|
||||||
mime-types (3.3.1)
|
mime-types (3.3.1)
|
||||||
mime-types-data (~> 3.2015)
|
mime-types-data (~> 3.2015)
|
||||||
mime-types-data (3.2020.1104)
|
mime-types-data (3.2021.0225)
|
||||||
mini_mime (1.0.2)
|
mini_magick (4.11.0)
|
||||||
|
mini_mime (1.1.0)
|
||||||
mini_portile2 (2.4.0)
|
mini_portile2 (2.4.0)
|
||||||
minitest (5.14.3)
|
minitest (5.14.4)
|
||||||
mono_logger (1.1.0)
|
mono_logger (1.1.1)
|
||||||
multi_json (1.15.0)
|
multi_json (1.15.0)
|
||||||
multi_xml (0.6.0)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.1.1)
|
multipart-post (2.1.1)
|
||||||
|
mustermann (1.1.1)
|
||||||
|
ruby2_keywords (~> 0.0.1)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
|
nio4r (2.5.7)
|
||||||
nokogiri (1.10.10)
|
nokogiri (1.10.10)
|
||||||
mini_portile2 (~> 2.4.0)
|
mini_portile2 (~> 2.4.0)
|
||||||
nokogumbo (2.0.4)
|
nokogumbo (2.0.5)
|
||||||
nokogiri (~> 1.8, >= 1.8.4)
|
nokogiri (~> 1.8, >= 1.8.4)
|
||||||
oj (2.17.1)
|
oj (2.17.1)
|
||||||
optimist (3.0.1)
|
optimist (3.0.1)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
pg (0.17.1)
|
pg (1.2.3)
|
||||||
pg_array_parser (0.0.9)
|
postgres-copy (1.5.0)
|
||||||
postgres-copy (1.2.0)
|
activerecord (>= 5.1)
|
||||||
activerecord (>= 4.0, < 5.1)
|
|
||||||
pg (>= 0.17)
|
pg (>= 0.17)
|
||||||
responders
|
responders
|
||||||
postgres_ext (3.0.1)
|
protected_attributes_continued (1.8.1)
|
||||||
activerecord (~> 4.0)
|
activemodel (>= 5.0)
|
||||||
arel (>= 4.0.1)
|
pry (0.14.1)
|
||||||
pg_array_parser (~> 0.0.9)
|
|
||||||
protected_attributes (1.1.4)
|
|
||||||
activemodel (>= 4.0.1, < 5.0)
|
|
||||||
pry (0.13.1)
|
|
||||||
coderay (~> 1.1)
|
coderay (~> 1.1)
|
||||||
method_source (~> 1.0)
|
method_source (~> 1.0)
|
||||||
public_suffix (4.0.6)
|
public_suffix (4.0.6)
|
||||||
raabro (1.4.0)
|
raabro (1.4.0)
|
||||||
rack (1.6.13)
|
rack (2.2.3)
|
||||||
rack-protection (1.5.5)
|
rack-protection (2.1.0)
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.3)
|
rack-test (1.1.0)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0, < 3)
|
||||||
rails (4.2.8)
|
rails (5.1.7)
|
||||||
actionmailer (= 4.2.8)
|
actioncable (= 5.1.7)
|
||||||
actionpack (= 4.2.8)
|
actionmailer (= 5.1.7)
|
||||||
actionview (= 4.2.8)
|
actionpack (= 5.1.7)
|
||||||
activejob (= 4.2.8)
|
actionview (= 5.1.7)
|
||||||
activemodel (= 4.2.8)
|
activejob (= 5.1.7)
|
||||||
activerecord (= 4.2.8)
|
activemodel (= 5.1.7)
|
||||||
activesupport (= 4.2.8)
|
activerecord (= 5.1.7)
|
||||||
bundler (>= 1.3.0, < 2.0)
|
activesupport (= 5.1.7)
|
||||||
railties (= 4.2.8)
|
bundler (>= 1.3.0)
|
||||||
sprockets-rails
|
railties (= 5.1.7)
|
||||||
rails-deprecated_sanitizer (1.0.3)
|
sprockets-rails (>= 2.0.0)
|
||||||
activesupport (>= 4.2.0.alpha)
|
rails-dom-testing (2.0.3)
|
||||||
rails-dom-testing (1.0.9)
|
activesupport (>= 4.2.0)
|
||||||
activesupport (>= 4.2.0, < 5.0)
|
nokogiri (>= 1.6)
|
||||||
nokogiri (~> 1.6)
|
|
||||||
rails-deprecated_sanitizer (>= 1.0.1)
|
|
||||||
rails-html-sanitizer (1.3.0)
|
rails-html-sanitizer (1.3.0)
|
||||||
loofah (~> 2.3)
|
loofah (~> 2.3)
|
||||||
rails-observers (0.1.2)
|
rails-observers (0.1.5)
|
||||||
activemodel (~> 4.0)
|
activemodel (>= 4.0)
|
||||||
railties (4.2.8)
|
railties (5.1.7)
|
||||||
actionpack (= 4.2.8)
|
actionpack (= 5.1.7)
|
||||||
activesupport (= 4.2.8)
|
activesupport (= 5.1.7)
|
||||||
|
method_source
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
thor (>= 0.18.1, < 2.0)
|
thor (>= 0.18.1, < 2.0)
|
||||||
rake (13.0.3)
|
rake (13.0.3)
|
||||||
|
|
@ -378,9 +393,9 @@ GEM
|
||||||
redis (3.3.0)
|
redis (3.3.0)
|
||||||
redis-namespace (1.5.2)
|
redis-namespace (1.5.2)
|
||||||
redis (~> 3.0, >= 3.0.4)
|
redis (~> 3.0, >= 3.0.4)
|
||||||
responders (2.4.1)
|
responders (3.0.1)
|
||||||
actionpack (>= 4.2.0, < 6.0)
|
actionpack (>= 5.0)
|
||||||
railties (>= 4.2.0, < 6.0)
|
railties (>= 5.0)
|
||||||
resque (1.27.4)
|
resque (1.27.4)
|
||||||
mono_logger (~> 1.0)
|
mono_logger (~> 1.0)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
|
@ -411,7 +426,7 @@ GEM
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 4.0)
|
mime-types (>= 1.16, < 4.0)
|
||||||
netrc (~> 0.8)
|
netrc (~> 0.8)
|
||||||
rexml (3.2.4)
|
rexml (3.2.5)
|
||||||
rspec (2.11.0)
|
rspec (2.11.0)
|
||||||
rspec-core (~> 2.11.0)
|
rspec-core (~> 2.11.0)
|
||||||
rspec-expectations (~> 2.11.0)
|
rspec-expectations (~> 2.11.0)
|
||||||
|
|
@ -425,6 +440,9 @@ GEM
|
||||||
ruby-prof
|
ruby-prof
|
||||||
ruby-prof (0.15.9)
|
ruby-prof (0.15.9)
|
||||||
ruby-protocol-buffers (1.2.2)
|
ruby-protocol-buffers (1.2.2)
|
||||||
|
ruby-vips (2.1.2)
|
||||||
|
ffi (~> 1.12)
|
||||||
|
ruby2_keywords (0.0.4)
|
||||||
rubyzip (1.2.0)
|
rubyzip (1.2.0)
|
||||||
rufus-scheduler (3.7.0)
|
rufus-scheduler (3.7.0)
|
||||||
fugit (~> 1.1, >= 1.1.6)
|
fugit (~> 1.1, >= 1.1.6)
|
||||||
|
|
@ -442,10 +460,11 @@ GEM
|
||||||
simplecov-html (0.7.1)
|
simplecov-html (0.7.1)
|
||||||
simplecov-rcov (0.2.3)
|
simplecov-rcov (0.2.3)
|
||||||
simplecov (>= 0.4.1)
|
simplecov (>= 0.4.1)
|
||||||
sinatra (1.4.8)
|
sinatra (2.1.0)
|
||||||
rack (~> 1.5)
|
mustermann (~> 1.0)
|
||||||
rack-protection (~> 1.4)
|
rack (~> 2.2)
|
||||||
tilt (>= 1.3, < 3)
|
rack-protection (= 2.1.0)
|
||||||
|
tilt (~> 2.0)
|
||||||
spork (0.9.0)
|
spork (0.9.0)
|
||||||
sprockets (3.6.3)
|
sprockets (3.6.3)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
|
@ -454,7 +473,8 @@ GEM
|
||||||
actionpack (>= 4.0)
|
actionpack (>= 4.0)
|
||||||
activesupport (>= 4.0)
|
activesupport (>= 4.0)
|
||||||
sprockets (>= 3.0.0)
|
sprockets (>= 3.0.0)
|
||||||
stripe (5.29.0)
|
ssrf_filter (1.0.7)
|
||||||
|
stripe (5.32.1)
|
||||||
stripe-ruby-mock (3.0.1)
|
stripe-ruby-mock (3.0.1)
|
||||||
dante (>= 0.2.0)
|
dante (>= 0.2.0)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
|
|
@ -462,9 +482,9 @@ GEM
|
||||||
thor (1.1.0)
|
thor (1.1.0)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (2.0.10)
|
tilt (2.0.10)
|
||||||
time_difference (0.5.0)
|
time_difference (0.7.0)
|
||||||
activesupport
|
activesupport (~> 5.1)
|
||||||
timecop (0.9.2)
|
timecop (0.9.4)
|
||||||
tzinfo (1.2.9)
|
tzinfo (1.2.9)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
|
|
@ -473,15 +493,20 @@ GEM
|
||||||
uuidtools (2.1.2)
|
uuidtools (2.1.2)
|
||||||
vegas (0.1.11)
|
vegas (0.1.11)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
warden (1.2.7)
|
warden (1.2.9)
|
||||||
rack (>= 1.0)
|
rack (>= 2.0.9)
|
||||||
webmock (3.11.2)
|
webmock (3.13.0)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
hashdiff (>= 0.4.0, < 2.0.0)
|
hashdiff (>= 0.4.0, < 2.0.0)
|
||||||
|
webrick (1.7.0)
|
||||||
|
websocket-driver (0.6.5)
|
||||||
|
websocket-extensions (>= 0.1.0)
|
||||||
|
websocket-extensions (0.1.5)
|
||||||
will_paginate (3.3.0)
|
will_paginate (3.3.0)
|
||||||
xml-simple (1.1.8)
|
xml-simple (1.1.8)
|
||||||
xmlrpc (0.3.1)
|
xmlrpc (0.3.2)
|
||||||
|
webrick
|
||||||
zip-codes (0.2.1)
|
zip-codes (0.2.1)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
|
@ -489,8 +514,8 @@ PLATFORMS
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
aasm
|
aasm
|
||||||
actionmailer (= 4.2.8)
|
actionmailer (= 5.1.7)
|
||||||
activerecord (= 4.2.8)
|
activerecord (= 5.1.7)
|
||||||
activerecord-import (~> 0.4.1)
|
activerecord-import (~> 0.4.1)
|
||||||
amqp (= 1.0.2)
|
amqp (= 1.0.2)
|
||||||
auto_strip_attributes
|
auto_strip_attributes
|
||||||
|
|
@ -498,9 +523,9 @@ DEPENDENCIES
|
||||||
bcrypt (= 3.1.15)
|
bcrypt (= 3.1.15)
|
||||||
bcrypt-ruby
|
bcrypt-ruby
|
||||||
builder
|
builder
|
||||||
carrierwave (= 0.9.0)
|
carrierwave
|
||||||
database_cleaner (= 1.4.1)
|
database_cleaner
|
||||||
devise (= 3.3.0)
|
devise
|
||||||
elasticsearch
|
elasticsearch
|
||||||
email_validator (= 1.6.0)
|
email_validator (= 1.6.0)
|
||||||
eventmachine (= 1.0.4)
|
eventmachine (= 1.0.4)
|
||||||
|
|
@ -520,13 +545,11 @@ DEPENDENCIES
|
||||||
logging (= 1.7.2)
|
logging (= 1.7.2)
|
||||||
nokogiri (= 1.10.10)
|
nokogiri (= 1.10.10)
|
||||||
oj (= 2.17.1)
|
oj (= 2.17.1)
|
||||||
pg (= 0.17.1)
|
pg
|
||||||
postgres-copy
|
postgres-copy
|
||||||
postgres_ext
|
protected_attributes_continued
|
||||||
protected_attributes
|
|
||||||
pry
|
pry
|
||||||
rails-observers (= 0.1.2)
|
rails-observers
|
||||||
railties (= 4.2.8)
|
|
||||||
recurly (= 2.18.16)
|
recurly (= 2.18.16)
|
||||||
redis (= 3.3.0)
|
redis (= 3.3.0)
|
||||||
redis-namespace (= 1.5.2)
|
redis-namespace (= 1.5.2)
|
||||||
|
|
@ -562,4 +585,4 @@ RUBY VERSION
|
||||||
ruby 2.4.1p111
|
ruby 2.4.1p111
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.17.3
|
2.2.15
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateInitStructure < ActiveRecord::Migration
|
class CreateInitStructure < ActiveRecord::Migration[4.2]
|
||||||
def up
|
def up
|
||||||
# this can't apply in production or staging, -- and schema.rb captures this test/dev environments
|
# this can't apply in production or staging, -- and schema.rb captures this test/dev environments
|
||||||
return if ENV['RAILS_ENV'] == 'production'
|
return if ENV['RAILS_ENV'] == 'production'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class PayPalFieldForAffiliate < ActiveRecord::Migration
|
class PayPalFieldForAffiliate < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute "ALTER TABLE affiliate_partners ADD COLUMN paypal_id VARCHAR(255)"
|
execute "ALTER TABLE affiliate_partners ADD COLUMN paypal_id VARCHAR(255)"
|
||||||
execute %(
|
execute %(
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeAffiliateDistributionsSaleLineItemIdNotNull < ActiveRecord::Migration
|
class ChangeAffiliateDistributionsSaleLineItemIdNotNull < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
#change_column_null :affiliate_distributions, :sale_line_item_id, true
|
#change_column_null :affiliate_distributions, :sale_line_item_id, true
|
||||||
execute "ALTER TABLE affiliate_distributions ALTER COLUMN sale_line_item_id DROP NOT NULL"
|
execute "ALTER TABLE affiliate_distributions ALTER COLUMN sale_line_item_id DROP NOT NULL"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddRecurlyTransactionsLastSyncAtToGenericState < ActiveRecord::Migration
|
class AddRecurlyTransactionsLastSyncAtToGenericState < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
#add_column :generic_state, :recurly_transactions_last_sync_at, :datetime
|
#add_column :generic_state, :recurly_transactions_last_sync_at, :datetime
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddProductTypeToAffiliateDistributions < ActiveRecord::Migration
|
class AddProductTypeToAffiliateDistributions < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE affiliate_distributions ADD COLUMN product_type VARCHAR(64)")
|
execute("ALTER TABLE affiliate_distributions ADD COLUMN product_type VARCHAR(64)")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class SetDefaultForAffiliateDistributionsProductType < ActiveRecord::Migration
|
class SetDefaultForAffiliateDistributionsProductType < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("UPDATE affiliate_distributions SET product_type = 'JamTrack'")
|
execute("UPDATE affiliate_distributions SET product_type = 'JamTrack'")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddProductCodeToAffiliateDistributions < ActiveRecord::Migration
|
class AddProductCodeToAffiliateDistributions < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE affiliate_distributions ADD COLUMN product_code VARCHAR(64)")
|
execute("ALTER TABLE affiliate_distributions ADD COLUMN product_code VARCHAR(64)")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamTrackShareInCentsToAffiliatePartners < ActiveRecord::Migration
|
class JamTrackShareInCentsToAffiliatePartners < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE affiliate_partners ADD COLUMN jamtrack_share_in_cents NUMERIC(8,2)")
|
execute("ALTER TABLE affiliate_partners ADD COLUMN jamtrack_share_in_cents NUMERIC(8,2)")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class SetDefaultValuesOfJamTrackShareInCents < ActiveRecord::Migration
|
class SetDefaultValuesOfJamTrackShareInCents < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("UPDATE affiliate_partners SET jamtrack_share_in_cents = 25")
|
execute("UPDATE affiliate_partners SET jamtrack_share_in_cents = 25")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddFirstSubscribedAtToUsers < ActiveRecord::Migration
|
class AddFirstSubscribedAtToUsers < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE users ADD COLUMN first_subscribed_at TIMESTAMP WITHOUT TIME ZONE")
|
execute("ALTER TABLE users ADD COLUMN first_subscribed_at TIMESTAMP WITHOUT TIME ZONE")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddExternalIdToAffiliateDistributions < ActiveRecord::Migration
|
class AddExternalIdToAffiliateDistributions < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE affiliate_distributions ADD COLUMN external_id character varying(64)")
|
execute("ALTER TABLE affiliate_distributions ADD COLUMN external_id character varying(64)")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class ChangeAffiliatePartnersRateDefault < ActiveRecord::Migration
|
class ChangeAffiliatePartnersRateDefault < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE affiliate_partners ALTER COLUMN rate SET DEFAULT 0.30")
|
execute("ALTER TABLE affiliate_partners ALTER COLUMN rate SET DEFAULT 0.30")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddUseVideoConferencingServerToUsers < ActiveRecord::Migration
|
class AddUseVideoConferencingServerToUsers < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE users ADD COLUMN use_video_conferencing_server BOOLEAN DEFAULT FALSE;")
|
execute("ALTER TABLE users ADD COLUMN use_video_conferencing_server BOOLEAN DEFAULT FALSE;")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateTempTokens < ActiveRecord::Migration
|
class CreateTempTokens < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute( <<-SQL
|
execute( <<-SQL
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require "pg"
|
require "pg"
|
||||||
require "active_record"
|
require "active_record"
|
||||||
require "rails/railtie"
|
require "rails/railtie"
|
||||||
require "protected_attributes"
|
require "protected_attributes_continued"
|
||||||
require "rails-observers"
|
require "rails-observers"
|
||||||
require "rails/observers/active_model"
|
require "rails/observers/active_model"
|
||||||
require "rails/observers/activerecord/active_record"
|
require "rails/observers/activerecord/active_record"
|
||||||
|
|
@ -19,7 +19,7 @@ require "sendgrid"
|
||||||
require "postgres-copy"
|
require "postgres-copy"
|
||||||
require "geokit"
|
require "geokit"
|
||||||
require "geokit-rails"
|
require "geokit-rails"
|
||||||
require "postgres_ext"
|
#require "postgres_ext"
|
||||||
require 'builder'
|
require 'builder'
|
||||||
require 'cgi'
|
require 'cgi'
|
||||||
require 'resque_mailer'
|
require 'resque_mailer'
|
||||||
|
|
@ -31,7 +31,8 @@ require 'stripe'
|
||||||
require 'zip-codes'
|
require 'zip-codes'
|
||||||
require 'email_validator'
|
require 'email_validator'
|
||||||
|
|
||||||
ActiveRecord::Base.raise_in_transactional_callbacks = true
|
#ActiveRecord::Base.raise_in_transactional_callbacks = true
|
||||||
|
require "jam_ruby/app/models/application_record"
|
||||||
require "jam_ruby/lib/timezone"
|
require "jam_ruby/lib/timezone"
|
||||||
require "jam_ruby/constants/limits"
|
require "jam_ruby/constants/limits"
|
||||||
require "jam_ruby/constants/notification_types"
|
require "jam_ruby/constants/notification_types"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
class ApplicationRecord < ActiveRecord::Base
|
||||||
|
self.abstract_class = true
|
||||||
|
end
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
class JamTrackRightUploader < CarrierWave::Uploader::Base
|
class JamTrackRightUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
#include CarrierWave::MimeTypes
|
||||||
|
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
class JamTrackTrackUploader < CarrierWave::Uploader::Base
|
class JamTrackTrackUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
#include CarrierWave::MimeTypes
|
||||||
|
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
class JamTrackUploader < CarrierWave::Uploader::Base
|
class JamTrackUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
#include CarrierWave::MimeTypes
|
||||||
|
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
class MaxMindReleaseUploader < CarrierWave::Uploader::Base
|
class MaxMindReleaseUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
#include CarrierWave::MimeTypes
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
|
|
||||||
after :store, :update_extras
|
after :store, :update_extras
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
class MixUploader < CarrierWave::Uploader::Base
|
class MixUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
#include CarrierWave::MimeTypes
|
||||||
|
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
process :add_metadata
|
process :add_metadata
|
||||||
|
|
||||||
version :mp3_url do
|
version :mp3_url do
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
class RecordedTrackUploader < CarrierWave::Uploader::Base
|
class RecordedTrackUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
# include CarrierWave::MimeTypes
|
||||||
|
|
||||||
process :set_content_type
|
#process :set_content_type
|
||||||
process :add_metadata
|
process :add_metadata
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class ActiveMusicSession < ActiveRecord::Base
|
class ActiveMusicSession < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[ActiveMusicSession]
|
@@log = Logging.logger[ActiveMusicSession]
|
||||||
|
|
||||||
|
|
@ -979,4 +979,4 @@ module JamRuby
|
||||||
music_session.lesson_session
|
music_session.lesson_session
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class AffiliateDistribution < ActiveRecord::Base
|
class AffiliateDistribution < ApplicationRecord
|
||||||
|
|
||||||
|
|
||||||
belongs_to :sale_line_item, class_name: 'JamRuby::SaleLineItem'
|
belongs_to :sale_line_item, class_name: 'JamRuby::SaleLineItem'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliateLegalese < ActiveRecord::Base
|
class JamRuby::AffiliateLegalese < ApplicationRecord
|
||||||
self.table_name = 'affiliate_legalese'
|
self.table_name = 'affiliate_legalese'
|
||||||
|
|
||||||
has_many :affiliate_partners, :class_name => "JamRuby::AffiliatePartner", :foreign_key => :legalese_id
|
has_many :affiliate_partners, :class_name => "JamRuby::AffiliatePartner", :foreign_key => :legalese_id
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliateLink < ActiveRecord::Base
|
class JamRuby::AffiliateLink < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :link, :name, as: :admin
|
attr_accessible :link, :name, as: :admin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliateMonthlyPayment < ActiveRecord::Base
|
class JamRuby::AffiliateMonthlyPayment < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :months
|
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :months
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliatePartner < ActiveRecord::Base
|
class JamRuby::AffiliatePartner < ApplicationRecord
|
||||||
self.table_name = 'affiliate_partners'
|
self.table_name = 'affiliate_partners'
|
||||||
|
|
||||||
belongs_to :partner_user, :class_name => "JamRuby::User", :foreign_key => :partner_user_id, inverse_of: :affiliate_partner
|
belongs_to :partner_user, :class_name => "JamRuby::User", :foreign_key => :partner_user_id, inverse_of: :affiliate_partner
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class AffiliatePayment < ActiveRecord::Base
|
class AffiliatePayment < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :affiliate_monthly_payment
|
belongs_to :affiliate_monthly_payment
|
||||||
belongs_to :affiliate_quarterly_payment
|
belongs_to :affiliate_quarterly_payment
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliateQuarterlyPayment < ActiveRecord::Base
|
class JamRuby::AffiliateQuarterlyPayment < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :quarters
|
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :quarters
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliateReferralVisit < ActiveRecord::Base
|
class JamRuby::AffiliateReferralVisit < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :visits
|
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :visits
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::AffiliateTrafficTotal < ActiveRecord::Base
|
class JamRuby::AffiliateTrafficTotal < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :traffic_totals
|
belongs_to :affiliate_partner, class_name: 'JamRuby::AffiliatePartner', inverse_of: :traffic_totals
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,11 +20,11 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_all_shopping_carts
|
def destroy_all_shopping_carts
|
||||||
ShoppingCart.destroy_all(anonymous_user_id: @id)
|
ShoppingCart.where(anonymous_user_id: @id).destroy_all()
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy_jam_track_shopping_carts
|
def destroy_jam_track_shopping_carts
|
||||||
ShoppingCart.destroy_all(anonymous_user_id: @id, cart_type: JamTrack::PRODUCT_TYPE)
|
ShoppingCart.where(anonymous_user_id: @id, cart_type: JamTrack::PRODUCT_TYPE).destroy_all()
|
||||||
end
|
end
|
||||||
|
|
||||||
def admin
|
def admin
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Ars < ActiveRecord::Base
|
class Ars < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :active, :name, :id_int, :ip, as: :admin
|
attr_accessible :active, :name, :id_int, :ip, as: :admin
|
||||||
|
|
||||||
|
|
@ -11,4 +11,4 @@ module JamRuby
|
||||||
Ars.where(active: true, beta: beta).where('ip is not NULL').where("ip != ''").all
|
Ars.where(active: true, beta: beta).where('ip is not NULL').where("ip != ''").all
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class ArtifactUpdate < ActiveRecord::Base
|
class ArtifactUpdate < ApplicationRecord
|
||||||
|
|
||||||
DEFAULT_ENVIRONMENT = 'public'
|
DEFAULT_ENVIRONMENT = 'public'
|
||||||
CLIENT_PREFIX = 'JamClient'
|
CLIENT_PREFIX = 'JamClient'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class BackingTrack < ActiveRecord::Base
|
class BackingTrack < ApplicationRecord
|
||||||
|
|
||||||
self.table_name = "backing_tracks"
|
self.table_name = "backing_tracks"
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
|
|
@ -16,4 +16,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Band < ActiveRecord::Base
|
class Band < ApplicationRecord
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:biography, :website, :name]
|
html_sanitize strict: [:biography, :website, :name]
|
||||||
|
|
||||||
|
|
@ -110,7 +110,7 @@ module JamRuby
|
||||||
.order('created_at DESC')
|
.order('created_at DESC')
|
||||||
.limit(10)
|
.limit(10)
|
||||||
|
|
||||||
result = recordings.concat(msh)
|
result = recordings.to_a.concat(msh.to_a)
|
||||||
result.sort! {|a,b| b.created_at <=> a.created_at}.first(5)
|
result.sort! {|a,b| b.created_at <=> a.created_at}.first(5)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -218,8 +218,8 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
unless band.new_record?
|
unless band.new_record?
|
||||||
OnlinePresence.delete_all(["player_id = ?", band.id])
|
OnlinePresence.where(["player_id = ?", band.id]).delete_all()
|
||||||
PerformanceSample.delete_all(["player_id = ?", band.id])
|
PerformanceSample.where(["player_id = ?", band.id]).delete_all()
|
||||||
end
|
end
|
||||||
|
|
||||||
online_presences = params[:online_presences]
|
online_presences = params[:online_presences]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class BandInvitation < ActiveRecord::Base
|
class BandInvitation < ApplicationRecord
|
||||||
|
|
||||||
self.table_name = "band_invitations"
|
self.table_name = "band_invitations"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class BandMusician < ActiveRecord::Base
|
class BandMusician < ApplicationRecord
|
||||||
|
|
||||||
self.table_name = "bands_musicians"
|
self.table_name = "bands_musicians"
|
||||||
|
|
||||||
|
|
@ -28,4 +28,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Broadcast < ActiveRecord::Base
|
class Broadcast < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[Broadcast]
|
@@log = Logging.logger[Broadcast]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class BroadcastNotification < ActiveRecord::Base
|
class BroadcastNotification < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :title, :message, :button_label, :frequency, :button_url, as: :admin
|
attr_accessible :title, :message, :button_label, :frequency, :button_url, as: :admin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class BroadcastNotificationView < ActiveRecord::Base
|
class BroadcastNotificationView < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :broadcast_notification, :class_name => 'JamRuby::BroadcastNotification'
|
belongs_to :broadcast_notification, :class_name => 'JamRuby::BroadcastNotification'
|
||||||
belongs_to :user, :class_name => 'JamRuby::User'
|
belongs_to :user, :class_name => 'JamRuby::User'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Calendar < ActiveRecord::Base
|
class Calendar < ApplicationRecord
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:name, :description]
|
html_sanitize strict: [:name, :description]
|
||||||
attr_accessible :name, :description, :target_uid, :trigger_delete, :start_at, :end_at
|
attr_accessible :name, :description, :target_uid, :trigger_delete, :start_at, :end_at
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class CampaignSpend < ActiveRecord::Base
|
class CampaignSpend < ApplicationRecord
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Charge < ActiveRecord::Base
|
class Charge < ApplicationRecord
|
||||||
|
|
||||||
attr_accessor :stripe_charge
|
attr_accessor :stripe_charge
|
||||||
|
|
||||||
|
|
@ -152,4 +152,4 @@ module JamRuby
|
||||||
self.save(validate: false)
|
self.save(validate: false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class ChatMessage < ActiveRecord::Base
|
class ChatMessage < ApplicationRecord
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:message]
|
html_sanitize strict: [:message]
|
||||||
|
|
||||||
|
|
@ -193,4 +193,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class City < ActiveRecord::Base
|
class City < ApplicationRecord
|
||||||
|
|
||||||
self.table_name = 'cities'
|
self.table_name = 'cities'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class ClaimedRecording < ActiveRecord::Base
|
class ClaimedRecording < ApplicationRecord
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:name, :description]
|
html_sanitize strict: [:name, :description]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class ClientLiveStream < ActiveRecord::Base
|
class ClientLiveStream < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[ClientLiveStream]
|
@@log = Logging.logger[ClientLiveStream]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
require 'aasm'
|
require 'aasm'
|
||||||
|
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Connection < ActiveRecord::Base
|
class Connection < ApplicationRecord
|
||||||
|
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
include AASM
|
include AASM
|
||||||
|
|
@ -203,7 +203,7 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
def report_add_participant
|
def report_add_participant
|
||||||
if self.music_session_id_changed? &&
|
if self.saved_change_to_music_session_id? &&
|
||||||
self.music_session.present? &&
|
self.music_session.present? &&
|
||||||
self.connected? &&
|
self.connected? &&
|
||||||
self.as_musician? &&
|
self.as_musician? &&
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Country < ActiveRecord::Base
|
class Country < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[Country]
|
@@log = Logging.logger[Country]
|
||||||
|
|
||||||
|
|
@ -35,7 +35,7 @@ module JamRuby
|
||||||
|
|
||||||
csv = ::CSV.new(io, {encoding: 'ISO-8859-1', headers: false})
|
csv = ::CSV.new(io, {encoding: 'ISO-8859-1', headers: false})
|
||||||
csv.each do |row|
|
csv.each do |row|
|
||||||
vals = vals+sep+"(#{ActiveRecord::Base.quote_value(row[0], nil)}, #{ActiveRecord::Base.quote_value(row[1], nil)})"
|
vals = vals+sep+"(#{ActiveRecord::Base.connection.quote(row[0])}, #{ActiveRecord::Base.connection.quote(row[1])})"
|
||||||
sep = ','
|
sep = ','
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class CrashDump < ActiveRecord::Base
|
class CrashDump < ApplicationRecord
|
||||||
|
|
||||||
include JamRuby::S3AnalyticsManagerMixin
|
include JamRuby::S3AnalyticsManagerMixin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Diagnostic < ActiveRecord::Base
|
class Diagnostic < ApplicationRecord
|
||||||
|
|
||||||
# occurs when the client does not see a heartbeat from the server in a while
|
# occurs when the client does not see a heartbeat from the server in a while
|
||||||
NO_HEARTBEAT_ACK = 'NO_HEARTBEAT_ACK'
|
NO_HEARTBEAT_ACK = 'NO_HEARTBEAT_ACK'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class DownloadTracker < ActiveRecord::Base
|
class DownloadTracker < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[DownloadTracker]
|
@@log = Logging.logger[DownloadTracker]
|
||||||
|
|
||||||
|
|
@ -145,4 +145,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class EmailBatch < ActiveRecord::Base
|
class EmailBatch < ApplicationRecord
|
||||||
self.table_name = "email_batches"
|
self.table_name = "email_batches"
|
||||||
|
|
||||||
has_many :email_batch_sets, :class_name => 'JamRuby::EmailBatchSet'
|
has_many :email_batch_sets, :class_name => 'JamRuby::EmailBatchSet'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class EmailBatchSet < ActiveRecord::Base
|
class EmailBatchSet < ApplicationRecord
|
||||||
self.table_name = "email_batch_sets"
|
self.table_name = "email_batch_sets"
|
||||||
|
|
||||||
belongs_to :email_batch, :class_name => 'JamRuby::EmailBatch'
|
belongs_to :email_batch, :class_name => 'JamRuby::EmailBatch'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class EmailBlacklist < ActiveRecord::Base
|
class EmailBlacklist < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :email, :source, :notes, as: :admin
|
attr_accessible :email, :source, :notes, as: :admin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::Event < ActiveRecord::Base
|
class JamRuby::Event < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :slug, :title, :description, :show_sponser, :social_description, as: :admin
|
attr_accessible :slug, :title, :description, :show_sponser, :social_description, as: :admin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::EventBriteOrder < ActiveRecord::Base
|
class JamRuby::EventBriteOrder < ApplicationRecord
|
||||||
|
|
||||||
|
|
||||||
belongs_to :live_stream, class_name: 'JamRuby::LiveStream'
|
belongs_to :live_stream, class_name: 'JamRuby::LiveStream'
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::EventBriteOrderUpload < ActiveRecord::Base
|
class JamRuby::EventBriteOrderUpload < ApplicationRecord
|
||||||
has_many :event_brite_orders, class_name: 'JamRuby::EventBriteOrder'
|
has_many :event_brite_orders, class_name: 'JamRuby::EventBriteOrder'
|
||||||
|
|
||||||
validates :upload_file_name, presence: true
|
validates :upload_file_name, presence: true
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class JamRuby::EventSession < ActiveRecord::Base
|
class JamRuby::EventSession < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :event_id, :user_id, :band_id, :starts_at, :ends_at, :pinned_state, :position, :img_url, :img_width, :img_height, :ordinal, as: :admin
|
attr_accessible :event_id, :user_id, :band_id, :starts_at, :ends_at, :pinned_state, :position, :img_url, :img_width, :img_height, :ordinal, as: :admin
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class FacebookSignup < ActiveRecord::Base
|
class FacebookSignup < ApplicationRecord
|
||||||
|
|
||||||
before_create :generate_lookup_id
|
before_create :generate_lookup_id
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class FanInvitation < ActiveRecord::Base
|
class FanInvitation < ApplicationRecord
|
||||||
|
|
||||||
FRIENDSHIP_REQUIRED_VALIDATION_ERROR = "You can only invite friends"
|
FRIENDSHIP_REQUIRED_VALIDATION_ERROR = "You can only invite friends"
|
||||||
MEMBERSHIP_REQUIRED_OF_MUSIC_SESSION = "You must be a member of the music session to send invitations on behalf of it"
|
MEMBERSHIP_REQUIRED_OF_MUSIC_SESSION = "You must be a member of the music session to send invitations on behalf of it"
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Feed < ActiveRecord::Base
|
class Feed < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :recording, class_name: "JamRuby::Recording", inverse_of: :feed, foreign_key: 'recording_id'
|
belongs_to :recording, class_name: "JamRuby::Recording", inverse_of: :feed, foreign_key: 'recording_id'
|
||||||
belongs_to :music_session, class_name: "JamRuby::MusicSession", inverse_of: :feed, foreign_key: 'music_session_id'
|
belongs_to :music_session, class_name: "JamRuby::MusicSession", inverse_of: :feed, foreign_key: 'music_session_id'
|
||||||
|
|
@ -32,8 +32,13 @@ module JamRuby
|
||||||
target_band = params[:band]
|
target_band = params[:band]
|
||||||
|
|
||||||
# TODO: SPEED UP QUERY. CURRENTLY TAKES FOR EVER.
|
# TODO: SPEED UP QUERY. CURRENTLY TAKES FOR EVER.
|
||||||
if target_user or target_band
|
if target_user or target_band and !APP_CONFIG.personal_feed_enabled
|
||||||
return { query: [], next_page: nil}
|
if params[:hash]
|
||||||
|
return { query: [], next_page: nil}
|
||||||
|
else
|
||||||
|
return [[], nil]
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
#query = Feed.includes([:recording]).includes([:music_session]).limit(limit)
|
#query = Feed.includes([:recording]).includes([:music_session]).limit(limit)
|
||||||
|
|
@ -132,4 +137,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class FingerprintWhitelist < ActiveRecord::Base
|
class FingerprintWhitelist < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[FingerprintWhitelist]
|
@@log = Logging.logger[FingerprintWhitelist]
|
||||||
|
|
||||||
|
|
@ -14,4 +14,4 @@ module JamRuby
|
||||||
"#{fingerprint}"
|
"#{fingerprint}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Follow < ActiveRecord::Base
|
class Follow < ApplicationRecord
|
||||||
|
|
||||||
belongs_to :user, :class_name => "JamRuby::User", :foreign_key => "user_id"
|
belongs_to :user, :class_name => "JamRuby::User", :foreign_key => "user_id"
|
||||||
belongs_to :followable, :polymorphic => true
|
belongs_to :followable, :polymorphic => true
|
||||||
|
|
@ -10,4 +10,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class FraudAlert < ActiveRecord::Base
|
class FraudAlert < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[MachineExtra]
|
@@log = Logging.logger[MachineExtra]
|
||||||
|
|
||||||
|
|
@ -23,4 +23,4 @@ module JamRuby
|
||||||
APP_CONFIG.admin_root_url + "/admin/fraud_alerts/" + id
|
APP_CONFIG.admin_root_url + "/admin/fraud_alerts/" + id
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class FriendRequest < ActiveRecord::Base
|
class FriendRequest < ApplicationRecord
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:message]
|
html_sanitize strict: [:message]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Friendship < ActiveRecord::Base
|
class Friendship < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :user_id, :friend_id
|
attr_accessible :user_id, :friend_id
|
||||||
|
|
||||||
|
|
@ -67,4 +67,4 @@ module JamRuby
|
||||||
self.user.update_progression_field(:first_friended_at)
|
self.user.update_progression_field(:first_friended_at)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GenericState < ActiveRecord::Base
|
class GenericState < ApplicationRecord
|
||||||
|
|
||||||
|
|
||||||
attr_accessible :top_message, :event_page_top_logo_url, :connection_policy, as: :admin
|
attr_accessible :top_message, :event_page_top_logo_url, :connection_policy, as: :admin
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Genre < ActiveRecord::Base
|
class Genre < ApplicationRecord
|
||||||
|
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GenreJamTrack < ActiveRecord::Base
|
class GenreJamTrack < ApplicationRecord
|
||||||
|
|
||||||
self.table_name = 'genres_jam_tracks'
|
self.table_name = 'genres_jam_tracks'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GenrePlayer < ActiveRecord::Base
|
class GenrePlayer < ApplicationRecord
|
||||||
|
|
||||||
PROFILE = 'profile'
|
PROFILE = 'profile'
|
||||||
VIRTUAL_BAND = 'virtual_band'
|
VIRTUAL_BAND = 'virtual_band'
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GeoIpBlocks < ActiveRecord::Base
|
class GeoIpBlocks < ApplicationRecord
|
||||||
|
|
||||||
# index names created on the copied table used during import.
|
# index names created on the copied table used during import.
|
||||||
# they do not exist except during import
|
# they do not exist except during import
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GeoIpLocations < ActiveRecord::Base
|
class GeoIpLocations < ApplicationRecord
|
||||||
|
|
||||||
# index names created on the copied table used during import.
|
# index names created on the copied table used during import.
|
||||||
# they do not exist except during import
|
# they do not exist except during import
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GetWork < ActiveRecord::Base
|
class GetWork < ApplicationRecord
|
||||||
|
|
||||||
self.table_name = "connections"
|
self.table_name = "connections"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# represents the gift card you hold in your hand
|
# represents the gift card you hold in your hand
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GiftCard < ActiveRecord::Base
|
class GiftCard < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[GiftCard]
|
@@log = Logging.logger[GiftCard]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# reperesents the gift card you buy from the site (but physical gift card is modeled by GiftCard)
|
# reperesents the gift card you buy from the site (but physical gift card is modeled by GiftCard)
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GiftCardPurchase < ActiveRecord::Base
|
class GiftCardPurchase < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[GiftCardPurchase]
|
@@log = Logging.logger[GiftCardPurchase]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
# reperesents the gift card you buy from the site (but physical gift card is modeled by GiftCard)
|
# reperesents the gift card you buy from the site (but physical gift card is modeled by GiftCard)
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class GiftCardType < ActiveRecord::Base
|
class GiftCardType < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[GiftCardType]
|
@@log = Logging.logger[GiftCardType]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastAdminAuthentication < ActiveRecord::Base
|
class IcecastAdminAuthentication < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :source_pass, :relay_user, :relay_pass, :admin_user, :admin_pass, as: :admin
|
attr_accessible :source_pass, :relay_user, :relay_pass, :admin_user, :admin_pass, as: :admin
|
||||||
|
|
||||||
|
|
@ -35,4 +35,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastDirectory < ActiveRecord::Base
|
class IcecastDirectory < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :yp_url_timeout, :yp_url, as: :admin
|
attr_accessible :yp_url_timeout, :yp_url, as: :admin
|
||||||
|
|
||||||
|
|
@ -29,4 +29,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastLimit < ActiveRecord::Base
|
class IcecastLimit < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :clients, :sources, :queue_size, :client_timeout, :header_timeout, :source_timeout, :burst_size,
|
attr_accessible :clients, :sources, :queue_size, :client_timeout, :header_timeout, :source_timeout, :burst_size,
|
||||||
as: :admin
|
as: :admin
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastListenSocket < ActiveRecord::Base
|
class IcecastListenSocket < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :port, :bind_address, :shoutcast_mount, :shoutcast_compat, as: :admin
|
attr_accessible :port, :bind_address, :shoutcast_mount, :shoutcast_compat, as: :admin
|
||||||
|
|
||||||
|
|
@ -33,4 +33,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastLogging < ActiveRecord::Base
|
class IcecastLogging < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :access_log, :error_log, :playlist_log, :log_level, :log_archive, :log_size, as: :admin
|
attr_accessible :access_log, :error_log, :playlist_log, :log_level, :log_archive, :log_size, as: :admin
|
||||||
|
|
||||||
|
|
@ -34,4 +34,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastMasterServerRelay < ActiveRecord::Base
|
class IcecastMasterServerRelay < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :master_server, :master_server_port, :master_update_interval, :master_username, :master_pass,
|
attr_accessible :master_server, :master_server_port, :master_update_interval, :master_username, :master_pass,
|
||||||
:relays_on_demand, as: :admin
|
:relays_on_demand, as: :admin
|
||||||
|
|
@ -35,4 +35,4 @@ module JamRuby
|
||||||
builder.tag! 'relays-on-demand', relays_on_demand
|
builder.tag! 'relays-on-demand', relays_on_demand
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastMount < ActiveRecord::Base
|
class IcecastMount < ApplicationRecord
|
||||||
|
|
||||||
@@log = Logging.logger[IcecastMount]
|
@@log = Logging.logger[IcecastMount]
|
||||||
|
|
||||||
|
|
@ -51,22 +51,22 @@ module JamRuby
|
||||||
def after_save
|
def after_save
|
||||||
server.update_attribute(:config_changed, 1) unless no_config_changed
|
server.update_attribute(:config_changed, 1) unless no_config_changed
|
||||||
|
|
||||||
if !sourced_was && sourced
|
if !sourced_before_last_save && sourced
|
||||||
|
|
||||||
# went from NOT SOURCED to SOURCED
|
# went from NOT SOURCED to SOURCED
|
||||||
notify_source_up
|
notify_source_up
|
||||||
|
|
||||||
elsif sourced_was && !sourced
|
elsif sourced_before_last_save && !sourced
|
||||||
|
|
||||||
# went from SOURCED to NOT SOURCED
|
# went from SOURCED to NOT SOURCED
|
||||||
notify_source_down
|
notify_source_down
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if source_direction_was != source_direction
|
if source_direction_before_last_save != source_direction
|
||||||
# temporarily removed; it seems better to leave all the data in for now. It should never be that much
|
# temporarily removed; it seems better to leave all the data in for now. It should never be that much
|
||||||
# if the requested source direction has changed, then delete diagnostic info
|
# if the requested source direction has changed, then delete diagnostic info
|
||||||
#IcecastSourceChange.delete_all(["icecast_mount_id = ?", self.id]) if source_direction
|
#IcecastSourceChange.where(["icecast_mount_id = ?", self.id]).delete_all() if source_direction
|
||||||
|
|
||||||
# and tell anyone listening that the direction has changed
|
# and tell anyone listening that the direction has changed
|
||||||
# SubscriptionMessage.mount_source_direction(self)
|
# SubscriptionMessage.mount_source_direction(self)
|
||||||
|
|
@ -368,4 +368,4 @@ module JamRuby
|
||||||
resolve_int(field)
|
resolve_int(field)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastMountTemplate < ActiveRecord::Base
|
class IcecastMountTemplate < ApplicationRecord
|
||||||
|
|
||||||
attr_accessor :hostname, :default_mime_type # used by jam-admin
|
attr_accessor :hostname, :default_mime_type # used by jam-admin
|
||||||
|
|
||||||
|
|
@ -59,4 +59,4 @@ module JamRuby
|
||||||
mount
|
mount
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastPath < ActiveRecord::Base
|
class IcecastPath < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :base_dir, :log_dir, :pid_file, :web_root, :admin_root, :allow_ip, :deny_ip, :alias_source,
|
attr_accessible :base_dir, :log_dir, :pid_file, :web_root, :admin_root, :allow_ip, :deny_ip, :alias_source,
|
||||||
:alias_dest, as: :admin
|
:alias_dest, as: :admin
|
||||||
|
|
@ -38,4 +38,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastRelay < ActiveRecord::Base
|
class IcecastRelay < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :server, :port, :mount, :local_mount, :relay_username, :relay_pass, :relay_shoutcast_metadata, :on_demand,
|
attr_accessible :server, :port, :mount, :local_mount, :relay_username, :relay_pass, :relay_shoutcast_metadata, :on_demand,
|
||||||
as: :admin
|
as: :admin
|
||||||
|
|
@ -37,4 +37,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastSecurity < ActiveRecord::Base
|
class IcecastSecurity < ApplicationRecord
|
||||||
|
|
||||||
attr_accessible :chroot, :change_owner_user, :change_owner_group, as: :admin
|
attr_accessible :chroot, :change_owner_user, :change_owner_group, as: :admin
|
||||||
|
|
||||||
|
|
@ -32,4 +32,4 @@ module JamRuby
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastServer < ActiveRecord::Base
|
class IcecastServer < ApplicationRecord
|
||||||
|
|
||||||
attr_accessor :skip_config_changed_flag
|
attr_accessor :skip_config_changed_flag
|
||||||
|
|
||||||
|
|
@ -191,4 +191,4 @@ module JamRuby
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue