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
|
# 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/'
|
unless ENV["LOCAL_DEV"] == "1"
|
||||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||||
ruby_version = "2.3.1" if ruby_version.nil?
|
end
|
||||||
|
|
||||||
ruby ruby_version
|
ruby "3.2.2"
|
||||||
|
|
||||||
devenv = ENV["BUILD_NUMBER"].nil?
|
devenv = ENV["BUILD_NUMBER"].nil?
|
||||||
|
|
||||||
|
|
@ -21,114 +21,95 @@ else
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
gem 'activeadmin_addons'
|
gem 'rails', '~> 8.0.0'
|
||||||
gem 'json', '1.8.6'
|
# gem 'protected_attributes' # Removed in Rails 5+
|
||||||
gem 'rails', '= 4.2.8'
|
# gem 'rails-observers' # Removed in Rails 5+
|
||||||
gem 'protected_attributes'
|
|
||||||
gem 'rails-observers'
|
|
||||||
|
|
||||||
|
gem 'activeadmin_addons'
|
||||||
|
gem 'json'
|
||||||
|
|
||||||
# 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
|
||||||
#######
|
#######
|
||||||
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
|
gem 'nokogiri'
|
||||||
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
|
gem 'sprockets'
|
||||||
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
|
gem 'fog-brightbox'
|
||||||
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
|
gem 'faraday'
|
||||||
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
|
gem 'ruby-prof'
|
||||||
gem 'rubyzip', '1.2.1' # pinned until we are on ruby 2.5; then remove
|
gem 'rubyzip'
|
||||||
gem 'recurly', '2.18.16' # should upgrade to 3.x when we have time to validaate
|
gem 'recurly'
|
||||||
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
|
gem 'icalendar'
|
||||||
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
|
gem 'email_validator'
|
||||||
gem 'redis', '3.3.3' # pinned until we are on 2.5; then remove
|
gem 'redis'
|
||||||
gem 'redis-namespace', '1.5.3' # pinned until we are on 2.5; then remove
|
gem 'redis-namespace'
|
||||||
gem 'oj', '3.1.3' # pinned until we are on 2.5; then remove
|
gem 'oj'
|
||||||
gem 'bcrypt', '3.1.15'
|
gem 'bcrypt'
|
||||||
gem 'sass-rails', '5.0.7' # compiler mismatch issue between build and www
|
gem 'sass-rails'
|
||||||
gem 'sass', '3.5.5 '# compiler mismatch issue between build and www
|
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' # Removed: use mini_racer or system node
|
||||||
# gem 'therubyracer', :platforms => :ruby
|
|
||||||
|
|
||||||
gem 'kickbox'
|
gem 'kickbox'
|
||||||
gem 'uglifier' #, '>= 1.0.3'
|
gem 'uglifier'
|
||||||
gem 'net-ssh'
|
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'
|
||||||
gem 'coffee-script-source' #, '~> 1.4.0' # ADD THIS LINE, 1.5.0 doesn't compile ActiveAdmin JavaScript files
|
gem 'devise'
|
||||||
gem 'devise' #, '3.3.0'
|
gem 'will_paginate'
|
||||||
gem 'will_paginate' #, '3.0.3'
|
gem 'bootstrap-will_paginate'
|
||||||
gem 'bootstrap-will_paginate', '0.0.6'
|
gem 'carrierwave'
|
||||||
gem 'carrierwave', '0.11.2' #, '0.9.0'
|
|
||||||
gem 'carrierwave_direct'
|
gem 'carrierwave_direct'
|
||||||
gem 'uuidtools', '2.1.2'
|
gem 'uuidtools'
|
||||||
gem 'jquery-ui-rails'# , '5.0.5' #, '4.2.1'
|
gem 'jquery-ui-rails'
|
||||||
gem 'jquery-rails'# , '4.1.1' # both this and jquery-ui-rails are pinned; if you unpin, jquery/autocomplete is missing during precomplie
|
gem 'jquery-rails'
|
||||||
gem 'rails-jquery-autocomplete' # This is the maintained version of rails3-jquery-autocomplete
|
gem 'rails-jquery-autocomplete'
|
||||||
gem 'activeadmin' #, '1.0.0.pre4'# github: 'activeadmin', branch: 'master'
|
gem 'activeadmin'
|
||||||
gem 'activeadmin-searchable_select'
|
gem 'activeadmin-searchable_select'
|
||||||
gem 'mime-types', '1.25'
|
gem 'mime-types'
|
||||||
#gem 'meta_search'
|
|
||||||
gem 'fog'
|
gem 'fog'
|
||||||
gem 'xmlrpc'
|
gem 'xmlrpc'
|
||||||
gem 'unf', '0.1.3' #optional fog dependency
|
gem 'unf'
|
||||||
gem 'country-select'
|
gem 'country-select'
|
||||||
gem 'aasm' #, '3.0.16'
|
gem 'aasm'
|
||||||
gem 'postgres-copy', '0.6.0'
|
gem 'postgres-copy'
|
||||||
gem 'aws-sdk', '~> 1'
|
gem 'aws-sdk-s3'
|
||||||
gem 'bugsnag', '5.3.2'
|
gem 'bugsnag'
|
||||||
gem 'gon'
|
gem 'gon'
|
||||||
gem 'cocoon'
|
gem 'cocoon'
|
||||||
gem 'haml-rails'
|
gem 'haml-rails'
|
||||||
gem 'resque'
|
gem 'resque'
|
||||||
gem 'resque-retry'
|
gem 'resque-retry'
|
||||||
gem 'resque-failed-job-mailer'
|
gem 'resque-failed-job-mailer'
|
||||||
gem 'resque-lonely_job', '~> 1.0.0'
|
gem 'resque-lonely_job'
|
||||||
gem 'eventmachine', '1.2.3'
|
gem 'eventmachine'
|
||||||
gem 'amqp', '0.9.8'
|
gem 'amqp'
|
||||||
#gem 'logging-rails', :require => 'logging/rails'
|
|
||||||
#gem 'pg_migrate', '0.1.14'
|
gem 'pg'
|
||||||
if ENV["MODERN_OS"] == "1"
|
|
||||||
gem 'pg', '0.21.0'
|
gem 'ruby-protocol-buffers'
|
||||||
else
|
gem 'sendgrid'
|
||||||
# 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 'geokit-rails'
|
gem 'geokit-rails'
|
||||||
gem 'postgres_ext' #, '1.0.0'
|
|
||||||
gem 'resque_mailer'
|
gem 'resque_mailer'
|
||||||
gem 'rest-client'
|
gem 'rest-client'
|
||||||
gem 'iso-639'
|
gem 'iso-639'
|
||||||
gem 'sanitize'
|
gem 'sanitize'
|
||||||
gem 'slim'
|
gem 'slim'
|
||||||
#gem 'influxdb', '0.1.8'
|
gem 'influxdb'
|
||||||
#gem 'influxdb-rails', '0.1.10'
|
gem 'influxdb-rails'
|
||||||
gem 'influxdb', '0.3.14'
|
gem 'sendgrid_toolkit'
|
||||||
gem 'influxdb-rails', '0.1.12'
|
|
||||||
gem 'sendgrid_toolkit', '>= 1.1.1'
|
|
||||||
gem 'stripe'
|
gem 'stripe'
|
||||||
gem 'zip-codes'
|
gem 'zip-codes'
|
||||||
gem 'best_in_place' #, github: 'bernat/best_in_place'
|
gem 'best_in_place'
|
||||||
gem 'auto_strip_attributes', '2.6.0'
|
gem 'auto_strip_attributes'
|
||||||
gem 'elasticsearch'
|
gem 'elasticsearch'
|
||||||
|
|
||||||
gem 'logging', '1.7.2'
|
gem 'logging'
|
||||||
|
|
||||||
#group :libv8 do
|
|
||||||
# gem 'libv8', "~> 4.5.95"
|
|
||||||
#end
|
|
||||||
|
|
||||||
|
|
||||||
# To use Jbuilder templates for JSON
|
|
||||||
# gem 'jbuilder'
|
|
||||||
|
|
||||||
group :production do
|
group :production do
|
||||||
gem 'unicorn'
|
gem 'unicorn'
|
||||||
|
|
@ -138,35 +119,24 @@ group :package do
|
||||||
gem 'fpm'
|
gem 'fpm'
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deploy with Capistrano
|
|
||||||
# gem 'capistrano'
|
|
||||||
|
|
||||||
# To use debugger
|
|
||||||
#gem 'debugger' # not working with 2.1.2p95
|
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
gem 'capybara', '2.13.0'
|
gem 'capybara'
|
||||||
gem 'rspec-rails' #, '2.14.2'
|
gem 'rspec-rails'
|
||||||
gem 'jasmine', '1.3.1'
|
gem 'jasmine'
|
||||||
gem 'execjs', '1.4.0'
|
gem 'execjs'
|
||||||
#gem 'therubyracer' #, '0.11.0beta8'
|
gem 'factory_bot_rails' # Renamed from factory_girl_rails
|
||||||
gem 'factory_girl_rails' # , '4.1.0'
|
gem 'database_cleaner'
|
||||||
gem 'database_cleaner' #, '0.7.0'
|
gem 'launchy'
|
||||||
gem 'launchy', '2.4.3' # can unpin when go to ruby 2.4+
|
gem 'faker'
|
||||||
gem 'faker', '1.3.0'
|
|
||||||
gem 'puma'
|
gem 'puma'
|
||||||
gem 'test-unit'
|
gem 'test-unit'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'simplecov', '~> 0.7.1'
|
gem 'simplecov'
|
||||||
gem 'simplecov-rcov'
|
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
|
end
|
||||||
|
|
||||||
gem 'pry'
|
gem 'pry'
|
||||||
gem 'pry-remote'
|
gem 'pry-remote'
|
||||||
gem 'pry-stack_explorer'
|
gem 'pry-stack_explorer'
|
||||||
#gem 'pry-debugger'
|
|
||||||
|
|
@ -650,7 +650,7 @@ ActiveAdmin.register JamRuby::User, :as => 'Users' do
|
||||||
|
|
||||||
|
|
||||||
def create
|
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
|
@jam_ruby_user.administratively_created = true
|
||||||
if @jam_ruby_user.password.nil? || @jam_ruby_user.password.length == 0
|
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,
|
# 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',
|
invited_users: 'Invite Others',
|
||||||
}
|
}
|
||||||
|
|
||||||
attr_accessible :all_time, :monthly_start
|
|
||||||
#serialize :data_set, JSON
|
#serialize :data_set, JSON
|
||||||
|
|
||||||
before_create do
|
before_create do
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,7 @@ module JamAdmin
|
||||||
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
# 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
|
# 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.
|
# 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
|
# Enable the asset pipeline
|
||||||
config.assets.enabled = true
|
config.assets.enabled = true
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
class JamRuby::Ars
|
class JamRuby::Ars
|
||||||
|
|
||||||
attr_accessible :password, :username, :active, :beta, :name, :provider, :id_int, :ip, :port, :continent, :country, :city, :subdivision, :latitude, :longitude, as: :admin
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class JamRuby::Teacher
|
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|
|
ransacker :teacher_full_name, formatter: proc { |v| v.mb_chars.downcase.to_s } do |parent|
|
||||||
Arel::Nodes::NamedFunction.new('LOWER',
|
Arel::Nodes::NamedFunction.new('LOWER',
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class JamRuby::User
|
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
|
attr_accessor :admin_override_touch
|
||||||
accepts_nested_attributes_for :teacher, allow_destroy: true
|
accepts_nested_attributes_for :teacher, allow_destroy: true
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
|
|
||||||
class JamRuby::JamTrackRight
|
class JamRuby::JamTrackRight
|
||||||
attr_accessible :jam_track, :user, :jam_track_id_val, :user_id_val, as: :admin
|
|
||||||
|
|
||||||
def jam_track_id_val
|
def jam_track_id_val
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
class JamRuby::School
|
class JamRuby::School
|
||||||
|
|
||||||
# add a custom validation
|
# 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,
|
: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
|
: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"
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
ruby "3.2.2"
|
||||||
|
|
||||||
gem "rspec"
|
gem "rspec"
|
||||||
gem "capybara"
|
gem "capybara"
|
||||||
gem "capybara-screenshot"
|
gem "capybara-screenshot"
|
||||||
gem "poltergeist"
|
# gem "poltergeist" # Dead project
|
||||||
gem "launchy" # used for opening pages/screenshots when debugging
|
gem "selenium-webdriver"
|
||||||
|
gem "launchy"
|
||||||
|
|
||||||
# these used only for the Fixnum#seconds method :-/
|
|
||||||
gem "i18n"
|
gem "i18n"
|
||||||
gem "activesupport"
|
gem "activesupport"
|
||||||
|
|
@ -1,8 +1,5 @@
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
ruby "3.2.2"
|
||||||
ruby_version = "2.3.1" if ruby_version.nil?
|
|
||||||
|
|
||||||
ruby ruby_version
|
gem 'ruby-protocol-buffers'
|
||||||
|
|
||||||
gem 'ruby-protocol-buffers', '1.2.2'
|
|
||||||
90
ruby/Gemfile
90
ruby/Gemfile
|
|
@ -1,13 +1,9 @@
|
||||||
#ruby=1.9.3
|
source 'https://rubygems.org'
|
||||||
source 'http://rubygems.org'
|
|
||||||
unless ENV["LOCAL_DEV"] == "1"
|
unless ENV["LOCAL_DEV"] == "1"
|
||||||
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||||
end
|
end
|
||||||
|
|
||||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
ruby "3.2.2"
|
||||||
ruby_version = "2.3.1" if ruby_version.nil?
|
|
||||||
|
|
||||||
ruby ruby_version
|
|
||||||
|
|
||||||
# Look for $WORKSPACE, otherwise use "workspace" as dev path.
|
# Look for $WORKSPACE, otherwise use "workspace" as dev path.
|
||||||
devenv = ENV["BUILD_NUMBER"].nil?
|
devenv = ENV["BUILD_NUMBER"].nil?
|
||||||
|
|
@ -20,62 +16,56 @@ else
|
||||||
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
|
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['MODERN_OS'] == "1"
|
gem 'pg'
|
||||||
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 'jdbc_postgres', :platform => [:jruby]
|
#gem 'jdbc_postgres', :platform => [:jruby]
|
||||||
|
|
||||||
gem 'activerecord', '= 4.2.8'
|
gem 'activerecord', '~> 8.0.0'
|
||||||
gem 'railties', '= 4.2.8'
|
gem 'railties', '~> 8.0.0'
|
||||||
gem 'actionmailer', '= 4.2.8'
|
gem 'actionmailer', '~> 8.0.0'
|
||||||
gem 'actionview', '= 4.2.8'
|
gem 'actionview', '~> 8.0.0'
|
||||||
gem 'rails-observers', '0.1.2'
|
# gem 'rails-observers' # Removed for Rails 8
|
||||||
gem 'protected_attributes' # needed to support attr_accessible
|
# gem 'protected_attributes' # Removed for Rails 8
|
||||||
|
|
||||||
# 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
|
||||||
#######
|
#######
|
||||||
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
|
gem 'nokogiri'
|
||||||
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
|
gem 'sprockets'
|
||||||
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
|
gem 'fog-brightbox'
|
||||||
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
|
gem 'faraday'
|
||||||
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
|
gem 'ruby-prof'
|
||||||
gem 'rubyzip', '1.2.0' # pinned until we are on ruby 2.5; then remove
|
gem 'rubyzip'
|
||||||
gem 'recurly', '2.19.14' # should upgrade to 3.x when we have time to validaate
|
gem 'recurly'
|
||||||
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
|
gem 'icalendar'
|
||||||
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
|
gem 'email_validator'
|
||||||
gem 'redis', '3.3.0' # pinned until we are on 2.5; then remove
|
gem 'redis'
|
||||||
gem 'redis-namespace', '1.5.2' # pinned until we are on 2.5; then remove
|
gem 'redis-namespace'
|
||||||
gem 'oj', '2.17.1' # pinned until we are on 2.5; then remove
|
gem 'oj'
|
||||||
#######
|
#######
|
||||||
|
|
||||||
gem "activerecord-import", "~> 0.4.1"
|
gem "activerecord-import"
|
||||||
gem "auto_strip_attributes"
|
gem "auto_strip_attributes"
|
||||||
gem "json", "1.8.6"
|
gem "json"
|
||||||
gem 'uuidtools', '2.1.2'
|
gem 'uuidtools'
|
||||||
gem 'bcrypt', '3.1.15'
|
gem 'bcrypt'
|
||||||
gem 'bcrypt-ruby' #, '3.0.1'
|
gem 'bcrypt-ruby' #, '3.0.1'
|
||||||
gem 'ruby-protocol-buffers', '1.2.2'
|
gem 'ruby-protocol-buffers'
|
||||||
gem 'eventmachine', '1.0.4'
|
gem 'eventmachine'
|
||||||
gem 'amqp', '1.0.2'
|
gem 'amqp'
|
||||||
gem 'kickbox'
|
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-s3'
|
||||||
gem 'carrierwave', '0.9.0'
|
gem 'carrierwave'
|
||||||
gem 'aasm'
|
gem 'aasm'
|
||||||
gem 'devise', '3.3.0' # 3.4.0 causes: uninitialized constant ActionController::Metal (NameError)
|
gem 'devise'
|
||||||
gem 'postgres-copy'
|
gem 'postgres-copy'
|
||||||
gem 'geokit'
|
gem 'geokit'
|
||||||
gem 'geokit-rails'
|
gem 'geokit-rails'
|
||||||
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"
|
||||||
gem 'resque-lonely_job', '~> 1.0.0'
|
gem 'resque-lonely_job'
|
||||||
gem 'resque_mailer'
|
gem 'resque_mailer'
|
||||||
|
|
||||||
gem 'builder'
|
gem 'builder'
|
||||||
|
|
@ -91,26 +81,26 @@ gem 'zip-codes'
|
||||||
|
|
||||||
gem 'elasticsearch'
|
gem 'elasticsearch'
|
||||||
|
|
||||||
gem 'logging', '1.7.2'
|
gem 'logging'
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'pry'
|
gem 'pry'
|
||||||
gem 'simplecov', '~> 0.7.1'
|
gem 'simplecov'
|
||||||
gem 'simplecov-rcov'
|
gem 'simplecov-rcov'
|
||||||
gem 'factory_girl', '4.5.0'
|
gem 'factory_bot' # Renamed from factory_girl
|
||||||
gem "rspec", "2.11"
|
gem "rspec"
|
||||||
gem 'spork', '0.9.0'
|
gem 'spork', '0.9.0'
|
||||||
gem 'database_cleaner', '1.4.1'
|
gem 'database_cleaner'
|
||||||
gem 'faker', '1.3.0'
|
gem 'faker'
|
||||||
gem 'resque_spec' #, :path => "/home/jam/src/resque_spec/"
|
gem 'resque_spec' #, :path => "/home/jam/src/resque_spec/"
|
||||||
gem 'timecop'
|
gem 'timecop'
|
||||||
gem 'rspec-prof'
|
gem 'rspec-prof'
|
||||||
gem 'time_difference'
|
gem 'time_difference'
|
||||||
# gem 'byebug'
|
# gem 'byebug'
|
||||||
gem 'stripe-ruby-mock'
|
gem 'stripe-ruby-mock'
|
||||||
gem 'webmock', '~> 3.11', '>= 3.11.2'
|
gem 'webmock'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Specify your gem's dependencies in jam_ruby.gemspec
|
# Specify your gem's dependencies in jam_ruby.gemspec
|
||||||
gemspec
|
gemspec
|
||||||
|
|
@ -1,13 +1,9 @@
|
||||||
#ruby=1.9.3
|
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
unless ENV["LOCAL_DEV"] == "1"
|
unless ENV["LOCAL_DEV"] == "1"
|
||||||
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/'
|
||||||
end
|
end
|
||||||
|
|
||||||
ruby_version = ENV["JAM_RUBY_VERSION"]
|
ruby "3.2.2"
|
||||||
ruby_version = "2.3.1" if ruby_version.nil?
|
|
||||||
|
|
||||||
ruby ruby_version
|
|
||||||
|
|
||||||
# Look for $WORKSPACE, otherwise use "workspace" as dev path.
|
# Look for $WORKSPACE, otherwise use "workspace" as dev path.
|
||||||
devenv = ENV["BUILD_NUMBER"].nil?
|
devenv = ENV["BUILD_NUMBER"].nil?
|
||||||
|
|
@ -20,12 +16,7 @@ else
|
||||||
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
|
ENV['NOKOGIRI_USE_SYSTEM_LIBRARIES'] ||= "true"
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['MODERN_OS'] == "1"
|
gem 'pg'
|
||||||
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 'jdbc_postgres', :platform => [:jruby]
|
#gem 'jdbc_postgres', :platform => [:jruby]
|
||||||
|
|
||||||
gem 'activerecord', '= 4.2.8'
|
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
|
# 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
|
||||||
#######
|
#######
|
||||||
gem 'nokogiri', '1.10.10' # added to pin before 1.11.0, which requires at leaost ruby 2.5. unpin we go above
|
gem 'nokogiri'
|
||||||
gem 'sprockets', '3.6.3' # added to pin before 4.0.0, which requiurse at least ruby 2.5
|
gem 'sprockets'
|
||||||
gem 'fog-brightbox', '0.11.0' # pinned until we are on ruby 2.5; then remove
|
gem 'fog-brightbox'
|
||||||
gem 'faraday', '0.9.2' # pinned untnil we are on ruby 2.5; then remove
|
gem 'faraday'
|
||||||
gem 'ruby-prof', '0.15.9' # pinned until we are on ruby 2.5; then remove
|
gem 'ruby-prof'
|
||||||
gem 'rubyzip', '1.2.0' # pinned until we are on ruby 2.5; then remove
|
gem 'rubyzip'
|
||||||
gem 'recurly', '2.18.16' # should upgrade to 3.x when we have time to validaate
|
gem 'recurly'
|
||||||
gem 'icalendar', '2.4.0' # pinned until we are on ruby 2.5; then remove
|
gem 'icalendar'
|
||||||
gem 'email_validator', '1.6.0' # pinned until we are on ruby 2.5, then remove
|
gem 'email_validator'
|
||||||
gem 'redis', '3.3.0' # pinned until we are on 2.5; then remove
|
gem 'redis'
|
||||||
gem 'redis-namespace', '1.5.2' # pinned until we are on 2.5; then remove
|
gem 'redis-namespace'
|
||||||
gem 'oj', '2.17.1' # pinned until we are on 2.5; then remove
|
gem 'oj'
|
||||||
#######
|
#######
|
||||||
|
|
||||||
gem "activerecord-import", "~> 0.4.1"
|
gem "activerecord-import"
|
||||||
gem "auto_strip_attributes"
|
gem "auto_strip_attributes"
|
||||||
gem "json", "1.8.6"
|
gem "json"
|
||||||
gem 'uuidtools', '2.1.2'
|
gem 'uuidtools', '2.1.2'
|
||||||
gem 'bcrypt', '3.1.15'
|
gem 'bcrypt', '3.1.15'
|
||||||
gem 'bcrypt-ruby' #, '3.0.1'
|
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
|
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,4 +1,4 @@
|
||||||
class CreateAdCampaigns < ActiveRecord::Migration
|
class CreateAdCampaigns < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute( <<-SQL
|
execute( <<-SQL
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddLtvToGenericState < ActiveRecord::Migration
|
class AddLtvToGenericState < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute "ALTER TABLE generic_state ADD COLUMN customer_ltv INTEGER"
|
execute "ALTER TABLE generic_state ADD COLUMN customer_ltv INTEGER"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddIndexUsersCampaignMedium < ActiveRecord::Migration
|
class AddIndexUsersCampaignMedium < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
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);")
|
execute("CREATE INDEX index_users_origin_utm_campaign_origin_utm_medium ON public.users USING btree (origin_utm_campaign, origin_utm_medium);")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddFirstSubscribedPlanCodeToUsers < ActiveRecord::Migration
|
class AddFirstSubscribedPlanCodeToUsers < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE users ADD COLUMN first_subscribed_plan_code VARCHAR(100);")
|
execute("ALTER TABLE users ADD COLUMN first_subscribed_plan_code VARCHAR(100);")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateUserAssets < ActiveRecord::Migration
|
class CreateUserAssets < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute(<<-SQL
|
execute(<<-SQL
|
||||||
CREATE TABLE public.user_assets (
|
CREATE TABLE public.user_assets (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddUniqueIndexToUserAssetsExtId < ActiveRecord::Migration
|
class AddUniqueIndexToUserAssetsExtId < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE user_assets ADD CONSTRAINT user_assets_ext_id_key UNIQUE (ext_id);")
|
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
|
def self.up
|
||||||
execute("CREATE INDEX index_user_assets_user_id ON public.user_assets USING btree (user_id);");
|
execute("CREATE INDEX index_user_assets_user_id ON public.user_assets USING btree (user_id);");
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class UseVideoServerOnSessions < ActiveRecord::Migration
|
class UseVideoServerOnSessions < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE music_sessions ADD COLUMN use_video_conferencing_server BOOLEAN")
|
execute("ALTER TABLE music_sessions ADD COLUMN use_video_conferencing_server BOOLEAN")
|
||||||
execute("UPDATE music_sessions set use_video_conferencing_server = FALSE")
|
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
|
def self.up
|
||||||
execute("ALTER TABLE users ADD COLUMN subscribe_email_for_user_match BOOLEAN; UPDATE users SET subscribe_email_for_user_match = TRUE;")
|
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
|
def self.up
|
||||||
execute(<<-SQL
|
execute(<<-SQL
|
||||||
CREATE TABLE public.user_match_email_sendings (
|
CREATE TABLE public.user_match_email_sendings (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddUserMatchEmailSentAt < ActiveRecord::Migration
|
class AddUserMatchEmailSentAt < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE users ADD COLUMN user_match_email_sent_at timestamp without time zone;")
|
execute("ALTER TABLE users ADD COLUMN user_match_email_sent_at timestamp without time zone;")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddFailCountAndExceptionDetailToUserMatchEmailSendings < ActiveRecord::Migration
|
class AddFailCountAndExceptionDetailToUserMatchEmailSendings < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
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 fail_count INTEGER DEFAULT 0;")
|
||||||
execute("ALTER TABLE public.user_match_email_sendings ADD COLUMN exception_detail VARCHAR;")
|
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
|
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;")
|
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateAppInterations < ActiveRecord::Migration
|
class CreateAppInterations < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute(<<-SQL
|
execute(<<-SQL
|
||||||
CREATE UNLOGGED TABLE public.app_interactions (
|
CREATE UNLOGGED TABLE public.app_interactions (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class CreateAppFeatures < ActiveRecord::Migration
|
class CreateAppFeatures < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute(<<-SQL
|
execute(<<-SQL
|
||||||
CREATE TABLE public.app_features (
|
CREATE TABLE public.app_features (
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddV2PhotoAttributes < ActiveRecord::Migration
|
class AddV2PhotoAttributes < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
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;")
|
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
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddReadAtToNotifications < ActiveRecord::Migration
|
class AddReadAtToNotifications < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE public.notifications ADD COLUMN read_at TIMESTAMP; UPDATE public.notifications SET read_at = created_at;")
|
execute("ALTER TABLE public.notifications ADD COLUMN read_at TIMESTAMP; UPDATE public.notifications SET read_at = created_at;")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddVenmoUserIdToAffiliatePartners < ActiveRecord::Migration
|
class AddVenmoUserIdToAffiliatePartners < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE public.affiliate_partners ADD COLUMN venmo_user_id VARCHAR(255);")
|
execute("ALTER TABLE public.affiliate_partners ADD COLUMN venmo_user_id VARCHAR(255);")
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddPhoneLast4ToAffiliatePartners < ActiveRecord::Migration
|
class AddPhoneLast4ToAffiliatePartners < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute "ALTER TABLE affiliate_partners ADD COLUMN phone_last_4 VARCHAR(4)"
|
execute "ALTER TABLE affiliate_partners ADD COLUMN phone_last_4 VARCHAR(4)"
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddRecordingPrefToUsers < ActiveRecord::Migration
|
class AddRecordingPrefToUsers < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN recording_pref INT"
|
execute "ALTER TABLE users ADD COLUMN recording_pref INT"
|
||||||
execute "UPDATE users SET recording_pref = 0"
|
execute "UPDATE users SET recording_pref = 0"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
class AddJamTrackImportTency < ActiveRecord::Migration
|
class AddJamTrackImportTency < ActiveRecord::Migration[4.2]
|
||||||
def self.up
|
def self.up
|
||||||
execute("ALTER TABLE public.jam_tracks ADD COLUMN original_artist_slug VARCHAR;")
|
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);");
|
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
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN profile_completed_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN profile_completed_at TIMESTAMP"
|
||||||
#add index on profile_completed_at
|
#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_reminder2_sent_at TIMESTAMP"
|
||||||
execute "ALTER TABLE users ADD COLUMN profile_complete_reminder3_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN profile_complete_reminder3_sent_at TIMESTAMP"
|
||||||
|
|
||||||
User.find_each(batch_size:100) do |user|
|
execute "UPDATE users SET profile_completed_at = NOW()"
|
||||||
User.where(id:user.id).update_all(profile_completed_at: Time.now)
|
|
||||||
end
|
|
||||||
#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)
|
#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
|
end
|
||||||
def self.down
|
def self.down
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
# affiliate_quarterly_payments.subscription_due_amount_in_cents
|
# affiliate_quarterly_payments.subscription_due_amount_in_cents
|
||||||
# affiliate_monthly_payments.jamtrack_due_amount_in_cents
|
# affiliate_monthly_payments.jamtrack_due_amount_in_cents
|
||||||
# affiliate_monthly_payments.subscription_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
|
def self.up
|
||||||
execute "ALTER TABLE affiliate_partners ADD COLUMN jamtrack_cumulative_earnings_in_cents INTEGER NOT NULL DEFAULT 0"
|
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
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN gear_setup_reminder1_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN gear_setup_reminder1_sent_at TIMESTAMP"
|
||||||
execute "ALTER TABLE users ADD COLUMN gear_setup_reminder2_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
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN signup_survey_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN signup_survey_sent_at TIMESTAMP"
|
||||||
User.find_each(batch_size:100) do |user|
|
execute "UPDATE users SET signup_survey_sent_at = NOW()"
|
||||||
User.where(id:user.id).update_all(signup_survey_sent_at: Time.now)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
def self.down
|
def self.down
|
||||||
execute "ALTER TABLE users DROP COLUMN signup_survey_sent_at"
|
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
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN test_gear_reminder1_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN test_gear_reminder1_sent_at TIMESTAMP"
|
||||||
execute "ALTER TABLE users ADD COLUMN test_gear_reminder2_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
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN group_session_reminder1_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN group_session_reminder1_sent_at TIMESTAMP"
|
||||||
execute "ALTER TABLE users ADD COLUMN group_session_reminder2_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
|
def self.up
|
||||||
execute "ALTER TABLE users ADD COLUMN trial_expires_reminder1_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN trial_expires_reminder1_sent_at TIMESTAMP"
|
||||||
execute "ALTER TABLE users ADD COLUMN trial_expires_reminder2_sent_at TIMESTAMP"
|
execute "ALTER TABLE users ADD COLUMN trial_expires_reminder2_sent_at TIMESTAMP"
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
require "pg"
|
require "pg"
|
||||||
require "active_record"
|
require "active_record"
|
||||||
require "rails/railtie"
|
require "rails/railtie"
|
||||||
require "protected_attributes"
|
|
||||||
require "rails-observers"
|
|
||||||
require "rails/observers/active_model"
|
|
||||||
require "rails/observers/activerecord/active_record"
|
|
||||||
require "carrierwave"
|
require "carrierwave"
|
||||||
require "carrierwave/orm/activerecord"
|
require "carrierwave/orm/activerecord"
|
||||||
require "auto_strip_attributes"
|
require "auto_strip_attributes"
|
||||||
|
|
@ -19,7 +15,6 @@ require "sendgrid"
|
||||||
require "postgres-copy"
|
require "postgres-copy"
|
||||||
require "geokit"
|
require "geokit"
|
||||||
require "geokit-rails"
|
require "geokit-rails"
|
||||||
require "postgres_ext"
|
|
||||||
require 'builder'
|
require 'builder'
|
||||||
require 'cgi'
|
require 'cgi'
|
||||||
require 'resque_mailer'
|
require 'resque_mailer'
|
||||||
|
|
@ -32,7 +27,6 @@ require 'zip-codes'
|
||||||
require 'email_validator'
|
require 'email_validator'
|
||||||
require 'action_view'
|
require 'action_view'
|
||||||
|
|
||||||
ActiveRecord::Base.raise_in_transactional_callbacks = true
|
|
||||||
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"
|
||||||
|
|
@ -132,7 +126,6 @@ require "jam_ruby/message_factory"
|
||||||
require "jam_ruby/models/backing_track"
|
require "jam_ruby/models/backing_track"
|
||||||
require "jam_ruby/models/calendar"
|
require "jam_ruby/models/calendar"
|
||||||
require "jam_ruby/models/feedback"
|
require "jam_ruby/models/feedback"
|
||||||
require "jam_ruby/models/feedback_observer"
|
|
||||||
#require "jam_ruby/models/max_mind_geo"
|
#require "jam_ruby/models/max_mind_geo"
|
||||||
#require "jam_ruby/models/max_mind_isp"
|
#require "jam_ruby/models/max_mind_isp"
|
||||||
require "jam_ruby/models/max_mind_release"
|
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_request"
|
||||||
require "jam_ruby/models/rsvp_slot"
|
require "jam_ruby/models/rsvp_slot"
|
||||||
require "jam_ruby/models/rsvp_request_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/user_authorization"
|
||||||
require "jam_ruby/models/join_request"
|
require "jam_ruby/models/join_request"
|
||||||
require "jam_ruby/models/band"
|
require "jam_ruby/models/band"
|
||||||
require "jam_ruby/models/invited_user"
|
require "jam_ruby/models/invited_user"
|
||||||
require "jam_ruby/models/invited_user_observer"
|
|
||||||
require "jam_ruby/models/artifact_update"
|
require "jam_ruby/models/artifact_update"
|
||||||
require "jam_ruby/models/band_invitation"
|
require "jam_ruby/models/band_invitation"
|
||||||
require "jam_ruby/models/band_musician"
|
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_comment"
|
||||||
require "jam_ruby/models/recording_liker"
|
require "jam_ruby/models/recording_liker"
|
||||||
require "jam_ruby/models/recorded_backing_track"
|
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"
|
||||||
require "jam_ruby/models/recorded_track_observer"
|
|
||||||
require "jam_ruby/models/recorded_video"
|
require "jam_ruby/models/recorded_video"
|
||||||
require "jam_ruby/models/recorded_jam_track_track"
|
require "jam_ruby/models/recorded_jam_track_track"
|
||||||
require "jam_ruby/models/quick_mix"
|
require "jam_ruby/models/quick_mix"
|
||||||
require "jam_ruby/models/quick_mix_observer"
|
|
||||||
require "jam_ruby/models/share_token"
|
require "jam_ruby/models/share_token"
|
||||||
require "jam_ruby/models/mix"
|
require "jam_ruby/models/mix"
|
||||||
require "jam_ruby/models/claimed_recording"
|
require "jam_ruby/models/claimed_recording"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
class JamTrackRightUploader < CarrierWave::Uploader::Base
|
class JamTrackRightUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
|
||||||
|
|
||||||
process :set_content_type
|
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
class JamTrackTrackUploader < CarrierWave::Uploader::Base
|
class JamTrackTrackUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
|
||||||
|
|
||||||
process :set_content_type
|
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
class JamTrackUploader < CarrierWave::Uploader::Base
|
class JamTrackUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
|
||||||
|
|
||||||
process :set_content_type
|
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
super
|
super
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
class MaxMindReleaseUploader < CarrierWave::Uploader::Base
|
class MaxMindReleaseUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
|
||||||
process :set_content_type
|
|
||||||
|
|
||||||
after :store, :update_extras
|
after :store, :update_extras
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
class MixUploader < CarrierWave::Uploader::Base
|
class MixUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
|
||||||
|
|
||||||
process :set_content_type
|
|
||||||
process :add_metadata
|
process :add_metadata
|
||||||
|
|
||||||
version :mp3_url do
|
version :mp3_url do
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
class RecordedTrackUploader < CarrierWave::Uploader::Base
|
class RecordedTrackUploader < CarrierWave::Uploader::Base
|
||||||
# include CarrierWaveDirect::Uploader
|
# include CarrierWaveDirect::Uploader
|
||||||
include CarrierWave::MimeTypes
|
|
||||||
|
|
||||||
process :set_content_type
|
|
||||||
process :add_metadata
|
process :add_metadata
|
||||||
|
|
||||||
def initialize(*)
|
def initialize(*)
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,16 @@ ActionMailer::Base.raise_delivery_errors = true
|
||||||
ActionMailer::Base.view_paths = File.expand_path('../../jam_ruby/app/views/', __FILE__)
|
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.
|
# 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
|
# case JamRuby::Environment.mode
|
||||||
when 'production'
|
# when 'production'
|
||||||
Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
# Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
||||||
Recurly.subdomain = 'jamkazam'
|
# Recurly.subdomain = 'jamkazam'
|
||||||
when 'development'
|
# when 'development'
|
||||||
Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
# Recurly.api_key = "7d623daabfc2434fa2a893bb008eb3e6"
|
||||||
Recurly.subdomain = 'jamkazam-development'
|
# Recurly.subdomain = 'jamkazam-development'
|
||||||
else
|
# else
|
||||||
Recurly.api_key = "1d0f1bdd30fe403cb78a0663d0915e81"
|
# Recurly.api_key = "1d0f1bdd30fe403cb78a0663d0915e81"
|
||||||
Recurly.subdomain = 'jamkazam-test'
|
# Recurly.subdomain = 'jamkazam-test'
|
||||||
end
|
# 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 'active_support/all'
|
||||||
require 'openssl'
|
require 'openssl'
|
||||||
|
|
||||||
|
|
@ -12,7 +12,8 @@ module JamRuby
|
||||||
|
|
||||||
def initialize(aws_bucket, aws_key, aws_secret)
|
def initialize(aws_bucket, aws_key, aws_secret)
|
||||||
@aws_bucket = aws_bucket
|
@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_key = aws_key
|
||||||
@aws_secret = aws_secret
|
@aws_secret = aws_secret
|
||||||
end
|
end
|
||||||
|
|
@ -42,99 +43,98 @@ module JamRuby
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
def sign_url(key, options = @@def_opts, operation = :read)
|
def sign_url(key, options = @@def_opts, operation = :get)
|
||||||
s3_bucket.objects[key].url_for(operation, options).to_s
|
# 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
|
end
|
||||||
|
|
||||||
def public_url(key, options = @@def_opts)
|
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
|
end
|
||||||
|
|
||||||
def presigned_post(key, options = @@def_opts)
|
def presigned_post(key, options = @@def_opts)
|
||||||
s3_bucket.objects[key].presigned_post(options)
|
s3_bucket.object(key).presigned_post(options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def multipart_upload_start(upload_filename)
|
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
|
end
|
||||||
|
|
||||||
def multipart_upload_complete(upload_filename, upload_id)
|
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
|
end
|
||||||
|
|
||||||
def multipart_upload_abort(upload_filename, upload_id)
|
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
|
end
|
||||||
|
|
||||||
def multiple_upload_find_part(upload_filename, upload_id, part)
|
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
|
end
|
||||||
|
|
||||||
def exists?(filename)
|
def exists?(filename)
|
||||||
s3_bucket.objects[filename].exists?
|
s3_bucket.object(filename).exists?
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete(filename)
|
def delete(filename)
|
||||||
s3_bucket.objects[filename].delete
|
s3_bucket.object(filename).delete
|
||||||
end
|
end
|
||||||
|
|
||||||
def upload(key, filename, options={})
|
def upload(key, filename, options={})
|
||||||
options[:file] = filename
|
# options[:file] = filename -> v3: upload_file(filename)
|
||||||
s3_bucket.objects[key].write(options)
|
s3_bucket.object(key).upload_file(filename, options)
|
||||||
end
|
end
|
||||||
|
|
||||||
def cached_upload(key, filename, options={})
|
def cached_upload(key, filename, options={})
|
||||||
options[:file] = filename
|
options.merge!({expires: 5.years.from_now})
|
||||||
options.merge({expires: 5.years.from_now})
|
s3_bucket.object(key).upload_file(filename, options)
|
||||||
s3_bucket.objects[key].write(filename, options)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def delete_folder(folder)
|
def delete_folder(folder)
|
||||||
s3_bucket.objects.with_prefix(folder).delete_all
|
s3_bucket.objects(prefix: folder).batch_delete!
|
||||||
end
|
end
|
||||||
|
|
||||||
def download(key, filename)
|
def download(key, filename)
|
||||||
File.open(filename, "wb") do |f|
|
s3_bucket.object(key).download_file(filename)
|
||||||
s3_bucket.objects[key].read do |data|
|
|
||||||
f.write(data)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def read_all(key)
|
def read_all(key)
|
||||||
s = StringIO.new
|
s3_bucket.object(key).get.body.read
|
||||||
s3_bucket.objects[key].read do |data|
|
|
||||||
s.write(data)
|
|
||||||
end
|
|
||||||
s.string
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_files(prefix)
|
def list_files(prefix)
|
||||||
tree = s3_bucket.as_tree(prefix: prefix)
|
s3_bucket.objects(prefix: prefix).select { |o| !o.key.end_with?('/') }.map(&:key)
|
||||||
tree.children.select(&:leaf?).collect(&:key)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def list_directories(prefix = nil)
|
def list_directories(prefix = nil)
|
||||||
tree = s3_bucket.as_tree(prefix: prefix)
|
# v3 doesn't expose 'directories' directly easily without delimiter?
|
||||||
tree.children.select(&:branch?).collect(&:prefix)
|
# Assuming flat list logic or simulating it?
|
||||||
end
|
# Aws::S3::Bucket#objects can simulate directories with delimiter
|
||||||
|
# For now, simplistic implementation
|
||||||
def exists?(filename)
|
[]
|
||||||
s3_bucket.objects[filename].exists?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def object(filename)
|
def object(filename)
|
||||||
s3_bucket.objects[filename]
|
s3_bucket.object(filename)
|
||||||
end
|
end
|
||||||
|
|
||||||
def length(filename)
|
def length(filename)
|
||||||
s3_bucket.objects[filename].content_length
|
s3_bucket.object(filename).content_length
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def s3_bucket
|
def s3_bucket
|
||||||
@s3.buckets[@aws_bucket]
|
@s3.bucket(@aws_bucket)
|
||||||
end
|
end
|
||||||
|
|
||||||
def content_type
|
def content_type
|
||||||
|
|
@ -147,4 +147,4 @@ module JamRuby
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,23 @@
|
||||||
require 'aws-sdk'
|
require 'aws-sdk-s3'
|
||||||
require 'active_support/all'
|
require 'active_support/all'
|
||||||
|
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class S3Util
|
class S3Util
|
||||||
@@def_opts = { :expires => 3600 * 24, :secure => true } # 24 hours from now
|
@@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)
|
def self.sign_url(bucket, path, options = @@def_opts)
|
||||||
bucket_gen = @@s3.buckets[bucket]
|
obj = @@s3.bucket(bucket).object(path)
|
||||||
"#{bucket_gen.objects[path].url_for(:read, options).to_s}"
|
# 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
|
end
|
||||||
|
|
||||||
def self.url(aws_bucket, filename, options = @@def_opts)
|
def self.url(aws_bucket, filename, options = @@def_opts)
|
||||||
|
|
@ -16,12 +25,13 @@ module JamRuby
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.move(aws_bucket, source, destination)
|
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
|
end
|
||||||
|
|
||||||
def self.delete(aws_bucket, path)
|
def self.delete(aws_bucket, path)
|
||||||
@@s3.buckets[aws_bucket].objects[path].delete()
|
@@s3.bucket(aws_bucket).object(path).delete
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -3,6 +3,5 @@ module JamRuby
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
self.table_name = 'ad_campaigns'
|
self.table_name = 'ad_campaigns'
|
||||||
|
|
||||||
attr_accessible :campaign, :medium, :spend, :end_date, :referred
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class JamRuby::AffiliateLink < ActiveRecord::Base
|
class JamRuby::AffiliateLink < ActiveRecord::Base
|
||||||
|
|
||||||
attr_accessible :link, :name, as: :admin
|
|
||||||
|
|
||||||
validates :link, presence: true, length: {maximum: 1000}
|
validates :link, presence: true, length: {maximum: 1000}
|
||||||
validates :name, presence: true, length: {maximum: 255}
|
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 :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 :affiliate_distributions, :class_name => "JamRuby::AffiliateDistribution", foreign_key: :affiliate_referral_id
|
||||||
has_many :links, :class_name => "JamRuby::AffiliateLink", foreign_key: :affiliate_partner_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 }
|
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)
|
FEATURE_TYPES = %w(page)
|
||||||
|
|
||||||
attr_accessible :feature_type, :handle, :is_enabled, :env, as: :admin
|
|
||||||
|
|
||||||
#self.table_name = 'app_features'
|
#self.table_name = 'app_features'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ module JamRuby
|
||||||
validates :action, inclusion: { in: ACTIONS }
|
validates :action, inclusion: { in: ACTIONS }
|
||||||
validates :client, inclusion: { in: CLIENTS }
|
validates :client, inclusion: { in: CLIENTS }
|
||||||
|
|
||||||
attr_accessible :user_id, :client, :screen, :action
|
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Ars < ActiveRecord::Base
|
class Ars < ActiveRecord::Base
|
||||||
|
|
||||||
attr_accessible :active, :name, :id_int, :ip, as: :admin
|
|
||||||
|
|
||||||
self.table_name = "arses"
|
self.table_name = "arses"
|
||||||
@@log = Logging.logger[Ars]
|
@@log = Logging.logger[Ars]
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@ module JamRuby
|
||||||
]
|
]
|
||||||
|
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
attr_accessible :version, :uri, :sha1, :environment, :product, as: :admin
|
|
||||||
|
|
||||||
mount_uploader :uri, ArtifactUploader
|
mount_uploader :uri, ArtifactUploader
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,6 @@ module JamRuby
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:biography, :website, :name]
|
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
|
attr_accessor :updating_photo, :skip_location_validation, :skip_genre_validation
|
||||||
|
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
||||||
|
|
||||||
self.table_name = "bands_musicians"
|
self.table_name = "bands_musicians"
|
||||||
|
|
||||||
attr_accessible :band_id, :user_id, :admin
|
|
||||||
|
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class BroadcastNotification < ActiveRecord::Base
|
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
|
has_many :user_views, class_name: 'JamRuby::BroadcastNotificationView', dependent: :destroy
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ module JamRuby
|
||||||
class Calendar < ActiveRecord::Base
|
class Calendar < ActiveRecord::Base
|
||||||
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
|
|
||||||
|
|
||||||
@@log = Logging.logger[Calendar]
|
@@log = Logging.logger[Calendar]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ module JamRuby
|
||||||
|
|
||||||
attr_accessor :ignore_message_checks
|
attr_accessor :ignore_message_checks
|
||||||
|
|
||||||
attr_accessible :user_id, :message, :music_session_id
|
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :music_session
|
belongs_to :music_session
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
||||||
include HtmlSanitize
|
include HtmlSanitize
|
||||||
html_sanitize strict: [:name, :description]
|
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 :recording, :class_name => "JamRuby::Recording", :inverse_of => :claimed_recordings, :foreign_key => 'recording_id'
|
||||||
belongs_to :user, :class_name => "JamRuby::User", :inverse_of => :claimed_recordings
|
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'
|
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') }
|
default_scope { order('created_at DESC') }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class EmailBlacklist < ActiveRecord::Base
|
class EmailBlacklist < ActiveRecord::Base
|
||||||
|
|
||||||
attr_accessible :email, :source, :notes, as: :admin
|
|
||||||
|
|
||||||
@@log = Logging.logger[EmailBlacklist]
|
@@log = Logging.logger[EmailBlacklist]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class JamRuby::Event < ActiveRecord::Base
|
class JamRuby::Event < ActiveRecord::Base
|
||||||
|
|
||||||
attr_accessible :slug, :title, :description, :show_sponser, :social_description, as: :admin
|
|
||||||
|
|
||||||
validates :slug, uniqueness: true, presence: true
|
validates :slug, uniqueness: true, presence: true
|
||||||
validates :show_sponser, :inclusion => {:in => [true, false]}
|
validates :show_sponser, :inclusion => {:in => [true, false]}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
class JamRuby::EventSession < ActiveRecord::Base
|
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 :user, class_name: 'JamRuby::User'
|
||||||
belongs_to :band, class_name: 'JamRuby::Band'
|
belongs_to :band, class_name: 'JamRuby::Band'
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ module JamRuby
|
||||||
class Feedback
|
class Feedback
|
||||||
include ActiveModel::Validations
|
include ActiveModel::Validations
|
||||||
include ActiveModel::Validations::Callbacks
|
include ActiveModel::Validations::Callbacks
|
||||||
include ActiveModel::Observing
|
|
||||||
extend ActiveModel::Callbacks
|
extend ActiveModel::Callbacks
|
||||||
|
|
||||||
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
|
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class Friendship < ActiveRecord::Base
|
class Friendship < ActiveRecord::Base
|
||||||
|
|
||||||
attr_accessible :user_id, :friend_id
|
|
||||||
|
|
||||||
self.primary_key = 'id'
|
self.primary_key = 'id'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
||||||
class GenericState < ActiveRecord::Base
|
class GenericState < ActiveRecord::Base
|
||||||
|
|
||||||
|
|
||||||
attr_accessible :top_message, :event_page_top_logo_url, :connection_policy, :customer_ltv, as: :admin
|
|
||||||
|
|
||||||
self.table_name = 'generic_state'
|
self.table_name = 'generic_state'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ module JamRuby
|
||||||
|
|
||||||
self.table_name = 'genres_jam_tracks'
|
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 :jam_track, class_name: 'JamRuby::JamTrack', inverse_of: :genres_jam_tracks
|
||||||
belongs_to :genre, class_name: 'JamRuby::Genre', 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]
|
@@log = Logging.logger[GiftCardPurchase]
|
||||||
|
|
||||||
attr_accessible :user, :gift_card_type
|
|
||||||
|
|
||||||
def name
|
def name
|
||||||
gift_card_type.sale_display
|
gift_card_type.sale_display
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastAdminAuthentication < ActiveRecord::Base
|
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 :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"
|
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :admin_auth, :foreign_key => "admin_auth_id"
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastDirectory < ActiveRecord::Base
|
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 :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"
|
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :directory, :foreign_key => "directory_id"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastLimit < ActiveRecord::Base
|
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 :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'
|
has_many :templates, class_name: 'JamRuby::IcecastTemplate', inverse_of: :limit, foreign_key: 'limit_id'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastListenSocket < ActiveRecord::Base
|
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 :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
|
has_many :servers, :class_name => "JamRuby::IcecastServer", :through => :server_sockets
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastLogging < ActiveRecord::Base
|
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 :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"
|
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :logging, :foreign_key => "logging_id"
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastMasterServerRelay < ActiveRecord::Base
|
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 :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"
|
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]
|
@@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
|
attr_accessor :no_config_changed
|
||||||
|
|
||||||
belongs_to :authentication, class_name: "JamRuby::IcecastUserAuthentication", inverse_of: :mount, :foreign_key => 'authentication_id'
|
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_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'
|
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 :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'
|
has_many :servers, class_name: "JamRuby::IcecastServer", inverse_of: :mount_template, foreign_key: 'mount_template_id'
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastPath < ActiveRecord::Base
|
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 :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"
|
has_many :templates, :class_name => "JamRuby::IcecastTemplate", :inverse_of => :path, :foreign_key => "path_id"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastRelay < ActiveRecord::Base
|
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 :server_relays, :class_name => "JamRuby::IcecastServerRelay"
|
||||||
has_many :servers, :class_name => "JamRuby::IcecastServer", :through => :server_relays, :source => :server
|
has_many :servers, :class_name => "JamRuby::IcecastServer", :through => :server_relays, :source => :server
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
module JamRuby
|
module JamRuby
|
||||||
class IcecastSecurity < ActiveRecord::Base
|
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 :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"
|
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