myrails 1.1.1 → 2.0.0

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: 9a04c90f6f73bd98b3b33310d9a71372e74e2efb
4
- data.tar.gz: b9159dadc657a39b1b3b1f300322999822aa2e85
3
+ metadata.gz: 1e8ae426601800f104ff9add6cde3b77f5fe57f1
4
+ data.tar.gz: 59bc8d8912a1d803aab43ae2c4e9054c7b9ae1e4
5
5
  SHA512:
6
- metadata.gz: 0f9f840ec9bc1a096584e2606b4f37ed23da9e1abfd6263ff7fa1ed0d99faf5aaff3ffdd30f82bd5edab73e022cb555efd170f928d81550081a8c6fb80962fdf
7
- data.tar.gz: b4adf482a09d447c1bf985fac4ac07efa1becae4b2bc916e3422e0c3af571b24bd74a0a3e675a963e56b83a45fd8a35a3d31160fd7b82c6fd707d40ceea6743d
6
+ metadata.gz: f3158f8c9346297f252f51dd33e0c010e982d6389dc32e6cf5409be53f9d1e874bbcfc8e4b377135453b24a65b729e5e67f5dc81bc63ec14323e1aeb5dd97bad
7
+ data.tar.gz: 5e887dc829d04a035d05e892c005f5f985603fec235b04d244575166feb420d2f4f177e8accce3207450c1fc567ae3255388b85d1c3e46cd7d15e9ef71a4d9df
data/README.md CHANGED
@@ -5,12 +5,14 @@ This gem was created to make generating rails related files and other rails gem
5
5
  This gem is not endorsed by 37signals. I wrote it as a convenience for generating files that I would otherwise have written by hand.
6
6
 
7
7
  ## Disclaimer
8
-
9
8
  This gem is not compatible with ruby 2.3 (yet).
10
9
 
10
+ ## Notes
11
+ Use 1.1.1 if you are primarily developing in rails 3 & 4
11
12
 
12
- ## Examples
13
+ Use 2.x.x if are primarily developing in rails 5
13
14
 
15
+ ## Examples
14
16
  Here is an example of the gem in action:
15
17
 
16
18
  For example, I use pundit. With this gem I am able to run the following:
@@ -45,7 +47,13 @@ with corresponding files:
45
47
  In your terminal:
46
48
 
47
49
  ```ruby
48
- gem install myrails -v 1.1.2
50
+ # For development in rails 3 & 4 primarily
51
+
52
+ gem install myrails -v 1.1.1
53
+
54
+ # For development in rails 5 primarily
55
+
56
+ gem install myrails
49
57
  ```
50
58
 
51
59
  ## Usage
@@ -1,2 +1,2 @@
1
- class <%= options[:name].camelize %> < ActiveRecord::Base
1
+ class <%= options[:name].camelize %> < ApplicationRecord
2
2
  end
@@ -1,4 +1,4 @@
1
1
  module <%= options[:namespace].camelize %>
2
- class <%= options[:name].camelize %> < ActiveRecord::Base
2
+ class <%= options[:name].camelize %> < ApplicationRecord
3
3
  end
4
4
  end
@@ -1,3 +1,3 @@
1
1
  module Myrails
2
- VERSION = "1.1.1"
2
+ VERSION = "2.0.0"
3
3
  end
data/lib/myrails.rb CHANGED
@@ -9,7 +9,7 @@ module Myrails
9
9
  TEMPLATES = source_root
10
10
  ENVIRONMENTS = %w(development test production)
11
11
 
12
- desc 'model', 'Generates and empty rails model with the given name and its related spec file. Add --namespace=NAME to create a namespaced model'
12
+ desc 'model', 'Generates and empty rails model with the given name and its related spec file Use --namespace=namespace to create a namespaced model'
13
13
  option :name, required: true
14
14
  option :namespace
15
15
  def model
@@ -22,7 +22,7 @@ module Myrails
22
22
  end
23
23
  end
24
24
 
25
- desc 'controller', 'Generate a rails controller with the given name along with boiler plate code and related spec file. Add --namespace=NAME to create namespaced controller'
25
+ desc 'controller', 'Generate a rails controller with the given name along with boiler plate code and related spec file. Add --namespace=NAME to create a namespaced controller'
26
26
  option :name, required: true
27
27
  option :namespace
28
28
  def controller
@@ -112,7 +112,7 @@ gem 'rspec-rails', group: :test
112
112
  end
113
113
  end
114
114
 
115
- desc 'config_env', 'Add code to environment files. Host refers to url options. Name option refers to mailer & controller default_url_options'
115
+ desc 'config_env', 'Add code to environment files. Host refers to url options. Name option referes to controller and mailer default_url_options'
116
116
  option :name, required: true
117
117
  def config_env
118
118
  ENVIRONMENTS.each do |environment|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myrails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vell