acts_as_span 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fec6db2024d649082face6a15ed22acffb3828ca67de3c54c509f940ade832eb
4
- data.tar.gz: 67c0277e44d09fb7b5b73e4eb73327c4e8ff796109975f77f5afe42dc2120db3
3
+ metadata.gz: 59d6ed6e5f0b02d6d3683a99d62ac5f3b11ccdb5cf510f5bf1a3197e095102ff
4
+ data.tar.gz: 856975edeadab3d35def0a65e51bb6d65987fc2042cdec822d72b7c76741a9cb
5
5
  SHA512:
6
- metadata.gz: 9fbe5d893be0359e262ed8cfb5d1fc58551317d103fc07098c1d5b6f5955fc95a520129c6d0d2493fda975681a9508484bc5550e17a187af9827fc867564ccc6
7
- data.tar.gz: 9fc6775556dca3cd990b2988de635beb11311c683e4a104951faf33245b1f5b36ecdd3d66d501c57092a517e6bbba15ec181def50cbea01c6de5b50271bc377a
6
+ metadata.gz: cb1ae3e3c092a528e83d7dcb2fd9ca7d601b985eaa974b6eac1c1eb2634dc4630473dc5bfcafd548d3748a602569185cd803c2f7f6551c486dddcee1905e8205
7
+ data.tar.gz: 605657a4fb0114f18018b4aab29d9c2f9c63bf87321fe7c04ceaccb7974ad064dc4112ce3b7e5b44c8b541b65680e768e60ef54e8d43e1502ec59f27f46c797d
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.6.3
1
+ ruby 2.6.5
data/.travis.yml CHANGED
@@ -2,7 +2,11 @@ language: ruby
2
2
  rvm:
3
3
  - 2.4.5
4
4
  - 2.5.3
5
- - 2.6.1
6
- before_install: gem install bundler
5
+ - 2.6.5
6
+
7
+ # match the bundler version in the gemspec
8
+ before_install:
9
+ - gem install -v 2.1.4 bundler --no-document
10
+ - bundle _2.1.4_ install
7
11
  notifications:
8
12
  email: false
data/acts_as_span.gemspec CHANGED
@@ -1,39 +1,40 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "acts_as_span/version"
1
+ # frozen_string_Literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+ require 'acts_as_span/version'
4
5
 
5
6
  Gem::Specification.new do |s|
6
- s.name = "acts_as_span"
7
+ s.name = 'acts_as_span'
7
8
  s.version = ActsAsSpan::VERSION::STRING
8
- s.authors = ["Eric Sullivan"]
9
- s.email = ["eric.sullivan@annkissam.com"]
10
- s.homepage = "https://github.com/annkissam/acts_as_span"
9
+ s.authors = ['Eric Sullivan']
10
+ s.email = ['eric.sullivan@annkissam.com']
11
+ s.homepage = 'https://github.com/annkissam/acts_as_span'
11
12
  s.summary = ActsAsSpan::VERSION::SUMMARY
12
- s.description = %q{ActiveRecord model w/ a start_date and an end_date == ActsAsSpan}
13
- s.license = "MIT"
13
+ s.description = 'ActiveRecord model w/ a start_date and an end_date == ActsAsSpan'
14
+ s.license = 'MIT'
14
15
 
15
16
  # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
16
17
  # to allow pushing to a single host or delete this section to allow pushing to any host.
17
18
  if s.respond_to?(:metadata)
18
- s.metadata["allowed_push_host"] = "https://rubygems.org"
19
+ s.metadata['allowed_push_host'] = 'https://rubygems.org'
19
20
  else
20
- raise "RubyGems 2.0 or newer is required to protect against " \
21
- "public gem pushes."
21
+ raise 'RubyGems 2.0 or newer is required to protect against ' \
22
+ 'public gem pushes.'
22
23
  end
23
24
 
24
25
  s.files = `git ls-files`.split("\n")
25
26
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
26
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
27
- s.require_paths = ["lib"]
27
+ s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
28
+ s.require_paths = %w[lib]
28
29
 
