acts_as_favoritor 4.0.2 → 4.0.3

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: ba4bae7bff5166a5903eccb9ed03fdc8905844309dac8b509d805dc945f09a4e
4
- data.tar.gz: 61061b39d5f29094fe329c00aac91df4988667522c945f859c4762381da4a117
3
+ metadata.gz: 45ca952d9906033e84ecc6ff24aca3934457d803c51f979d59c561847b1d61d6
4
+ data.tar.gz: 941c85b77b52b66360a6ba7df70227c2e7cc32fc5fe0230f6191e2d20e6afd3e
5
5
  SHA512:
6
- metadata.gz: eb97712eb98769614cd99a910633ec0b397feec7d55282f42884915c8246732f0b1b611ace2dae13c5360c998ba49f3ac02b0c9a8a7421b9ac2a3e57714493e0
7
- data.tar.gz: 726d2a2aec78589821dabc017d5f53b8a142d961a3caa21eae436d5d6cbda4b231d613305ae8099aae4340addc09be508b68d09479b104d199c3fc586ec1c0cc
6
+ metadata.gz: bae098e81f7b219469fd3e2a18446914f46fe9ba65edc58f8f36ecd1ade9393f9a877ea8b96795abb4bd7324357fac01bdf2910a630a58828b9c5a984914076c
7
+ data.tar.gz: 0adfa2859658a591c472279295197c7c97bf3af1157210e992fafa384fc0dd083c6e7f3b791395b84e0638b25ff25c8ab25a20ee04996ec1975fe75df0b0b1f1
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # acts_as_favoritor
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/acts_as_favoritor.svg)](https://badge.fury.io/rb/acts_as_favoritor) ![Travis](https://travis-ci.org/jonhue/acts_as_favoritor.svg?branch=master)
4
-
5
3
  acts_as_favoritor is a Rubygem to allow any ActiveRecord model to associate any other model including the option for multiple relationships per association with scopes.
6
4
 
7
5
  You are able to differentiate followers, favorites, watchers, votes and whatever else you can imagine through a single relationship. This is accomplished by a double polymorphic relationship on the Favorite model. There is also built in support for blocking/un-blocking favorite records as well as caching.
@@ -20,6 +18,7 @@ You are able to differentiate followers, favorites, watchers, votes and whatever
20
18
  * [Caching](#caching)
21
19
  * [Configuration](#configuration)
22
20
  * [Testing](#testing)
21
+ * [Release](#release)
23
22
  * [To do](#to-do)
24
23
  * [Contributing](#contributing)
25
24
  * [Semantic versioning](#semantic-versioning)
@@ -263,8 +262,6 @@ end
263
262
 
264
263
  ## Testing
265
264
 
266
- Tests are written with Shoulda on top of `Test::Unit` with Factory Girl being used instead of fixtures. Tests are run using rake.
267
-
268
265
  1. Fork this repository
269
266
  2. Clone your forked git locally
270
267
  3. Install dependencies
@@ -281,6 +278,17 @@ Tests are written with Shoulda on top of `Test::Unit` with Factory Girl being us
281
278
 
282
279
  ---
283
280
 
281
+ ## Release
282
+
283
+ 1. Review breaking changes and deprecations in `CHANGELOG.md`
284
+ 2. Change the gem version in `lib/acts_as_favoritor/version.rb`
285
+ 3. Reset `CHANGELOG.md`
286
+ 4. Create a pull request to merge the changes into `master`
287
+ 5. After the pull request was merged, create a new release listing the breaking changes and commits on `master` since the last release.
288
+ 6. The release workflow will publish the gems to RubyGems and the GitHub Package Registry
289
+
290
+ ---
291
+
284
292
  ## To do
285
293
 
286
294
  We use [GitHub projects](https://github.com/jonhue/acts_as_favoritor/projects/1) to coordinate the work on this project.
@@ -151,9 +151,9 @@ module ActsAsFavoritor
151
151
 
152
152
  favoritable.favoritable_score[scope] =
153
153
  (favoritable.favoritable_score[scope] || 0) - 1
154
- # rubocop:disable Metrics/LineLength
155
- favoritable.favoritable_score.delete(scope) unless favoritable.favoritable_score[scope].positive?
156
- # rubocop:enable Metrics/LineLength
154
+ unless favoritable.favoritable_score[scope].positive?
155
+ favoritable.favoritable_score.delete(scope)
156
+ end
157
157
  favoritable.save!
158
158
  end
159
159
  # rubocop:enable Metrics/AbcSize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActsAsFavoritor
4
- VERSION = '4.0.2'
4
+ VERSION = '4.0.3'
5
5
  end
@@ -13,7 +13,8 @@ class ActsAsFavoritorGenerator < Rails::Generators::Base
13
13
  if ActiveRecord::Base.timestamped_migrations
14
14
  Time.now.utc.strftime('%Y%m%d%H%M%S')
15
15
  else
16
- format('%.3d', current_migration_number(dirname) + 1)
16
+ format('%<migration_number>.3d',
17
+ migration_number: current_migration_number(dirname) + 1)
17
18
  end
18
19
  end
19
20
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_favoritor
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Hübotter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-17 00:00:00.000000000 Z
11
+ date: 2019-10-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -159,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  requirements:
160
160
  - - ">="
161
161
  - !ruby/object:Gem::Version
162
- version: '2.3'
162
+ version: '2.5'
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - ">="