orthodox 0.3.1 → 0.3.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: 3c740d0d444bd2896b459d0bda364d38cef3b9bbe943fe1a012e7deb0114d816
4
- data.tar.gz: 63d17b2215420e68e9fc7510dad4adeaa4d188017b2c2330349c178d52118328
3
+ metadata.gz: 5c76ea98111b9b984963beba14eb62daea017a646a34057c726b73b44fc3805c
4
+ data.tar.gz: 5d712ea97e53c4247eae89c6875a0e6fec64edb8b88123483762dbd9251837e3
5
5
  SHA512:
6
- metadata.gz: 891bdc496f65fb89d4731384fac358a1d0b928da22f44dc046a08d0a79743261613872d4a561c9c8cfb879667e89ea33384e93692d2806060f6294a06f510b02
7
- data.tar.gz: 37a7304318cefc33c5a110a3744b5333d1973fd0d94341be24b0fade681602cb0071e6eed7b21ccc83499488807738e4082a3ca2201229528436cf7c6581f4b8
6
+ metadata.gz: 0b230ca3b3d30e942336fddb247f2fbe722c00b983985df52c1e2f799e25d030fb1e9404bdfe1813a80c2752413545e1fa0b15dd3b570af35d034af61d3de4c6
7
+ data.tar.gz: 249654ccbfa5844af6c3862a8efcabca77339554ee77b7a55fa30a64d07cb5faaaf69da69f8443c53346c719f34254997b2ae47de5b41c1bbf0335b958de64f0
@@ -8,7 +8,7 @@ gem 'rails', '~> 5.2.0'
8
8
  # Use sqlite3 as the database for Active Record
9
9
  gem 'sqlite3'
10
10
  # Use Puma as the app server
11
- gem 'puma', '~> 3.11'
11
+ gem 'puma', '~> 4.3'
12
12
  # Use SCSS for stylesheets
13
13
  gem 'sass-rails', '~> 5.0'
14
14
  # Use Uglifier as compressor for JavaScript assets
@@ -113,7 +113,8 @@ GEM
113
113
  nokogiri (1.10.5)
114
114
  mini_portile2 (~> 2.4.0)
115
115
  public_suffix (3.0.2)
116
- puma (3.11.4)
116
+ puma (4.3.1)
117
+ nio4r (~> 2.0)
117
118
  rack (2.0.6)
118
119
  rack-test (1.1.0)
119
120
  rack (>= 1.0, < 3)
@@ -215,7 +216,7 @@ DEPENDENCIES
215
216
  jbuilder (~> 2.5)
216
217
  listen (>= 3.0.5, < 3.2)
217
218
  orthodox!
218
- puma (~> 3.11)
219
+ puma (~> 4.3)
219
220
  rails (~> 5.2.0)
220
221
  sass-rails (~> 5.0)
221
222
  selenium-webdriver
@@ -82,10 +82,11 @@ module Authentication
82
82
  # Returns Boolean
83
83
  define_method(:"current_#{model_name}?") { send(:"current_#{model_name}").present? }
84
84
 
85
- alias_method :"#{model_name}_signed_in?", :"current_#{model_name}?"
85
+ define_method(:"#{model_name}_signed_in?") { send(:"current_#{model_name}?") }
86
86
 
87
- alias_method :"#{model_name}_failed_authentication_url",
88
- :"new_#{model_name.to_s.pluralize}_session_url"
87
+ define_method(:"#{model_name}_failed_authentication_url") do
88
+ send(:"new_#{model_name.to_s.pluralize}_session_url")
89
+ end
89
90
 
90
91
  helper_method :"current_#{model_name}"
91
92
  helper_method :"current_#{model_name}?"
@@ -3,20 +3,20 @@ class <%= class_name %>Controller < <%= parent_class_name %>
3
3
 
4
4
  <%- if authenticate_actor? -%>
5
5
  before_action :authenticate_<%= authenticate_actor %>!
6
+
6
7
  <%- end -%>
7
-
8
8
  <%- if actions.include?('index') -%>
9
9
  def index
10
10
  @<%= plural_name %> = <%= plural_name %>_scope
11
11
  end
12
- <%- end -%>
13
12
 
13
+ <%- end -%>
14
14
  <%- if actions.include?('new') -%>
15
15
  def new
16
16
  @<%= singular_name %> = <%= plural_name %>_scope.new
17
17
  end
18
- <%- end -%>
19
18
 
19
+ <%- end -%>
20
20
  <%- if actions.include?('create') -%>
21
21
  def create
22
22
  @<%= singular_name %> = <%= plural_name %>_scope.new(<%= singular_name %>_params)
@@ -26,20 +26,20 @@ class <%= class_name %>Controller < <%= parent_class_name %>
26
26
  render :new
27
27
  end
28
28
  end
29
- <%- end -%>
30
29
 
30
+ <%- end -%>
31
31
  <%- if actions.include?('show') -%>
32
32
  def show
33
33
  @<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
34
34
  end
35
- <%- end -%>
36
35
 
36
+ <%- end -%>
37
37
  <%- if actions.include?('edit') -%>
38
38
  def edit
39
39
  @<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
40
40
  end
41
- <%- end -%>
42
41
 
42
+ <%- end -%>
43
43
  <%- if actions.include?('update') -%>
44
44
  def update
45
45
  @<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
@@ -49,16 +49,16 @@ class <%= class_name %>Controller < <%= parent_class_name %>
49
49
  render :edit
50
50
  end
51
51
  end
52
- <%- end -%>
53
52
 
53
+ <%- end -%>
54
54
  <%- if actions.include?('destroy') -%>
55
55
  def destroy
56
56
  @<%= singular_name %> = <%= plural_name %>_scope.find(params[:id])
57
57
  @<%= singular_name %>.destroy
58
- redirect_to(<%= singular_name %>_url(@<%= singular_name %>), notice: "<%= destroy_flash_message %>")
58
+ redirect_to(<%= plural_name %>_url, notice: "<%= destroy_flash_message %>")
59
59
  end
60
- <%- end -%>
61
60
 
61
+ <%- end -%>
62
62
  <%- if actions.any? -%>
63
63
  private
64
64
 
@@ -67,9 +67,12 @@ class <%= class_name %>Controller < <%= parent_class_name %>
67
67
  <%= singular_name.classify %>.all
68
68
  end
69
69
 
70
+ <% end %>
71
+ <%- if actions.include?('create') || actions.include?('update') -%>
72
+
70
73
  def <%= singular_name %>_params
71
74
  params.require(:<%= singular_name %>).permit()
72
75
  end
73
- <%- end -%>
74
76
 
77
+ <%- end -%>
75
78
  end
@@ -1,3 +1,3 @@
1
1
  module Orthodox
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orthodox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bodacious
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-12-04 00:00:00.000000000 Z
12
+ date: 2019-12-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails