active_record_model_and_rspec_enhanced_templates 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/active_record_model_and_rspec_enhanced_templates.gemspec +12 -19
- data/lib/templates/rspec/model/model_spec.rb +1 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f34e84fdc2fa0622dbbccea20cd6ad720b9b583a32e88e0cdc7c774abe73d8d
|
4
|
+
data.tar.gz: 8cffbae2ad3719d3dacf1bcc94fff6dc2c6ff12fa809a8c415ae17cf55a99ff3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bcd1264691ab7a46f2e43b70a2e7201cb8339e240747151392b8d29f111b82fe6993d2dc8c4f1d7cf29495e504dbe943dc6eeed7a7d57431e29bdeb4ea1adb8
|
7
|
+
data.tar.gz: e30701ddf869851b82308398fc6428d42eea60033fa0ca89866fbe6c58354c69db85732389a476653355e5fc85304e6b82c758bcc01cc5143612e30c119fa4f3
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.4
|
@@ -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.
|
5
|
+
# stub: active_record_model_and_rspec_enhanced_templates 1.4 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.
|
9
|
+
s.version = "1.4"
|
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 = "
|
14
|
+
s.date = "2020-06-08"
|
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 = [
|
@@ -35,27 +35,20 @@ Gem::Specification.new do |s|
|
|
35
35
|
]
|
36
36
|
s.homepage = "http://github.com/dima4p/active_record_model_and_rspec_enhanced_templates".freeze
|
37
37
|
s.licenses = ["MIT".freeze]
|
38
|
-
s.rubygems_version = "3.
|
38
|
+
s.rubygems_version = "3.1.2".freeze
|
39
39
|
s.summary = "ActiveRecord generator and RSpec templates that add some basic functionality".freeze
|
40
40
|
|
41
41
|
if s.respond_to? :specification_version then
|
42
42
|
s.specification_version = 4
|
43
|
+
end
|
43
44
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
else
|
52
|
-
s.add_dependency(%q<rake>.freeze, ["~> 11.0"])
|
53
|
-
s.add_dependency(%q<rspec>.freeze, ["~> 3.1"])
|
54
|
-
s.add_dependency(%q<rdoc>.freeze, ["~> 4.1"])
|
55
|
-
s.add_dependency(%q<bundler>.freeze, ["~> 1.6"])
|
56
|
-
s.add_dependency(%q<jeweler>.freeze, ["~> 2.0"])
|
57
|
-
s.add_dependency(%q<simplecov>.freeze, ["~> 0.0"])
|
58
|
-
end
|
45
|
+
if s.respond_to? :add_runtime_dependency then
|
46
|
+
s.add_development_dependency(%q<rake>.freeze, ["~> 11.0"])
|
47
|
+
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.1"])
|
48
|
+
s.add_development_dependency(%q<rdoc>.freeze, ["~> 4.1"])
|
49
|
+
s.add_development_dependency(%q<bundler>.freeze, ["~> 1.6"])
|
50
|
+
s.add_development_dependency(%q<jeweler>.freeze, ["~> 2.0"])
|
51
|
+
s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.0"])
|
59
52
|
else
|
60
53
|
s.add_dependency(%q<rake>.freeze, ["~> 11.0"])
|
61
54
|
s.add_dependency(%q<rspec>.freeze, ["~> 3.1"])
|
@@ -19,7 +19,7 @@ describe <%= class_name %>, type: :model do
|
|
19
19
|
<% end -%>
|
20
20
|
|
21
21
|
describe 'validations' do
|
22
|
-
it {
|
22
|
+
it { is_expected.to be_valid }
|
23
23
|
end # validations
|
24
24
|
|
25
25
|
<% if attribute = attributes.detect{|a| a.name == 'position'} || attributes.detect{|a| a.name == 'name'} || attributes.detect{|a| a.name == 'title'} || attributes.first -%>
|
@@ -27,13 +27,6 @@ describe <%= class_name %>, type: :model do
|
|
27
27
|
describe 'scopes' do
|
28
28
|
describe '.ordered' do
|
29
29
|
it 'orders the records of <%= class_name %> by :<%=attribute.name %>' do
|
30
|
-
<% if options[:fixture_replacement] == :factory_bot -%>
|
31
|
-
create :<%= singular_name %>
|
32
|
-
create :<%= singular_name %>
|
33
|
-
<% else -%>
|
34
|
-
<%= class_name %>.create @valid_attrs
|
35
|
-
<%= class_name %>.create @valid_attrs
|
36
|
-
<% end -%>
|
37
30
|
expect(<%= class_name %>.ordered).to eq <%= class_name %>.order(:<%=attribute.name %>)
|
38
31
|
end
|
39
32
|
end # .ordered
|
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.
|
4
|
+
version: '1.4'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitri Koulikoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
rubygems_version: 3.
|
138
|
+
rubygems_version: 3.1.2
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: ActiveRecord generator and RSpec templates that add some basic functionality
|