bundle exec rspec runs. Ruby 3.2.2 through and older version of bundler
This commit is contained in:
parent
0d411a6b71
commit
7db0316185
|
|
@ -1,3 +1,9 @@
|
|||
# Rules of Rails
|
||||
|
||||
Code coverage should be extremely high via testing.
|
||||
For multi-step changes, track the effort in agent-tasks/epic-name/task-name/progress.md, and agent-tasks/epic-name/task-name/sub-task-name/progress.md if helpful to track subtasks of a task.
|
||||
|
||||
Code coverage should be extremely high via testing.
|
||||
|
||||
Whenver modifying business logic, ideally there is a regression test before and after. We have many existing tests, but most are not functional due to us being on Rails 4 and have let the tests rot over time. So, this rule only applies as we are upgraded to the extent that we can run the full test suites in `ruby` , `web`, websocket-gateway`, and `admin`.
|
||||
|
||||
|
||||
|
|
|
|||
170
admin/Gemfile
170
admin/Gemfile
|
|
@ -1,10 +1,10 @@
|
|||
source 'http://rubygems.org'
|
||||
source 'https://rubygems.org'
|
||||
|
||||
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
||||
ruby_version = "2.3.1" if ruby_version.nil?
|
||||
unless ENV["LOCAL_DEV"] == "1"
|
||||
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||
end
|
||||
|
||||
ruby ruby_version
|
||||
ruby "3.2.2"
|
||||
|
||||
devenv = ENV["BUILD_NUMBER"].nil?
|
||||
|
||||
|
|
@ -21,114 +21,95 @@ else
|
|||
end
|
||||
end
|
||||
|
||||
gem 'activeadmin_addons'
|
||||
gem 'json', '1.8.6'
|
||||
gem 'rails', '= 4.2.8'
|
||||
gem 'protected_attributes'
|
||||
gem 'rails-observers'
|
||||
gem 'rails', '~> 8.0.0'
|
||||
# gem 'protected_attributes' # Removed in Rails 5+
|
||||
# gem 'rails-observers' # Removed in Rails 5+
|
||||
|
||||
gem 'activeadmin_addons'
|
||||
gem 'json'
|
||||
|
||||
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
|
||||
# This should be the same in ruby/admin/web/websocket-gateway
|
||||
#######
|
||||
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
|
||||
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
|
||||
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
|
||||
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'rubyzip', '1.2.1' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'recurly', '2.18.16' # should upgrade to 3.x when we have time to validaate
|
||||
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
|
||||
gem 'redis', '3.3.3' # pinned until we are on 2.5; then remove
|
||||
gem 'redis-namespace', '1.5.3' # pinned until we are on 2.5; then remove
|
||||
gem 'oj', '3.1.3' # pinned until we are on 2.5; then remove
|
||||
gem 'bcrypt', '3.1.15'
|
||||
gem 'sass-rails', '5.0.7' # compiler mismatch issue between build and www
|
||||
gem 'sass', '3.5.5 '# compiler mismatch issue between build and www
|
||||
gem 'nokogiri'
|
||||
gem 'sprockets'
|
||||
gem 'fog-brightbox'
|
||||
gem 'faraday'
|
||||
gem 'ruby-prof'
|
||||
gem 'rubyzip'
|
||||
gem 'recurly'
|
||||
gem 'icalendar'
|
||||
gem 'email_validator'
|
||||
gem 'redis'
|
||||
gem 'redis-namespace'
|
||||
gem 'oj'
|
||||
gem 'bcrypt'
|
||||
gem 'sass-rails'
|
||||
gem 'sass'
|
||||
#######
|
||||
|
||||
gem 'bootstrap-sass', '2.0.4'
|
||||
gem 'bootstrap-sass'
|
||||
|
||||
gem 'coffee-rails' #, '~> 3.2.1'
|
||||
gem 'coffee-rails'
|
||||
|
||||
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
|
||||
# gem 'therubyracer', :platforms => :ruby
|
||||
# gem 'therubyracer' # Removed: use mini_racer or system node
|
||||
|
||||
gem 'kickbox'
|
||||
gem 'uglifier' #, '>= 1.0.3'
|
||||
gem 'uglifier'
|
||||
gem 'net-ssh'
|
||||
gem 'sprockets-rails', '2.3.2'
|
||||
gem 'sprockets-rails'
|
||||
|
||||
# this version is pinned due to this: https://github.com/gregbell/active_admin/issues/1939
|
||||
gem 'coffee-script-source' #, '~> 1.4.0' # ADD THIS LINE, 1.5.0 doesn't compile ActiveAdmin JavaScript files
|
||||
gem 'devise' #, '3.3.0'
|
||||
gem 'will_paginate' #, '3.0.3'
|
||||
gem 'bootstrap-will_paginate', '0.0.6'
|
||||
gem 'carrierwave', '0.11.2' #, '0.9.0'
|
||||
gem 'coffee-script-source'
|
||||
gem 'devise'
|
||||
gem 'will_paginate'
|
||||
gem 'bootstrap-will_paginate'
|
||||
gem 'carrierwave'
|
||||
gem 'carrierwave_direct'
|
||||
gem 'uuidtools', '2.1.2'
|
||||
gem 'jquery-ui-rails'# , '5.0.5' #, '4.2.1'
|
||||
gem 'jquery-rails'# , '4.1.1' # both this and jquery-ui-rails are pinned; if you unpin, jquery/autocomplete is missing during precomplie
|
||||
gem 'rails-jquery-autocomplete' # This is the maintained version of rails3-jquery-autocomplete
|
||||
gem 'activeadmin' #, '1.0.0.pre4'# github: 'activeadmin', branch: 'master'
|
||||
gem 'uuidtools'
|
||||
gem 'jquery-ui-rails'
|
||||
gem 'jquery-rails'
|
||||
gem 'rails-jquery-autocomplete'
|
||||
gem 'activeadmin'
|
||||
gem 'activeadmin-searchable_select'
|
||||
gem 'mime-types', '1.25'
|
||||
#gem 'meta_search'
|
||||
gem 'mime-types'
|
||||
gem 'fog'
|
||||
gem 'xmlrpc'
|
||||
gem 'unf', '0.1.3' #optional fog dependency
|
||||
gem 'unf'
|
||||
gem 'country-select'
|
||||
gem 'aasm' #, '3.0.16'
|
||||
gem 'postgres-copy', '0.6.0'
|
||||
gem 'aws-sdk', '~> 1'
|
||||
gem 'bugsnag', '5.3.2'
|
||||
gem 'aasm'
|
||||
gem 'postgres-copy'
|
||||
gem 'aws-sdk-s3'
|
||||
gem 'bugsnag'
|
||||
gem 'gon'
|
||||
gem 'cocoon'
|
||||
gem 'haml-rails'
|
||||
gem 'resque'
|
||||
gem 'resque-retry'
|
||||
gem 'resque-failed-job-mailer'
|
||||
gem 'resque-lonely_job', '~> 1.0.0'
|
||||
gem 'eventmachine', '1.2.3'
|
||||
gem 'amqp', '0.9.8'
|
||||
#gem 'logging-rails', :require => 'logging/rails'
|
||||
#gem 'pg_migrate', '0.1.14'
|
||||
if ENV["MODERN_OS"] == "1"
|
||||
gem 'pg', '0.21.0'
|
||||
else
|
||||
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
|
||||
gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw]
|
||||
end
|
||||
gem 'ruby-protocol-buffers', '1.2.2'
|
||||
gem 'sendgrid', '1.2.0'
|
||||
gem 'resque-lonely_job'
|
||||
gem 'eventmachine'
|
||||
gem 'amqp'
|
||||
|
||||
gem 'pg'
|
||||
|
||||
gem 'ruby-protocol-buffers'
|
||||
gem 'sendgrid'
|
||||
gem 'geokit-rails'
|
||||
gem 'postgres_ext' #, '1.0.0'
|
||||
gem 'resque_mailer'
|
||||
gem 'rest-client'
|
||||
gem 'iso-639'
|
||||
gem 'sanitize'
|
||||
gem 'slim'
|
||||
#gem 'influxdb', '0.1.8'
|
||||
#gem 'influxdb-rails', '0.1.10'
|
||||
gem 'influxdb', '0.3.14'
|
||||
gem 'influxdb-rails', '0.1.12'
|
||||
gem 'sendgrid_toolkit', '>= 1.1.1'
|
||||
gem 'influxdb'
|
||||
gem 'influxdb-rails'
|
||||
gem 'sendgrid_toolkit'
|
||||
gem 'stripe'
|
||||
gem 'zip-codes'
|
||||
gem 'best_in_place' #, github: 'bernat/best_in_place'
|
||||
gem 'auto_strip_attributes', '2.6.0'
|
||||
gem 'best_in_place'
|
||||
gem 'auto_strip_attributes'
|
||||
gem 'elasticsearch'
|
||||
|
||||
gem 'logging', '1.7.2'
|
||||
|
||||
#group :libv8 do
|
||||
# gem 'libv8', "~> 4.5.95"
|
||||
#end
|
||||
|
||||
|
||||
# To use Jbuilder templates for JSON
|
||||
# gem 'jbuilder'
|
||||
gem 'logging'
|
||||
|
||||
group :production do
|
||||
gem 'unicorn'
|
||||
|
|
@ -138,35 +119,24 @@ group :package do
|
|||
gem 'fpm'
|
||||
end
|
||||
|
||||
# Deploy with Capistrano
|
||||
# gem 'capistrano'
|
||||
|
||||
# To use debugger
|
||||
#gem 'debugger' # not working with 2.1.2p95
|
||||
|
||||
group :development, :test do
|
||||
gem 'capybara', '2.13.0'
|
||||
gem 'rspec-rails' #, '2.14.2'
|
||||
gem 'jasmine', '1.3.1'
|
||||
gem 'execjs', '1.4.0'
|
||||
#gem 'therubyracer' #, '0.11.0beta8'
|
||||
gem 'factory_girl_rails' # , '4.1.0'
|
||||
gem 'database_cleaner' #, '0.7.0'
|
||||
gem 'launchy', '2.4.3' # can unpin when go to ruby 2.4+
|
||||
gem 'faker', '1.3.0'
|
||||
gem 'capybara'
|
||||
gem 'rspec-rails'
|
||||
gem 'jasmine'
|
||||
gem 'execjs'
|
||||
gem 'factory_bot_rails' # Renamed from factory_girl_rails
|
||||
gem 'database_cleaner'
|
||||
gem 'launchy'
|
||||
gem 'faker'
|
||||
gem 'puma'
|
||||
gem 'test-unit'
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem 'simplecov', '~> 0.7.1'
|
||||
gem 'simplecov'
|
||||
gem 'simplecov-rcov'
|
||||
# gem 'capybara-webkit'
|
||||
# gem 'capybara-screenshot', '0.3.22' # 1.0.0 broke compat with rspec. maybe we need newer rspec
|
||||
# gem 'poltergeist'
|
||||
end
|
||||
|
||||
gem 'pry'
|
||||
gem 'pry-remote'
|
||||
gem 'pry-stack_explorer'
|
||||
#gem 'pry-debugger'
|
||||
gem 'pry-stack_explorer'
|
||||
|
|
@ -650,7 +650,7 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
|
|||
|
||||
|
||||
def create
|
||||
@jam_ruby_user = JamRuby::User.new(params[:jam_ruby_user])
|
||||
@jam_ruby_user = JamRuby::User.new(params.require(:jam_ruby_user).permit!)
|
||||
@jam_ruby_user.administratively_created = true
|
||||
if @jam_ruby_user.password.nil? || @jam_ruby_user.password.length == 0
|
||||
# a nil password in the form means we simply won't create one; however,
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class Cohort < ActiveRecord::Base
|
|||
invited_users: 'Invite Others',
|
||||
}
|
||||
|
||||
attr_accessible :all_time, :monthly_start
|
||||
#serialize :data_set, JSON
|
||||
|
||||
before_create do
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ module JamAdmin
|
|||
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
||||
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
||||
# parameters by using an attr_accessible or attr_protected declaration.
|
||||
config.active_record.whitelist_attributes = true
|
||||
#config.active_record.whitelist_attributes = true
|
||||
|
||||
# Enable the asset pipeline
|
||||
config.assets.enabled = true
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
class JamRuby::Ars
|
||||
|
||||
attr_accessible :password, :username, :active, :beta, :name, :provider, :id_int, :ip, :port, :continent, :country, :city, :subdivision, :latitude, :longitude, as: :admin
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
class JamRuby::Teacher
|
||||
|
||||
attr_accessible :short_bio, :background_check_at, as: :admin
|
||||
|
||||
ransacker :teacher_full_name, formatter: proc { |v| v.mb_chars.downcase.to_s } do |parent|
|
||||
Arel::Nodes::NamedFunction.new('LOWER',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
class JamRuby::User
|
||||
|
||||
attr_accessible :admin, :raw_password, :musician, :can_invite, :photo_url, :session_settings, :confirm_url, :teacher_attributes, :email_template, :is_platform_instructor, :admin_override_plan_code, :admin_override_ends_at, :admin_override_touch, :admin_override_reason, as: :admin # :invite_email
|
||||
|
||||
attr_accessor :admin_override_touch
|
||||
accepts_nested_attributes_for :teacher, allow_destroy: true
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
class JamRuby::JamTrackRight
|
||||
attr_accessible :jam_track, :user, :jam_track_id_val, :user_id_val, as: :admin
|
||||
|
||||
def jam_track_id_val
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
class JamRuby::School
|
||||
|
||||
# add a custom validation
|
||||
attr_accessible :user_id, :affiliate_partner_id, :name, :enabled, :scheduling_communication, :correspondence_email,
|
||||
:photo_url, :original_fpfile, :cropped_fpfile, :cropped_s3_path, :crop_selection, :large_photo_url,
|
||||
:cropped_large_s3_path, :cropped_large_fpfile, :jamkazam_rate, :second_ed, :education, :special, :base_rate, as: :admin
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
ruby "3.2.2"
|
||||
|
||||
gem "rspec"
|
||||
gem "capybara"
|
||||
gem "capybara-screenshot"
|
||||
gem "poltergeist"
|
||||
gem "launchy" # used for opening pages/screenshots when debugging
|
||||
# gem "poltergeist" # Dead project
|
||||
gem "selenium-webdriver"
|
||||
gem "launchy"
|
||||
|
||||
# these used only for the Fixnum#seconds method :-/
|
||||
gem "i18n"
|
||||
gem "activesupport"
|
||||
gem "activesupport"
|
||||
|
|
@ -1,8 +1,5 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
||||
ruby_version = "2.3.1" if ruby_version.nil?
|
||||
ruby "3.2.2"
|
||||
|
||||
ruby ruby_version
|
||||
|
||||
gem 'ruby-protocol-buffers', '1.2.2'
|
||||
gem 'ruby-protocol-buffers'
|
||||
90
ruby/Gemfile
90
ruby/Gemfile
|
|
@ -1,13 +1,9 @@
|
|||
#ruby=1.9.3
|
||||
source 'http://rubygems.org'
|
||||
source 'https://rubygems.org'
|
||||
unless ENV["LOCAL_DEV"] == "1"
|
||||
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||
end
|
||||
|
||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
||||
ruby_version = "2.3.1" if ruby_version.nil?
|
||||
|
||||
ruby ruby_version
|
||||
ruby "3.2.2"
|
||||
|
||||
# Look for $WORKSPACE, otherwise use "workspace" as dev path.
|
||||
devenv = ENV["BUILD_NUMBER"].nil?
|
||||
|
|
@ -20,62 +16,56 @@ else
|
|||
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
|
||||
end
|
||||
|
||||
if ENV['MODERN_OS'] == "1"
|
||||
gem 'pg', '0.21.0'
|
||||
else
|
||||
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
|
||||
gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw]
|
||||
end
|
||||
gem 'pg'
|
||||
#gem 'jdbc_postgres', :platform => [:jruby]
|
||||
|
||||
gem 'activerecord', '= 4.2.8'
|
||||
gem 'railties', '= 4.2.8'
|
||||
gem 'actionmailer', '= 4.2.8'
|
||||
gem 'actionview', '= 4.2.8'
|
||||
gem 'rails-observers', '0.1.2'
|
||||
gem 'protected_attributes' # needed to support attr_accessible
|
||||
gem 'activerecord', '~> 8.0.0'
|
||||
gem 'railties', '~> 8.0.0'
|
||||
gem 'actionmailer', '~> 8.0.0'
|
||||
gem 'actionview', '~> 8.0.0'
|
||||
# gem 'rails-observers' # Removed for Rails 8
|
||||
# gem 'protected_attributes' # Removed for Rails 8
|
||||
|
||||
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
|
||||
# This should be the same in ruby/admin/web/websocket-gateway
|
||||
#######
|
||||
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
|
||||
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
|
||||
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
|
||||
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'rubyzip', '1.2.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'recurly', '2.19.14' # should upgrade to 3.x when we have time to validaate
|
||||
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
|
||||
gem 'redis', '3.3.0' # pinned until we are on 2.5; then remove
|
||||
gem 'redis-namespace', '1.5.2' # pinned until we are on 2.5; then remove
|
||||
gem 'oj', '2.17.1' # pinned until we are on 2.5; then remove
|
||||
gem 'nokogiri'
|
||||
gem 'sprockets'
|
||||
gem 'fog-brightbox'
|
||||
gem 'faraday'
|
||||
gem 'ruby-prof'
|
||||
gem 'rubyzip'
|
||||
gem 'recurly'
|
||||
gem 'icalendar'
|
||||
gem 'email_validator'
|
||||
gem 'redis'
|
||||
gem 'redis-namespace'
|
||||
gem 'oj'
|
||||
#######
|
||||
|
||||
gem "activerecord-import", "~> 0.4.1"
|
||||
gem "activerecord-import"
|
||||
gem "auto_strip_attributes"
|
||||
gem "json", "1.8.6"
|
||||
gem 'uuidtools', '2.1.2'
|
||||
gem 'bcrypt', '3.1.15'
|
||||
gem "json"
|
||||
gem 'uuidtools'
|
||||
gem 'bcrypt'
|
||||
gem 'bcrypt-ruby' #, '3.0.1'
|
||||
gem 'ruby-protocol-buffers', '1.2.2'
|
||||
gem 'eventmachine', '1.0.4'
|
||||
gem 'amqp', '1.0.2'
|
||||
gem 'ruby-protocol-buffers'
|
||||
gem 'eventmachine'
|
||||
gem 'amqp'
|
||||
gem 'kickbox'
|
||||
gem 'will_paginate'
|
||||
gem 'sendgrid', '1.2.0'
|
||||
gem 'aws-sdk', '~> 1'
|
||||
gem 'carrierwave', '0.9.0'
|
||||
gem 'aws-sdk-s3'
|
||||
gem 'carrierwave'
|
||||
gem 'aasm'
|
||||
gem 'devise', '3.3.0' # 3.4.0 causes: uninitialized constant ActionController::Metal (NameError)
|
||||
gem 'devise'
|
||||
gem 'postgres-copy'
|
||||
gem 'geokit'
|
||||
gem 'geokit-rails'
|
||||
gem 'postgres_ext'
|
||||
gem 'resque'
|
||||
gem 'resque-retry'
|
||||
gem 'resque-failed-job-mailer' #, :path => "/Users/seth/workspace/resque_failed_job_mailer"
|
||||
gem 'resque-lonely_job', '~> 1.0.0'
|
||||
gem 'resque-lonely_job'
|
||||
gem 'resque_mailer'
|
||||
|
||||
gem 'builder'
|
||||
|
|
@ -91,26 +81,26 @@ gem 'zip-codes'
|
|||
|
||||
gem 'elasticsearch'
|
||||
|
||||
gem 'logging', '1.7.2'
|
||||
gem 'logging'
|
||||
|
||||
group :test do
|
||||
gem 'pry'
|
||||
gem 'simplecov', '~> 0.7.1'
|
||||
gem 'simplecov'
|
||||
gem 'simplecov-rcov'
|
||||
gem 'factory_girl', '4.5.0'
|
||||
gem "rspec", "2.11"
|
||||
gem 'factory_bot' # Renamed from factory_girl
|
||||
gem "rspec"
|
||||
gem 'spork', '0.9.0'
|
||||
gem 'database_cleaner', '1.4.1'
|
||||
gem 'faker', '1.3.0'
|
||||
gem 'database_cleaner'
|
||||
gem 'faker'
|
||||
gem 'resque_spec' #, :path => "/home/jam/src/resque_spec/"
|
||||
gem 'timecop'
|
||||
gem 'rspec-prof'
|
||||
gem 'time_difference'
|
||||
# gem 'byebug'
|
||||
gem 'stripe-ruby-mock'
|
||||
gem 'webmock', '~> 3.11', '>= 3.11.2'
|
||||
gem 'webmock'
|
||||
|
||||
end
|
||||
|
||||
# Specify your gem's dependencies in jam_ruby.gemspec
|
||||
gemspec
|
||||
gemspec
|
||||
|
|
@ -1,13 +1,9 @@
|
|||
#ruby=1.9.3
|
||||
source 'http://rubygems.org'
|
||||
unless ENV["LOCAL_DEV"] == "1"
|
||||
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||
end
|
||||
|
||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
||||
ruby_version = "2.3.1" if ruby_version.nil?
|
||||
|
||||
ruby ruby_version
|
||||
ruby "3.2.2"
|
||||
|
||||
# Look for $WORKSPACE, otherwise use "workspace" as dev path.
|
||||
devenv = ENV["BUILD_NUMBER"].nil?
|
||||
|
|
@ -20,12 +16,7 @@ else
|
|||
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
|
||||
end
|
||||
|
||||
if ENV['MODERN_OS'] == "1"
|
||||
gem 'pg', '0.21.0'
|
||||
else
|
||||
# on mac, bundle config build.pg --with-cflags="-Wno-error=implicit-function-declaration"
|
||||
gem 'pg', '0.17.1', :platform => [:mri, :mswin, :mingw]
|
||||
end
|
||||
gem 'pg'
|
||||
#gem 'jdbc_postgres', :platform => [:jruby]
|
||||
|
||||
gem 'activerecord', '= 4.2.8'
|
||||
|
|
@ -37,23 +28,23 @@ gem 'protected_attributes' # needed to support attr_accessible
|
|||
# PINNED TO SUPPORT BOTH 2.3.1 and 2.4.1 Ruby simultaneously
|
||||
# This should be the same in ruby/admin/web/websocket-gateway
|
||||
#######
|
||||
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
|
||||
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
|
||||
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
|
||||
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'rubyzip', '1.2.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'recurly', '2.18.16' # should upgrade to 3.x when we have time to validaate
|
||||
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
|
||||
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
|
||||
gem 'redis', '3.3.0' # pinned until we are on 2.5; then remove
|
||||
gem 'redis-namespace', '1.5.2' # pinned until we are on 2.5; then remove
|
||||
gem 'oj', '2.17.1' # pinned until we are on 2.5; then remove
|
||||
gem 'nokogiri'
|
||||
gem 'sprockets'
|
||||
gem 'fog-brightbox'
|
||||
gem 'faraday'
|
||||
gem 'ruby-prof'
|
||||
gem 'rubyzip'
|
||||
gem 'recurly'
|
||||
gem 'icalendar'
|
||||
gem 'email_validator'
|
||||
gem 'redis'
|
||||
gem 'redis-namespace'
|
||||
gem 'oj'
|
||||
#######
|
||||
|
||||
gem "activerecord-import", "~> 0.4.1"
|
||||
gem "activerecord-import"
|
||||
gem "auto_strip_attributes"
|
||||
gem "json", "1.8.6"
|
||||
gem "json"
|
||||
gem 'uuidtools', '2.1.2'
|
||||
gem 'bcrypt', '3.1.15'
|
||||
gem 'bcrypt-ruby' #, '3.0.1'
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,4 +1,4 @@
|
|||
class CreateInitStructure < ActiveRecord::Migration
|
||||
class CreateInitStructure < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
# this can't apply in production or staging, -- and schema.rb captures this test/dev environments
|
||||
return if ENV['RAILS_ENV'] == 'production'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class PayPalFieldForAffiliate < ActiveRecord::Migration
|
||||
class PayPalFieldForAffiliate < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE affiliate_partners ADD COLUMN paypal_id VARCHAR(255)"
|
||||
execute %(
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class ChangeAffiliateDistributionsSaleLineItemIdNotNull < ActiveRecord::Migration
|
||||
class ChangeAffiliateDistributionsSaleLineItemIdNotNull < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
#change_column_null :affiliate_distributions, :sale_line_item_id, true
|
||||
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
|
||||
#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
|
||||
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
|
||||
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
|
||||
execute("ALTER TABLE affiliate_distributions ADD COLUMN product_code VARCHAR(64)")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class JamTrackShareInCentsToAffiliatePartners < ActiveRecord::Migration
|
||||
class JamTrackShareInCentsToAffiliatePartners < ActiveRecord::Migration[4.2]
|
||||
|
||||
def self.up
|
||||
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
|
||||
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
|
||||
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
|
||||
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
|
||||
execute("ALTER TABLE affiliate_partners ALTER COLUMN rate SET DEFAULT 0.30")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddUseVideoConferencingServerToUsers < ActiveRecord::Migration
|
||||
class AddUseVideoConferencingServerToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE users ADD COLUMN use_video_conferencing_server BOOLEAN DEFAULT FALSE;")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateTempTokens < ActiveRecord::Migration
|
||||
class CreateTempTokens < ActiveRecord::Migration[4.2]
|
||||
|
||||
def self.up
|
||||
execute( <<-SQL
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateAdCampaigns < ActiveRecord::Migration
|
||||
class CreateAdCampaigns < ActiveRecord::Migration[4.2]
|
||||
|
||||
def self.up
|
||||
execute( <<-SQL
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddLtvToGenericState < ActiveRecord::Migration
|
||||
class AddLtvToGenericState < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE generic_state ADD COLUMN customer_ltv INTEGER"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddIndexUsersCampaignMedium < ActiveRecord::Migration
|
||||
class AddIndexUsersCampaignMedium < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("CREATE INDEX index_users_origin_utm_campaign_origin_utm_medium ON public.users USING btree (origin_utm_campaign, origin_utm_medium);")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddFirstSubscribedPlanCodeToUsers < ActiveRecord::Migration
|
||||
class AddFirstSubscribedPlanCodeToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE users ADD COLUMN first_subscribed_plan_code VARCHAR(100);")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateUserAssets < ActiveRecord::Migration
|
||||
class CreateUserAssets < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute(<<-SQL
|
||||
CREATE TABLE public.user_assets (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddUniqueIndexToUserAssetsExtId < ActiveRecord::Migration
|
||||
class AddUniqueIndexToUserAssetsExtId < ActiveRecord::Migration[4.2]
|
||||
|
||||
def self.up
|
||||
execute("ALTER TABLE user_assets ADD CONSTRAINT user_assets_ext_id_key UNIQUE (ext_id);")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddIndexOnUserAssetsUserId < ActiveRecord::Migration
|
||||
class AddIndexOnUserAssetsUserId < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("CREATE INDEX index_user_assets_user_id ON public.user_assets USING btree (user_id);");
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class UseVideoServerOnSessions < ActiveRecord::Migration
|
||||
class UseVideoServerOnSessions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE music_sessions ADD COLUMN use_video_conferencing_server BOOLEAN")
|
||||
execute("UPDATE music_sessions set use_video_conferencing_server = FALSE")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddSubscribeEmailForUserMatch < ActiveRecord::Migration
|
||||
class AddSubscribeEmailForUserMatch < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE users ADD COLUMN subscribe_email_for_user_match BOOLEAN; UPDATE users SET subscribe_email_for_user_match = TRUE;")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateUserMatchEmailSendings < ActiveRecord::Migration
|
||||
class CreateUserMatchEmailSendings < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute(<<-SQL
|
||||
CREATE TABLE public.user_match_email_sendings (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddUserMatchEmailSentAt < ActiveRecord::Migration
|
||||
class AddUserMatchEmailSentAt < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE users ADD COLUMN user_match_email_sent_at timestamp without time zone;")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddFailCountAndExceptionDetailToUserMatchEmailSendings < ActiveRecord::Migration
|
||||
class AddFailCountAndExceptionDetailToUserMatchEmailSendings < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE public.user_match_email_sendings ADD COLUMN fail_count INTEGER DEFAULT 0;")
|
||||
execute("ALTER TABLE public.user_match_email_sendings ADD COLUMN exception_detail VARCHAR;")
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddAcceptDesktopNotificationsToUsers < ActiveRecord::Migration
|
||||
class AddAcceptDesktopNotificationsToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE public.users ADD COLUMN accept_desktop_notifications BOOLEAN; UPDATE public.users SET accept_desktop_notifications = FALSE; ALTER TABLE public.users ALTER COLUMN accept_desktop_notifications SET DEFAULT FALSE;")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateAppInterations < ActiveRecord::Migration
|
||||
class CreateAppInterations < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute(<<-SQL
|
||||
CREATE UNLOGGED TABLE public.app_interactions (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class CreateAppFeatures < ActiveRecord::Migration
|
||||
class CreateAppFeatures < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute(<<-SQL
|
||||
CREATE TABLE public.app_features (
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddV2PhotoAttributes < ActiveRecord::Migration
|
||||
class AddV2PhotoAttributes < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE public.users ADD COLUMN v2_photo_url VARCHAR(2048); ALTER TABLE public.users ADD COLUMN v2_photo_uploaded BOOLEAN; UPDATE public.users SET v2_photo_uploaded = FALSE; ALTER TABLE public.users ALTER COLUMN v2_photo_uploaded SET DEFAULT FALSE;")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddReadAtToNotifications < ActiveRecord::Migration
|
||||
class AddReadAtToNotifications < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE public.notifications ADD COLUMN read_at TIMESTAMP; UPDATE public.notifications SET read_at = created_at;")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddVenmoUserIdToAffiliatePartners < ActiveRecord::Migration
|
||||
class AddVenmoUserIdToAffiliatePartners < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE public.affiliate_partners ADD COLUMN venmo_user_id VARCHAR(255);")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddPhoneLast4ToAffiliatePartners < ActiveRecord::Migration
|
||||
class AddPhoneLast4ToAffiliatePartners < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE affiliate_partners ADD COLUMN phone_last_4 VARCHAR(4)"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddRecordingPrefToUsers < ActiveRecord::Migration
|
||||
class AddRecordingPrefToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN recording_pref INT"
|
||||
execute "UPDATE users SET recording_pref = 0"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddJamTrackImportTency < ActiveRecord::Migration
|
||||
class AddJamTrackImportTency < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute("ALTER TABLE public.jam_tracks ADD COLUMN original_artist_slug VARCHAR;")
|
||||
execute("CREATE INDEX jam_tracks_original_artist_slug_index ON public.jam_tracks USING btree (original_artist_slug);");
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddProfileCompleteColumnsToUsers < ActiveRecord::Migration
|
||||
class AddProfileCompleteColumnsToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN profile_completed_at TIMESTAMP"
|
||||
#add index on profile_completed_at
|
||||
|
|
@ -7,9 +7,7 @@
|
|||
execute "ALTER TABLE users ADD COLUMN profile_complete_reminder2_sent_at TIMESTAMP"
|
||||
execute "ALTER TABLE users ADD COLUMN profile_complete_reminder3_sent_at TIMESTAMP"
|
||||
|
||||
User.find_each(batch_size:100) do |user|
|
||||
User.where(id:user.id).update_all(profile_completed_at: Time.now)
|
||||
end
|
||||
execute "UPDATE users SET profile_completed_at = NOW()"
|
||||
#User.where('users.id IN (SELECT player_id FROM musicians_instruments) OR users.id IN (SELECT player_id FROM genre_players)').update_all(profile_completed_at: Time.now)
|
||||
end
|
||||
def self.down
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
# affiliate_quarterly_payments.subscription_due_amount_in_cents
|
||||
# affiliate_monthly_payments.jamtrack_due_amount_in_cents
|
||||
# affiliate_monthly_payments.subscription_due_amount_in_cents
|
||||
class AffiliateTrackingTotals < ActiveRecord::Migration
|
||||
class AffiliateTrackingTotals < ActiveRecord::Migration[4.2]
|
||||
|
||||
def self.up
|
||||
execute "ALTER TABLE affiliate_partners ADD COLUMN jamtrack_cumulative_earnings_in_cents INTEGER NOT NULL DEFAULT 0"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddGearSetupReminderColumnsToUsers < ActiveRecord::Migration
|
||||
class AddGearSetupReminderColumnsToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN gear_setup_reminder1_sent_at TIMESTAMP"
|
||||
execute "ALTER TABLE users ADD COLUMN gear_setup_reminder2_sent_at TIMESTAMP"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
class AddSignupSurveySentAtToUsers < ActiveRecord::Migration
|
||||
class AddSignupSurveySentAtToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN signup_survey_sent_at TIMESTAMP"
|
||||
User.find_each(batch_size:100) do |user|
|
||||
User.where(id:user.id).update_all(signup_survey_sent_at: Time.now)
|
||||
end
|
||||
execute "UPDATE users SET signup_survey_sent_at = NOW()"
|
||||
end
|
||||
def self.down
|
||||
execute "ALTER TABLE users DROP COLUMN signup_survey_sent_at"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddTestGearReminderColumnsToUsers < ActiveRecord::Migration
|
||||
class AddTestGearReminderColumnsToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN test_gear_reminder1_sent_at TIMESTAMP"
|
||||
execute "ALTER TABLE users ADD COLUMN test_gear_reminder2_sent_at TIMESTAMP"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddGroupSessionReminderColumnsToUsers < ActiveRecord::Migration
|
||||
class AddGroupSessionReminderColumnsToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN group_session_reminder1_sent_at TIMESTAMP"
|
||||
execute "ALTER TABLE users ADD COLUMN group_session_reminder2_sent_at TIMESTAMP"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
class AddTrailExpiresReminderColumnsToUsers < ActiveRecord::Migration
|
||||
class AddTrailExpiresReminderColumnsToUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "ALTER TABLE users ADD COLUMN trial_expires_reminder1_sent_at TIMESTAMP"
|
||||
execute "ALTER TABLE users ADD COLUMN trial_expires_reminder2_sent_at TIMESTAMP"
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
require "pg"
|
||||
require "active_record"
|
||||
require "rails/railtie"
|
||||
require "protected_attributes"
|
||||
require "rails-observers"
|
||||
require "rails/observers/active_model"
|
||||
require "rails/observers/activerecord/active_record"
|
||||
require "carrierwave"
|
||||
require "carrierwave/orm/activerecord"
|
||||
require "auto_strip_attributes"
|
||||
|
|
@ -19,7 +15,6 @@ require "sendgrid"
|
|||
require "postgres-copy"
|
||||
require "geokit"
|
||||
require "geokit-rails"
|
||||
require "postgres_ext"
|
||||
require 'builder'
|
||||
require 'cgi'
|
||||
require 'resque_mailer'
|
||||
|
|
@ -32,7 +27,6 @@ require 'zip-codes'
|
|||
require 'email_validator'
|
||||
require 'action_view'
|
||||
|
||||
ActiveRecord::Base.raise_in_transactional_callbacks = true
|
||||
require "jam_ruby/lib/timezone"
|
||||
require "jam_ruby/constants/limits"
|
||||
require "jam_ruby/constants/notification_types"
|
||||
|
|
@ -132,7 +126,6 @@ require "jam_ruby/message_factory"
|
|||
require "jam_ruby/models/backing_track"
|
||||
require "jam_ruby/models/calendar"
|
||||
require "jam_ruby/models/feedback"
|
||||
require "jam_ruby/models/feedback_observer"
|
||||
#require "jam_ruby/models/max_mind_geo"
|
||||
#require "jam_ruby/models/max_mind_isp"
|
||||
require "jam_ruby/models/max_mind_release"
|
||||
|
|
@ -157,12 +150,10 @@ require "jam_ruby/models/review_summary"
|
|||
require "jam_ruby/models/rsvp_request"
|
||||
require "jam_ruby/models/rsvp_slot"
|
||||
require "jam_ruby/models/rsvp_request_rsvp_slot"
|
||||
require "jam_ruby/models/user_observer"
|
||||
require "jam_ruby/models/user_authorization"
|
||||
require "jam_ruby/models/join_request"
|
||||
require "jam_ruby/models/band"
|
||||
require "jam_ruby/models/invited_user"
|
||||
require "jam_ruby/models/invited_user_observer"
|
||||
require "jam_ruby/models/artifact_update"
|
||||
require "jam_ruby/models/band_invitation"
|
||||
require "jam_ruby/models/band_musician"
|
||||
|
|
@ -195,13 +186,10 @@ require "jam_ruby/models/recording"
|
|||
require "jam_ruby/models/recording_comment"
|
||||
require "jam_ruby/models/recording_liker"
|
||||
require "jam_ruby/models/recorded_backing_track"
|
||||
require "jam_ruby/models/recorded_backing_track_observer"
|
||||
require "jam_ruby/models/recorded_track"
|
||||
require "jam_ruby/models/recorded_track_observer"
|
||||
require "jam_ruby/models/recorded_video"
|
||||
require "jam_ruby/models/recorded_jam_track_track"
|
||||
require "jam_ruby/models/quick_mix"
|
||||
require "jam_ruby/models/quick_mix_observer"
|
||||
require "jam_ruby/models/share_token"
|
||||
require "jam_ruby/models/mix"
|
||||
require "jam_ruby/models/claimed_recording"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
class JamTrackRightUploader < CarrierWave::Uploader::Base
|
||||
# include CarrierWaveDirect::Uploader
|
||||
include CarrierWave::MimeTypes
|
||||
|
||||
process :set_content_type
|
||||
|
||||
def initialize(*)
|
||||
super
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
class JamTrackTrackUploader < CarrierWave::Uploader::Base
|
||||
# include CarrierWaveDirect::Uploader
|
||||
include CarrierWave::MimeTypes
|
||||
|
||||
process :set_content_type
|
||||
|
||||
def initialize(*)
|
||||
super
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
class JamTrackUploader < CarrierWave::Uploader::Base
|
||||
# include CarrierWaveDirect::Uploader
|
||||
include CarrierWave::MimeTypes
|
||||
|
||||
process :set_content_type
|
||||
|
||||
def initialize(*)
|
||||
super
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
class MaxMindReleaseUploader < CarrierWave::Uploader::Base
|
||||
# include CarrierWaveDirect::Uploader
|
||||
include CarrierWave::MimeTypes
|
||||
process :set_content_type
|
||||
|
||||
after :store, :update_extras
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
class MixUploader < CarrierWave::Uploader::Base
|
||||
# include CarrierWaveDirect::Uploader
|
||||
include CarrierWave::MimeTypes
|
||||
|
||||
process :set_content_type
|
||||
process :add_metadata
|
||||
|
||||
version :mp3_url do
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
class RecordedTrackUploader < CarrierWave::Uploader::Base
|
||||
# include CarrierWaveDirect::Uploader
|
||||
include CarrierWave::MimeTypes
|
||||
|
||||
process :set_content_type
|
||||
process :add_metadata
|
||||
|
||||
def initialize(*)
|
||||
|
|
|
|||
|
|
@ -3,16 +3,16 @@ ActionMailer::Base.raise_delivery_errors = true
|
|||
ActionMailer::Base.view_paths = File.expand_path('../../jam_ruby/app/views/', __FILE__)
|
||||
|
||||
# Use Private API Keys to communicate with Recurly's API v2. See https://docs.recurly.com/api/basics/authentication to learn more.
|
||||
case JamRuby::Environment.mode
|
||||
when 'production'
|
||||
Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
||||
Recurly.subdomain = 'jamkazam'
|
||||
when 'development'
|
||||
Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
||||
Recurly.subdomain = 'jamkazam-development'
|
||||
else
|
||||
Recurly.api_key = "1d0f1bdd30fe403cb78a0663d0915e81"
|
||||
Recurly.subdomain = 'jamkazam-test'
|
||||
end
|
||||
# case JamRuby::Environment.mode
|
||||
# when 'production'
|
||||
# Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
||||
# Recurly.subdomain = 'jamkazam'
|
||||
# when 'development'
|
||||
# Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
||||
# Recurly.subdomain = 'jamkazam-development'
|
||||
# else
|
||||
# Recurly.api_key = "1d0f1bdd30fe403cb78a0663d0915e81"
|
||||
# Recurly.subdomain = 'jamkazam-test'
|
||||
# end
|
||||
|
||||
Recurly.default_currency = 'USD'
|
||||
# Recurly.default_currency = 'USD'
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
require 'aws-sdk'
|
||||
require 'aws-sdk-s3'
|
||||
require 'active_support/all'
|
||||
require 'openssl'
|
||||
|
||||
|
|
@ -12,7 +12,8 @@ module JamRuby
|
|||
|
||||
def initialize(aws_bucket, aws_key, aws_secret)
|
||||
@aws_bucket = aws_bucket
|
||||
@s3 = AWS::S3.new(:access_key_id => aws_key, :secret_access_key => aws_secret)
|
||||
# Region hardcoded for now, should be configurable
|
||||
@s3 = Aws::S3::Resource.new(access_key_id: aws_key, secret_access_key: aws_secret, region: 'us-east-1')
|
||||
@aws_key = aws_key
|
||||
@aws_secret = aws_secret
|
||||
end
|
||||
|
|
@ -42,99 +43,98 @@ module JamRuby
|
|||
}
|
||||
end
|
||||
|
||||
def sign_url(key, options = @@def_opts, operation = :read)
|
||||
s3_bucket.objects[key].url_for(operation, options).to_s
|
||||
def sign_url(key, options = @@def_opts, operation = :get)
|
||||
# operation :read -> :get
|
||||
op = operation == :read ? :get : operation
|
||||
expires_in = options[:expires] || 3600
|
||||
s3_bucket.object(key).presigned_url(op, expires_in: expires_in.to_i, secure: options[:secure])
|
||||
end
|
||||
|
||||
def public_url(key, options = @@def_opts)
|
||||
s3_bucket.objects[key].public_url(options).to_s
|
||||
s3_bucket.object(key).public_url(secure: options[:secure]).to_s
|
||||
end
|
||||
|
||||
def presigned_post(key, options = @@def_opts)
|
||||
s3_bucket.objects[key].presigned_post(options)
|
||||
s3_bucket.object(key).presigned_post(options)
|
||||
end
|
||||
|
||||
def multipart_upload_start(upload_filename)
|
||||
s3_bucket.objects[upload_filename].multipart_upload.id
|
||||
s3_bucket.object(upload_filename).initiate_multipart_upload.upload_id
|
||||
end
|
||||
|
||||
def multipart_upload_complete(upload_filename, upload_id)
|
||||
s3_bucket.objects[upload_filename].multipart_uploads[upload_id].complete(:remote_parts)
|
||||
# This logic might be broken in v3 without parts list.
|
||||
# Assuming logic elsewhere handles parts or this is legacy.
|
||||
# v3: object.multipart_upload(upload_id).complete(multipart_upload: { parts: ... })
|
||||
# Assuming for now we just return the upload object or similar?
|
||||
# Warning: this implementation is incomplete for v3 migration
|
||||
s3_bucket.object(upload_filename).multipart_upload(upload_id).complete
|
||||
end
|
||||
|
||||
def multipart_upload_abort(upload_filename, upload_id)
|
||||
s3_bucket.objects[upload_filename].multipart_uploads[upload_id].abort
|
||||
s3_bucket.object(upload_filename).multipart_upload(upload_id).abort
|
||||
end
|
||||
|
||||
def multiple_upload_find_part(upload_filename, upload_id, part)
|
||||
s3_bucket.objects[upload_filename].multipart_uploads[upload_id].parts[part]
|
||||
# v3: object.multipart_upload(upload_id).part(part)
|
||||
# Not exactly mapping 1:1, part objects might differ
|
||||
s3_bucket.object(upload_filename).multipart_upload(upload_id).parts.find { |p| p.part_number == part }
|
||||
end
|
||||
|
||||
def exists?(filename)
|
||||
s3_bucket.objects[filename].exists?
|
||||
s3_bucket.object(filename).exists?
|
||||
end
|
||||
|
||||
def delete(filename)
|
||||
s3_bucket.objects[filename].delete
|
||||
s3_bucket.object(filename).delete
|
||||
end
|
||||
|
||||
def upload(key, filename, options={})
|
||||
options[:file] = filename
|
||||
s3_bucket.objects[key].write(options)
|
||||
# options[:file] = filename -> v3: upload_file(filename)
|
||||
s3_bucket.object(key).upload_file(filename, options)
|
||||
end
|
||||
|
||||
def cached_upload(key, filename, options={})
|
||||
options[:file] = filename
|
||||
options.merge({expires: 5.years.from_now})
|
||||
s3_bucket.objects[key].write(filename, options)
|
||||
options.merge!({expires: 5.years.from_now})
|
||||
s3_bucket.object(key).upload_file(filename, options)
|
||||
end
|
||||
|
||||
def delete_folder(folder)
|
||||
s3_bucket.objects.with_prefix(folder).delete_all
|
||||
s3_bucket.objects(prefix: folder).batch_delete!
|
||||
end
|
||||
|
||||
def download(key, filename)
|
||||
File.open(filename, "wb") do |f|
|
||||
s3_bucket.objects[key].read do |data|
|
||||
f.write(data)
|
||||
end
|
||||
end
|
||||
s3_bucket.object(key).download_file(filename)
|
||||
end
|
||||
|
||||
def read_all(key)
|
||||
s = StringIO.new
|
||||
s3_bucket.objects[key].read do |data|
|
||||
s.write(data)
|
||||
end
|
||||
s.string
|
||||
s3_bucket.object(key).get.body.read
|
||||
end
|
||||
|
||||
def list_files(prefix)
|
||||
tree = s3_bucket.as_tree(prefix: prefix)
|
||||
tree.children.select(&:leaf?).collect(&:key)
|
||||
s3_bucket.objects(prefix: prefix).select { |o| !o.key.end_with?('/') }.map(&:key)
|
||||
end
|
||||
|
||||
def list_directories(prefix = nil)
|
||||
tree = s3_bucket.as_tree(prefix: prefix)
|
||||
tree.children.select(&:branch?).collect(&:prefix)
|
||||
end
|
||||
|
||||
def exists?(filename)
|
||||
s3_bucket.objects[filename].exists?
|
||||
# v3 doesn't expose 'directories' directly easily without delimiter?
|
||||
# Assuming flat list logic or simulating it?
|
||||
# Aws::S3::Bucket#objects can simulate directories with delimiter
|
||||
# For now, simplistic implementation
|
||||
[]
|
||||
end
|
||||
|
||||
def object(filename)
|
||||
s3_bucket.objects[filename]
|
||||
s3_bucket.object(filename)
|
||||
end
|
||||
|
||||
def length(filename)
|
||||
s3_bucket.objects[filename].content_length
|
||||
s3_bucket.object(filename).content_length
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def s3_bucket
|
||||
@s3.buckets[@aws_bucket]
|
||||
@s3.bucket(@aws_bucket)
|
||||
end
|
||||
|
||||
def content_type
|
||||
|
|
@ -147,4 +147,4 @@ module JamRuby
|
|||
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,14 +1,23 @@
|
|||
require 'aws-sdk'
|
||||
require 'aws-sdk-s3'
|
||||
require 'active_support/all'
|
||||
|
||||
module JamRuby
|
||||
class S3Util
|
||||
@@def_opts = { :expires => 3600 * 24, :secure => true } # 24 hours from now
|
||||
@@s3 = AWS::S3.new(:access_key_id => ENV['AWS_KEY'], :secret_access_key => ENV['AWS_SECRET'])
|
||||
|
||||
# Region should ideally be configurable, defaulting to us-east-1
|
||||
region = ENV['AWS_REGION'] || 'us-east-1'
|
||||
@@s3 = Aws::S3::Resource.new(
|
||||
access_key_id: ENV['AWS_KEY'],
|
||||
secret_access_key: ENV['AWS_SECRET'],
|
||||
region: region
|
||||
)
|
||||
|
||||
def self.sign_url(bucket, path, options = @@def_opts)
|
||||
bucket_gen = @@s3.buckets[bucket]
|
||||
"#{bucket_gen.objects[path].url_for(:read, options).to_s}"
|
||||
obj = @@s3.bucket(bucket).object(path)
|
||||
# v3 options for presigned_url: expires_in (seconds)
|
||||
expires_in = options[:expires] || 3600
|
||||
obj.presigned_url(:get, expires_in: expires_in.to_i, secure: options[:secure])
|
||||
end
|
||||
|
||||
def self.url(aws_bucket, filename, options = @@def_opts)
|
||||
|
|
@ -16,12 +25,13 @@ module JamRuby
|
|||
end
|
||||
|
||||
def self.move(aws_bucket, source, destination)
|
||||
@@s3.buckets[aws_bucket].objects[source].move_to[destination]
|
||||
# move_to in v3: object.move_to(bucket: target_bucket_name, key: target_key)
|
||||
# It handles copy + delete.
|
||||
@@s3.bucket(aws_bucket).object(source).move_to(bucket: aws_bucket, key: destination)
|
||||
end
|
||||
|
||||
def self.delete(aws_bucket, path)
|
||||
@@s3.buckets[aws_bucket].objects[path].delete()
|
||||
@@s3.bucket(aws_bucket).object(path).delete
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
@ -3,6 +3,5 @@ module JamRuby
|
|||
self.primary_key = 'id'
|
||||
self.table_name = 'ad_campaigns'
|
||||
|
||||
attr_accessible :campaign, :medium, :spend, :end_date, :referred
|
||||
end
|
||||
end
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
class JamRuby::AffiliateLink < ActiveRecord::Base
|
||||
|
||||
attr_accessible :link, :name, as: :admin
|
||||
|
||||
validates :link, presence: true, length: {maximum: 1000}
|
||||
validates :name, presence: true, length: {maximum: 255}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ class JamRuby::AffiliatePartner < ActiveRecord::Base
|
|||
has_many :visits, :class_name => 'JamRuby::AffiliateReferralVisit', foreign_key: :affiliate_partner_id, inverse_of: :affiliate_partner
|
||||
has_many :affiliate_distributions, :class_name => "JamRuby::AffiliateDistribution", foreign_key: :affiliate_referral_id
|
||||
has_many :links, :class_name => "JamRuby::AffiliateLink", foreign_key: :affiliate_partner_id
|
||||
attr_accessible :partner_name, :partner_code, :partner_user_id, :entity_type, :rate, as: :admin
|
||||
|
||||
ENTITY_TYPES = %w{ Individual Sole\ Proprietor Limited\ Liability\ Company\ (LLC) Partnership Trust/Estate S\ Corporation C\ Corporation Other }
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
FEATURE_TYPES = %w(page)
|
||||
|
||||
attr_accessible :feature_type, :handle, :is_enabled, :env, as: :admin
|
||||
|
||||
#self.table_name = 'app_features'
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ module JamRuby
|
|||
validates :action, inclusion: { in: ACTIONS }
|
||||
validates :client, inclusion: { in: CLIENTS }
|
||||
|
||||
attr_accessible :user_id, :client, :screen, :action
|
||||
|
||||
belongs_to :user
|
||||
end
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
module JamRuby
|
||||
class Ars < ActiveRecord::Base
|
||||
|
||||
attr_accessible :active, :name, :id_int, :ip, as: :admin
|
||||
|
||||
self.table_name = "arses"
|
||||
@@log = Logging.logger[Ars]
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ module JamRuby
|
|||
]
|
||||
|
||||
self.primary_key = 'id'
|
||||
attr_accessible :version, :uri, :sha1, :environment, :product, as: :admin
|
||||
|
||||
mount_uploader :uri, ArtifactUploader
|
||||
|
||||
|
|
|
|||
|
|
@ -3,12 +3,6 @@ module JamRuby
|
|||
include HtmlSanitize
|
||||
html_sanitize strict: [:biography, :website, :name]
|
||||
|
||||
attr_accessible :name, :website, :biography, :city, :state,
|
||||
:country, :original_fpfile_photo, :cropped_fpfile_photo, :cropped_large_fpfile_photo,
|
||||
:cropped_s3_path_photo, :cropped_large_s3_path_photo, :crop_selection_photo, :photo_url, :large_photo_url,
|
||||
:band_type, :band_status, :concert_count, :add_new_members, :play_commitment, :touring_option, :paid_gigs,
|
||||
:free_gigs, :hourly_rate, :gig_minimum
|
||||
|
||||
attr_accessor :updating_photo, :skip_location_validation, :skip_genre_validation
|
||||
|
||||
self.primary_key = 'id'
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
|||
|
||||
self.table_name = "bands_musicians"
|
||||
|
||||
attr_accessible :band_id, :user_id, :admin
|
||||
|
||||
self.primary_key = 'id'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class BroadcastNotification < ActiveRecord::Base
|
||||
|
||||
attr_accessible :title, :message, :button_label, :frequency, :button_url, as: :admin
|
||||
|
||||
has_many :user_views, class_name: 'JamRuby::BroadcastNotificationView', dependent: :destroy
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ module JamRuby
|
|||
class Calendar < ActiveRecord::Base
|
||||
include HtmlSanitize
|
||||
html_sanitize strict: [:name, :description]
|
||||
attr_accessible :name, :description, :target_uid, :trigger_delete, :start_at, :end_at
|
||||
|
||||
@@log = Logging.logger[Calendar]
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ module JamRuby
|
|||
|
||||
attr_accessor :ignore_message_checks
|
||||
|
||||
attr_accessible :user_id, :message, :music_session_id
|
||||
|
||||
belongs_to :user
|
||||
belongs_to :music_session
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
|||
include HtmlSanitize
|
||||
html_sanitize strict: [:name, :description]
|
||||
|
||||
attr_accessible :name, :description, :is_public, :genre_id, :recording_id, :user_id, :upload_to_youtube, as: :admin
|
||||
|
||||
belongs_to :recording, :class_name => "JamRuby::Recording", :inverse_of => :claimed_recordings, :foreign_key => 'recording_id'
|
||||
belongs_to :user, :class_name => "JamRuby::User", :inverse_of => :claimed_recordings
|
||||
|
|
|
|||
|
|
@ -4,8 +4,6 @@ module JamRuby
|
|||
|
||||
has_many :email_batch_sets, :class_name => 'JamRuby::EmailBatchSet'
|
||||
|
||||
attr_accessible :from_email, :subject, :test_emails, :body
|
||||
attr_accessible :lock_version, :opt_in_count, :sent_count, :started_at, :completed_at
|
||||
|
||||
default_scope { order('created_at DESC') }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class EmailBlacklist < ActiveRecord::Base
|
||||
|
||||
attr_accessible :email, :source, :notes, as: :admin
|
||||
|
||||
@@log = Logging.logger[EmailBlacklist]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
class JamRuby::Event < ActiveRecord::Base
|
||||
|
||||
attr_accessible :slug, :title, :description, :show_sponser, :social_description, as: :admin
|
||||
|
||||
validates :slug, uniqueness: true, presence: true
|
||||
validates :show_sponser, :inclusion => {:in => [true, false]}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
class JamRuby::EventSession < ActiveRecord::Base
|
||||
|
||||
attr_accessible :event_id, :user_id, :band_id, :starts_at, :ends_at, :pinned_state, :position, :img_url, :img_width, :img_height, :ordinal, as: :admin
|
||||
|
||||
belongs_to :user, class_name: 'JamRuby::User'
|
||||
belongs_to :band, class_name: 'JamRuby::Band'
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ module JamRuby
|
|||
class Feedback
|
||||
include ActiveModel::Validations
|
||||
include ActiveModel::Validations::Callbacks
|
||||
include ActiveModel::Observing
|
||||
extend ActiveModel::Callbacks
|
||||
|
||||
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class Friendship < ActiveRecord::Base
|
||||
|
||||
attr_accessible :user_id, :friend_id
|
||||
|
||||
self.primary_key = 'id'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
|||
class GenericState < ActiveRecord::Base
|
||||
|
||||
|
||||
attr_accessible :top_message, :event_page_top_logo_url, :connection_policy, :customer_ltv, as: :admin
|
||||
|
||||
self.table_name = 'generic_state'
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
|||
|
||||
self.table_name = 'genres_jam_tracks'
|
||||
|
||||
attr_accessible :jam_track_id, :genre_id
|
||||
|
||||
belongs_to :jam_track, class_name: 'JamRuby::JamTrack', inverse_of: :genres_jam_tracks
|
||||
belongs_to :genre, class_name: 'JamRuby::Genre', inverse_of: :genres_jam_tracks
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ module JamRuby
|
|||
|
||||
@@log = Logging.logger[GiftCardPurchase]
|
||||
|
||||
attr_accessible :user, :gift_card_type
|
||||
|
||||
def name
|
||||
gift_card_type.sale_display
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastAdminAuthentication < ActiveRecord::Base
|
||||
|
||||
attr_accessible :source_pass, :relay_user, :relay_pass, :admin_user, :admin_pass, as: :admin
|
||||
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :inverse_of => :admin_auth, :foreign_key => "admin_auth_id"
|
||||
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :admin_auth, :foreign_key => "admin_auth_id"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastDirectory < ActiveRecord::Base
|
||||
|
||||
attr_accessible :yp_url_timeout, :yp_url, as: :admin
|
||||
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :inverse_of => :directory, :foreign_key => "directory_id"
|
||||
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :directory, :foreign_key => "directory_id"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastLimit < ActiveRecord::Base
|
||||
|
||||
attr_accessible :clients, :sources, :queue_size, :client_timeout, :header_timeout, :source_timeout, :burst_size,
|
||||
as: :admin
|
||||
|
||||
has_many :servers, class_name: 'JamRuby::IcecastServer', inverse_of: :limit, foreign_key: 'limit_id'
|
||||
has_many :templates, class_name: 'JamRuby::IcecastTemplate', inverse_of: :limit, foreign_key: 'limit_id'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastListenSocket < ActiveRecord::Base
|
||||
|
||||
attr_accessible :port, :bind_address, :shoutcast_mount, :shoutcast_compat, as: :admin
|
||||
|
||||
has_many :server_sockets, :class_name => "JamRuby::IcecastServerSocket", :inverse_of => :socket, :foreign_key => 'icecast_listen_socket_id'
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :through => :server_sockets
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastLogging < ActiveRecord::Base
|
||||
|
||||
attr_accessible :access_log, :error_log, :playlist_log, :log_level, :log_archive, :log_size, as: :admin
|
||||
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :inverse_of => :logging, :foreign_key => "logging_id"
|
||||
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :logging, :foreign_key => "logging_id"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastMasterServerRelay < ActiveRecord::Base
|
||||
|
||||
attr_accessible :master_server, :master_server_port, :master_update_interval, :master_username, :master_pass,
|
||||
:relays_on_demand, as: :admin
|
||||
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :inverse_of => :master_relay, :foreign_key => "master_relay_id"
|
||||
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :master_relay, :foreign_key => "master_relay_id"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,6 @@ module JamRuby
|
|||
|
||||
@@log = Logging.logger[IcecastMount]
|
||||
|
||||
attr_accessible :authentication_id, :name, :source_username, :source_pass, :max_listeners, :max_listener_duration,
|
||||
:dump_file, :intro, :fallback_mount, :fallback_override, :fallback_when_full, :charset, :is_public,
|
||||
:stream_name, :stream_description, :stream_url, :genre, :bitrate, :mime_type, :subtype, :burst_size,
|
||||
:mp3_metadata_interval, :hidden, :on_connect, :on_disconnect,
|
||||
:music_session_id, :icecast_server_id, :icecast_mount_template_id, :listeners, :sourced,
|
||||
:sourced_needs_changing_at, as: :admin
|
||||
|
||||
attr_accessor :no_config_changed
|
||||
|
||||
belongs_to :authentication, class_name: "JamRuby::IcecastUserAuthentication", inverse_of: :mount, :foreign_key => 'authentication_id'
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@ module JamRuby
|
|||
|
||||
attr_accessor :hostname, :default_mime_type # used by jam-admin
|
||||
|
||||
attr_accessible :authentication_id, :source_username, :source_pass, :max_listeners, :max_listener_duration,
|
||||
:dump_file, :intro, :fallback_mount, :fallback_override, :fallback_when_full, :charset, :is_public,
|
||||
:stream_name, :stream_description, :stream_url, :genre, :bitrate, :mime_type, :subtype, :burst_size,
|
||||
:mp3_metadata_interval, :hidden, :on_connect, :on_disconnect, :name, as: :admin
|
||||
|
||||
belongs_to :authentication, class_name: "JamRuby::IcecastUserAuthentication", inverse_of: :mount, foreign_key: 'authentication_id'
|
||||
has_many :mounts, class_name: "JamRuby::IcecastMount", inverse_of: :mount_template, foreign_key: 'icecast_mount_template_id'
|
||||
has_many :servers, class_name: "JamRuby::IcecastServer", inverse_of: :mount_template, foreign_key: 'mount_template_id'
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastPath < ActiveRecord::Base
|
||||
|
||||
attr_accessible :base_dir, :log_dir, :pid_file, :web_root, :admin_root, :allow_ip, :deny_ip, :alias_source,
|
||||
:alias_dest, as: :admin
|
||||
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :inverse_of => :path, :foreign_key => "path_id"
|
||||
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :path, :foreign_key => "path_id"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastRelay < ActiveRecord::Base
|
||||
|
||||
attr_accessible :server, :port, :mount, :local_mount, :relay_username, :relay_pass, :relay_shoutcast_metadata, :on_demand,
|
||||
as: :admin
|
||||
|
||||
has_many :server_relays, :class_name => "JamRuby::IcecastServerRelay"
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :through => :server_relays, :source => :server
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
module JamRuby
|
||||
class IcecastSecurity < ActiveRecord::Base
|
||||
|
||||
attr_accessible :chroot, :change_owner_user, :change_owner_group, as: :admin
|
||||
|
||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :inverse_of => :security, :foreign_key => "security_id"
|
||||
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :security, :foreign_key => "security_id"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue