timestamp_states 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d53b3b9487625bb1e70771d96f6fc72aac6a7413841f8dbf9eb19b5683a16719
4
+ data.tar.gz: 2ecc59ec394d53c3946a52e6d620aa0ba7c772d0e8ba6934d51b40ec81f121c4
5
+ SHA512:
6
+ metadata.gz: 1c7a7da3d3d0f2ed31eab19b5ce520714ee2311c7a94f750826efbf807742ec58864107c5a719e08fe266b85d1d5e5e50cf24365026f0b7b7d87407c66c1d3d2
7
+ data.tar.gz: c34785b5f5b891d2fd80cb8471471c299391f4e4961f1d62766369303d2dd38c0b02b8d9429c40c10acfadc5748747735d5978e70392fba2ccb6d62beada67ff
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,77 @@
1
+ Style/Documentation:
2
+ Enabled: false
3
+ Layout/MultilineArrayBraceLayout:
4
+ Enabled: false
5
+ Layout/MultilineAssignmentLayout:
6
+ Enabled: false
7
+ Layout/MultilineBlockLayout:
8
+ Enabled: false
9
+ Layout/MultilineHashBraceLayout:
10
+ Enabled: false
11
+ Layout/MultilineMethodCallBraceLayout:
12
+ Enabled: false
13
+ Layout/MultilineMethodCallIndentation:
14
+ Enabled: false
15
+ Layout/MultilineMethodDefinitionBraceLayout:
16
+ Enabled: false
17
+ Layout/MultilineOperationIndentation:
18
+ Enabled: false
19
+ Layout/ParameterAlignment:
20
+ Enabled: false
21
+ Layout/RescueEnsureAlignment:
22
+ Enabled: false
23
+ Metrics/CyclomaticComplexity:
24
+ Max: 60
25
+ Metrics/MethodLength:
26
+ Enabled: false
27
+ Metrics/ModuleLength:
28
+ Enabled: false
29
+ Metrics/ParameterLists:
30
+ Enabled: true
31
+ Max: 7
32
+ Metrics/PerceivedComplexity:
33
+ Enabled: false
34
+ Layout/SpaceAfterNot:
35
+ Enabled: false
36
+ Layout/SpaceBeforeBlockBraces:
37
+ Enabled: false
38
+ Layout/SpaceInLambdaLiteral:
39
+ Enabled: false
40
+ Lint/AmbiguousRegexpLiteral:
41
+ Enabled: false
42
+ Lint/AssignmentInCondition:
43
+ Enabled: false
44
+ Lint/NonLocalExitFromIterator:
45
+ Enabled: false
46
+ Metrics/AbcSize:
47
+ Enabled: false
48
+ Max: 60
49
+ Metrics/ClassLength:
50
+ Enabled: false
51
+ Layout/LineLength:
52
+ AllowedPatterns:
53
+ - ^\s*#
54
+ - ^\s*([a-zA-Z]*[lL]og[a-zA-Z]*)[ (]
55
+ - ^\s*['"]
56
+ - .*#.{30,300}
57
+ - ^\s*[a-z_]:\s*".+",?[}\s]*$
58
+ Max: 200
59
+ Exclude:
60
+ - '*/spec/**/*.rb '# Nicer to have sample data on a single long line
61
+ - 'spec/**/*.rb'
62
+ Layout/LineContinuationLeadingSpace:
63
+ Enabled: true
64
+ Exclude:
65
+ - '*/spec/**/*.rb ' # Just a pain for specs that contain lots of sample data.
66
+ - 'spec/**/*.rb'
67
+ Metrics/BlockLength:
68
+ Exclude:
69
+ - Rakefile
70
+ - '**/*.rake'
71
+ - config/routes.rb
72
+ - '*/spec/**/*.rb' # Some blocks can be really long with sample data
73
+ - 'spec/**/*.rb'
74
+ Max: 200
75
+ AllCops:
76
+ NewCops: disable
77
+
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.3.6
@@ -0,0 +1,132 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, caste, color, religion, or sexual
10
+ identity and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the overall
26
+ community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or advances of
31
+ any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email address,
35
+ without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official email address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ [INSERT CONTACT METHOD].
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series of
86
+ actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or permanent
93
+ ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within the
113
+ community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.1, available at
119
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
120
+
121
+ Community Impact Guidelines were inspired by
122
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
123
+
124
+ For answers to common questions about this code of conduct, see the FAQ at
125
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
126
+ [https://www.contributor-covenant.org/translations][translations].
127
+
128
+ [homepage]: https://www.contributor-covenant.org
129
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
130
+ [Mozilla CoC]: https://github.com/mozilla/diversity
131
+ [FAQ]: https://www.contributor-covenant.org/faq
132
+ [translations]: https://www.contributor-covenant.org/translations
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2024 Jay El-Kaake
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,60 @@
1
+ # TimestampState
2
+
3
+ This gem adds methods and scopes to your Rails models to easily interact with state flags that are stored as timestamp (`datetime`) values.
4
+
5
+ For example, if you have a `published_at` column in your `Product` model, then this gem adds things like `product.published?` and `product.publish!` that get and set the published_at value respectively.
6
+
7
+ ## Installation
8
+ Install the gem and add to the application's Gemfile by executing:
9
+
10
+ $ bundle add timestamp_states
11
+
12
+ If bundler is not being used to manage dependencies, install the gem by executing:
13
+
14
+ $ gem install timestamp_states
15
+
16
+ ## Usage
17
+ 1. Add `_at` column to your DB if it doesn't already exist. Example: `bundle exec rails g migration AddPublishedAtToProducts published_at:datetime && bundle exec rails db:migrate`
18
+ 2. Add `timestamp_state :column_name` to your model. Example: `timestamp_state :published_at`
19
+
20
+
21
+ ### Model methods:
22
+ ```ruby
23
+ Product.first.published? # true of false
24
+ Product.first.publish # sets value to now
25
+ Product.first.publish! # sets value to now and saves
26
+ Product.first.timestamp_states # returns [:published]
27
+ ```
28
+
29
+ ### Scopes:
30
+ ```ruby
31
+ Product.published # gets all published products
32
+ Product.not_published # gets all unpublished products
33
+ Product.published_at(1.day.ago..Time.now.utc) # gets all published products within the last day
34
+ Product.published_at("2023-10-28 to 2023-11-29") # gets all published products within that date range (useful for filters with Flatpickr JS)
35
+ ```
36
+
37
+ ### Callbacks:
38
+ ```ruby
39
+ after_publish :do_something # runs the callback after the product is published (after the timestamp is set AND saved)
40
+ before_publish :do_something # runs the callback before the product is published (after the timestamp is set AND saved)
41
+ ```
42
+
43
+
44
+ ## Development
45
+
46
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
+
48
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
+
50
+ ## Contributing
51
+
52
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/timestamp_states. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/timestamp_states/blob/master/CODE_OF_CONDUCT.md).
53
+
54
+ ## License
55
+
56
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
57
+
58
+ ## Code of Conduct
59
+
60
+ Everyone interacting in the TimestampState project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/timestamp_states/blob/master/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ task default: :spec
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rails/railtie'
4
+
5
+ module TimestampStates
6
+ class Railtie < Rails::Railtie
7
+ initializer 'timestamp_states.insert_into_active_record' do
8
+ ActiveSupport.on_load :active_record do
9
+ include TimestampStates
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TimestampStates
4
+ VERSION = '1.0.3'
5
+ end
@@ -0,0 +1,188 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'timestamp_states/version'
4
+ require 'timestamp_states/railtie' if defined?(Rails::Railtie)
5
+ require 'active_support/concern'
6
+
7
+ module TimestampStates
8
+ extend ActiveSupport::Concern
9
+
10
+ class Error < StandardError; end
11
+
12
+ included do
13
+ class_attribute :timestamp_state_config_aliases, :timestamp_state_configs, instance_accessor: false
14
+
15
+ scope :with_timestamp_state_within, lambda { |column, dates, timezone = 'EDT'|
16
+ dates = Array(dates).join.split(/\s*(,|to)\s*/i).grep_v(/\s*(,|to)\s*/i).map(&:strip)
17
+ times = dates.map { |date| Time.parse("#{date} 00:00:00 #{timezone}") }
18
+ times << (times.first + 1.day) if times.size == 1
19
+ where(column => times.first..times.last)
20
+ }
21
+
22
+ scope :with_timestamp_state, lambda { |column, range|
23
+ if range.is_a?(Range) || range.is_a?(Time) || range.is_a?(Date)
24
+ where(column => range)
25
+ else
26
+ with_timestamp_state_within(column, range)
27
+ end
28
+ }
29
+
30
+ around_save :around_timestamp_state_save
31
+ end
32
+
33
+ module ClassMethods
34
+ def add_timestamp_state_config(column)
35
+ self.timestamp_state_configs ||= {}
36
+ self.timestamp_state_configs[column] ||= {}
37
+ yield(timestamp_state_configs[column])
38
+ end
39
+
40
+ ##
41
+ # @param [Symbol] column The name of the column to define timestamp states for. Example: `:published_at`, `:archived_at`, etc
42
+ # @option options [Hash] :words
43
+ # @option options [Symbol] :words[:past] The word to use for the past tense of the timestamp state
44
+ # @option options [Symbol] :words[:action] The word to use for the action of the timestamp state
45
+ # @option options [Boolean] :define_scopes Whether or not to define scopes for the timestamp state
46
+ def timestamp_state(column, words: {}, define_scopes: true, aliases: [])
47
+ add_timestamp_state_config(column) do |config|
48
+ config[:words] = config[:words].to_h.merge(words)
49
+ config[:words][:past] ||= column.to_s.gsub(/_at$/, '').to_sym
50
+ config[:words][:action] ||= { enqueued: :enqueue }[config[:words][:past]]
51
+ config[:words][:action] ||= column.to_s
52
+ .sub(/_at$/, '')
53
+ .sub(/lled$/, 'll')
54
+ .sub(/failed$/, 'fail')
55
+ .sub(/ted$/, 't')
56
+ .sub(/eeded$/, 'eed')
57
+ .sub(/([^tvklure])ed$/, '\1') # spellr:disable-line
58
+ .sub(/lle$/, 'l')
59
+ .sub(/tte$/, 't')
60
+ .sub(/pp$/, 'p').to_sym
61
+ config[:words][:past_not] ||= "not_#{config[:words][:past]}".to_sym
62
+ config[:words][:not_action] ||= "un#{config[:words][:action]}".to_sym
63
+
64
+ action_word = config[:words][:action]
65
+ not_action_word = config[:words][:not_action]
66
+ past_word = config[:words][:past]
67
+ past_not_word = config[:words][:past_not]
68
+
69
+ if define_scopes
70
+ scope past_word, -> { where.not(column => nil) }
71
+ scope past_not_word, -> { where(column => nil) }
72
+ scope column, ->(range) { with_timestamp_state(column, range) }
73
+ end
74
+
75
+ define_model_callbacks action_word, not_action_word
76
+
77
+ Array(aliases).each { |alias_name| alias_timestamp_state(alias_name, column, define_scopes: define_scopes) }
78
+ end
79
+ end
80
+
81
+ def timestamp_states(*columns, **options)
82
+ return timestamp_state_configs if columns.empty?
83
+
84
+ columns.each { |column| timestamp_state(column, **options) }
85
+ end
86
+
87
+ def alias_timestamp_state(alias_name, column, define_scopes: true)
88
+ self.timestamp_state_config_aliases ||= {}
89
+ self.timestamp_state_config_aliases[column] ||= []
90
+ self.timestamp_state_config_aliases[column] << alias_name unless timestamp_state_config_aliases[column].include?(alias_name)
91
+
92
+ alias_attribute alias_name, column # ensure the attribute is aliased as well
93
+
94
+ timestamp_state(alias_name, define_scopes: define_scopes)
95
+ end
96
+ end
97
+
98
+ def method_missing(method_name, *args, &block)
99
+ self.class.base_class.timestamp_state_configs.to_h.each do |column, options|
100
+ return timestamp_state?(column) if method_name.to_s == "#{options[:words][:past]}?" || method_name.to_s == options[:words][:past].to_s
101
+ return !timestamp_state?(column) if method_name.to_s == "#{options[:words][:past_not]}?" || method_name.to_s == options[:words][:past_not].to_s
102
+ return touch_timestamp_state(column) if method_name.to_s == options[:words][:action].to_s
103
+ return unset_timestamp_state(column) if method_name.to_s == options[:words][:not_action].to_s
104
+ return touch_timestamp_state!(column) if method_name.to_s == "#{options[:words][:action]}!"
105
+ return unset_timestamp_state!(column) if method_name.to_s == "#{options[:words][:not_action]}!"
106
+ return set_timestamp_state(column, args.first) if method_name.to_s == "#{options[:words][:past]}="
107
+ return set_timestamp_state(column, !args.first) if method_name.to_s == "#{options[:words][:past_not]}="
108
+ end
109
+
110
+ super
111
+ end
112
+
113
+ def respond_to_missing?(method_name, include_private = false)
114
+ self.class.base_class.timestamp_state_configs.to_h.each_value do |options|
115
+ return true if method_name.to_s == "#{options[:words][:past]}?" || method_name.to_s == options[:words][:past].to_s
116
+ return true if method_name.to_s == options[:words][:action].to_s || method_name.to_s == "#{options[:words][:action]}!"
117
+ return true if method_name.to_s == options[:words][:not_action].to_s || method_name.to_s == "#{options[:words][:not_action]}!"
118
+ return true if ["#{options[:words][:past]}=", "#{options[:words][:past_not]}="].include?(method_name.to_s)
119
+ end
120
+
121
+ super
122
+ end
123
+
124
+ private
125
+
126
+ def timestamp_state_configs
127
+ self.class.base_class.timestamp_state_configs.to_h.map do |column, options|
128
+ timestamp_state?(column) ? options[:past] : nil
129
+ end.compact
130
+ end
131
+
132
+ def around_timestamp_state_save(&block)
133
+ callbacks = [block]
134
+
135
+ # What we're doing here is nesting each callback inside the next callback, then ending by
136
+ # calling the pram block to trigger the actual save.
137
+ self.class.base_class.timestamp_state_configs.to_h.each do |column, options|
138
+ callbacks.unshift(-> { run_callbacks(options[:words][:action]) { callbacks.shift.try(:call) } }) if !timestamp_state_previously_set?(column) && timestamp_state?(column)
139
+ end.compact
140
+
141
+ callbacks.shift.try(:call)
142
+ end
143
+
144
+ def timestamp_state_previously_set?(column)
145
+ if changes.key?(column)
146
+ changes[column].to_a.first.present?
147
+ else
148
+ timestamp_state?(column)
149
+ end
150
+ end
151
+
152
+ def set_timestamp_state(column, value)
153
+ send("#{column}=", determine_timestamp_state_value(value))
154
+ end
155
+
156
+ def touch_timestamp_state(column)
157
+ send("#{column}=", Time.now.utc)
158
+ end
159
+
160
+ def touch_timestamp_state!(column)
161
+ touch_timestamp_state(column)
162
+ save!
163
+ end
164
+
165
+ def unset_timestamp_state(column)
166
+ send("#{column}=", nil)
167
+ end
168
+
169
+ def unset_timestamp_state!(column)
170
+ unset_timestamp_state(column)
171
+ save!
172
+ end
173
+
174
+ def timestamp_state?(column)
175
+ send(column).present?
176
+ end
177
+
178
+ ##
179
+ # @param [NilClass, String, Time, Numeric, Boolean] value
180
+ # @return [Time, NilClass]
181
+ def determine_timestamp_state_value(value)
182
+ if [true, false, 'true', 'false', 0, 1, '0', '1', nil, 'null'].include?(value)
183
+ value.to_bool ? Time.now.utc : nil
184
+ else
185
+ Time.zone.parse(value.to_s)
186
+ end
187
+ end
188
+ end
metadata ADDED
@@ -0,0 +1,210 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: timestamp_states
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
5
+ platform: ruby
6
+ authors:
7
+ - Jay El-Kaake
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2025-11-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activesupport
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '5'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '5'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: anonymous_active_record
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: dotenv
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: pry
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pry-byebug
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rack
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: 3.1.12
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: 3.1.12
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '1.69'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '1.69'
153
+ - !ruby/object:Gem::Dependency
154
+ name: sqlite3
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '1'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '1'
167
+ description:
168
+ email:
169
+ - najibkaake@gmail.com
170
+ executables: []
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - ".rspec"
175
+ - ".rubocop.yml"
176
+ - ".ruby-version"
177
+ - CODE_OF_CONDUCT.md
178
+ - LICENSE.txt
179
+ - README.md
180
+ - Rakefile
181
+ - lib/timestamp_states.rb
182
+ - lib/timestamp_states/railtie.rb
183
+ - lib/timestamp_states/version.rb
184
+ homepage: https://www.github.com/jayelkaake/timestamp_states
185
+ licenses:
186
+ - MIT
187
+ metadata:
188
+ homepage_uri: https://www.github.com/jayelkaake/timestamp_states
189
+ source_code_uri: https://www.github.com/jayelkaake/timestamp_states
190
+ post_install_message:
191
+ rdoc_options: []
192
+ require_paths:
193
+ - lib
194
+ required_ruby_version: !ruby/object:Gem::Requirement
195
+ requirements:
196
+ - - ">="
197
+ - !ruby/object:Gem::Version
198
+ version: '2.7'
199
+ required_rubygems_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ requirements: []
205
+ rubygems_version: 3.1.6
206
+ signing_key:
207
+ specification_version: 4
208
+ summary: Gives Rails models nice methods for managing columns that define a timestamp
209
+ that represents a state such as `published_at` => `published?`.
210
+ test_files: []