Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds serialized hashie to cuetip #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
PATH
remote: .
specs:
cuetip (1.1.0)
cuetip (1.2.0)
activerecord (>= 5.0)
hashie
serialized-hashie (~> 1.1, >= 1.1.4)

GEM
remote: https://rubygems.org/
specs:
activemodel (6.0.2.1)
activesupport (= 6.0.2.1)
activerecord (6.0.2.1)
activemodel (= 6.0.2.1)
activesupport (= 6.0.2.1)
activesupport (6.0.2.1)
activemodel (6.0.3.2)
activesupport (= 6.0.3.2)
activerecord (6.0.3.2)
activemodel (= 6.0.3.2)
activesupport (= 6.0.3.2)
activesupport (6.0.3.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
concurrent-ruby (1.1.6)
zeitwerk (~> 2.2, >= 2.2.2)
concurrent-ruby (1.1.7)
diff-lcs (1.3)
hashie (4.1.0)
i18n (1.8.2)
i18n (1.8.5)
concurrent-ruby (~> 1.0)
minitest (5.14.0)
json (2.3.1)
minitest (5.14.1)
mysql2 (0.4.10)
rspec (3.9.0)
rspec-core (~> 3.9.0)
Expand All @@ -39,11 +40,14 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
serialized-hashie (1.1.4)
hashie (>= 4.0, < 5.0)
json (>= 1.8, < 3.0)
sqlite3 (1.4.2)
thread_safe (0.3.6)
tzinfo (1.2.6)
tzinfo (1.2.7)
thread_safe (~> 0.1)
zeitwerk (2.2.2)
zeitwerk (2.4.0)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion cuetip.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ Gem::Specification.new do |s|
s.authors = ['Adam Cooke']
s.email = ['[email protected]']
s.add_runtime_dependency 'activerecord', '>= 5.0'
s.add_runtime_dependency 'hashie'
s.add_runtime_dependency 'serialized-hashie', '~> 1.1', '>= 1.1.4'
end
4 changes: 2 additions & 2 deletions lib/cuetip/models/job.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# frozen_string_literal: true

require 'active_record'
require 'serialized_hashie'
require 'cuetip/models/queued_job'
require 'cuetip/serialized_hashie'

module Cuetip
module Models
Expand All @@ -14,7 +14,7 @@ class Job < ActiveRecord::Base
has_one :queued_job, class_name: 'Cuetip::Models::QueuedJob', dependent: :destroy
belongs_to :associated_object, polymorphic: true, optional: true

serialize :params, Cuetip::SerializedHashie
serialize :params, SerializedHashie::Hash

before_validation(on: :create) do
self.status = 'Pending'
Expand Down
19 changes: 0 additions & 19 deletions lib/cuetip/serialized_hashie.rb

This file was deleted.