unidom-position 1.5.5 → 1.5.6

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
  SHA1:
3
- metadata.gz: 9d524f9a0026d671f20476ae67a4201ce263b533
4
- data.tar.gz: d14c8e378cea90875003de02fafa7b302c574817
3
+ metadata.gz: f0813c4e46f3fbc13975ba48100dab648537a148
4
+ data.tar.gz: 9048d4fb96b701b1b75bcf5ee5fc906005521dbc
5
5
  SHA512:
6
- metadata.gz: b1919bf69407ff14a98f79fcdc4603fc6046b47545092c89663d59e9b870157b55d78385ef6cf0985851196b8aa6cf8945399953018ffe7c6ce17f34c00f62db
7
- data.tar.gz: f7143771d9200f23cde9c98b858976b7924f7ceed50263b367c372d5ee4d9918da07879635c36d6559a4b01165062ca7bd9770f42d3a395516798bc0b8254e8d
6
+ metadata.gz: 2e9bcce5614ccbc20f78cf16c2fa083763c523cde625576acfb7dc56bfaffc0e0e790b6980822e3c33252deba48d8aacbc0c54fe5e7b921252a59f32737515f4
7
+ data.tar.gz: d026bdaa309541c8182303716ef3b83e4971007b290df95faed67938bb0895b406515689c9429de34bc3ae20273c09f126f7cbd3fd5118c55d72ce99c9179590
@@ -14,4 +14,6 @@ class Unidom::Position::Position < Unidom::Position::ApplicationRecord
14
14
 
15
15
  has_many :posts, class_name: 'Unidom::Position::Post'
16
16
 
17
+ scope :occupation_is, ->(occupation) { where occupation: occupation }
18
+
17
19
  end unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Position::Position'
@@ -17,7 +17,8 @@ describe Unidom::Position::Occupation, type: :model do
17
17
 
18
18
  it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes
19
19
 
20
- it_behaves_like 'validates text', model_attributes, :name, length: 2..described_class.columns_hash['name'].limit
20
+ it_behaves_like 'validates text', model_attributes, :name,
21
+ length: 2..described_class.columns_hash['name'].limit
21
22
 
22
23
  position_1_attributes = {
23
24
  organization_id: SecureRandom.uuid,
@@ -42,6 +42,8 @@ describe Unidom::Position::Position, type: :model do
42
42
 
43
43
  it_behaves_like 'has_many', model_attributes, :posts, Unidom::Position::Post, [ post_1_attributes, post_2_attributes ]
44
44
 
45
+ it_behaves_like 'monomorphic scope', model_attributes, :occupation_is, :occupation
46
+
45
47
  end
46
48
 
47
49
  end
@@ -1,5 +1,5 @@
1
1
  module Unidom
2
2
  module Position
3
- VERSION = '1.5.5'.freeze
3
+ VERSION = '1.5.6'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unidom-position
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Topbit Du
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-24 00:00:00.000000000 Z
11
+ date: 2017-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unidom-common