jbuilder_rspec_generator 1.0.5 → 1.0.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 338fc349a3f7abc8eab597c8f3b7c024a88d936f
4
- data.tar.gz: c9c0ef5dc6c837c893326d25af365207dd11c4c5
3
+ metadata.gz: 0ce181d029f2241d3d2f6f9dfc47a5348e7e65e0
4
+ data.tar.gz: 78c17563c22499335269fa508ee9b1a98625892a
5
5
  SHA512:
6
- metadata.gz: c0d16ea97698e963969366f278aa94a5e51192640dda720a3b0fa6fc05df0cf210a9facfa12b2821d92783b2700769233d24d767069d3344a0274d5811ae0eb6
7
- data.tar.gz: 4b12cb6544efe9e7e9f500ceac57fc9819d71b856136c8229695b98696b44a791e1582110645a6c667ff9d738a1b9e8a1e929c81d381b118e783af5e96a6fcba
6
+ metadata.gz: 99334a45ff241edb9ea0728463797373d6e5003747efbbdefd2bea77cb619fef6f2e7f8e4a687d4c868a90ad5c98438b6d6bc7ea78da59d897c492a3bbf8dfab
7
+ data.tar.gz: ea9f0c216e20660ba2aa43a6118b851713615891ebb75fded0294a8ca8fdb1126cb81fac639ccf323c7d8ab3dc710b63b832a4137e849db1633f6fe950560488
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.5
1
+ 1.0.6
@@ -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: jbuilder_rspec_generator 1.0.5 ruby lib
5
+ # stub: jbuilder_rspec_generator 1.0.6 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "jbuilder_rspec_generator"
9
- s.version = "1.0.5"
9
+ s.version = "1.0.6"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Dmitri Koulikoff"]
14
- s.date = "2014-09-17"
14
+ s.date = "2014-09-18"
15
15
  s.description = "Generates RSpecs for jbuilder templates"
16
16
  s.email = "dima@koulikoff.ru"
17
17
  s.extra_rdoc_files = [
@@ -24,8 +24,6 @@ describe "<%= ns_table_name %>/index.json.jbuilder", type: :view do
24
24
  <% for attribute in attributes -%>
25
25
  <%= attribute.name %>
26
26
  <% end -%>
27
- created_at
28
- updated_at
29
27
  url
30
28
  ]
31
29
 
@@ -35,10 +33,11 @@ describe "<%= ns_table_name %>/index.json.jbuilder", type: :view do
35
33
  hash = MultiJson.load rendered
36
34
  expect(hash.first).to eq(hash = hash.last)
37
35
  expect(hash.keys.sort).to eq attributes.sort
38
- expected = MultiJson.load MultiJson.dump @<%= ns_file_name %>.attributes.slice *attributes
36
+ expected = @<%= ns_file_name %>.attributes.slice *attributes
37
+ expected = MultiJson.load MultiJson.dump expected
39
38
  expected['url'] = <%= ns_file_name %>_url(@<%= ns_file_name %>, format: 'json')
40
39
  expect(hash).to eq expected
41
- <% for attribute in attributes -%>
40
+ <% for attribute in attributes + ['id'] -%>
42
41
  # expect(hash['<%= attribute.name %>']).to eq @<%= ns_file_name %>.<%= attribute.name %>.to_s
43
42
  <% end -%>
44
43
  # expect(hash['url']).to eq <%= ns_file_name %>_url(@<%= ns_file_name %>, format: 'json')
@@ -34,9 +34,10 @@ describe "<%= ns_table_name %>/show.json.jbuilder", type: :view do
34
34
 
35
35
  hash = MultiJson.load rendered
36
36
  expect(hash.keys.sort).to eq attributes.sort
37
- expected = MultiJson.load MultiJson.dump @<%= ns_file_name %>.attributes.slice *attributes
37
+ expected = @<%= ns_file_name %>.attributes.slice *attributes
38
+ expected = MultiJson.load MultiJson.dump expected
38
39
  expect(hash).to eq expected
39
- <% for attribute in attributes -%>
40
+ <% for attribute in attributes + %w[id created_at updated_at] -%>
40
41
  # expect(hash['<%= attribute.name %>']).to eq @<%= ns_file_name %>.<%= attribute.name %>.to_s
41
42
  <% end -%>
42
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbuilder_rspec_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitri Koulikoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-17 00:00:00.000000000 Z
11
+ date: 2014-09-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json