29
- s.add_development_dependency "bundler", "~> 2.0.1"
30
- s.add_development_dependency "rake", "~> 10.0"
31
- s.add_development_dependency "rspec", "~> 3.0"
32
- s.add_development_dependency "sqlite3", "~> 1.4"
33
- s.add_development_dependency "has_siblings", "~> 0.2.7"
34
- s.add_development_dependency "temping"
35
- s.add_development_dependency "pry-byebug"
30
+ s.add_development_dependency 'bundler', '~> 2.1.4'
31
+ s.add_development_dependency 'has_siblings', '~> 0.2.7'
32
+ s.add_development_dependency 'pry-byebug'
33
+ s.add_development_dependency 'rake', '>= 12.3.3'
34
+ s.add_development_dependency 'rspec', '~> 3.0'
35
+ s.add_development_dependency 'sqlite3', '~> 1.4'
36
+ s.add_development_dependency 'temping'
36
37
 
37
- s.add_runtime_dependency('activerecord', '>= 4.2.0')
38
- s.add_runtime_dependency('activesupport', '>= 4.2.0')
38
+ s.add_runtime_dependency('activerecord', '>= 5.0.0')
39
+ s.add_runtime_dependency('activesupport', '>= 5.0.0')
39
40
  end
@@ -70,12 +70,14 @@ module ActsAsSpan
70
70
  class EndDatePropagator
71
71
  attr_reader :object,
72
72
  :errors_cache,
73
- :skipped_classes
73
+ :skipped_classes,
74
+ :include_errors
74
75
 
75
- def initialize(object, errors_cache: [], skipped_classes: [])
76
+ def initialize(object, errors_cache: [], skipped_classes: [], include_errors: true)
76
77
  @object = object
77
78
  @errors_cache = errors_cache
78
79
  @skipped_classes = skipped_classes
80
+ @include_errors = include_errors
79
81
  end
80
82
 
81
83
  # class-level call: enable the usage of ActsAsSpan::EndDatePropagator.call
@@ -88,7 +90,7 @@ module ActsAsSpan
88
90
  # only add new errors to the object
89
91
  result.errors.each do |error, message|
90
92
  unless object.errors[error].include? message
91
- object.errors[error] << message
93
+ object.errors.add(error, message: message)
92
94
  end
93
95
  end
94
96
  object
@@ -108,8 +110,13 @@ module ActsAsSpan
108
110
  save_with_errors(object, child, propagated_child)
109
111
  end
110
112
 
111
- # add just the strings, prevent ugly nested arrays in the view
112
- object.errors[:base].push(*errors_cache.flatten)
113
+ if errors_cache.present?
114
+ errors_cache.each do |message|
115
+ skip if object.errors.added?(:base, message)
116
+
117
+ object.errors.add(:base, message: message)
118
+ end
119
+ end
113
120
 
114
121
  # return the object, with any newly-added errors
115
122
  object
@@ -119,13 +126,15 @@ module ActsAsSpan
119
126
  def assign_end_date(child, new_end_date)
120
127
  child.assign_attributes({ child.span.end_field => new_end_date })
121
128
  ActsAsSpan::EndDatePropagator.call(
122
- child, errors_cache: errors_cache, skipped_classes: skipped_classes
129
+ child,
130
+ errors_cache: errors_cache,
131
+ skipped_classes: skipped_classes,
123
132
  )
124
133
  end
125
134
 
126
135
  # save the child record, add errors.
127
136
  def save_with_errors(object, child, propagated_child)
128
- if object_has_errors?(propagated_child)
137
+ if object_has_errors?(propagated_child) && include_errors
129
138
  errors_cache << propagation_error_message(object, child)
130
139
  end
131
140
  child.save
@@ -136,11 +145,11 @@ module ActsAsSpan
136
145
  'propagation_failure',
137
146
  scope: %i[activerecord errors messages end_date_propagator],
138
147
  end_date_field_name: child.class.human_attribute_name(
139
- child.span.end_field
148
+ child.span.end_field,
140
149
  ),
141
150
  parent: object.model_name.human,
142
151
  child: child.model_name.human,
143
- reason: child.errors.full_messages.join('; ')
152
+ reason: child.errors.full_messages.join('; '),
144
153
  )
145
154
  end
146
155
 
@@ -163,8 +172,7 @@ module ActsAsSpan
163
172
 
164
173
  # Use acts_as_span to determine whether a record has an end date
165
174
  def should_propagate_to?(klass)
166
- klass.respond_to?(:span) &&
167
- @skipped_classes.exclude?(klass)
175
+ klass.respond_to?(:span) && @skipped_classes.exclude?(klass)
168
176
  end
169
177
 
170
178
  def child_associations(object)
@@ -42,9 +42,10 @@ module ActsAsSpan
42
42
 
43
43
  return unless overlapping_records.any? && instance_scope
44
44
 
