blueberry_redirector 0.1.5 → 0.1.6

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: f438fe827c6a82fcd9187399f523496f907ef6a4
4
- data.tar.gz: 0e09ede94d66c523360423a0acc0ba872af7f34f
3
+ metadata.gz: c1effdf99e765e96d0c8ab6e3f4230559f6d217c
4
+ data.tar.gz: 5d1c5da4cf8eb489b8aa6c0f5cc56efec5b54c74
5
5
  SHA512:
6
- metadata.gz: 810d20477cf8ff9ee2e02470e2fbc201f6a358a11cb9c3ce4dca6ab7689aea12ea41c008620770df44137bec7e2f1a7e8c06e9a0f310acc7db1f246578081d00
7
- data.tar.gz: 7d53039e6b350faee298495e46ee5218e08bbbc0ddb419bfd306c253c0a0ed704a65357dd78d28e17ba3e3bfc948c5234dd80d415364e997b5aa4cb7e44a9355
6
+ metadata.gz: 48096329b63839c30bdbb7a8f2ff7d83785c2f7409c9e448384cba4aa78d5d9f88bce6d6c500a0b0db46d4717304a1e5627f2c09036a038044ac131510161bdf
7
+ data.tar.gz: 1add403ed950690c3db5d8f73ffb06689d0c21c0529967921ef896b7a76bf3c8245f3111c8ad0ffb534aed9cef291d158e12671b320b5689f04c29cc7d1b0856
data/README.md CHANGED
@@ -7,13 +7,24 @@ How to use my plugin.
7
7
  ## Installation
8
8
  1. Add this to your Gemfile and then `bundle install`:
9
9
 
10
- ```ruby
10
+ ```ruby
11
11
  gem 'blueberry_redirector'
12
12
  ```
13
13
 
14
14
  2. `$ rake redirector:install:migrations`
15
15
  3. `$ rake db:migrate`
16
+ 4. Customize
17
+ Initializer
18
+ ```ruby
19
+ BlueberryRedirector.config do |config|
20
+ # config.admin_controller = 'Admin::BaseController'
21
+ end
22
+ ```
16
23
 
24
+ Add link to your layout
25
+ ```ruby
26
+ = link_to t('.redirector'), admin_redirector.root_path
27
+ ```
17
28
 
18
29
  ## Contributing
19
30
  Contribution directions go here.
@@ -1,8 +1,7 @@
1
1
  module BlueberryRedirector
2
- class ApplicationController < Admin::BaseController
2
+ class ApplicationController < BlueberryRedirector.admin_controller.constantize
3
3
  protect_from_forgery with: :exception
4
4
 
5
- layout 'blueberry_redirector/admin'
6
5
  helper BlueberryRedirector::RedirectorHelper
7
6
  end
8
7
  end
@@ -2,4 +2,11 @@ require 'blueberry_redirector/engine'
2
2
  require 'redirector'
3
3
 
4
4
  module BlueberryRedirector
5
+ mattr_accessor :admin_controller
6
+
7
+ @@admin_controller = 'Admin::BaseController'
8
+
9
+ def self.config
10
+ yield self
11
+ end
5
12
  end
@@ -1,3 +1,3 @@
1
1
  module BlueberryRedirector
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueberry_redirector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tonda Pleskac
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-21 00:00:00.000000000 Z
11
+ date: 2018-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -105,7 +105,6 @@ files:
105
105
  - app/views/blueberry_redirector/redirector_rules/index.html.slim
106
106
  - app/views/blueberry_redirector/redirector_rules/new.html.slim
107
107
  - app/views/blueberry_redirector/redirector_rules/new_import.html.slim
108
- - app/views/layouts/blueberry_redirector/admin.html.slim
109
108
  - config/locales/cs.yml
110
109
  - config/routes.rb
111
110
  - db/migrate/20170126132346_create_redirect_rules.rb
@@ -133,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
132
  version: '0'
134
133
  requirements: []
135
134
  rubyforge_project:
136
- rubygems_version: 2.6.8
135
+ rubygems_version: 2.6.14
137
136
  signing_key:
138
137
  specification_version: 4
139
138
  summary: Summary of BlueberryRedirector.
@@ -1,37 +0,0 @@
1
- doctype html
2
- html
3
- head
4
- = metamagic site: 'Admin - Přesměrování',
5
- title: [:title, :site],
6
- separator: ' – '
7
- meta charset='utf-8'
8
- meta name='viewport' content='width=device-width, initial-scale=1.0'
9
- = stylesheet_link_tag :admin, media: 'all'
10
- = csrf_meta_tags
11
-
12
- body class=body_class
13
- .wrapper
14
- .sidebar
15
- ul.sidebar-menu
16
- li.logo = link_to image_tag('blueberry-logo.png'), main_app.admin_root_path
17
- li = link_to t('.main_app'), main_app.admin_root_path
18
- li = link_to t('.redirector_rules'), [:redirector_rules]
19
-
20
- .content-wrapper
21
- .header
22
- nav.navbar.navbar-static-top role="navigation"
23
- .navbar-custom-menu
24
- ul.nav.navbar-nav
25
- li
26
- = link_to '#'
27
- i.glyphicon.glyphicon-user>
28
- span.role = current_administrator.email.split('@').first
29
- li
30
- = link_to main_app.destroy_administrator_session_path, method: :delete, title: t('.logout')
31
- i.glyphicon.glyphicon-log-out
32
-
33
- = render 'application/flashes'
34
- = yield
35
-
36
- = javascript_include_tag :admin
37
- = yield :javascript