linked_rails 0.0.2 → 0.0.3

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: 6ea353cdd2aa8e1d314e82719b3a6eeb3032ba357d9bc6f68ae35b51b85024b8
4
- data.tar.gz: e62b42eb95b8127e2c3e364150c5c695a5df206cc0d8b63311f3270b798dee8b
3
+ metadata.gz: 6779d430183378aeebf11d84973275d9f95ba6be8d9d806c4488f9c5e0a7ca11
4
+ data.tar.gz: e98856daaf5f8698922faeec141b6f24c3e72856076955bd2892b067e37609d2
5
5
  SHA512:
6
- metadata.gz: 246b26849c79ab8d7237b5578413534042afbb4b70b642d54632afcec5d0c8a060cdf18e40f078532428a93712a2ccfe7bc509724e4b2bd3a7aa8e5c78fc0469
7
- data.tar.gz: 9f05542d477578c2bf53bada3dde3c282f4a45ce83142fd847fc0da645bb37366961df1061862e858fae04af1d82000a2a7a4a0caa888aeec50e86f548e37b02
6
+ metadata.gz: 17934ce95f375a4b36a63b56285f1db4e2171d6d1c5bc2747dc0132548b77c36a484be64aeacb47ec89fe15ba77fd39a9f44ee25096759438aea8882b8ec8dbf
7
+ data.tar.gz: 30fff5ebacf094fcaada45caab3d15537ba5806692f9dd887f509155420880b07283ec41aa6282e2d572e15fcb7cdce508bd55d102bd790eb1b7be5cc1d353dd
@@ -26,6 +26,8 @@ module LinkedRails
26
26
  application 'config.middleware.use LinkedRails::Middleware::LinkedDataParams'
27
27
  application 'config.jwt_encryption_method = :hs512'
28
28
  inject_includes
29
+
30
+ readme 'README'
29
31
  end
30
32
 
31
33
  private
@@ -0,0 +1,5 @@
1
+ Add the following to config/development.rb
2
+ config.hosts = []
3
+ config.hosts << 'localhost'
4
+ config.hosts << '.svc.cluster.local'
5
+
@@ -4,6 +4,8 @@ module LinkedRails
4
4
  module Controller
5
5
  module ErrorHandling
6
6
  extend ActiveSupport::Concern
7
+ include ActiveSupport::Rescuable
8
+
7
9
  included do
8
10
  rescue_from StandardError, with: :handle_and_report_error
9
11
  rescue_from ActiveRecord::RecordNotFound, with: :handle_error
@@ -36,7 +36,7 @@ module LinkedRails
36
36
  module ClassMethods
37
37
  def controller_class
38
38
  @controller_class ||=
39
- name.sub(/Controller$/, '').classify.safe_constantize || controller_name.classify.safe_constantize
39
+ name.sub(/Controller$/, '').classify.safe_constantize || try(:controller_name)&.classify&.safe_constantize
40
40
  end
41
41
  end
42
42
  end
@@ -3,7 +3,7 @@
3
3
  module LinkedRails
4
4
  module Enhanceable
5
5
  def include_enhancements(klass_method, enhanceable)
6
- send(klass_method)
6
+ try(klass_method)
7
7
  .try(:enhancement_modules, enhanceable)
8
8
  &.reject { |mod| include? mod }
9
9
  &.each { |mod| include mod }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LinkedRails
4
- VERSION = '0.0.2'
4
+ VERSION = '0.0.3'
5
5
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Rails
4
4
  class WelcomeController
5
+ include AbstractController::Callbacks
5
6
  include ActiveResponse::Controller
6
7
  include LinkedRails::Controller
7
8
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linked_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Dingemans
@@ -306,6 +306,7 @@ files:
306
306
  - app/serializers/linked_rails/widget_serializer.rb
307
307
  - config/initializers/inflections.rb
308
308
  - lib/generators/linked_rails/install/install_generator.rb
309
+ - lib/generators/linked_rails/install/templates/README
309
310
  - lib/generators/linked_rails/install/templates/app_menu_list.rb
310
311
  - lib/generators/linked_rails/install/templates/application_action_list.rb
311
312
  - lib/generators/linked_rails/install/templates/application_form.rb