45
+ error_message = options[:message] || :no_overlap
45
46
  record.errors.add(
46
47
  :base,
47
- :no_overlap,
48
+ error_message,
48
49
  model_name: record.class.model_name.human,
49
50
  model_name_plural: record.class.model_name.plural.humanize,
50
51
  start_date: record.span.start_date,
@@ -33,5 +33,13 @@ module ActsAsSpan
33
33
  def end_date
34
34
  span_model[end_field]
35
35
  end
36
+
37
+ def start_date_changed?
38
+ span_model.will_save_change_to_attribute?(start_field)
39
+ end
40
+
41
+ def end_date_changed?
42
+ span_model.will_save_change_to_attribute?(end_field)
43
+ end
36
44
  end
37
45
  end
@@ -8,10 +8,7 @@ module ActsAsSpan
8
8
  included do
9
9
  def current(query_date = Date.current)
10
10
  klass.where(
11
- (arel_table[start_field].lteq(query_date).or(arel_table[start_field].eq(nil))).
12
- and(
13
- arel_table[end_field].eq(nil).or(arel_table[end_field].gteq(query_date))
14
- )
11
+ current_condition(query_date: query_date, table: arel_table)
15
12
  )
16
13
  end
17
14
 
@@ -44,6 +41,19 @@ module ActsAsSpan
44
41
  end
45
42
 
46
43
  alias_method :current_or_future, :current_or_future_on
44
+
45
+ private
46
+
47
+ # returns an Arel node usable within an ActiveRecord `where` clause
48
+ def current_condition(query_date:, table:)
49
+ start_col = arel_table[start_field]
50
+ end_col = arel_table[end_field]
51
+
52
+ start_condition = start_col.lteq(query_date).or(start_col.eq(nil))
53
+ end_condition = end_col.eq(nil).or(end_col.gteq(query_date))
54
+
55
+ start_condition.and(end_condition)
56
+ end
47
57
  end
48
58
  end
49
59
  end
@@ -1,8 +1,10 @@
1
+ # frozen_string_Literal: true
2
+
1
3
  module ActsAsSpan
2
4
  module VERSION
3
5
  MAJOR = 1
4
- MINOR = 1
5
- TINY = 1
6
+ MINOR = 2
7
+ TINY = 0
6
8
  PRE = nil
7
9
 
8
10
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
@@ -3,8 +3,10 @@ module ActsAsSpan
3
3
  def validate(record)
4
4
  parents = options[:parent] || options[:parents]
5
5
 
6
+ error_message = options[:message] || :not_within_parent_date_span
7
+
6
8
  Array(parents).each do |parent|
7
- record.errors.add(:base, :not_within_parent_date_span, parent: record.class.human_attribute_name(parent)) if outside_of_parent_date_span?(record, parent)
9
+ record.errors.add(:base, error_message, parent: record.class.human_attribute_name(parent)) if outside_of_parent_date_span?(record, parent)
8
10
  end
9
11
  end
10
12
 
@@ -3,13 +3,16 @@ require 'spec_helper'
3
3
  RSpec.describe ActsAsSpan::EndDatePropagator do
4
4
  let(:end_date_propagator) do
5
5
  ActsAsSpan::EndDatePropagator.new(
6
- base_instance, skipped_classes: skipped_classes
6
+ base_instance, skipped_classes: skipped_classes,
7
+ include_errors: include_errors
7
8
  )
8
9
  end
9
10
 
10
11
  let(:base_instance) do
11
12
  Base.create(end_date: initial_end_date)
12
13
  end
14
+
15
+ let(:include_errors) { true }
13
16
  let(:initial_end_date) { nil }
14
17
 
15
18
  let(:other_base_instance) do
@@ -102,28 +105,38 @@ RSpec.describe ActsAsSpan::EndDatePropagator do
102
105
  end
103
106
 
104
107
  context 'when multiple child records are not valid' do
105
- before do
106
- child_instance.date_of_birth = base_instance.span.start_date - 1
107
- child_instance.save(validate: false)
108
- bird_instance.start_date = child_instance.span.start_date - 1
109
- bird_instance.save(validate: false)
110
- end
111
- it "the parent gains all children's errors" do
112
- expect(
113
- end_date_propagator.call.errors.values.join
114
- ).to include(
115
- I18n.t(
116
- 'not_within_parent_date_span',
117
- parent: 'Child',
118
- scope: %i[activerecord errors messages]
119
- )
120
- ).and include(
121
- I18n.t(
122
- 'not_within_parent_date_span',
123
- parent: 'Base',
124
- scope: %i[activerecord errors messages]
108
+ context 'when include_errors = true (default)' do
109
+ before do
110
+ child_instance.date_of_birth = base_instance.span.start_date - 1
111
+ child_instance.save(validate: false)
112
+ bird_instance.start_date = child_instance.span.start_date - 1
113
+ bird_instance.save(validate: false)
114
+ end
115
+ it "the parent gains all children's errors" do
116
+ expect(
117
+ end_date_propagator.call.errors.values.join
118
+ ).to include(
119
+ I18n.t(
120
+ 'not_within_parent_date_span',
121
+ parent: 'Child',
122
+ scope: %i[activerecord errors messages]
123
+ )
124
+ ).and include(
125
+ I18n.t(
126
+ 'not_within_parent_date_span',
127
+ parent: 'Base',
128
+ scope: %i[activerecord errors messages]
129
+ )
125
130
  )
126
- )
131
+ end
132
+ end
133
+
134
+ context 'when include_errors = false' do
135
+ let(:include_errors) { false }
136
+
137
+ it 'does not push any child errors' do
138
+ expect(end_date_propagator.call.errors.values).to be_empty
139
+ end
127
140
  end
128
141
  end
129
142
  end
@@ -116,4 +116,14 @@ RSpec.describe ActsAsSpan::NoOverlapValidator do
116
116
  end
117
117
  end
118
118
  end
119
+
120
+ describe 'error messages' do
121
+ let(:child_class) { OneParentChildCustom }
122
+ let(:new_child_start_date) { sister_start_date }
123
+ let(:new_child_end_date) { sister_end_date }
124
+ it 'allows using custom error messages' do
125
+ expect(new_child).not_to be_valid
126
+ expect(new_child.errors.messages[:base]).to include('Custom error message')
127
+ end
128
+ end
119
129
  end
@@ -12,5 +12,17 @@ RSpec.describe "Span" do
12
12
  it "should return the end_date" do
13
13
  expect(span.end_date).to eq(span_model.end_date)
14
14
  end
15
+
16
+ context "changed?" do
17
+ it 'returns true when start_date has changed' do
18
+ span_model.start_date = span_model.start_date + 5
19
+ expect(span.start_date_changed?).to eq(true)
20
+ end
21
+
22
+ it 'returns true when end_date has changed' do
23
+ span_model.end_date = span_model.end_date + 5
24
+ expect(span.end_date_changed?).to eq(true)
25
+ end
26
+ end
15
27
  end
16
28
  end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe ActsAsSpan::SpanKlass::Status do
6
+ let(:span_klass) { ::SpanModel }
7
+
8
+ let!(:today) { Date.current }
9
+
10
+ describe '.current' do
11
+ let!(:record) do
12
+ span_klass.create(
13
+ start_date: today - 1.week,
14
+ end_date: today + 1.week,
15
+ )
16
+ end
17
+
18
+ subject { span_klass.current(query_date) }
19
+
20
+ context "when query_date is within the record's span" do
21
+ let(:query_date) { record.start_date + 3.days }
22
+
23
+ it { is_expected.not_to be_empty }
24
+ end
25
+
26
+ context "when query_date is before the record's span" do
27
+ let(:query_date) { record.start_date - 1.week }
28
+
29
+ it { is_expected.to be_empty }
30
+ end
31
+
32
+ context "when query_date is after the record's span" do
33
+ let(:query_date) { record.end_date + 1.week }
34
+
35
+ it { is_expected.to be_empty }
36
+ end
37
+ end
38
+ end
@@ -112,4 +112,15 @@ RSpec.describe ActsAsSpan::WithinParentDateSpanValidator do
112
112
  end
113
113
  end
114
114
  end
115
+
116
+ describe 'error messages' do
117
+ let(:child_class) { OneParentChildCustom }
118
+ let(:new_child_start_date) { mama_start_date - 3.days }
119
+ let(:new_child_end_date) { mama_end_date + 5.days }
120
+
121
+ it 'allows using custom error messages' do
122
+ expect(new_child).not_to be_valid
123
+ expect(new_child.errors.messages[:base]).to include('Custom error message')
124
+ end
125
+ end
115
126
  end
data/spec/spec_models.rb CHANGED
@@ -47,6 +47,32 @@ Temping.create :one_parent_child do
47
47
  validates_with ActsAsSpan::WithinParentDateSpanValidator, parents: [:mama]
48
48
  end
49
49
 
50
+ Temping.create :one_parent_child_custom do
51
+ with_columns do |t|
52
+ t.belongs_to :mama
53
+
54
+ t.date :start_date
55
+ t.date :end_date
56
+
57
+ # every one-parent child is a favorite! ...by default
58
+ t.boolean :favorite, default: true
59
+ end
60
+
61
+ acts_as_span
62
+
63
+ def favorite?
64
+ favorite
65
+ end
66
+
67
+ belongs_to :mama
68
+ has_siblings through: [:mama]
69
+
70
+ validates_with ActsAsSpan::NoOverlapValidator,
71
+ scope: proc { siblings }, instance_scope: proc { favorite? }, message: 'Custom error message'
72
+ validates_with ActsAsSpan::WithinParentDateSpanValidator, parents: [:mama], message: 'Custom error message'
73
+ end
74
+
75
+
50
76
  Temping.create :two_parent_child do
51
77
  with_columns do |t|
52
78
  t.belongs_to :mama
@@ -76,6 +102,7 @@ Temping.create :mama do
76
102
 
77
103
  has_many :one_parent_children
78
104
  has_many :two_parent_children
105
+ has_many :one_parent_child_customs
79
106
  end
80
107
 
81
108
  Temping.create :papa do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_span
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Sullivan
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-01 00:00:00.000000000 Z
11
+ date: 2021-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,86 +16,86 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.1
19
+ version: 2.1.4
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.1
26
+ version: 2.1.4
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: has_siblings
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 0.2.7
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: 0.2.7
41
41
  - !ruby/object:Gem::Dependency
42
- name: rspec
42
+ name: pry-byebug
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '3.0'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '3.0'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: sqlite3
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '1.4'
61
+ version: 12.3.3
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '1.4'
68
+ version: 12.3.3
69
69
  - !ruby/object:Gem::Dependency
70
- name: has_siblings
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 0.2.7
75
+ version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 0.2.7
82
+ version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: temping
84
+ name: sqlite3
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '1.4'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '1.4'
97
97
  - !ruby/object:Gem::Dependency
98
- name: pry-byebug
98
+ name: temping
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -114,28 +114,28 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 4.2.0
117
+ version: 5.0.0
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 4.2.0
124
+ version: 5.0.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: activesupport
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
130
130
  - !ruby/object:Gem::Version
131
- version: 4.2.0
131
+ version: 5.0.0
132
132
  type: :runtime
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
- version: 4.2.0
138
+ version: 5.0.0
139
139
  description: ActiveRecord model w/ a start_date and an end_date == ActsAsSpan
140
140
  email:
141
141
  - eric.sullivan@annkissam.com
@@ -173,6 +173,7 @@ files:
173
173
  - spec/lib/span_instance/status_spec.rb
174
174
  - spec/lib/span_instance/validations_spec.rb
175
175
  - spec/lib/span_instance_spec.rb
176
+ - spec/lib/span_klass/status_spec.rb
176
177
  - spec/lib/within_parent_date_span_validator_spec.rb
177
178
  - spec/spec_helper.rb
178
179
  - spec/spec_models.rb
@@ -181,7 +182,7 @@ licenses:
181
182
  - MIT
182
183
  metadata:
183
184
  allowed_push_host: https://rubygems.org
184
- post_install_message:
185
+ post_install_message:
185
186
  rdoc_options: []
186
187
  require_paths:
187
188
  - lib
@@ -196,10 +197,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
197
  - !ruby/object:Gem::Version
197
198
  version: '0'
198
199
  requirements: []
199
- rubygems_version: 3.1.2
200
- signing_key:
200
+ rubygems_version: 3.0.3
201
+ signing_key:
201
202
  specification_version: 4
202
- summary: acts_as_span 1.1.1
203
+ summary: acts_as_span 1.2.0
203
204
  test_files:
204
205
  - spec/lib/acts_as_span_spec.rb
205
206
  - spec/lib/delegation_spec.rb
@@ -211,6 +212,7 @@ test_files:
211
212
  - spec/lib/span_instance/status_spec.rb
212
213
  - spec/lib/span_instance/validations_spec.rb
213
214
  - spec/lib/span_instance_spec.rb
215
+ - spec/lib/span_klass/status_spec.rb
214
216
  - spec/lib/within_parent_date_span_validator_spec.rb
215
217
  - spec/spec_helper.rb
216
218
  - spec/spec_models.rb