phcdevworks_active_menus 2.1.2 → 2.3.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
  SHA256:
3
- metadata.gz: 0d7af2b482230969d4b1103d71861ee501cb396fb8bb235699bba4189211e001
4
- data.tar.gz: b8893107b2a098f9a6b4d40a6cba85b07f25c03815c329c5503ee15120a5f056
3
+ metadata.gz: 69dfa4d5554399d20bb1fe9f3fe2c27a8bcbe283557fb4a431dccd60d0b823f1
4
+ data.tar.gz: 53e5feef5d14514e0801d3b1bc42ecb4e81ebabee5e7173a216071e27099c732
5
5
  SHA512:
6
- metadata.gz: 363fdb264d024e6d41174639a09c2ae45c0322aeaaa79aaaeee1ef861202652f0d7e6c55416097bb0f55963564cb31141d22e23c699a48d78c9a29c97e9c6607
7
- data.tar.gz: 3e0e8c64b95788942379c4b7dde895434c5998e2f5459d519c5064cb5cbd0489f836ac359ed321f6da7d6b4c52068fda88d689faaef9c7179547dcc21f196a71
6
+ metadata.gz: 61ab8542e99813e58e7d3526722a715121b1d5d572f72a7c2a3ec652a93b0b71924a2ad2f98164e06cf2f60fe697302b575225d300e439790dfcb30d4fec6763
7
+ data.tar.gz: 8214db7f059fc315043d485c55811e7fc9608cce98dded69b335d0a4c5ab8c6d89315f76bd851f365754327f7ae7adb71c350706ce6111ca042ed3bc465204e6
data/MIT-LICENSE CHANGED
@@ -1,20 +1,20 @@
1
- Copyright 2010-2020 BradPotts - PHCDevworks
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright 2021 PHCDevworks
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,31 +1,33 @@
1
- ### PHCDevworks Active Menus for Rails 6 (Add Active Class to Menus)
2
- PHCDevworks Active Menus Rails 6 engine with helpers to add active class to menus.
3
-
4
- * Add active class based on current controller.
5
- * Add active class based on current action.
6
- * Add active class based on both current controller plus current action.
7
-
8
- #### Step 1 - Add PHCDevworks Active Menus to your gemfile
9
-
10
- gem 'phcdevworks_active_menus'
11
- bundle install
12
-
13
- #### Step 2 - Load Helpers in the Application's Controller
14
- Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
15
-
16
- helper PhcdevworksActiveMenus::Engine.helpers
17
-
18
- #### How to Add Active Class Based on Controller Only (Often used for main menu items with sub-menus.)
19
- Add the line of code in between div class tag.
20
-
21
- <div class"<%= phc_menu_active_controller("ExampleControllerName") %>">
22
-
23
- #### How to Add Active Class Based on Action Only (Often used for submenu items.)
24
- Add the line of code in between div class tag.
25
-
26
- <div class"<%= phc_menu_active_action("ExampleActionName") %>">
27
-
28
- #### How to Add Active Class Based on Controller and Action (Used if you need to get specific.)
29
- Add the line of code in between div class tag.
30
-
31
- <div class"<%= phc_menu_active_action_controller("ExampleControllerName", "ExampleActionName") %>">
1
+ ### PHCDevworks Active Menus for Rails 6 (Add Active Class to Menus)
2
+ PHCDevworks Active Menus Rails 6 engine with helpers to add active class to menus.
3
+
4
+ * Add active class based on current controller.
5
+ * Add active class based on current action.
6
+ * Add active class based on both current controller plus current action.
7
+
8
+ #### Step 1 - Add PHCDevworks Active Menus to your gemfile
9
+
10
+ gem 'phcdevworks_active_menus'
11
+ bundle install
12
+
13
+ #### Step 2 - Load Helpers in the Application's Controller
14
+ Add the line of code below into your app/controllers/application_controller.rb (application's controller file).
15
+
16
+ helper PhcdevworksActiveMenus::Engine.helpers
17
+
18
+ #### How to Add Active Class Based on Controller Only (Often used for main menu items with sub-menus.)
19
+ Add the line of code in between div class tag.
20
+
21
+ <div class"<%= phc_menu_active_controller("ExampleControllerName") %>">
22
+
23
+ #### How to Add Active Class Based on Action Only (Often used for submenu items.)
24
+ Add the line of code in between div class tag.
25
+
26
+ <div class"<%= phc_menu_active_action("ExampleActionName") %>">
27
+
28
+ #### How to Add Active Class Based on Controller and Action (Used if you need to get specific.)
29
+ Add the line of code in between div class tag.
30
+
31
+ <div class"<%= phc_menu_active_action_controller("ExampleControllerName", "ExampleActionName") %>">
32
+
33
+ [![Gem Version](https://badge.fury.io/rb/phcdevworks_active_menus.svg)](https://badge.fury.io/rb/phcdevworks_active_menus)
data/Rakefile CHANGED
@@ -1,32 +1,8 @@
1
- begin
2
- require 'bundler/setup'
3
- rescue LoadError
4
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
- end
6
-
7
- require 'rdoc/task'
8
-
9
- RDoc::Task.new(:rdoc) do |rdoc|
10
- rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'PhcdevworksActiveMenus'
12
- rdoc.options << '--line-numbers'
13
- rdoc.rdoc_files.include('README.md')
14
- rdoc.rdoc_files.include('lib/**/*.rb')
15
- end
16
-
17
- APP_RAKEFILE = File.expand_path("test/test_app/Rakefile", __dir__)
18
- load 'rails/tasks/engine.rake'
19
-
20
- load 'rails/tasks/statistics.rake'
21
-
22
- require 'bundler/gem_tasks'
23
-
24
- require 'rake/testtask'
25
-
26
- Rake::TestTask.new(:test) do |t|
27
- t.libs << 'test'
28
- t.pattern = 'test/**/*_test.rb'
29
- t.verbose = false
30
- end
31
-
32
- task default: :test
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("spec/test_app/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
@@ -1,20 +1,20 @@
1
- module PhcdevworksActiveMenus
2
- module ApplicationHelper
3
-
4
- # Add Active to Menu Based on Controller Name
5
- def phc_menu_active_controller(controller_name)
6
- params[:controller] == controller_name ? "active" : nil
7
- end
8
-
9
- # Add Active to Menu Based on Controller Name
10
- def phc_menu_active_action(action_name)
11
- params[:action] == action_name ? "active" : nil
12
- end
13
-
14
- # Add Active to Menu Based on Both Controller Name and Action
15
- def phc_menu_active_action_controller(controller_name, action_name)
16
- params[:controller] == controller_name && params[:action] == action_name ? "active" : nil
17
- end
18
-
19
- end
20
- end
1
+ module PhcdevworksActiveMenus
2
+ module ApplicationHelper
3
+
4
+ # Add Active to Menu Based on Controller Name
5
+ def phc_menu_active_controller(controller_name)
6
+ params[:controller] == controller_name ? "active" : nil
7
+ end
8
+
9
+ # Add Active to Menu Based on Controller Name
10
+ def phc_menu_active_action(action_name)
11
+ params[:action] == action_name ? "active" : nil
12
+ end
13
+
14
+ # Add Active to Menu Based on Both Controller Name and Action
15
+ def phc_menu_active_action_controller(controller_name, action_name)
16
+ params[:controller] == controller_name && params[:action] == action_name ? "active" : nil
17
+ end
18
+
19
+ end
20
+ end
@@ -1,12 +1,12 @@
1
- module PhcdevworksActiveMenus
2
- class Engine < ::Rails::Engine
3
-
4
- # Theme Dependencies
5
- require "phcthemes_admin_panel_pack"
6
- require "phcthemes_web_theme_pack"
7
-
8
- # Plugin Namespace
9
- isolate_namespace PhcdevworksActiveMenus
10
-
11
- end
12
- end
1
+ module PhcdevworksActiveMenus
2
+ class Engine < ::Rails::Engine
3
+
4
+ # Theme Dependencies
5
+ require "phcthemes_admin_panel_pack"
6
+ require "phcthemes_web_theme_pack"
7
+
8
+ # Plugin Namespace
9
+ isolate_namespace PhcdevworksActiveMenus
10
+
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
- module PhcdevworksActiveMenus
2
- VERSION = "2.1.2"
3
- end
1
+ module PhcdevworksActiveMenus
2
+ VERSION = '2.3.0'
3
+ end
@@ -1,5 +1,6 @@
1
- require "phcdevworks_active_menus/engine"
2
-
3
- module PhcdevworksActiveMenus
4
- # Your code goes here...
5
- end
1
+ require "phcdevworks_active_menus/version"
2
+ require "phcdevworks_active_menus/engine"
3
+
4
+ module PhcdevworksActiveMenus
5
+ # Your code goes here...
6
+ end
@@ -1,4 +1,4 @@
1
- # desc "Explaining what the task does"
2
- # task :phcdevworks_active_menus do
3
- # # Task goes here
4
- # end
1
+ # desc "Explaining what the task does"
2
+ # task :phcdevworks_active_menus do
3
+ # # Task goes here
4
+ # end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phcdevworks_active_menus
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.2
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PHCDevworks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-22 00:00:00.000000000 Z
11
+ date: 2021-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,48 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '6.0'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 6.0.3.4
19
+ version: '6.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '6.0'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 6.0.3.4
26
+ version: '6.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: phcthemes_admin_panel_pack
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
31
  - - "~>"
38
32
  - !ruby/object:Gem::Version
39
- version: '3.1'
33
+ version: '4.1'
40
34
  type: :runtime
41
35
  prerelease: false
42
36
  version_requirements: !ruby/object:Gem::Requirement
43
37
  requirements:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: '3.1'
40
+ version: '4.1'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: phcthemes_web_theme_pack
49
43
  requirement: !ruby/object:Gem::Requirement
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '3.1'
47
+ version: '4.1'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - "~>"
59
53
  - !ruby/object:Gem::Version
60
- version: '3.1'
54
+ version: '4.1'
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: sqlite3
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +69,7 @@ dependencies:
75
69
  description: Rails helpers to add active class to menu items based on controller and
76
70
  controller action.
77
71
  email:
78
- - info@phcdevworks.com
72
+ - imfo@phcdevworks.com
79
73
  executables: []
80
74
  extensions: []
81
75
  extra_rdoc_files: []
@@ -83,15 +77,7 @@ files:
83
77
  - MIT-LICENSE
84
78
  - README.md
85
79
  - Rakefile
86
- - app/assets/config/phcdevworks_active_menus_manifest.js
87
- - app/assets/javascripts/phcdevworks_active_menus/application.js
88
- - app/assets/stylesheets/phcdevworks_active_menus/application.scss
89
- - app/controllers/phcdevworks_active_menus/application_controller.rb
90
80
  - app/helpers/phcdevworks_active_menus/application_helper.rb
91
- - app/jobs/phcdevworks_active_menus/application_job.rb
92
- - app/mailers/phcdevworks_active_menus/application_mailer.rb
93
- - app/models/phcdevworks_active_menus/application_record.rb
94
- - app/views/layouts/phcdevworks_active_menus/application.html.erb
95
81
  - lib/phcdevworks_active_menus.rb
96
82
  - lib/phcdevworks_active_menus/engine.rb
97
83
  - lib/phcdevworks_active_menus/version.rb
@@ -99,7 +85,11 @@ files:
99
85
  homepage: https://phcdevworks.com/
100
86
  licenses:
101
87
  - MIT
102
- metadata: {}
88
+ metadata:
89
+ allowed_push_host: https://rubygems.org/
90
+ homepage_uri: https://phcdevworks.com/
91
+ source_code_uri: https://github.com/phcdevworks/phcdevworks_active_menus
92
+ changelog_uri: https://github.com/phcdevworks/phcdevworks_active_menus/releases
103
93
  post_install_message:
104
94
  rdoc_options: []
105
95
  require_paths:
@@ -115,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
105
  - !ruby/object:Gem::Version
116
106
  version: '0'
117
107
  requirements: []
118
- rubygems_version: 3.0.3
108
+ rubygems_version: 3.2.22
119
109
  signing_key:
120
110
  specification_version: 4
121
111
  summary: PHCDevworks - Helpers - Active Menus
@@ -1,3 +0,0 @@
1
- //= link_tree ../images
2
- //= link_directory ../javascripts/phcdevworks_active_menus .js
3
- //= link_directory ../stylesheets/phcdevworks_active_menus .scss
@@ -1,5 +0,0 @@
1
- module PhcdevworksActiveMenus
2
- class ApplicationController < ActionController::Base
3
- protect_from_forgery with: :exception
4
- end
5
- end
@@ -1,4 +0,0 @@
1
- module PhcdevworksActiveMenus
2
- class ApplicationJob < ActiveJob::Base
3
- end
4
- end
@@ -1,6 +0,0 @@
1
- module PhcdevworksActiveMenus
2
- class ApplicationMailer < ActionMailer::Base
3
- default from: 'from@example.com'
4
- layout 'mailer'
5
- end
6
- end
@@ -1,5 +0,0 @@
1
- module PhcdevworksActiveMenus
2
- class ApplicationRecord < ActiveRecord::Base
3
- self.abstract_class = true
4
- end
5
- end
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
-
5
- <title>PHCDevworks Active Menus</title>
6
- <%= csrf_meta_tags %>
7
- <%= csp_meta_tag %>
8
-
9
- <%= stylesheet_link_tag "phcdevworks_active_menus/application", media: "all" %>
10
- <%= javascript_include_tag "phcdevworks_active_menus/application" %>
11
-
12
- </head>
13
- <body>
14
-
15
- <%= yield %>
16
-
17
- </body>
18
- </html>