active_record_model_and_rspec_enhanced_templates 1.1.2 → 1.1.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
  SHA1:
3
- metadata.gz: 19ba7981b6abd9635bbc4d0ad45cf26f66c6fd45
4
- data.tar.gz: deb13461ff84ddf9d4f8b4c703cc4cc9beea4ea7
3
+ metadata.gz: d62169fd351b7aea72b46c4edc3288732406d8ac
4
+ data.tar.gz: 4510ad37439d2e2aa7545b3690f90108b3f13222
5
5
  SHA512:
6
- metadata.gz: 4013d40e3709944d5b3a1a91966d4ae71b6325ce0e8aa7bf21f434319dcd1805b465729430e86c5f6ed110da43e5b2ed1d257eadd66bc3cec6723fd1eb234c0e
7
- data.tar.gz: c68b1e3c36e8463b93f794c626c4c2ed5a0c749501750eb52c57bab3a83cbdd5e6dec913fdca3c9484d16eb153dab0fe5cf9bd1e0129233b606655464d798b01
6
+ metadata.gz: 35a57d4a0a28d42ae96320f04bc640db0754f86d2f6c28615373c58f4ce61a2934a3bcc8db4766f4cb3783d14b5252e655fc284be43a22ae5ff14f234c8878b5
7
+ data.tar.gz: 0024a825b6b912f330ab00653968b8b3d66fd90e8a930c863322ad871e684aedb88a703e7f1fc555d61b43f86b11826272d15e42a318612cd1f0c707d78c68dd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.2
1
+ 1.1.3
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: active_record_model_and_rspec_enhanced_templates 1.1.2 ruby lib
5
+ # stub: active_record_model_and_rspec_enhanced_templates 1.1.3 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "active_record_model_and_rspec_enhanced_templates".freeze
9
- s.version = "1.1.2"
9
+ s.version = "1.1.3"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Dmitri Koulikoff".freeze]
14
- s.date = "2017-03-29"
14
+ s.date = "2017-06-07"
15
15
  s.description = "ActiveRecord generator and RSpec templates that add some basic functionality to the model and its spec".freeze
16
16
  s.email = "dima@koulikoff.ru".freeze
17
17
  s.extra_rdoc_files = [
@@ -5,7 +5,7 @@ class <%= class_name %> < <%= parent_class_name.classify %>
5
5
  <% if attributes.any?(&:reference?) -%>
6
6
 
7
7
  <% attributes.select(&:reference?).each do |attribute| -%>
8
- belongs_to :<%= attribute.name %><%= ', polymorphic: true' if attribute.polymorphic? %><%= ', required: true' if attribute.required? %>
8
+ belongs_to :<%= attribute.name %><%= ', polymorphic: true' if attribute.respond_to?(:polymorphic?) and attribute.polymorphic? %><%= ', required: true' if attribute.respond_to?(:required?) and attribute.required? %>
9
9
  <% end -%>
10
10
  <% end -%>
11
11
  <% if attributes.first.respond_to?(:token) and attributes.any?(&:token?) -%>
@@ -14,7 +14,7 @@ class <%= class_name %> < <%= parent_class_name.classify %>
14
14
  has_secure_token<% if attribute.name != "token" %> :<%= attribute.name %><% end %>
15
15
  <% end -%>
16
16
  <% end -%>
17
- <% if attributes.any?(&:password_digest?) -%>
17
+ <% if (attributes.any?(&:password_digest?) rescue false) -%>
18
18
 
19
19
  has_secure_password
20
20
  <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_model_and_rspec_enhanced_templates
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2017-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake