Skip to content

Commit

Permalink
build: Update chrono_model
Browse files Browse the repository at this point in the history
  • Loading branch information
roschaefer committed Sep 9, 2020
1 parent 5ab01a0 commit 1ecfb51
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ DEPENDENCIES
capistrano-rails
capybara
childprocess
chrono_model (<= 0.12.1)
chrono_model
cucumber
database_cleaner
factory_bot_rails
Expand Down
2 changes: 1 addition & 1 deletion backend/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source 'https://rubygems.org'
gem 'active_model_serializers'
gem 'arel'
gem 'cancancan'
gem 'chrono_model', '<= 0.12.1'
gem 'chrono_model'
gem 'geocoder'
gem 'globalize', git: 'https://github.com/globalize/globalize'
gem 'globalize-accessors'
Expand Down
6 changes: 3 additions & 3 deletions backend/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ GEM
case_transform (0.2)
activesupport
choice (0.2.0)
chrono_model (0.12.1)
activerecord (>= 4.2.0, < 5.2.0)
chrono_model (1.2.2)
activerecord (>= 5.0.0)
multi_json
pg
coderay (1.1.2)
Expand Down Expand Up @@ -356,7 +356,7 @@ DEPENDENCIES
capistrano
capistrano-db-tasks!
capistrano-rails
chrono_model (<= 0.12.1)
chrono_model
factory_bot_rails
geocoder
globalize!
Expand Down
7 changes: 7 additions & 0 deletions backend/db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
# Character.create(name: 'Luke', movie: movies.first)

# avoid after_commit error when creating broadcasts

# to make amend_period! available
require 'chrono_model/utilities'
ActiveRecord::Base.instance_eval do
extend ChronoModel::Utilities
end

Scenic.database.refresh_materialized_view(:statistic_broadcasts, cascade: false)

tv = Medium.create!(id: 0, name_de: 'TV', name_en: 'TV')
Expand Down
6 changes: 6 additions & 0 deletions backend/spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
require 'rspec/rails'
require 'vcr'
require 'json_matchers/rspec'
# to make amend_period! available
require 'chrono_model/utilities'
ActiveRecord::Base.instance_eval do
extend ChronoModel::Utilities
end

# Add additional requires below this line. Rails is not loaded until this point!

# Requires supporting ruby files with custom matchers and macros, etc, in
Expand Down

0 comments on commit 1ecfb51

Please sign in to comment.