Initial Update to ruby 4.2
This commit is contained in:
parent
6fa8bd5a62
commit
ca17696529
52 changed files with 559 additions and 487 deletions
11
Gemfile
11
Gemfile
|
@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
||||||
|
|
||||||
ruby '2.3.7'
|
ruby '2.3.7'
|
||||||
gem 'rake'
|
gem 'rake'
|
||||||
gem 'rails', '3.2.22.5'
|
gem 'rails', '~> 4.1'
|
||||||
gem 'rails_12factor'
|
gem 'rails_12factor'
|
||||||
# https://stripe.com/docs/api
|
# https://stripe.com/docs/api
|
||||||
gem 'stripe'
|
gem 'stripe'
|
||||||
|
@ -26,8 +26,7 @@ gem 'test-unit', '~> 3.0'
|
||||||
gem 'hamster'
|
gem 'hamster'
|
||||||
|
|
||||||
gem 'aws-ses'
|
gem 'aws-ses'
|
||||||
gem 'aws-sdk'
|
gem 'aws-sdk', '~> 1'
|
||||||
|
|
||||||
# for blocking ip addressses
|
# for blocking ip addressses
|
||||||
gem 'rack-attack'
|
gem 'rack-attack'
|
||||||
|
|
||||||
|
@ -91,7 +90,7 @@ gem 'table_print'
|
||||||
|
|
||||||
gem 'bunny', '>= 2.6.3'
|
gem 'bunny', '>= 2.6.3'
|
||||||
|
|
||||||
gem 'rails-i18n', '~> 3.0.0' # For 3.x
|
gem 'rails-i18n', '~> 4.0' # For 3.x
|
||||||
gem 'i18n-js'
|
gem 'i18n-js'
|
||||||
gem 'countries'
|
gem 'countries'
|
||||||
|
|
||||||
|
@ -125,7 +124,7 @@ end
|
||||||
|
|
||||||
# Gems used for asset compilation
|
# Gems used for asset compilation
|
||||||
gem 'sass', '3.2.19'
|
gem 'sass', '3.2.19'
|
||||||
gem 'sass-rails', '3.2.6'
|
gem 'sass-rails'
|
||||||
gem 'uglifier'
|
gem 'uglifier'
|
||||||
|
|
||||||
# make logging less terrible in rails
|
# make logging less terrible in rails
|
||||||
|
@ -137,7 +136,7 @@ gem 'dry-validation' # used only for config validation
|
||||||
gem 'foreman'
|
gem 'foreman'
|
||||||
|
|
||||||
gem 'grape', '~> 1.1.0'
|
gem 'grape', '~> 1.1.0'
|
||||||
gem 'grape-entity', git: 'https://github.com/ruby-grape/grape-entity.git', ref: '0e04aa561373b510c2486282979085eaef2ae663'
|
gem 'grape-entity'
|
||||||
gem 'grape-swagger'
|
gem 'grape-swagger'
|
||||||
gem 'grape-swagger-entity'
|
gem 'grape-swagger-entity'
|
||||||
gem 'grape_url_validator'
|
gem 'grape_url_validator'
|
||||||
|
|
404
Gemfile.lock
404
Gemfile.lock
|
@ -13,9 +13,9 @@ GIT
|
||||||
revision: 0e04aa561373b510c2486282979085eaef2ae663
|
revision: 0e04aa561373b510c2486282979085eaef2ae663
|
||||||
ref: 0e04aa561373b510c2486282979085eaef2ae663
|
ref: 0e04aa561373b510c2486282979085eaef2ae663
|
||||||
specs:
|
specs:
|
||||||
grape-entity (0.7.1)
|
qx (0.1.1)
|
||||||
activesupport (>= 3.0.0)
|
activerecord (>= 3.0)
|
||||||
multi_json (>= 1.3.2)
|
colorize (~> 0.8)
|
||||||
|
|
||||||
PATH
|
PATH
|
||||||
remote: gems/grape_devise
|
remote: gems/grape_devise
|
||||||
|
@ -42,100 +42,108 @@ GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
action_mailer_matchers (1.0.0)
|
action_mailer_matchers (1.0.0)
|
||||||
actionmailer (3.2.22.5)
|
actionmailer (4.1.16)
|
||||||
actionpack (= 3.2.22.5)
|
actionpack (= 4.1.16)
|
||||||
mail (~> 2.5.4)
|
actionview (= 4.1.16)
|
||||||
actionpack (3.2.22.5)
|
mail (~> 2.5, >= 2.5.4)
|
||||||
activemodel (= 3.2.22.5)
|
actionpack (4.1.16)
|
||||||
activesupport (= 3.2.22.5)
|
actionview (= 4.1.16)
|
||||||
builder (~> 3.0.0)
|
activesupport (= 4.1.16)
|
||||||
erubis (~> 2.7.0)
|
rack (~> 1.5.2)
|
||||||
journey (~> 1.0.4)
|
rack-test (~> 0.6.2)
|
||||||
rack (~> 1.4.5)
|
activemodel (4.0.0)
|
||||||
rack-cache (~> 1.2)
|
activesupport (= 4.0.0)
|
||||||
rack-test (~> 0.6.1)
|
builder (~> 3.1.0)
|
||||||
sprockets (~> 2.2.1)
|
activerecord (4.0.0)
|
||||||
activemodel (3.2.22.5)
|
activemodel (= 4.0.0)
|
||||||
activesupport (= 3.2.22.5)
|
activerecord-deprecated_finders (~> 1.0.2)
|
||||||
builder (~> 3.0.0)
|
activesupport (= 4.0.0)
|
||||||
activerecord (3.2.22.5)
|
arel (~> 4.0.0)
|
||||||
activemodel (= 3.2.22.5)
|
activerecord-deprecated_finders (1.0.4)
|
||||||
activesupport (= 3.2.22.5)
|
activesupport (4.0.0)
|
||||||
arel (~> 3.0.2)
|
|
||||||
tzinfo (~> 0.3.29)
|
|
||||||
activeresource (3.2.22.5)
|
|
||||||
activemodel (= 3.2.22.5)
|
|
||||||
activesupport (= 3.2.22.5)
|
|
||||||
activesupport (3.2.22.5)
|
|
||||||
i18n (~> 0.6, >= 0.6.4)
|
i18n (~> 0.6, >= 0.6.4)
|
||||||
multi_json (~> 1.0)
|
multi_json (~> 1.0)
|
||||||
addressable (2.3.8)
|
addressable (2.3.8)
|
||||||
amq-protocol (2.2.0)
|
amq-protocol (2.2.0)
|
||||||
andand (1.3.3)
|
andand (1.3.3)
|
||||||
arel (3.0.3)
|
arel (5.0.1.20140414130214)
|
||||||
aws-sdk (1.66.0)
|
aws-eventstream (1.0.1)
|
||||||
aws-sdk-v1 (= 1.66.0)
|
aws-partitions (1.110.0)
|
||||||
aws-sdk-v1 (1.66.0)
|
aws-sdk (1.67.0)
|
||||||
|
aws-sdk-v1 (= 1.67.0)
|
||||||
|
aws-sdk-core (3.37.0)
|
||||||
|
aws-eventstream (~> 1.0)
|
||||||
|
aws-partitions (~> 1.0)
|
||||||
|
aws-sigv4 (~> 1.0)
|
||||||
|
jmespath (~> 1.0)
|
||||||
|
aws-sdk-kms (1.11.0)
|
||||||
|
aws-sdk-core (~> 3, >= 3.26.0)
|
||||||
|
aws-sigv4 (~> 1.0)
|
||||||
|
aws-sdk-s3 (1.23.1)
|
||||||
|
aws-sdk-core (~> 3, >= 3.26.0)
|
||||||
|
aws-sdk-kms (~> 1)
|
||||||
|
aws-sigv4 (~> 1.0)
|
||||||
|
aws-sdk-v1 (1.67.0)
|
||||||
json (~> 1.4)
|
json (~> 1.4)
|
||||||
nokogiri (>= 1.4.4)
|
nokogiri (~> 1)
|
||||||
aws-ses (0.6.0)
|
aws-ses (0.6.0)
|
||||||
builder
|
builder
|
||||||
mail (> 2.2.5)
|
mail (> 2.2.5)
|
||||||
mime-types
|
mime-types
|
||||||
xml-simple
|
xml-simple
|
||||||
|
aws-sigv4 (1.0.3)
|
||||||
axiom-types (0.1.1)
|
axiom-types (0.1.1)
|
||||||
descendants_tracker (~> 0.0.4)
|
descendants_tracker (~> 0.0.4)
|
||||||
ice_nine (~> 0.11.0)
|
ice_nine (~> 0.11.0)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
bcrypt (3.1.11)
|
bcrypt (3.1.12)
|
||||||
binding_of_caller (0.7.2)
|
binding_of_caller (0.8.0)
|
||||||
debug_inspector (>= 0.0.1)
|
debug_inspector (>= 0.0.1)
|
||||||
bootsnap (1.1.7)
|
bootsnap (1.3.2)
|
||||||
msgpack (~> 1.0)
|
msgpack (~> 1.0)
|
||||||
browserify-rails (0.9.3)
|
browserify-rails (1.1.0)
|
||||||
sprockets (~> 2.2)
|
railties (>= 4.0.0, < 5.0)
|
||||||
builder (3.0.4)
|
builder (3.2.3)
|
||||||
bunny (2.7.1)
|
bunny (2.12.0)
|
||||||
amq-protocol (>= 2.2.0)
|
amq-protocol (~> 2.3, >= 2.3.0)
|
||||||
carrierwave (0.10.0)
|
carrierwave (1.2.3)
|
||||||
activemodel (>= 3.2.0)
|
activemodel (>= 4.0.0)
|
||||||
activesupport (>= 3.2.0)
|
activesupport (>= 4.0.0)
|
||||||
json (>= 1.7)
|
|
||||||
mime-types (>= 1.16)
|
mime-types (>= 1.16)
|
||||||
carrierwave-aws (0.5.0)
|
carrierwave-aws (1.3.0)
|
||||||
aws-sdk (~> 1.58)
|
aws-sdk-s3 (~> 1.0)
|
||||||
carrierwave (~> 0.7)
|
carrierwave (>= 0.7, < 2.0)
|
||||||
chronic (0.10.2)
|
chronic (0.10.2)
|
||||||
coderay (1.1.2)
|
coderay (1.1.2)
|
||||||
coercible (1.0.0)
|
coercible (1.0.0)
|
||||||
descendants_tracker (~> 0.0.1)
|
descendants_tracker (~> 0.0.1)
|
||||||
colorize (0.8.1)
|
colorize (0.8.1)
|
||||||
concurrent-ruby (1.0.5)
|
concurrent-ruby (1.1.4)
|
||||||
config (1.7.0)
|
config (1.7.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
deep_merge (~> 1.2.1)
|
deep_merge (~> 1.2.1)
|
||||||
dry-validation (>= 0.10.4)
|
dry-validation (>= 0.10.4)
|
||||||
countries (2.1.2)
|
countries (2.1.4)
|
||||||
i18n_data (~> 0.8.0)
|
i18n_data (~> 0.8.0)
|
||||||
money (~> 6.9)
|
money (~> 6.9)
|
||||||
sixarm_ruby_unaccent (~> 1.1)
|
sixarm_ruby_unaccent (~> 1.1)
|
||||||
unicode_utils (~> 1.4)
|
unicode_utils (~> 1.4)
|
||||||
crack (0.4.2)
|
crack (0.4.3)
|
||||||
safe_yaml (~> 1.0.0)
|
safe_yaml (~> 1.0.0)
|
||||||
css_parser (1.3.6)
|
css_parser (1.6.0)
|
||||||
addressable
|
addressable
|
||||||
dalli (2.7.6)
|
dalli (2.7.9)
|
||||||
dante (0.2.0)
|
dante (0.2.0)
|
||||||
database_cleaner (1.6.1)
|
database_cleaner (1.7.0)
|
||||||
debase (0.2.2)
|
debase (0.2.2)
|
||||||
debase-ruby_core_source (>= 0.10.2)
|
debase-ruby_core_source (>= 0.10.2)
|
||||||
debase-ruby_core_source (0.10.3)
|
debase-ruby_core_source (0.10.3)
|
||||||
debug_inspector (0.0.2)
|
debug_inspector (0.0.3)
|
||||||
deep_merge (1.2.1)
|
deep_merge (1.2.1)
|
||||||
delayed_job (4.1.2)
|
delayed_job (4.1.5)
|
||||||
activesupport (>= 3.0, < 5.1)
|
activesupport (>= 3.0, < 5.3)
|
||||||
delayed_job_active_record (4.1.1)
|
delayed_job_active_record (4.1.3)
|
||||||
activerecord (>= 3.0, < 5.1)
|
activerecord (>= 3.0, < 5.3)
|
||||||
delayed_job (>= 3.0, < 5)
|
delayed_job (>= 3.0, < 5)
|
||||||
descendants_tracker (0.0.4)
|
descendants_tracker (0.0.4)
|
||||||
thread_safe (~> 0.3, >= 0.3.1)
|
thread_safe (~> 0.3, >= 0.3.1)
|
||||||
|
@ -146,65 +154,65 @@ GEM
|
||||||
responders
|
responders
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
warden (~> 1.2.3)
|
warden (~> 1.2.3)
|
||||||
devise-async (0.9.0)
|
devise-async (0.10.2)
|
||||||
devise (~> 3.2)
|
devise (>= 3.2, < 4.0)
|
||||||
diff-lcs (1.2.5)
|
diff-lcs (1.3)
|
||||||
docile (1.3.1)
|
docile (1.3.1)
|
||||||
domain_name (0.5.20160615)
|
domain_name (0.5.20180417)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
dotenv (2.0.1)
|
dotenv (2.5.0)
|
||||||
dotenv-rails (2.0.1)
|
dotenv-rails (2.5.0)
|
||||||
dotenv (= 2.0.1)
|
dotenv (= 2.5.0)
|
||||||
|
railties (>= 3.2, < 6.0)
|
||||||
dry-configurable (0.7.0)
|
dry-configurable (0.7.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-container (0.6.0)
|
dry-container (0.6.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-configurable (~> 0.1, >= 0.1.3)
|
dry-configurable (~> 0.1, >= 0.1.3)
|
||||||
dry-core (0.4.5)
|
dry-core (0.4.7)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-equalizer (0.2.0)
|
dry-equalizer (0.2.1)
|
||||||
|
dry-inflector (0.1.2)
|
||||||
dry-logic (0.4.2)
|
dry-logic (0.4.2)
|
||||||
dry-container (~> 0.2, >= 0.2.6)
|
dry-container (~> 0.2, >= 0.2.6)
|
||||||
dry-core (~> 0.2)
|
dry-core (~> 0.2)
|
||||||
dry-equalizer (~> 0.2)
|
dry-equalizer (~> 0.2)
|
||||||
dry-types (0.12.2)
|
dry-types (0.13.2)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-configurable (~> 0.1)
|
|
||||||
dry-container (~> 0.3)
|
dry-container (~> 0.3)
|
||||||
dry-core (~> 0.2, >= 0.2.1)
|
dry-core (~> 0.4, >= 0.4.4)
|
||||||
dry-equalizer (~> 0.2)
|
dry-equalizer (~> 0.2)
|
||||||
|
dry-inflector (~> 0.1, >= 0.1.2)
|
||||||
dry-logic (~> 0.4, >= 0.4.2)
|
dry-logic (~> 0.4, >= 0.4.2)
|
||||||
inflecto (~> 0.0.0, >= 0.0.2)
|
dry-validation (0.12.2)
|
||||||
dry-validation (0.11.1)
|
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
dry-configurable (~> 0.1, >= 0.1.3)
|
dry-configurable (~> 0.1, >= 0.1.3)
|
||||||
dry-core (~> 0.2, >= 0.2.1)
|
dry-core (~> 0.2, >= 0.2.1)
|
||||||
dry-equalizer (~> 0.2)
|
dry-equalizer (~> 0.2)
|
||||||
dry-logic (~> 0.4, >= 0.4.0)
|
dry-logic (~> 0.4, >= 0.4.0)
|
||||||
dry-types (~> 0.12.0)
|
dry-types (~> 0.13.1)
|
||||||
equalizer (0.0.11)
|
equalizer (0.0.11)
|
||||||
erubis (2.7.0)
|
erubis (2.7.0)
|
||||||
execjs (2.5.2)
|
execjs (2.7.0)
|
||||||
factory_bot (4.8.2)
|
factory_bot (4.11.1)
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
factory_bot_rails (4.8.2)
|
factory_bot_rails (4.11.1)
|
||||||
factory_bot (~> 4.8.2)
|
factory_bot (~> 4.11.1)
|
||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
faraday (0.9.1)
|
faraday (0.11.0)
|
||||||
multipart-post (>= 1.2, < 3)
|
multipart-post (>= 1.2, < 3)
|
||||||
faraday_middleware (0.9.1)
|
faraday_middleware (0.9.1)
|
||||||
faraday (>= 0.7.4, < 0.10)
|
faraday (>= 0.7.4, < 0.10)
|
||||||
font_assets (0.1.14)
|
font_assets (0.1.14)
|
||||||
rack
|
rack
|
||||||
foreman (0.84.0)
|
foreman (0.85.0)
|
||||||
thor (~> 0.19.1)
|
thor (~> 0.19.1)
|
||||||
fullcontact (0.9.0)
|
fullcontact (0.18.0)
|
||||||
faraday (~> 0.9.0)
|
faraday (~> 0.11.0)
|
||||||
faraday_middleware (>= 0.9)
|
faraday_middleware (>= 0.10)
|
||||||
hashie (>= 2.0, < 4.0)
|
hashie (>= 2.0, < 4.0)
|
||||||
plissken
|
geocoder (1.5.0)
|
||||||
geocoder (1.2.11)
|
get_process_mem (0.2.3)
|
||||||
get_process_mem (0.2.1)
|
|
||||||
grape (1.1.0)
|
grape (1.1.0)
|
||||||
activesupport
|
activesupport
|
||||||
builder
|
builder
|
||||||
|
@ -212,11 +220,14 @@ GEM
|
||||||
rack (>= 1.3.0)
|
rack (>= 1.3.0)
|
||||||
rack-accept
|
rack-accept
|
||||||
virtus (>= 1.0.0)
|
virtus (>= 1.0.0)
|
||||||
grape-swagger (0.28.0)
|
grape-entity (0.7.1)
|
||||||
|
activesupport (>= 4.0)
|
||||||
|
multi_json (>= 1.3.2)
|
||||||
|
grape-swagger (0.31.1)
|
||||||
grape (>= 0.16.2)
|
grape (>= 0.16.2)
|
||||||
grape-swagger-entity (0.2.3)
|
grape-swagger-entity (0.3.0)
|
||||||
grape-entity (>= 0.5.0)
|
grape-entity (>= 0.5.0)
|
||||||
grape-swagger (>= 0.20.4)
|
grape-swagger (>= 0.31.0)
|
||||||
grape_logging (1.8.0)
|
grape_logging (1.8.0)
|
||||||
grape
|
grape
|
||||||
rack
|
rack
|
||||||
|
@ -224,36 +235,34 @@ GEM
|
||||||
grape (>= 0.12.0)
|
grape (>= 0.12.0)
|
||||||
hamster (3.0.0)
|
hamster (3.0.0)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
hashie (3.4.1)
|
hashdiff (0.3.7)
|
||||||
heroku-deflater (0.5.3)
|
hashie (3.6.0)
|
||||||
|
heroku-deflater (0.6.3)
|
||||||
rack (>= 1.4.5)
|
rack (>= 1.4.5)
|
||||||
hike (1.2.3)
|
http-cookie (1.0.3)
|
||||||
http-cookie (1.0.2)
|
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
httparty (0.13.3)
|
httparty (0.16.2)
|
||||||
json (~> 1.8)
|
|
||||||
multi_xml (>= 0.5.2)
|
multi_xml (>= 0.5.2)
|
||||||
i18n (0.9.5)
|
i18n (0.9.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
i18n-js (3.0.2)
|
i18n-js (3.1.0)
|
||||||
i18n (~> 0.6, >= 0.6.6)
|
i18n (>= 0.6.6, < 2)
|
||||||
i18n_data (0.8.0)
|
i18n_data (0.8.0)
|
||||||
ice_nine (0.11.2)
|
ice_nine (0.11.2)
|
||||||
inflecto (0.0.2)
|
jmespath (1.4.0)
|
||||||
journey (1.0.4)
|
|
||||||
json (1.8.6)
|
json (1.8.6)
|
||||||
kdtree (0.3)
|
kdtree (0.4)
|
||||||
lograge (0.3.6)
|
lograge (0.10.0)
|
||||||
actionpack (>= 3)
|
actionpack (>= 4)
|
||||||
activesupport (>= 3)
|
activesupport (>= 4)
|
||||||
railties (>= 3)
|
railties (>= 4)
|
||||||
mail (2.5.5)
|
request_store (~> 1.0)
|
||||||
mime-types (~> 1.16)
|
mail (2.7.1)
|
||||||
treetop (~> 1.4.8)
|
mini_mime (>= 0.1.1)
|
||||||
mail_view (2.0.4)
|
mail_view (2.0.4)
|
||||||
tilt
|
tilt
|
||||||
memcachier (0.0.2)
|
memcachier (0.0.2)
|
||||||
method_source (0.9.0)
|
method_source (0.9.1)
|
||||||
mime-types (1.25.1)
|
mime-types (1.25.1)
|
||||||
mini_magick (4.9.5)
|
mini_magick (4.9.5)
|
||||||
mini_portile2 (2.1.0)
|
mini_portile2 (2.1.0)
|
||||||
|
@ -261,7 +270,7 @@ GEM
|
||||||
i18n (>= 0.6.4, < 1.0)
|
i18n (>= 0.6.4, < 1.0)
|
||||||
msgpack (1.2.0)
|
msgpack (1.2.0)
|
||||||
multi_json (1.13.1)
|
multi_json (1.13.1)
|
||||||
multi_xml (0.5.5)
|
multi_xml (0.6.0)
|
||||||
multipart-post (2.0.0)
|
multipart-post (2.0.0)
|
||||||
mustermann (1.0.3)
|
mustermann (1.0.3)
|
||||||
mustermann-grape (1.0.0)
|
mustermann-grape (1.0.0)
|
||||||
|
@ -271,47 +280,46 @@ GEM
|
||||||
kdtree
|
kdtree
|
||||||
require_all
|
require_all
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
nokogiri (1.6.8.1)
|
nokogiri (1.8.5)
|
||||||
mini_portile2 (~> 2.1.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
orm_adapter (0.5.0)
|
orm_adapter (0.5.0)
|
||||||
parallel (1.6.1)
|
parallel (1.12.1)
|
||||||
pg (0.18.3)
|
pg (0.21.0)
|
||||||
plissken (0.2.0)
|
|
||||||
symbolize (~> 4.2)
|
|
||||||
polyglot (0.3.5)
|
polyglot (0.3.5)
|
||||||
power_assert (1.1.1)
|
power_assert (1.1.1)
|
||||||
pry (0.11.3)
|
pry (0.11.3)
|
||||||
coderay (~> 1.1.0)
|
coderay (~> 1.1.0)
|
||||||
method_source (~> 0.9.0)
|
method_source (~> 0.9.0)
|
||||||
puma (3.11.2)
|
public_suffix (3.0.3)
|
||||||
|
puma (3.12.0)
|
||||||
puma_worker_killer (0.1.0)
|
puma_worker_killer (0.1.0)
|
||||||
get_process_mem (~> 0.2)
|
get_process_mem (~> 0.2)
|
||||||
puma (>= 2.7, < 4)
|
puma (>= 2.7, < 4)
|
||||||
rabl (0.11.6)
|
rabl (0.14.0)
|
||||||
activesupport (>= 2.3.14)
|
activesupport (>= 2.3.14)
|
||||||
rack (1.4.7)
|
rack (1.5.5)
|
||||||
rack-accept (0.4.5)
|
rack-accept (0.4.5)
|
||||||
rack (>= 0.4)
|
rack (>= 0.4)
|
||||||
rack-attack (4.2.0)
|
rack-attack (5.4.2)
|
||||||
rack
|
rack (>= 1.0, < 3)
|
||||||
rack-cache (1.7.2)
|
rack-ssl (1.4.1)
|
||||||
rack (>= 0.4)
|
|
||||||
rack-ssl (1.3.4)
|
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rack-timeout (0.4.2)
|
rack-timeout (0.5.1)
|
||||||
rails (3.2.22.5)
|
rails (4.1.16)
|
||||||
actionmailer (= 3.2.22.5)
|
actionmailer (= 4.1.16)
|
||||||
actionpack (= 3.2.22.5)
|
actionpack (= 4.1.16)
|
||||||
activerecord (= 3.2.22.5)
|
actionview (= 4.1.16)
|
||||||
activeresource (= 3.2.22.5)
|
activemodel (= 4.1.16)
|
||||||
activesupport (= 3.2.22.5)
|
activerecord (= 4.1.16)
|
||||||
bundler (~> 1.0)
|
activesupport (= 4.1.16)
|
||||||
railties (= 3.2.22.5)
|
bundler (>= 1.3.0, < 2.0)
|
||||||
rails-i18n (3.0.1)
|
railties (= 4.1.16)
|
||||||
i18n (~> 0.5)
|
sprockets-rails (~> 2.0)
|
||||||
rails (>= 3.0.0, < 4.0.0)
|
rails-i18n (4.0.9)
|
||||||
|
i18n (~> 0.7)
|
||||||
|
railties (~> 4.0)
|
||||||
rails_12factor (0.0.3)
|
rails_12factor (0.0.3)
|
||||||
rails_serve_static_assets
|
rails_serve_static_assets
|
||||||
rails_stdout_logging
|
rails_stdout_logging
|
||||||
|
@ -322,90 +330,86 @@ GEM
|
||||||
activesupport (= 3.2.22.5)
|
activesupport (= 3.2.22.5)
|
||||||
rack-ssl (~> 1.3.2)
|
rack-ssl (~> 1.3.2)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
rdoc (~> 3.4)
|
thor (>= 0.18.1, < 2.0)
|
||||||
thor (>= 0.14.6, < 2.0)
|
rake (12.3.2)
|
||||||
rake (12.3.1)
|
request_store (1.4.1)
|
||||||
rdoc (3.12.2)
|
rack (>= 1.4)
|
||||||
json (~> 1.4)
|
require_all (2.0.0)
|
||||||
require_all (1.3.2)
|
|
||||||
responders (1.1.2)
|
responders (1.1.2)
|
||||||
railties (>= 3.2, < 4.2)
|
railties (>= 3.2, < 4.2)
|
||||||
rest-client (1.8.0)
|
rest-client (2.0.2)
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 3.0)
|
mime-types (>= 1.16, < 4.0)
|
||||||
netrc (~> 0.7)
|
netrc (~> 0.8)
|
||||||
roadie (3.0.4)
|
roadie (3.4.0)
|
||||||
css_parser (~> 1.3.4)
|
css_parser (~> 1.4)
|
||||||
nokogiri (~> 1.6.0)
|
nokogiri (~> 1.5)
|
||||||
roadie-rails (1.0.5)
|
roadie-rails (1.3.0)
|
||||||
railties (>= 3.0, < 4.3)
|
railties (>= 3.0, < 5.3)
|
||||||
roadie (~> 3.0)
|
roadie (~> 3.1)
|
||||||
rspec (3.5.0)
|
rspec (3.8.0)
|
||||||
rspec-core (~> 3.5.0)
|
rspec-core (~> 3.8.0)
|
||||||
rspec-expectations (~> 3.5.0)
|
rspec-expectations (~> 3.8.0)
|
||||||
rspec-mocks (~> 3.5.0)
|
rspec-mocks (~> 3.8.0)
|
||||||
rspec-core (3.5.1)
|
rspec-core (3.8.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.8.0)
|
||||||
rspec-expectations (3.5.0)
|
rspec-expectations (3.8.2)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.8.0)
|
||||||
rspec-mocks (3.5.0)
|
rspec-mocks (3.8.0)
|
||||||
diff-lcs (>= 1.2.0, < 2.0)
|
diff-lcs (>= 1.2.0, < 2.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.8.0)
|
||||||
rspec-rails (3.5.0)
|
rspec-rails (3.8.1)
|
||||||
actionpack (>= 3.0)
|
actionpack (>= 3.0)
|
||||||
activesupport (>= 3.0)
|
activesupport (>= 3.0)
|
||||||
railties (>= 3.0)
|
railties (>= 3.0)
|
||||||
rspec-core (~> 3.5.0)
|
rspec-core (~> 3.8.0)
|
||||||
rspec-expectations (~> 3.5.0)
|
rspec-expectations (~> 3.8.0)
|
||||||
rspec-mocks (~> 3.5.0)
|
rspec-mocks (~> 3.8.0)
|
||||||
rspec-support (~> 3.5.0)
|
rspec-support (~> 3.8.0)
|
||||||
rspec-support (3.5.0)
|
rspec-support (3.8.0)
|
||||||
ruby-debug-ide (0.6.1)
|
ruby-debug-ide (0.6.1)
|
||||||
rake (>= 0.8.1)
|
rake (>= 0.8.1)
|
||||||
ruby-prof (0.15.9)
|
ruby-prof (0.15.9)
|
||||||
safe_yaml (1.0.4)
|
safe_yaml (1.0.4)
|
||||||
sass (3.2.19)
|
sass (3.2.19)
|
||||||
sass-rails (3.2.6)
|
sass-rails (5.0.7)
|
||||||
railties (~> 3.2.0)
|
railties (>= 4.0.0, < 6)
|
||||||
sass (>= 3.1.10)
|
sass (~> 3.1)
|
||||||
tilt (~> 1.3)
|
sprockets (>= 2.8, < 4.0)
|
||||||
|
sprockets-rails (>= 2.0, < 4.0)
|
||||||
|
tilt (>= 1.1, < 3)
|
||||||
simplecov (0.16.1)
|
simplecov (0.16.1)
|
||||||
docile (~> 1.1)
|
docile (~> 1.1)
|
||||||
json (>= 1.8, < 3)
|
json (>= 1.8, < 3)
|
||||||
simplecov-html (~> 0.10.0)
|
simplecov-html (~> 0.10.0)
|
||||||
simplecov-html (0.10.2)
|
simplecov-html (0.10.2)
|
||||||
sixarm_ruby_unaccent (1.2.0)
|
sixarm_ruby_unaccent (1.2.0)
|
||||||
sprockets (2.2.3)
|
sprockets (3.7.2)
|
||||||
hike (~> 1.2)
|
concurrent-ruby (~> 1.0)
|
||||||
multi_json (~> 1.0)
|
rack (> 1, < 3)
|
||||||
rack (~> 1.0)
|
sprockets-rails (2.3.3)
|
||||||
tilt (~> 1.1, != 1.3.0)
|
actionpack (>= 3.0)
|
||||||
stripe (1.49.0)
|
activesupport (>= 3.0)
|
||||||
rest-client (>= 1.4, < 3.0)
|
sprockets (>= 2.8, < 4.0)
|
||||||
symbolize (4.5.2)
|
stripe (1.58.0)
|
||||||
activemodel (>= 3.2, < 5)
|
rest-client (>= 1.4, < 4.0)
|
||||||
activesupport (>= 3.2, < 5)
|
table_print (1.5.6)
|
||||||
i18n
|
test-unit (3.2.8)
|
||||||
table_print (1.5.4)
|
|
||||||
test-unit (3.2.7)
|
|
||||||
power_assert
|
power_assert
|
||||||
thor (0.19.4)
|
thor (0.19.4)
|
||||||
thread_safe (0.3.6)
|
thread_safe (0.3.6)
|
||||||
tilt (1.4.1)
|
tilt (2.0.9)
|
||||||
timecop (0.7.3)
|
timecop (0.9.1)
|
||||||
traceroute (0.5.0)
|
traceroute (0.8.0)
|
||||||
rails (>= 3.0.0)
|
rails (>= 3.0.0)
|
||||||
treetop (1.4.15)
|
tzinfo (1.2.5)
|
||||||
polyglot
|
thread_safe (~> 0.1)
|
||||||
polyglot (>= 0.3.1)
|
uglifier (4.1.19)
|
||||||
tzinfo (0.3.54)
|
execjs (>= 0.3.0, < 3)
|
||||||
uglifier (2.7.1)
|
|
||||||
execjs (>= 0.3.0)
|
|
||||||
json (>= 1.8.0)
|
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.2)
|
unf_ext (0.0.7.5)
|
||||||
unicode_utils (1.4.0)
|
unicode_utils (1.4.0)
|
||||||
virtus (1.0.5)
|
virtus (1.0.5)
|
||||||
axiom-types (~> 0.1)
|
axiom-types (~> 0.1)
|
||||||
|
@ -414,9 +418,10 @@ GEM
|
||||||
equalizer (~> 0.0, >= 0.0.9)
|
equalizer (~> 0.0, >= 0.0.9)
|
||||||
warden (1.2.7)
|
warden (1.2.7)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
webmock (1.21.0)
|
webmock (3.4.2)
|
||||||
addressable (>= 2.3.6)
|
addressable (>= 2.3.6)
|
||||||
crack (>= 0.3.2)
|
crack (>= 0.3.2)
|
||||||
|
hashdiff
|
||||||
xml-simple (1.1.5)
|
xml-simple (1.1.5)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
|
@ -451,7 +456,7 @@ DEPENDENCIES
|
||||||
fullcontact
|
fullcontact
|
||||||
geocoder
|
geocoder
|
||||||
grape (~> 1.1.0)
|
grape (~> 1.1.0)
|
||||||
grape-entity!
|
grape-entity
|
||||||
grape-swagger
|
grape-swagger
|
||||||
grape-swagger-entity
|
grape-swagger-entity
|
||||||
grape_devise!
|
grape_devise!
|
||||||
|
@ -475,9 +480,10 @@ DEPENDENCIES
|
||||||
qx!
|
qx!
|
||||||
rabl
|
rabl
|
||||||
rack-attack
|
rack-attack
|
||||||
|
rack-ssl
|
||||||
rack-timeout
|
rack-timeout
|
||||||
rails (= 3.2.22.5)
|
rails (~> 4.1)
|
||||||
rails-i18n (~> 3.0.0)
|
rails-i18n (~> 4.0)
|
||||||
rails_12factor
|
rails_12factor
|
||||||
rake
|
rake
|
||||||
roadie-rails
|
roadie-rails
|
||||||
|
@ -486,7 +492,7 @@ DEPENDENCIES
|
||||||
ruby-debug-ide
|
ruby-debug-ide
|
||||||
ruby-prof (= 0.15.9)
|
ruby-prof (= 0.15.9)
|
||||||
sass (= 3.2.19)
|
sass (= 3.2.19)
|
||||||
sass-rails (= 3.2.6)
|
sass-rails
|
||||||
simplecov (~> 0.16.1)
|
simplecov (~> 0.16.1)
|
||||||
sprockets
|
sprockets
|
||||||
stripe
|
stripe
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
||||||
include Controllers::CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:index]
|
before_filter :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order, :report]
|
||||||
|
|
||||||
def index
|
def report
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json do
|
format.json do
|
||||||
render json: QueryCampaignGifts.report_metrics(current_campaign.id)
|
render json: QueryCampaignGifts.report_metrics(current_campaign.id)
|
||||||
|
@ -12,4 +12,40 @@ module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def index
|
||||||
|
@gift_options = current_campaign.campaign_gift_options.order('"order", amount_recurring, amount_one_time')
|
||||||
|
render json: {data: @gift_options}
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
render json: {data: current_campaign.campaign_gift_options.find(params[:id])}
|
||||||
|
end
|
||||||
|
|
||||||
|
def create
|
||||||
|
campaign = current_campaign
|
||||||
|
json_saved CreateCampaignGiftOption.create(campaign, params[:campaign_gift_option]),
|
||||||
|
'Gift option successfully created!'
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@campaign = current_campaign
|
||||||
|
gift_option = @campaign.campaign_gift_options.find params[:id]
|
||||||
|
json_saved UpdateCampaignGiftOption.update(gift_option, params[:campaign_gift_option]), 'Successfully updated'
|
||||||
|
end
|
||||||
|
|
||||||
|
# put /nonprofits/:nonprofit_id/campaigns/:campaign_id/campaign_gift_options/update_order
|
||||||
|
# Pass in {data: [{id: 1, order: 1}]}
|
||||||
|
def update_order
|
||||||
|
updated_gift_options = UpdateOrder.with_data('campaign_gift_options', params[:data])
|
||||||
|
render json: updated_gift_options
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@campaign = current_campaign
|
||||||
|
|
||||||
|
render_json { DeleteCampaignGiftOption.delete(@campaign, params[:id])}
|
||||||
|
end
|
||||||
|
|
||||||
end; end
|
end; end
|
||||||
|
|
|
@ -57,18 +57,7 @@ class CampaignsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
Time.use_zone(current_nonprofit.timezone || 'UTC') do
|
render json: CreateCampaign.create(params, current_nonprofit)
|
||||||
params[:campaign][:end_datetime] = Chronic.parse(params[:campaign][:end_datetime]) if params[:campaign][:end_datetime].present?
|
|
||||||
end
|
|
||||||
|
|
||||||
if !params[:campaign][:parent_campaign_id]
|
|
||||||
campaign = current_nonprofit.campaigns.create params[:campaign]
|
|
||||||
json_saved campaign, 'Campaign created! Well done.'
|
|
||||||
else
|
|
||||||
profile_id = params[:campaign][:profile_id]
|
|
||||||
Profile.find(profile_id).update_attributes params[:profile]
|
|
||||||
render json: CreatePeerToPeerCampaign.create(params[:campaign], profile_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
|
|
|
@ -73,7 +73,8 @@ class Nonprofit < ActiveRecord::Base
|
||||||
has_many :email_settings
|
has_many :email_settings
|
||||||
has_many :cards, as: :holder
|
has_many :cards, as: :holder
|
||||||
|
|
||||||
has_one :bank_account, dependent: :destroy, conditions: "COALESCE(deleted, false) = false"
|
has_one :bank_account, -> { where("COALESCE(deleted, false) = false") },
|
||||||
|
dependent: :destroy
|
||||||
has_one :billing_subscription, dependent: :destroy
|
has_one :billing_subscription, dependent: :destroy
|
||||||
has_one :billing_plan, through: :billing_subscription
|
has_one :billing_plan, through: :billing_subscription
|
||||||
has_one :miscellaneous_np_info
|
has_one :miscellaneous_np_info
|
||||||
|
|
3
bin/bundle
Executable file
3
bin/bundle
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
||||||
|
load Gem.bin_path('bundler', 'bundle')
|
4
bin/rails
Executable file
4
bin/rails
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rails/commands'
|
4
bin/rake
Executable file
4
bin/rake
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env ruby
|
||||||
|
require_relative '../config/boot'
|
||||||
|
require 'rake'
|
||||||
|
Rake.application.run
|
|
@ -1,7 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
#
|
|
||||||
# Set up gems listed in the Gemfile.
|
# Set up gems listed in the Gemfile.
|
||||||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
||||||
|
|
||||||
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
|
require 'bundler/setup'
|
||||||
require 'bootsnap/setup'
|
require 'bootsnap/setup'
|
|
@ -298,4 +298,4 @@ end
|
||||||
Settings.reload!
|
Settings.reload!
|
||||||
|
|
||||||
# Initialize the rails application
|
# Initialize the rails application
|
||||||
Commitchange::Application.initialize!
|
Rails.application.initialize!
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
Commitchange::Application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
|
|
|
@ -5,7 +5,7 @@ CarrierWave.configure do |config|
|
||||||
config.ignore_download_errors = false
|
config.ignore_download_errors = false
|
||||||
end
|
end
|
||||||
|
|
||||||
Commitchange::Application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# In the development environment your application's code is reloaded on
|
||||||
|
@ -14,9 +14,8 @@ Commitchange::Application.configure do
|
||||||
config.cache_classes = false
|
config.cache_classes = false
|
||||||
config.cache_store = Settings.default.cache_store.to_sym
|
config.cache_store = Settings.default.cache_store.to_sym
|
||||||
|
|
||||||
# Log error messages when you accidentally call methods on nil.
|
# Do not eager load code on boot.
|
||||||
config.whiny_nils = true
|
config.eager_load = false
|
||||||
|
|
||||||
# Show full error reports and disable caching
|
# Show full error reports and disable caching
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
@ -30,7 +29,8 @@ Commitchange::Application.configure do
|
||||||
config.action_mailer.smtp_settings['password']= Settings.mailer.password if Settings.mailer.password
|
config.action_mailer.smtp_settings['password']= Settings.mailer.password if Settings.mailer.password
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { host: Settings.mailer.host }
|
config.action_mailer.default_url_options = { host: Settings.mailer.host }
|
||||||
|
# Don't care if the mailer can't send.
|
||||||
|
config.action_mailer.raise_delivery_errors = false
|
||||||
# Print deprecation notices to the Rails logger
|
# Print deprecation notices to the Rails logger
|
||||||
config.active_support.deprecation = :log
|
config.active_support.deprecation = :log
|
||||||
|
|
||||||
|
@ -40,9 +40,8 @@ Commitchange::Application.configure do
|
||||||
# Raise exception on mass assignment protection for Active Record models
|
# Raise exception on mass assignment protection for Active Record models
|
||||||
config.active_record.mass_assignment_sanitizer = :strict
|
config.active_record.mass_assignment_sanitizer = :strict
|
||||||
|
|
||||||
# Log the query plan for queries taking more than this (works)
|
# Raise an error on page load if there are pending migrations
|
||||||
# with SQLite, MySQL, and PostgreSQL)
|
config.active_record.migration_error = :page_load
|
||||||
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
||||||
|
|
||||||
# Do not compress assets
|
# Do not compress assets
|
||||||
config.assets.compress = false
|
config.assets.compress = false
|
||||||
|
|
|
@ -1,89 +1,78 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
Rails.application.configure do
|
||||||
Commitchange::Application.configure do
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
|
||||||
|
|
||||||
# Code is not reloaded between requests
|
# Code is not reloaded between requests.
|
||||||
config.cache_classes = true
|
config.cache_classes = true
|
||||||
config.cache_store = Settings.default.cache_store.to_sym
|
|
||||||
|
|
||||||
# Full error reports are disabled and caching is turned on
|
# Eager load code on boot. This eager loads most of Rails and
|
||||||
|
# your application in memory, allowing both threaded web servers
|
||||||
|
# and those relying on copy on write to perform better.
|
||||||
|
# Rake tasks automatically ignore this option for performance.
|
||||||
|
config.eager_load = true
|
||||||
|
|
||||||
|
# Full error reports are disabled and caching is turned on.
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
config.action_controller.perform_caching = true
|
config.action_controller.perform_caching = true
|
||||||
|
|
||||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
||||||
config.serve_static_assets = true
|
# Add `rack-cache` to your Gemfile before enabling this.
|
||||||
|
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
||||||
|
# config.action_dispatch.rack_cache = true
|
||||||
|
|
||||||
# Compress JavaScripts and CSS
|
# Disable Rails's static asset server (Apache or nginx will already do this).
|
||||||
config.assets.compress = true
|
config.serve_static_assets = false
|
||||||
|
|
||||||
# Generate digests for assets URLs
|
# Compress JavaScripts and CSS.
|
||||||
config.assets.digest = true
|
config.assets.js_compressor = :uglifier
|
||||||
|
# config.assets.css_compressor = :sass
|
||||||
|
|
||||||
|
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
||||||
config.assets.compile = false
|
config.assets.compile = false
|
||||||
|
|
||||||
# Defaults to nil and saved in location specified by config.assets.prefix
|
# Generate digests for assets URLs.
|
||||||
# config.assets.manifest = YOUR_PATH
|
config.assets.digest = true
|
||||||
|
|
||||||
# Specifies the header that your server uses for sending files
|
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
|
||||||
|
|
||||||
|
# Specifies the header that your server uses for sending files.
|
||||||
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
||||||
config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
||||||
|
|
||||||
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
||||||
config.force_ssl = true
|
# config.force_ssl = true
|
||||||
|
|
||||||
# See everything in the log (default is :info)
|
# Set to :debug to see everything in the log.
|
||||||
config.log_level = :debug
|
config.log_level = :info
|
||||||
|
|
||||||
# Prepend all log lines with the following tags
|
# Prepend all log lines with the following tags.
|
||||||
# config.log_tags = [ :subdomain, :uuid ]
|
# config.log_tags = [ :subdomain, :uuid ]
|
||||||
|
|
||||||
# Use a different logger for distributed setups
|
# Use a different logger for distributed setups.
|
||||||
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
||||||
|
|
||||||
# Use a different cache store in production
|
# Use a different cache store in production.
|
||||||
# config.cache_store = :mem_cache_store
|
# config.cache_store = :mem_cache_store
|
||||||
|
|
||||||
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
||||||
|
# config.action_controller.asset_host = "http://assets.example.com"
|
||||||
|
|
||||||
cdn_url= URI(Settings.cdn.url)
|
# Ignore bad email addresses and do not raise email delivery errors.
|
||||||
cdn_url = cdn_url.to_s
|
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||||
config.action_controller.asset_host = cdn_url
|
|
||||||
config.action_mailer.asset_host = cdn_url
|
|
||||||
config.font_assets.origin = '*'
|
|
||||||
|
|
||||||
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
|
||||||
|
|
||||||
# Disable delivery errors, bad email addresses will be ignored
|
|
||||||
# config.action_mailer.raise_delivery_errors = false
|
# config.action_mailer.raise_delivery_errors = false
|
||||||
config.action_mailer.delivery_method = Settings.mailer.delivery_method.to_sym
|
|
||||||
config.action_mailer.default_url_options = { host: Settings.mailer.host }
|
|
||||||
# Precompile all "page" files, it needs to be set here so the proper env is setup
|
|
||||||
config.assets.precompile << Proc.new do |path|
|
|
||||||
if path =~ /.*page\.(css|js)/
|
|
||||||
puts "Compiling asset: " + path
|
|
||||||
true
|
|
||||||
else
|
|
||||||
false
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Enable threaded mode
|
|
||||||
# config.threadsafe!
|
|
||||||
|
|
||||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||||
# the I18n.default_locale when a translation can not be found)
|
# the I18n.default_locale when a translation cannot be found).
|
||||||
config.i18n.fallbacks = true
|
config.i18n.fallbacks = true
|
||||||
|
|
||||||
# Send deprecation notices to registered listeners
|
# Send deprecation notices to registered listeners.
|
||||||
config.active_support.deprecation = :notify
|
config.active_support.deprecation = :notify
|
||||||
|
|
||||||
# Log the query plan for queries taking more than this (works
|
# Disable automatic flushing of the log to improve performance.
|
||||||
# with SQLite, MySQL, and PostgreSQL)
|
# config.autoflush_log = false
|
||||||
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
||||||
|
|
||||||
config.assets.compile = false
|
# Use default logging formatter so that PID and timestamp are not suppressed.
|
||||||
|
config.log_formatter = ::Logger::Formatter.new
|
||||||
|
|
||||||
config.threadsafe!
|
# Do not dump schema after migrations.
|
||||||
config.dependency_loading = true if $rails_rake_task
|
config.active_record.dump_schema_after_migration = false
|
||||||
# Compress json
|
|
||||||
# config.middleware.use Rack::Deflater
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
Commitchange::Application.configure do
|
Rails.application.configure do
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
# Settings specified here will take precedence over those in config/application.rb
|
||||||
|
|
||||||
# Code is not reloaded between requests
|
# Code is not reloaded between requests
|
||||||
|
|
|
@ -1,55 +1,42 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
Rails.application.configure do
|
||||||
Commitchange::Application.configure do
|
# Settings specified here will take precedence over those in config/application.rb.
|
||||||
# Settings specified here will take precedence over those in config/application.rb
|
|
||||||
|
|
||||||
# In the development environment your application's code is reloaded on
|
# The test environment is used exclusively to run your application's
|
||||||
# every request. This slows down response time but is perfect for development
|
# test suite. You never need to work with it otherwise. Remember that
|
||||||
# since you don't have to restart the web server when you make code changes.
|
# your test database is "scratch space" for the test suite and is wiped
|
||||||
config.cache_classes = false
|
# and recreated between test runs. Don't rely on the data there!
|
||||||
|
config.cache_classes = true
|
||||||
|
|
||||||
# Log error messages when you accidentally call methods on nil.
|
# Do not eager load code on boot. This avoids loading your whole application
|
||||||
config.whiny_nils = true
|
# just for the purpose of running a single test. If you are using a tool that
|
||||||
|
# preloads Rails for running tests, you may have to set it to true.
|
||||||
|
config.eager_load = false
|
||||||
|
|
||||||
# Show full error reports and disable caching
|
# Configure static asset server for tests with Cache-Control for performance.
|
||||||
|
config.serve_static_assets = true
|
||||||
|
config.static_cache_control = 'public, max-age=3600'
|
||||||
|
|
||||||
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
# config.action_controller.perform_caching = false
|
config.action_controller.perform_caching = false
|
||||||
|
|
||||||
# Don't care if the mailer can't send
|
# Raise exceptions instead of rendering exception templates.
|
||||||
config.action_mailer.delivery_method = :test
|
config.action_dispatch.show_exceptions = false
|
||||||
config.action_mailer.raise_delivery_errors = false
|
|
||||||
config.action_mailer.default_url_options = { host: 'localhost:8080' }
|
|
||||||
|
|
||||||
# Print deprecation notices to the Rails logger
|
|
||||||
config.active_support.deprecation = :log
|
|
||||||
|
|
||||||
# Only use best-standards-support built into browsers
|
|
||||||
config.action_dispatch.best_standards_support = :builtin
|
|
||||||
|
|
||||||
# Raise exception on mass assignment protection for Active Record models
|
|
||||||
config.active_record.mass_assignment_sanitizer = :strict
|
|
||||||
|
|
||||||
# Log the query plan for queries taking more than this (works
|
|
||||||
# with SQLite, MySQL, and PostgreSQL)
|
|
||||||
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
|
||||||
|
|
||||||
# Do not compress assets
|
|
||||||
config.assets.compress = false
|
|
||||||
|
|
||||||
# Expands the lines which load the assets
|
|
||||||
config.assets.debug = true
|
|
||||||
|
|
||||||
config.log_level = :none
|
|
||||||
|
|
||||||
|
# Disable request forgery protection in test environment.
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
|
||||||
config.cache_store = :memory_store
|
# Tell Action Mailer not to deliver emails to the real world.
|
||||||
config.threadsafe!
|
# The :test delivery method accumulates sent emails in the
|
||||||
config.after_initialize do
|
# ActionMailer::Base.deliveries array.
|
||||||
ActiveRecord::Base.logger = nil
|
config.action_mailer.delivery_method = :test
|
||||||
ActionController::Base.logger = nil
|
|
||||||
ActionMailer::Base.logger = nil
|
# Print deprecation notices to the stderr.
|
||||||
end
|
config.active_support.deprecation = :stderr
|
||||||
|
|
||||||
|
|
||||||
|
config.action_mailer.default_url_options = {host: 'houdiniproject.test'}
|
||||||
|
|
||||||
|
# Raises error for missing translations
|
||||||
|
# config.action_view.raise_on_missing_translations = true
|
||||||
end
|
end
|
||||||
|
|
8
config/initializers/assets.rb
Normal file
8
config/initializers/assets.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Version of your assets, change this if you want to expire all your assets.
|
||||||
|
Rails.application.config.assets.version = '1.0'
|
||||||
|
|
||||||
|
# Precompile additional assets.
|
||||||
|
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
||||||
|
# Rails.application.config.assets.precompile += %w( search.js )
|
3
config/initializers/cookies_serializer.rb
Normal file
3
config/initializers/cookies_serializer.rb
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
Rails.application.config.action_dispatch.cookies_serializer = :json
|
4
config/initializers/filter_parameter_logging.rb
Normal file
4
config/initializers/filter_parameter_logging.rb
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Configure sensitive parameters which will be filtered from the log file.
|
||||||
|
Rails.application.config.filter_parameters += [:password]
|
|
@ -1,4 +1,3 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Add new inflection rules using the following format. Inflections
|
# Add new inflection rules using the following format. Inflections
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
Commitchange::Application.configure do
|
Rails.application.configure do
|
||||||
if (Rails.env != 'test')
|
if (Rails.env != 'test')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
# Add new mime types for use in respond_to blocks:
|
# Add new mime types for use in respond_to blocks:
|
||||||
# Mime::Type.register "text/richtext", :rtf
|
# Mime::Type.register "text/richtext", :rtf
|
||||||
# Mime::Type.register_alias "text/html", :iphone
|
|
||||||
|
|
|
@ -5,4 +5,4 @@
|
||||||
# If you change this key, all old signed cookies will become invalid!
|
# If you change this key, all old signed cookies will become invalid!
|
||||||
# Make sure the secret is at least 30 characters and all random,
|
# Make sure the secret is at least 30 characters and all random,
|
||||||
# no regular words or you'll be exposed to dictionary attacks.
|
# no regular words or you'll be exposed to dictionary attacks.
|
||||||
Commitchange::Application.config.secret_token = ENV.fetch('SECRET_TOKEN')
|
Rails.application.config.secret_token = ENV.fetch('SECRET_TOKEN')
|
||||||
|
|
|
@ -1,9 +1,3 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
||||||
# Be sure to restart your server when you modify this file.
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
Commitchange::Application.config.session_store ActionDispatch::Session::CacheStore, :expire_after => 4.hours
|
Rails.application.config.session_store :cookie_store, key: '_commitchange_session'
|
||||||
|
|
||||||
# Use the database for sessions instead of the cookie-based default,
|
|
||||||
# which shouldn't be used to store highly confidential information
|
|
||||||
# (create the session table with "rails generate session_migration")
|
|
||||||
# Commitchange::Application.config.session_store :active_record_store
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
timeout = Integer(ENV['WEB_TIMEOUT'] || 15)
|
# timeout = Integer(ENV['WEB_TIMEOUT'] || 15)
|
||||||
if ENV['RAILS_ENV'] == 'development' || ENV['IDE_PROCESS_DISPATCHER']
|
# if ENV['RAILS_ENV'] == 'development' || ENV['IDE_PROCESS_DISPATCHER']
|
||||||
timeout = 10000
|
# timeout = 10000
|
||||||
end
|
# end
|
||||||
|
#
|
||||||
Rack::Timeout.timeout = timeout # seconds
|
# Rack::Timeout.timeout = timeout # seconds
|
|
@ -1,5 +1,5 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
Commitchange::Application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
mount Houdini::API => '/api'
|
mount Houdini::API => '/api'
|
||||||
|
|
||||||
if Rails.env == 'development'
|
if Rails.env == 'development'
|
||||||
|
@ -196,47 +196,47 @@ Commitchange::Application.routes.draw do
|
||||||
:confirmations => 'users/confirmations'
|
:confirmations => 'users/confirmations'
|
||||||
}
|
}
|
||||||
devise_scope :user do
|
devise_scope :user do
|
||||||
match '/sign_in' => 'users/sessions#new'
|
match '/sign_in' => 'users/sessions#new', via: [:get, :post]
|
||||||
match '/signup' => 'devise/registrations#new'
|
match '/signup' => 'devise/registrations#new', via: [:get, :post]
|
||||||
post '/confirm' => 'users/confirmations#confirm'
|
post '/confirm' => 'users/confirmations#confirm', via: [:get]
|
||||||
match '/users/is_confirmed' => 'users/confirmations#is_confirmed'
|
match '/users/is_confirmed' => 'users/confirmations#is_confirmed', via: [:get, :post]
|
||||||
match '/users/exists' => 'users/confirmations#exists'
|
match '/users/exists' => 'users/confirmations#exists', via: [:get]
|
||||||
post '/users/confirm_auth', action: :confirm_auth, controller: 'users/sessions'
|
post '/users/confirm_auth', action: :confirm_auth, controller: 'users/sessions', via: [:get, :post]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Super admin
|
# Super admin
|
||||||
match '/admin' => 'super_admins#index', :as => 'admin'
|
match '/admin' => 'super_admins#index', :as => 'admin', via: [:get, :post]
|
||||||
match '/admin/search-nonprofits' => 'super_admins#search_nonprofits'
|
match '/admin/search-nonprofits' => 'super_admins#search_nonprofits', via: [:get, :post]
|
||||||
match '/admin/search-profiles' => 'super_admins#search_profiles'
|
match '/admin/search-profiles' => 'super_admins#search_profiles', via: [:get, :post]
|
||||||
match '/admin/search-fullcontact' => 'super_admins#search_fullcontact'
|
match '/admin/search-fullcontact' => 'super_admins#search_fullcontact', via: [:get, :post]
|
||||||
match '/admin/recurring-donations-without-cards' => 'super_admins#recurring_donations_without_cards'
|
match '/admin/recurring-donations-without-cards' => 'super_admins#recurring_donations_without_cards', via: [:get, :post]
|
||||||
match '/admin/export_supporters_with_rds' => 'super_admins#export_supporters_with_rds'
|
match '/admin/export_supporters_with_rds' => 'super_admins#export_supporters_with_rds', via: [:get, :post]
|
||||||
match '/admin/resend_user_confirmation' => 'super_admins#resend_user_confirmation'
|
match '/admin/resend_user_confirmation' => 'super_admins#resend_user_confirmation', via: [:get, :post]
|
||||||
|
|
||||||
# Events
|
# Events
|
||||||
match '/events' => 'events#index'
|
match '/events' => 'events#index', via: [:get]
|
||||||
match '/events/:event_slug' => 'events#show'
|
match '/events/:event_slug' => 'events#show', via: [:get, :post]
|
||||||
|
|
||||||
# Nonprofits
|
# Nonprofits
|
||||||
match ':state_code/:city/:name' => 'nonprofits#show', :as => :nonprofit_location
|
match ':state_code/:city/:name' => 'nonprofits#show', :as => :nonprofit_location, via: [:get, :post]
|
||||||
match ':state_code/:city/:name/donate' => 'nonprofits#donate', :as => :nonprofit_donation
|
match ':state_code/:city/:name/donate' => 'nonprofits#donate', :as => :nonprofit_donation, via: [:get, :post]
|
||||||
match ':state_code/:city/:name/button' => 'nonprofits/button#guided'
|
match ':state_code/:city/:name/button' => 'nonprofits/button#guided', via: [:get, :post]
|
||||||
|
|
||||||
# Campaigns
|
# Campaigns
|
||||||
match ':state_code/:city/:name/campaigns' => 'campaigns#index'
|
match ':state_code/:city/:name/campaigns' => 'campaigns#index', via: [:get, :post]
|
||||||
match ':state_code/:city/:name/campaigns/:campaign_slug' => 'campaigns#show', :as => :campaign_loc
|
match ':state_code/:city/:name/campaigns/:campaign_slug' => 'campaigns#show', via: [:get, :post]
|
||||||
match ':state_code/:city/:name/campaigns/:campaign_slug/supporters' => 'campaigns/supporters#index', :as => :campaign_loc
|
match ':state_code/:city/:name/campaigns/:campaign_slug/supporters' => 'campaigns/supporters#index', via: [:get, :post]
|
||||||
match '/peer-to-peer' => 'campaigns#peer_to_peer'
|
match '/peer-to-peer' => 'campaigns#peer_to_peer', via: [:get, :post]
|
||||||
|
|
||||||
# Events
|
# Events
|
||||||
match ':state_code/:city/:name/events' => 'events#index'
|
match ':state_code/:city/:name/events' => 'events#index', via: [:get, :post]
|
||||||
match ':state_code/:city/:name/events/:event_slug' => 'events#show'
|
match ':state_code/:city/:name/events/:event_slug' => 'events#show', via: [:get, :post]
|
||||||
match ':state_code/:city/:name/events/:event_slug/stats' => 'events#stats'
|
match ':state_code/:city/:name/events/:event_slug/stats' => 'events#stats', via: [:get, :post]
|
||||||
match ':state_code/:city/:name/events/:event_slug/tickets' => 'tickets#index'
|
match ':state_code/:city/:name/events/:event_slug/tickets' => 'tickets#index', via: [:get, :post]
|
||||||
# get '/events' => 'events#index'
|
# get '/events' => 'events#index'
|
||||||
|
|
||||||
# Dashboard
|
# Dashboard
|
||||||
match ':state_code/:city/:name/dashboard' => 'nonprofits#dashboard', as: :np_dashboard
|
match ':state_code/:city/:name/dashboard' => 'nonprofits#dashboard', as: :np_dashboard, via: [:get, :post]
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
get '/pages/wp-plugin', to: redirect('/help/wordpress-plugin') #temporary, until WP plugin updated
|
get '/pages/wp-plugin', to: redirect('/help/wordpress-plugin') #temporary, until WP plugin updated
|
||||||
|
@ -248,7 +248,7 @@ Commitchange::Application.routes.draw do
|
||||||
get '/maps/specific-npo-supporters' => 'maps#specific_npo_supporters'
|
get '/maps/specific-npo-supporters' => 'maps#specific_npo_supporters'
|
||||||
|
|
||||||
# Mailchimp Landing
|
# Mailchimp Landing
|
||||||
match '/mailchimp-landing' => 'nonprofits/nonprofit_keys#mailchimp_landing'
|
match '/mailchimp-landing' => 'nonprofits/nonprofit_keys#mailchimp_landing', via: [:get, :post]
|
||||||
|
|
||||||
# Webhooks
|
# Webhooks
|
||||||
post '/webhooks/stripe_subscription_payment' => 'webhooks#subscription_payment'
|
post '/webhooks/stripe_subscription_payment' => 'webhooks#subscription_payment'
|
||||||
|
|
22
config/secrets.yml
Normal file
22
config/secrets.yml
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Be sure to restart your server when you modify this file.
|
||||||
|
|
||||||
|
# Your secret key is used for verifying the integrity of signed cookies.
|
||||||
|
# If you change this key, all old signed cookies will become invalid!
|
||||||
|
|
||||||
|
# Make sure the secret is at least 30 characters and all random,
|
||||||
|
# no regular words or you'll be exposed to dictionary attacks.
|
||||||
|
# You can use `rake secret` to generate a secure secret key.
|
||||||
|
|
||||||
|
# Make sure the secrets in this file are kept private
|
||||||
|
# if you're sharing your code publicly.
|
||||||
|
|
||||||
|
development:
|
||||||
|
secret_key_base: 2d40128da31b5d45c2db72181b23eb1d2ca216517e033921a07febee5350179627b4ea75f898b71e2641df86ceed0e45a8a052731a1ce8420fe07d0f3840688d
|
||||||
|
|
||||||
|
test:
|
||||||
|
secret_key_base: e0cdefb8725ea588ef3d2786bbfe5b79c2394f9c2203662c246a5fbdf20aeb3ecf4ae81f27d276139c661ad7091fc0060621edba2837d55b0fe7726a2de359c6
|
||||||
|
|
||||||
|
# Do not keep production secrets in the repository,
|
||||||
|
# instead read values from the environment.
|
||||||
|
production:
|
||||||
|
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
|
@ -3,7 +3,7 @@
|
||||||
--
|
--
|
||||||
|
|
||||||
-- Dumped from database version 9.6.5
|
-- Dumped from database version 9.6.5
|
||||||
-- Dumped by pg_dump version 9.6.11
|
-- Dumped by pg_dump version 9.6.10
|
||||||
|
|
||||||
SET statement_timeout = 0;
|
SET statement_timeout = 0;
|
||||||
SET lock_timeout = 0;
|
SET lock_timeout = 0;
|
||||||
|
|
|
@ -2,4 +2,32 @@
|
||||||
module CreateCampaign
|
module CreateCampaign
|
||||||
CAMPAIGN_NAME_LENGTH_LIMIT = 60
|
CAMPAIGN_NAME_LENGTH_LIMIT = 60
|
||||||
|
|
||||||
|
|
||||||
|
# @return [Object] a json object for historical purposes
|
||||||
|
def self.create(params, nonprofit)
|
||||||
|
Time.use_zone(nonprofit.timezone || 'UTC') do
|
||||||
|
params[:campaign][:end_datetime] = Chronic.parse(params[:campaign][:end_datetime]) if params[:campaign][:end_datetime].present?
|
||||||
|
end
|
||||||
|
|
||||||
|
if !params[:campaign][:parent_campaign_id]
|
||||||
|
campaign = nonprofit.campaigns.create params[:campaign]
|
||||||
|
|
||||||
|
#do notifications
|
||||||
|
user = campaign.profile.user
|
||||||
|
Role.create(name: :campaign_editor, user_id: user.id, host: self)
|
||||||
|
CampaignMailer.delay.creation_followup(self)
|
||||||
|
NonprofitAdminMailer.delay.supporter_fundraiser(self) unless QueryRoles.is_nonprofit_user?(user.id, self.nonprofit_id)
|
||||||
|
|
||||||
|
return { errors: campaign.errors.messages }.as_json unless campaign.errors.empty?
|
||||||
|
return campaign.as_json
|
||||||
|
#json_saved campaign, 'Campaign created! Well done.'
|
||||||
|
else
|
||||||
|
profile_id = params[:campaign][:profile_id]
|
||||||
|
Profile.find(profile_id).update_attributes params[:profile]
|
||||||
|
return CreatePeerToPeerCampaign.create(params[:campaign], profile_id)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
module Email
|
module Email
|
||||||
|
|
||||||
Regex ||= /^[^ ]+@[^ ]+\.[^ ]+/i
|
Regex ||= /\A[^ ]+@[^ ]+\.[^ ]+/i
|
||||||
#PsqlRegex ||= '^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$'
|
#PsqlRegex ||= '^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+[.][A-Za-z]+$'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
describe Houdini::V1::<%= name.camelcase %>, :type => :request do
|
describe Houdini::V1::<%= name.camelcase %>, :type => :request do
|
||||||
describe :get do
|
describe 'get', :get do
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -1,18 +1,18 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
require 'rails_helper'
|
require 'rails_helper'
|
||||||
|
|
||||||
describe Houdini::V1::Nonprofit, :type => :controller do
|
describe Houdini::V1::Nonprofit, :type => :request do
|
||||||
describe :get do
|
describe 'get' do
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe :post do
|
describe 'post' do
|
||||||
around {|e|
|
around(:each) do |example|
|
||||||
@old_bp =Settings.default_bp
|
@old_bp =Settings.default_bp
|
||||||
e.run
|
example.run
|
||||||
Settings.default_bp = @old_bp
|
Settings.default_bp = @old_bp
|
||||||
|
|
||||||
}
|
end
|
||||||
def expect_validation_errors(actual, input)
|
def expect_validation_errors(actual, input)
|
||||||
expected_errors = input.with_indifferent_access[:errors]
|
expected_errors = input.with_indifferent_access[:errors]
|
||||||
expect(actual["errors"]).to match_array expected_errors
|
expect(actual["errors"]).to match_array expected_errors
|
||||||
|
@ -47,7 +47,7 @@ describe Houdini::V1::Nonprofit, :type => :controller do
|
||||||
}.with_indifferent_access
|
}.with_indifferent_access
|
||||||
}
|
}
|
||||||
describe 'authorization' do
|
describe 'authorization' do
|
||||||
around {|e|
|
around(:each) {|e|
|
||||||
Rails.configuration.action_controller.allow_forgery_protection = true
|
Rails.configuration.action_controller.allow_forgery_protection = true
|
||||||
e.run
|
e.run
|
||||||
Rails.configuration.action_controller.allow_forgery_protection = false
|
Rails.configuration.action_controller.allow_forgery_protection = false
|
||||||
|
|
|
@ -11,14 +11,14 @@ describe CampaignGiftOptionsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_campaign_editor, :put, :update, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_campaign_editor, :put, :update, nonprofit_id: :__our_np, campaign_id: :__our_campaign, id: "1"
|
||||||
end
|
end
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_campaign_editor, :delete, :destroy, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_campaign_editor, :delete, :destroy, nonprofit_id: :__our_np, campaign_id: :__our_campaign, id: "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update_order' do
|
describe 'update_order' do
|
||||||
include_context :open_to_campaign_editor, :put, :update_order, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_campaign_editor, :put, :update_order, nonprofit_id: :__our_np, campaign_id: :__our_campaign, id: "1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ describe CampaignGiftOptionsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np, campaign_id: :__our_campaign, id: "1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -15,15 +15,15 @@ describe CampaignsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'duplicate' do
|
describe 'duplicate' do
|
||||||
include_context :open_to_confirmed_users, :post, :duplicate, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_confirmed_users, :post, :duplicate, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_campaign_editor, :put, :update, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_campaign_editor, :put, :update, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'soft_delete' do
|
describe 'soft_delete' do
|
||||||
include_context :open_to_campaign_editor, :delete, :soft_delete, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_campaign_editor, :delete, :soft_delete, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -33,33 +33,34 @@ describe CampaignsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'activities' do
|
describe 'activities' do
|
||||||
include_context :open_to_all, :get, :activities, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_all, :get, :activities, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'metrics' do
|
describe 'metrics' do
|
||||||
include_context :open_to_all, :get, :metrics, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_all, :get, :metrics, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'timeline' do
|
describe 'timeline' do
|
||||||
include_context :open_to_all, :get, :timeline, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_all, :get, :timeline, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'totals' do
|
describe 'totals' do
|
||||||
include_context :open_to_all, :get, :totals, nonprofit_id: :__our_np, campaign_id: :__our_campaign
|
include_context :open_to_all, :get, :totals, nonprofit_id: :__our_np, id: :__our_campaign
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'peer_to_peer' do
|
describe 'peer_to_peer' do
|
||||||
include_context :open_to_all, :get, :peer_to_peer, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :peer_to_peer, nonprofit_id: :__our_np
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
describe 'routes' do
|
||||||
|
it "routes campaigns#index" do
|
||||||
|
expect(:get => "/nonprofits/5/campaigns/4").to(route_to(:controller => "campaigns", :action => "show", nonprofit_id: "5", id: "4"))
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -11,11 +11,11 @@ describe EventDiscountsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_event_editor, :put, :update, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :put, :update, nonprofit_id: :__our_np, event_id: :__our_event, id: '2'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_event_editor, :delete, :destroy, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :delete, :destroy, nonprofit_id: :__our_np, event_id: :__our_event, id: '2'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ describe EventDiscountsController, :type => :controller do
|
||||||
|
|
||||||
describe 'open to all' do
|
describe 'open to all' do
|
||||||
describe 'index' do
|
describe 'index' do
|
||||||
include_context :open_to_all, :get, :index, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_all, :get, :index, nonprofit_id: :__our_np, event_id: :__our_event, id: "2"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,19 +6,19 @@ describe EventsController, :type => :controller do
|
||||||
describe 'authorization' do
|
describe 'authorization' do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
describe 'create' do
|
describe 'create' do
|
||||||
include_context :open_to_event_editor, :post, :create, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :post, :create, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_event_editor, :put, :update, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :put, :update, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
describe 'duplicate' do
|
describe 'duplicate' do
|
||||||
include_context :open_to_event_editor, :post, :duplicate, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :post, :duplicate, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
describe 'soft_delete' do
|
describe 'soft_delete' do
|
||||||
include_context :open_to_event_editor, :delete, :soft_delete, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :delete, :soft_delete, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
describe 'stats' do
|
describe 'stats' do
|
||||||
include_context :open_to_event_editor, :get, :stats, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :get, :stats, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'name_and_id' do
|
describe 'name_and_id' do
|
||||||
|
@ -36,14 +36,14 @@ describe EventsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'activities' do
|
describe 'activities' do
|
||||||
include_context :open_to_all, :get, :activities, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :activities, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
describe 'metrics' do
|
describe 'metrics' do
|
||||||
include_context :open_to_all, :get, :metrics, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :metrics, nonprofit_id: :__our_np, id: :__our_event
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ describe Nonprofits::ActivitiesController, :type => :controller do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
describe 'rejects unauthorized users' do
|
describe 'rejects unauthorized users' do
|
||||||
describe 'get' do
|
describe 'get' do
|
||||||
include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :index, id: :__our_np
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,7 +14,7 @@ describe Nonprofits::CustomFieldMastersController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -10,11 +10,11 @@ describe Nonprofits::CustomFieldJoinsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'modify' do
|
describe 'modify' do
|
||||||
include_context :open_to_np_associate, :post, :modify, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :post, :modify, nonprofit_id: :__our_np, id: "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: "1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -9,14 +9,14 @@ describe Nonprofits::DonationsController, :type => :controller do
|
||||||
describe 'rejects unauthenticated users' do
|
describe 'rejects unauthenticated users' do
|
||||||
describe 'index' do
|
describe 'index' do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :index, nonprofit_id: :__our_np, id: "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np, id: "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ describe Nonprofits::DonationsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'follow up' do
|
describe 'follow up' do
|
||||||
include_context :open_to_all, :put, :followup, nonprofit_id: :__our_np
|
include_context :open_to_all, :put, :followup, nonprofit_id: :__our_np, id: "1"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -14,15 +14,15 @@ describe Nonprofits::PaymentsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show payments' do
|
describe 'show payments' do
|
||||||
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy payment' do
|
describe 'destroy payment' do
|
||||||
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -14,7 +14,7 @@ describe Nonprofits::PayoutsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,15 +14,15 @@ describe Nonprofits::RecurringDonationsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -14,23 +14,23 @@ describe Nonprofits::SupportersController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :show, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'email_address' do
|
describe 'email_address' do
|
||||||
include_context :open_to_np_associate, :get, :email_address, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :email_address, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'full_contact' do
|
describe 'full_contact' do
|
||||||
include_context :open_to_np_associate, :get, :full_contact, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :full_contact, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'info_card' do
|
describe 'info_card' do
|
||||||
include_context :open_to_np_associate, :get, :info_card, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :info_card, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'bulk_delete' do
|
describe 'bulk_delete' do
|
||||||
|
|
|
@ -10,11 +10,11 @@ describe Nonprofits::TagJoinsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'modify' do
|
describe 'modify' do
|
||||||
include_context :open_to_np_associate, :post, :modify, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :post, :modify, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ describe Nonprofits::TagMastersController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,54 +7,47 @@ describe NonprofitsController, :type => :controller do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
describe 'rejects unauthorized users' do
|
describe 'rejects unauthorized users' do
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_np_associate, :put, :update, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :put, :update, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'dashboard' do
|
describe 'dashboard' do
|
||||||
include_context :open_to_np_associate, :get, :dashboard, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :dashboard, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'dashboard_metrics' do
|
describe 'dashboard_metrics' do
|
||||||
include_context :open_to_np_associate, :get, :dashboard_metrics, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :dashboard_metrics, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'verify_identity' do
|
describe 'verify_identity' do
|
||||||
include_context :open_to_np_associate, :put, :verify_identity, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :put, :verify_identity, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'recurring_donation_stats' do
|
describe 'recurring_donation_stats' do
|
||||||
include_context :open_to_np_associate, :get, :recurring_donation_stats, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :recurring_donation_stats, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'profile_todos' do
|
describe 'profile_todos' do
|
||||||
include_context :open_to_np_associate, :get, :profile_todos, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :profile_todos, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'dashboard_todos' do
|
describe 'dashboard_todos' do
|
||||||
include_context :open_to_np_associate, :get, :dashboard_todos, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :dashboard_todos, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'payment_history' do
|
describe 'payment_history' do
|
||||||
include_context :open_to_np_associate, :get, :payment_history, nonprofit_id: :__our_np
|
include_context :open_to_np_associate, :get, :payment_history, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_super_admin, :delete, :destroy
|
include_context :open_to_super_admin, :delete, :destroy, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'open to all' do
|
describe 'open to all' do
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :show, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'create' do
|
describe 'create' do
|
||||||
|
@ -62,19 +55,19 @@ describe NonprofitsController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'btn' do
|
describe 'btn' do
|
||||||
include_context :open_to_all, :get, :btn, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :btn, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'supporter_form' do
|
describe 'supporter_form' do
|
||||||
include_context :open_to_all, :get, :supporter_form, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :supporter_form, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'custom_supporter' do
|
describe 'custom_supporter' do
|
||||||
include_context :open_to_all, :post, :custom_supporter, nonprofit_id: :__our_np
|
include_context :open_to_all, :post, :custom_supporter, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'donate' do
|
describe 'donate' do
|
||||||
include_context :open_to_all, :get, :donate, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :donate, id: :__our_np
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'search' do
|
describe 'search' do
|
||||||
|
|
|
@ -21,7 +21,7 @@ describe ProfilesController, :type => :controller do
|
||||||
|
|
||||||
describe 'open to all' do
|
describe 'open to all' do
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :show, id: :__our_np
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,22 +7,20 @@ describe RecurringDonationsController, :type => :controller do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
describe 'open to all (note: edit token is checked inside methods)' do
|
describe 'open to all (note: edit token is checked inside methods)' do
|
||||||
describe 'edit' do
|
describe 'edit' do
|
||||||
include_context :open_to_all, :get, :edit, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :edit, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_all, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_all, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_all, :put, :update, nonprofit_id: :__our_np
|
include_context :open_to_all, :put, :update, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'update_amount' do
|
describe 'update_amount' do
|
||||||
include_context :open_to_all, :put, :update_amount, nonprofit_id: :__our_np
|
include_context :open_to_all, :put, :update_amount, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
|
@ -11,7 +11,7 @@ describe RolesController, :type => :controller do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_np_admin, :delete, :destroy, nonprofit_id: :__our_np
|
include_context :open_to_np_admin, :delete, :destroy, nonprofit_id: :__our_np, id: '1'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,27 +7,27 @@ describe TicketLevelsController, :type => :controller do
|
||||||
include_context :shared_user_context
|
include_context :shared_user_context
|
||||||
describe 'rejects unauthorized users' do
|
describe 'rejects unauthorized users' do
|
||||||
describe 'create' do
|
describe 'create' do
|
||||||
include_context :open_to_event_editor, :post, :create, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :post, :create, nonprofit_id: :__our_np, event_id: :__our_event, id: "1"
|
||||||
end
|
end
|
||||||
describe 'update' do
|
describe 'update' do
|
||||||
include_context :open_to_event_editor, :put, :update, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :put, :update, nonprofit_id: :__our_np, event_id: :__our_event, id: "1"
|
||||||
end
|
end
|
||||||
describe 'update_order' do
|
describe 'update_order' do
|
||||||
include_context :open_to_event_editor, :put, :update_order, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :put, :update_order, nonprofit_id: :__our_np, event_id: :__our_event
|
||||||
end
|
end
|
||||||
describe 'destroy' do
|
describe 'destroy' do
|
||||||
include_context :open_to_event_editor, :delete, :destroy, nonprofit_id: :__our_np, event_id: :__our_event
|
include_context :open_to_event_editor, :delete, :destroy, nonprofit_id: :__our_np, event_id: :__our_event, id: "1"
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'open to all' do
|
describe 'open to all' do
|
||||||
describe 'show' do
|
describe 'show' do
|
||||||
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :show, nonprofit_id: :__our_np, event_id: :__our_event, id: '2'
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'index' do
|
describe 'index' do
|
||||||
include_context :open_to_all, :get, :index, nonprofit_id: :__our_np
|
include_context :open_to_all, :get, :index, nonprofit_id: :__our_np, event_id: :__our_event
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
8
spec/lib/create/create_campaign_spec.rb
Normal file
8
spec/lib/create/create_campaign_spec.rb
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
describe CreateCampaign do
|
||||||
|
it 'is untested' do
|
||||||
|
pending 'add tests here'
|
||||||
|
end
|
||||||
|
end
|
|
@ -3,7 +3,7 @@ require 'rails_helper'
|
||||||
|
|
||||||
describe QueryDonations do
|
describe QueryDonations do
|
||||||
|
|
||||||
describe :campaign_export do
|
describe 'campaign_export' do
|
||||||
let(:nonprofit) {force_create(:nonprofit)}
|
let(:nonprofit) {force_create(:nonprofit)}
|
||||||
let(:supporter) {force_create(:supporter)}
|
let(:supporter) {force_create(:supporter)}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue