diff --git a/.ruby-version b/.ruby-version index 5859406..437459c 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -2.2.3 +2.5.0 diff --git a/.travis.yml b/.travis.yml index 38b8007..415bb59 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,12 @@ language: ruby -rvm: 2.2.3 +cache: bundler +rvm: 2.5.0 sudo: false +before_install: + - gem update --system + - gem --version before_script: - - "bundle exec rake db:migrate" + - RAILS_ENV=test bundle exec rake db:create db:schema:load notifications: email: - me@svenfuchs.com diff --git a/Gemfile b/Gemfile index 7bd8c1d..11c0e34 100644 --- a/Gemfile +++ b/Gemfile @@ -1,17 +1,17 @@ source 'https://rubygems.org' -ruby '2.2.3' +ruby '2.5.0' gem 'rails', '~> 4.2' -gem 'stripe', git: 'https://github.com/stripe/stripe-ruby' +gem 'stripe' gem 'slim' gem 'simple_form' gem 'country_select' -gem 'gravatar-ultimate' gem 'hashr' gem 'simple_statistics' -gem 'rollbar', '~> 2.7.1' +gem 'sentry-raven' +gem 'puma' # for attr_accessible # TODO: This gem won't be updated for Rails 5, so any usage of attr_accessible must be updated before upgrading @@ -19,7 +19,6 @@ gem 'protected_attributes' group :development do gem 'quiet_assets' - gem 'thin' end group :test do @@ -28,13 +27,12 @@ group :test do end group :production do - gem 'pg' - gem 'unicorn' + gem 'pg', '< 1.0' end group :development, :test do gem 'rspec-rails' - gem 'sqlite3' + gem 'pg', '< 1.0' end gem 'sass-rails' @@ -42,7 +40,3 @@ gem 'coffee-rails' gem 'uglifier' gem 'jquery-rails' - -# Needs to be available on Hoerku for running `rails console` -# TODO: Remove me after upgrading to Rails 4 -gem 'test-unit' diff --git a/Gemfile.lock b/Gemfile.lock index 650406d..cec9f59 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,214 +1,195 @@ -GIT - remote: https://github.com/stripe/stripe-ruby - revision: eda056b9f62ef3631a158e8b8d141a9590b813e6 - specs: - stripe (1.36.0) - rest-client (~> 1.4) - GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.5.1) - actionpack (= 4.2.5.1) - actionview (= 4.2.5.1) - activejob (= 4.2.5.1) + actionmailer (4.2.10) + actionpack (= 4.2.10) + actionview (= 4.2.10) + activejob (= 4.2.10) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.5.1) - actionview (= 4.2.5.1) - activesupport (= 4.2.5.1) + actionpack (4.2.10) + actionview (= 4.2.10) + activesupport (= 4.2.10) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.5.1) - activesupport (= 4.2.5.1) + actionview (4.2.10) + activesupport (= 4.2.10) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - activejob (4.2.5.1) - activesupport (= 4.2.5.1) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (4.2.10) + activesupport (= 4.2.10) globalid (>= 0.3.0) - activemodel (4.2.5.1) - activesupport (= 4.2.5.1) + activemodel (4.2.10) + activesupport (= 4.2.10) builder (~> 3.1) - activerecord (4.2.5.1) - activemodel (= 4.2.5.1) - activesupport (= 4.2.5.1) + activerecord (4.2.10) + activemodel (= 4.2.10) + activesupport (= 4.2.10) arel (~> 6.0) - activesupport (4.2.5.1) + activesupport (4.2.10) i18n (~> 0.7) - json (~> 1.7, >= 1.7.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - addressable (2.4.0) - arel (6.0.3) - builder (3.2.2) - capybara (2.6.2) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + arel (6.0.4) + builder (3.2.3) + capybara (2.18.0) addressable - mime-types (>= 1.16) + mini_mime (>= 0.1.3) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) - xpath (~> 2.0) - coffee-rails (4.1.1) + xpath (>= 2.0, < 4.0) + coffee-rails (4.2.2) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.1.x) + railties (>= 4.0.0) coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.10.0) - concurrent-ruby (1.0.0) - countries (1.2.5) - currencies (~> 0.4.2) - i18n_data (~> 0.7.0) - country_select (2.5.1) - countries (~> 1.2.0) + coffee-script-source (1.12.2) + concurrent-ruby (1.0.5) + countries (2.1.4) + i18n_data (~> 0.8.0) + money (~> 6.9) + sixarm_ruby_unaccent (~> 1.1) + unicode_utils (~> 1.4) + country_select (3.1.1) + countries (~> 2.0) sort_alphabetical (~> 1.0) - currencies (0.4.2) - daemons (1.2.3) - diff-lcs (1.2.5) - domain_name (0.5.20160128) - unf (>= 0.0.5, < 1.0.0) + crass (1.0.3) + diff-lcs (1.3) erubis (2.7.0) - eventmachine (1.0.9.1) - execjs (2.6.0) - globalid (0.3.6) - activesupport (>= 4.1.0) - gravatar-ultimate (2.0.0) - activesupport (>= 2.3.14) - rack - hashr (2.0.0) - http-cookie (1.0.2) - domain_name (~> 0.5) - i18n (0.7.0) - i18n_data (0.7.0) - jquery-rails (4.1.0) - rails-dom-testing (~> 1.0) + execjs (2.7.0) + faraday (0.14.0) + multipart-post (>= 1.2, < 3) + ffi (1.9.21) + globalid (0.4.1) + activesupport (>= 4.2.0) + hashr (2.0.1) + i18n (0.9.5) + concurrent-ruby (~> 1.0) + i18n_data (0.8.0) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.3) - kgio (2.10.0) - loofah (2.0.3) + loofah (2.2.0) + crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.3) - mime-types (>= 1.16, < 3) - mime-types (2.99) - mini_portile2 (2.0.0) - minitest (5.8.4) - multi_json (1.11.2) - netrc (0.11.0) - nokogiri (1.6.7.2) - mini_portile2 (~> 2.0.0.rc2) - pg (0.18.4) - power_assert (0.2.7) - protected_attributes (1.1.3) + mail (2.7.0) + mini_mime (>= 0.1.1) + mini_mime (1.0.0) + mini_portile2 (2.3.0) + minitest (5.11.3) + money (6.10.1) + i18n (>= 0.6.4, < 1.0) + multipart-post (2.0.0) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) + pg (0.21.0) + protected_attributes (1.1.4) activemodel (>= 4.0.1, < 5.0) + public_suffix (3.0.2) + puma (3.11.2) quiet_assets (1.1.0) railties (>= 3.1, < 5.0) - rack (1.6.4) + rack (1.6.8) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.5.1) - actionmailer (= 4.2.5.1) - actionpack (= 4.2.5.1) - actionview (= 4.2.5.1) - activejob (= 4.2.5.1) - activemodel (= 4.2.5.1) - activerecord (= 4.2.5.1) - activesupport (= 4.2.5.1) + rails (4.2.10) + actionmailer (= 4.2.10) + actionpack (= 4.2.10) + actionview (= 4.2.10) + activejob (= 4.2.10) + activemodel (= 4.2.10) + activerecord (= 4.2.10) + activesupport (= 4.2.10) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.5.1) + railties (= 4.2.10) sprockets-rails rails-deprecated_sanitizer (1.0.3) activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.7) - activesupport (>= 4.2.0.beta, < 5.0) - nokogiri (~> 1.6.0) + rails-dom-testing (1.0.9) + activesupport (>= 4.2.0, < 5.0) + nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) rails-html-sanitizer (1.0.3) loofah (~> 2.0) - railties (4.2.5.1) - actionpack (= 4.2.5.1) - activesupport (= 4.2.5.1) + railties (4.2.10) + actionpack (= 4.2.10) + activesupport (= 4.2.10) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - raindrops (0.15.0) - rake (10.5.0) - rest-client (1.8.0) - http-cookie (>= 1.0.2, < 2.0) - mime-types (>= 1.16, < 3.0) - netrc (~> 0.7) - rollbar (2.7.1) - multi_json - rspec-core (3.4.3) - rspec-support (~> 3.4.0) - rspec-expectations (3.4.0) + rake (12.3.0) + rb-fsevent (0.10.2) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + rspec-core (3.7.1) + rspec-support (~> 3.7.0) + rspec-expectations (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-mocks (3.4.1) + rspec-support (~> 3.7.0) + rspec-mocks (3.7.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.4.0) - rspec-rails (3.4.2) - actionpack (>= 3.0, < 4.3) - activesupport (>= 3.0, < 4.3) - railties (>= 3.0, < 4.3) - rspec-core (~> 3.4.0) - rspec-expectations (~> 3.4.0) - rspec-mocks (~> 3.4.0) - rspec-support (~> 3.4.0) - rspec-support (3.4.1) - sass (3.4.21) - sass-rails (5.0.4) - railties (>= 4.0.0, < 5.0) + rspec-support (~> 3.7.0) + rspec-rails (3.7.2) + actionpack (>= 3.0) + activesupport (>= 3.0) + railties (>= 3.0) + rspec-core (~> 3.7.0) + rspec-expectations (~> 3.7.0) + rspec-mocks (~> 3.7.0) + rspec-support (~> 3.7.0) + rspec-support (3.7.1) + sass (3.5.5) + sass-listen (~> 4.0.0) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + sass-rails (5.0.7) + railties (>= 4.0.0, < 6) sass (~> 3.1) sprockets (>= 2.8, < 4.0) sprockets-rails (>= 2.0, < 4.0) tilt (>= 1.1, < 3) - simple_form (3.2.1) - actionpack (> 4, < 5.1) - activemodel (> 4, < 5.1) + sentry-raven (2.7.2) + faraday (>= 0.7.6, < 1.0) + simple_form (3.5.1) + actionpack (> 4, < 5.2) + activemodel (> 4, < 5.2) simple_statistics (0.12) - slim (3.0.6) - temple (~> 0.7.3) + sixarm_ruby_unaccent (1.2.0) + slim (3.0.9) + temple (>= 0.7.6, < 0.9) tilt (>= 1.3.3, < 2.1) - sort_alphabetical (1.0.2) + sort_alphabetical (1.1.0) unicode_utils (>= 1.2.2) - sprockets (3.5.2) + sprockets (3.7.1) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.0.1) + sprockets-rails (3.2.1) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.3.11) - temple (0.7.6) - test-unit (3.1.7) - power_assert - thin (1.6.4) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (~> 1.0) - thor (0.19.1) - thread_safe (0.3.5) - tilt (2.0.2) - tzinfo (1.2.2) + stripe (3.9.2) + faraday (~> 0.10) + temple (0.8.0) + thor (0.20.0) + thread_safe (0.3.6) + tilt (2.0.8) + tzinfo (1.2.5) thread_safe (~> 0.1) - uglifier (2.7.2) - execjs (>= 0.3.0) - json (>= 1.8.0) - unf (0.1.4) - unf_ext - unf_ext (0.0.7.2) + uglifier (4.1.6) + execjs (>= 0.3.0, < 3) unicode_utils (1.4.0) - unicorn (5.0.1) - kgio (~> 2.6) - rack - raindrops (~> 0.7) - xpath (2.0.0) - nokogiri (~> 1.3) + xpath (3.0.0) + nokogiri (~> 1.8) PLATFORMS ruby @@ -217,29 +198,25 @@ DEPENDENCIES capybara coffee-rails country_select - gravatar-ultimate hashr jquery-rails - pg + pg (< 1.0) protected_attributes + puma quiet_assets rails (~> 4.2) rake - rollbar (~> 2.7.1) rspec-rails sass-rails + sentry-raven simple_form simple_statistics slim - sqlite3 - stripe! - test-unit - thin + stripe uglifier - unicorn RUBY VERSION - ruby 2.2.3p173 + ruby 2.5.0p0 BUNDLED WITH - 1.13.7 + 1.16.1 diff --git a/app/models/donation.rb b/app/models/donation.rb index d9b6414..06abd2c 100644 --- a/app/models/donation.rb +++ b/app/models/donation.rb @@ -1,5 +1,4 @@ require 'csv' -require 'gravatar-ultimate' class Donation < ActiveRecord::Base attr_accessible :stripe_card_token, :stripe_customer_id, :package, :amount, :vat_id, :add_vat, :display, :hide, diff --git a/config/database.yml b/config/database.yml index 055003d..676bf4a 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,14 +1,13 @@ development: - adapter: sqlite3 - database: db/development.sqlite3 - pool: 5 - timeout: 5000 + adapter: postgresql + database: rgsoc_campaign_development + host: localhost test: - adapter: sqlite3 - database: db/test.sqlite3 - pool: 5 - timeout: 5000 + adapter: postgresql + database: rgsoc_campaign_test + host: localhost + min_messages: error production: adapter: postgresql diff --git a/config/initializers/rollbar.rb b/config/initializers/rollbar.rb deleted file mode 100644 index 63c0038..0000000 --- a/config/initializers/rollbar.rb +++ /dev/null @@ -1,57 +0,0 @@ -Rollbar.configure do |config| - # Without configuration, Rollbar is enabled in all environments. - # To disable in specific environments, set config.enabled=false. - - config.access_token = 'ada7fcdb29e04ab7b50e21950576e176' - - # Here we'll disable in 'test': - unless Rails.env.production? - config.enabled = false - end - - # By default, Rollbar will try to call the `current_user` controller method - # to fetch the logged-in user object, and then call that object's `id`, - # `username`, and `email` methods to fetch those properties. To customize: - # config.person_method = "my_current_user" - # config.person_id_method = "my_id" - # config.person_username_method = "my_username" - # config.person_email_method = "my_email" - - # If you want to attach custom data to all exception and message reports, - # provide a lambda like the following. It should return a hash. - # config.custom_data_method = lambda { {:some_key => "some_value" } } - - # Add exception class names to the exception_level_filters hash to - # change the level that exception is reported at. Note that if an exception - # has already been reported and logged the level will need to be changed - # via the rollbar interface. - # Valid levels: 'critical', 'error', 'warning', 'info', 'debug', 'ignore' - # 'ignore' will cause the exception to not be reported at all. - # config.exception_level_filters.merge!('MyCriticalException' => 'critical') - # - # You can also specify a callable, which will be called with the exception instance. - # config.exception_level_filters.merge!('MyCriticalException' => lambda { |e| 'critical' }) - - # Enable asynchronous reporting (uses girl_friday or Threading if girl_friday - # is not installed) - # config.use_async = true - # Supply your own async handler: - # config.async_handler = Proc.new { |payload| - # Thread.new { Rollbar.process_from_async_handler(payload) } - # } - - # Enable asynchronous reporting (using sucker_punch) - # config.use_sucker_punch - - # Enable delayed reporting (using Sidekiq) - # config.use_sidekiq - # You can supply custom Sidekiq options: - # config.use_sidekiq 'queue' => 'default' - - # If you run your staging application instance in production environment then - # you'll want to override the environment reported by `Rails.env` with an - # environment variable like this: `ROLLBAR_ENV=staging`. This is a recommended - # setup for Heroku. See: - # https://devcenter.heroku.com/articles/deploying-to-a-custom-rails-environment - config.environment = ENV['ROLLBAR_ENV'] || Rails.env -end diff --git a/config/initializers/sentry.rb b/config/initializers/sentry.rb new file mode 100644 index 0000000..b26a17d --- /dev/null +++ b/config/initializers/sentry.rb @@ -0,0 +1,3 @@ +Raven.configure do |config| + config.environments = %w[production] +end diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 0000000..66d71d3 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,56 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. + +preload_app! + +# If you are preloading your application and using Active Record, it's +# recommended that you close any connections to the database before workers +# are forked to prevent connection leakage. +# +# before_fork do +# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) +# end + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted, this block will be run. If you are using the `preload_app!` +# option, you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, as Ruby +# cannot share connections between processes. + +on_worker_boot do + ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +end + + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/config/unicorn.rb b/config/unicorn.rb deleted file mode 100644 index b3d0b3f..0000000 --- a/config/unicorn.rb +++ /dev/null @@ -1,15 +0,0 @@ -# http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/ - -worker_processes 3 # amount of unicorn workers to spin up -timeout 30 # restarts workers that hang for 15 seconds - -preload_app true - -before_fork do |server, worker| - ActiveRecord::Base.connection.disconnect! if defined?(ActiveRecord::Base) -end - -after_fork do |server, worker| - ActiveRecord::Base.establish_connection if defined?(ActiveRecord::Base) -end - diff --git a/db/schema.rb b/db/schema.rb index a80a1ff..eaabc29 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,11 +9,14 @@ # from scratch. The latter is a flawed and unsustainable approach (the more migrations # you'll amass, the slower it'll run and the greater likelihood for issues). # -# It's strongly recommended to check this file into your version control system. +# It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(:version => 20130608165215) do +ActiveRecord::Schema.define(version: 20130608165215) do - create_table "applications", :force => true do |t| + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "applications", force: :cascade do |t| t.string "timestamp" t.string "student_name" t.string "student_email" @@ -21,9 +24,9 @@ t.string "pair_email" t.string "living_costs" t.text "data" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false - t.boolean "hidden", :default => false + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "hidden", default: false t.string "sponsor_pick" t.string "country" t.integer "min_living" @@ -32,17 +35,17 @@ t.string "comment" end - add_index "applications", ["timestamp"], :name => "index_applications_on_timestamp" + add_index "applications", ["timestamp"], name: "index_applications_on_timestamp", using: :btree - create_table "comments", :force => true do |t| + create_table "comments", force: :cascade do |t| t.integer "application_id" t.string "author_name" t.text "text" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end - create_table "donations", :force => true do |t| + create_table "donations", force: :cascade do |t| t.string "stripe_card_token" t.string "stripe_customer_id" t.string "package" @@ -59,19 +62,19 @@ t.string "twitter_handle" t.string "github_handle" t.string "homepage" - t.boolean "display", :default => true - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.boolean "display", default: true + t.datetime "created_at" + t.datetime "updated_at" t.text "comment" t.string "gravatar_url" end - create_table "ratings", :force => true do |t| + create_table "ratings", force: :cascade do |t| t.integer "application_id" t.string "user_name" t.text "data" - t.datetime "created_at", :null => false - t.datetime "updated_at", :null => false + t.datetime "created_at" + t.datetime "updated_at" end end diff --git a/lib/gravatar.rb b/lib/gravatar.rb new file mode 100644 index 0000000..923808c --- /dev/null +++ b/lib/gravatar.rb @@ -0,0 +1,39 @@ +# This is a drop-in replacement from the gravatar-ultimate gem +# https://github.com/sinisterchipmunk/gravatar + +class Gravatar + attr_reader :email + + def initialize(email, options = {}) + raise ArgumentError, "Expected :email" unless email + @options = options || {} + @email = email + end + + def image_url(options = {}) + secure = options[:ssl] || options[:secure] + proto = "http#{secure ? 's' : ''}" + sub = secure ? "secure" : "www" + + "#{proto}://#{sub}.gravatar.com/avatar/#{email_hash}#{extension_for_image(options)}#{query_for_image(options)}" + end + + def email_hash(email = self.email) + Digest::MD5.hexdigest(email.downcase.strip) + end + + def extension_for_image(options) + options.key?(:filetype) || options.key?(:ext) ? "." + (options[:filetype] || options[:ext] || "jpg").to_s : "" + end + + def query_for_image(options) + query = '' + [:rating, :size, :default, :forcedefault, :r, :s, :d, :f].each do |key| + if options.key?(key) + query.blank? ? query.concat("?") : query.concat("&") + query.concat("#{key}=#{CGI::escape options[key].to_s}") + end + end + query + end +end diff --git a/spec/helpers/givie_helper_spec.rb b/spec/helpers/givie_helper_spec.rb index 725913d..e7f486c 100644 --- a/spec/helpers/givie_helper_spec.rb +++ b/spec/helpers/givie_helper_spec.rb @@ -13,8 +13,9 @@ homepage: "http://www.foo.bar" }) } + before do - ENV['GIVIE_SECRET'] = "kitten sandwich is a strange project name" + ENV['GIVIE_SECRET'] = "kitten sandwich is a strange pro" end it "passes donation info as encrypted param" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 3f56cc4..1534737 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -56,5 +56,5 @@ def stub_stripe_methods allow_any_instance_of(Donation).to receive(:stripe_create_charge) end -ENV['GIVIE_SECRET']="this is the testing secret. it is not very secret" +ENV['GIVIE_SECRET'] = "this is the testing secret. it i"