godmin 0.12.2 → 0.12.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bb2915931cb75703a3b3bffc12bb57a9b29cc97
4
- data.tar.gz: 6c7247808002572bd0fe122615c82dde755be974
3
+ metadata.gz: 7ca2bcb850c5153d711926873311e9bcd6b097cc
4
+ data.tar.gz: dd1743579d7a139f5d46fe46fc9ba531d9944a45
5
5
  SHA512:
6
- metadata.gz: 93690b6ab331b871865ebd7a9af79626e7bec7d4f066476c6118c42769855e10da4d83ddaf3d38bc89b10c34f2cc6798231d0c5b6b9d8769271cdc7aee9239d9
7
- data.tar.gz: 9f7fe59b58bc5032c4734cf9f0e734e4b9b301c76edf9ad0b52b92e55943b98b44c427ce0ba41624a88a8e01431a56a788197744726597dd1c47e55e7ea71b15
6
+ metadata.gz: a1631d2deb602e75080c84ede97d5b8a019f50730679102fc9f254410c66e0d9d161796bad023618771d1b568662fab72ee920512cc4e5c9aa04fce482bb6d38
7
+ data.tar.gz: b3e86c7325e55d74cab0e5b54c1f9eb63c88cf27a7591c61da97f50f8b9dd6c9bac83870920f50da8c8e6afb253ceabf2eb2e548ffc7e7eb6bfc8b5800d23bb2
data/.gitignore CHANGED
@@ -24,4 +24,4 @@ config/initializers/secret_token.rb
24
24
  /test/dummy/tmp/*
25
25
  /test/dummy/db/*.sqlite3
26
26
  Gemfile.lock
27
- tags
27
+ .tags
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.12.3 - 2015-09-18
4
+ Bug fixes
5
+ - Adds support for plural engines (https://github.com/varvet/godmin/pull/128)
6
+ - Remove turbolinks from application.js if present (https://github.com/varvet/godmin/issues/129)
7
+
3
8
  ### 0.12.2 - 2015-09-07
4
9
  Bug fixes
5
10
  - Fixes broken sign in page
@@ -22,9 +22,13 @@ class Godmin::InstallGenerator < Godmin::Generators::Base
22
22
  end
23
23
 
24
24
  def modify_application_js
25
- inject_into_file File.join("app/assets/javascripts", namespaced_path, "application.js"), before: "//= require_tree ." do
25
+ application_js = File.join("app/assets/javascripts", namespaced_path, "application.js")
26
+
27
+ inject_into_file application_js, before: "//= require_tree ." do
26
28
  "//= require godmin\n"
27
29
  end
30
+
31
+ gsub_file application_js, /\/\/= require turbolinks\n/, ""
28
32
  end
29
33
 
30
34
  def modify_application_css
@@ -17,7 +17,7 @@ module Godmin
17
17
  def namespaced_path
18
18
  @namespaced_path ||= begin
19
19
  if namespaced?
20
- namespace.name.classify.split("::").map(&:underscore)
20
+ namespace.name.split("::").map(&:underscore)
21
21
  else
22
22
  []
23
23
  end
@@ -22,7 +22,7 @@ module Godmin
22
22
  def namespaced_path
23
23
  @namespaced_path ||= begin
24
24
  if namespaced?
25
- namespace.name.classify.split("::").map(&:underscore)
25
+ namespace.name.split("::").map(&:underscore)
26
26
  else
27
27
  []
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module Godmin
2
- VERSION = "0.12.2"
2
+ VERSION = "0.12.3"
3
3
  end
@@ -10,6 +10,14 @@ module Godmin
10
10
  class Controller < ActionController::Base; end
11
11
  end
12
12
 
13
+ module Admins
14
+ class Engine < Rails::Engine
15
+ isolate_namespace Admins
16
+ end
17
+
18
+ class Controller < ActionController::Base; end
19
+ end
20
+
13
21
  class Controller < ActionController::Base; end
14
22
 
15
23
  def test_default_namespace
@@ -47,6 +55,11 @@ module Godmin
47
55
  assert_equal ["godmin", "engine_wrapper_test", "admin"], engine_wrapper.namespaced_path
48
56
  end
49
57
 
58
+ def test_plural_engine_namespaced_path
59
+ engine_wrapper = EngineWrapper.new(Admins::Controller)
60
+ assert_equal ["godmin", "engine_wrapper_test", "admins"], engine_wrapper.namespaced_path
61
+ end
62
+
50
63
  def test_engine_root
51
64
  engine_wrapper = EngineWrapper.new(Admin::Controller)
52
65
  assert_equal Admin::Engine.root, engine_wrapper.root
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: godmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Ljungblad
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-09-07 00:00:00.000000000 Z
13
+ date: 2015-09-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bcrypt