myrails 1.0.1 → 1.0.2

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: 23c01d29604ec2394d097386744bcc2afb1c4efa
4
- data.tar.gz: 5a2a3c28899cdf8fd6ad9b18f6ba07c2cdef5aeb
3
+ metadata.gz: 5dd155001e1b7b4bad6352d9aaec53b7ae78680f
4
+ data.tar.gz: 81bc37e3680dd46b262e86f9eecc484893f91e6c
5
5
  SHA512:
6
- metadata.gz: 4da573dddca6f48725868341a395703b7caef3c99837476e7b91a78b1a8a8e8cac2384a8e0c584addadcefaf2c0909cb34ed921033583dc86184a0abf9f01881
7
- data.tar.gz: c28fef380ac5c780e83eec6260559ec2b7e3dd17d39e8fb0d20014ebc7a3ed5a9a2c255f9595989510ca6c061f1cadbe9dfb55b91ac6c7d20449599f2b421a0e
6
+ metadata.gz: 78dbf072b3af692b64c1556fe19e8eac2392cd781881f397eecb75d57e7fd09d552970daa96c66705aef2278cdf64ebc42ed4cf47092b8c3f12b3ead0b1681cf
7
+ data.tar.gz: 134e186dbfd51d0ebf485f485d6b7f53e0ae7d447eb25aa4c86c21856d33e6d28e20725666b05af15c796f798e5c9838ba97d4db8724a9e1fbfe3b17589abe02
@@ -7,6 +7,6 @@ class <%= options[:name].pluralize.camelize %>Controller < ApplicationController
7
7
  end
8
8
 
9
9
  def <%= options[:name].singularize %>_params
10
- params.require(:<%= options[:name] %>).permit()
10
+ params.require(:<%= options[:name].singularize %>).permit()
11
11
  end
12
12
  end
@@ -1,7 +1,7 @@
1
1
  require 'rails_helper'
2
2
 
3
3
  # Does this controller require authentication?
4
- describe <%= options[:name].camelize %>Controller do
4
+ describe <%= options[:name].pluralize.camelize %>Controller do
5
5
  # let(:user) {create :user}
6
6
  let(:<%= options[:name].pluralize %>) {[]}
7
7
  let(:<%= options[:name].singularize %>) {create :<%= options[:name].singularize %>}
@@ -1,3 +1,3 @@
1
1
  module Myrails
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/myrails.rb CHANGED
@@ -22,9 +22,9 @@ module Myrails
22
22
  desc 'controller --name=controller-name', 'Generate a rails controller with the given name along with boiler plate code and related spec filet'
23
23
  option :name, required: true
24
24
  def controller
25
- template 'rails/controller.rb', "app/controllers/#{options[:name]}_controller.rb"
26
- template 'rspec/controller.rb', "spec/controllers/#{options[:name]}_controller_spec.rb"
27
- run "mkdir app/views/#{options[:name]}"
25
+ template 'rails/controller.rb', "app/controllers/#{options[:name].pluralize}_controller.rb"
26
+ template 'rspec/controller.rb', "spec/controllers/#{options[:name].pluralize}_controller_spec.rb"
27
+ run "mkdir -p app/views/#{options[:name].pluralize}"
28
28
  end
29
29
 
30
30
  desc 'policy --name=policy-name', 'Generate a pundit policy with the given name and a related spec file'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-05 00:00:00.000000000 Z
11
+ date: 2016-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  requirements: []
188
188
  rubyforge_project:
189
- rubygems_version: 2.4.8
189
+ rubygems_version: 2.5.1
190
190
  signing_key:
191
191
  specification_version: 4
192
192
  summary: A thor backed generator for generating rails related files based on my style