snfoil-rails 1.1.1 → 1.1.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
  SHA256:
3
- metadata.gz: b2775609a8022b5d2ce38d53bc265f26e30504748235e93102b4e5197ffed9f3
4
- data.tar.gz: 7bd4df8cbd82f669857a26b373e923b71ee2e57f0b0cdd92fe7f1b11c515feb6
3
+ metadata.gz: 6700afcdb719797fdaeabbf26cd6756eeaec499241e279c3c02782a9d6ff7acf
4
+ data.tar.gz: 35c678efb56db5936547a847e5e098a2f0fde3dc497554f9d205839c7d27469d
5
5
  SHA512:
6
- metadata.gz: 3293333e0b487dd54d2428b79ec1140a5a9bb9cb6f9b1f4da4dc1722f1cb4c2dfc36903f4c690878a63ec3a0e0ff41b275a00c9ae7ca1c501a82724c5cff4cc4
7
- data.tar.gz: d7f6c54c4a3e1280cf92087dae0faed02d243ed033b33a4ecc2d8a44dfc121558e1fd71a09f5de3068d6a98c7dde719400bc1965edb2946b8b60291b69495330
6
+ metadata.gz: e33b44fccb163393262df4955445afae964e3efd013f147a93eb519479a4b1dd22a33839e31c8029b20614bfe546ae1007285f95f95b25566f1d88e06ecb1379
7
+ data.tar.gz: a2ecf94f51600bee7b5fac77176a27dea9bd39cf04a6fbe674a1aae78829ed6e355023a95318d05312e4001761929e1a407f7505270b80f0225536b8d5a1ba17
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class AllGenerator < Rails::Generators::Base
18
+ class AllGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:all'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -24,6 +29,8 @@ module SnFoil
24
29
  class_option(:skip_model, desc: 'Skip Model Creation', type: :boolean, default: false)
25
30
 
26
31
  def add_model
32
+ return if options[:skip_model]
33
+
27
34
  rails_command "generate model #{call_args.join(' ')}", call_options
28
35
  end
29
36
 
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class ContextGenerator < Rails::Generators::Base
18
+ class ContextGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:context'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class ControllerGenerator < Rails::Generators::Base
18
+ class ControllerGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:controller'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class JsonapiDeserializerGenerator < Rails::Generators::Base
18
+ class JsonapiDeserializerGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:jsonapi_deserializer'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class JsonapiSerializerGenerator < Rails::Generators::Base
18
+ class JsonapiSerializerGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:jsonapi_serializer'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class PolicyGenerator < Rails::Generators::Base
18
+ class PolicyGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:policy'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -15,7 +15,12 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module SnFoil
18
- class SearcherGenerator < Rails::Generators::Base
18
+ class SearcherGenerator < ::Rails::Generators::Base
19
+ def self.base_name
20
+ 'snfoil'
21
+ end
22
+
23
+ namespace 'snfoil:searcher'
19
24
  source_root File.expand_path('templates', __dir__)
20
25
 
21
26
  argument :model, type: :string
@@ -16,6 +16,6 @@
16
16
 
17
17
  module SnFoil
18
18
  module Rails
19
- VERSION = '1.1.1'
19
+ VERSION = '1.1.2'
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snfoil-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Howes