awesome_admin_layout 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +19 -1
- data/CHANGELOG.md +6 -1
- data/README.md +1 -1
- data/Rakefile +15 -0
- data/awesome_admin_layout.gemspec +2 -1
- data/gemfiles/rails_32.gemfile +5 -0
- data/gemfiles/rails_40.gemfile +5 -0
- data/gemfiles/rails_41.gemfile +5 -0
- data/gemfiles/rails_42.gemfile +5 -0
- data/gemfiles/rails_edge.gemfile +7 -0
- data/lib/awesome_admin_layout/recognize_path.rb +11 -1
- data/lib/awesome_admin_layout/tasks/release.rake +2 -2
- data/lib/awesome_admin_layout/version.rb +1 -1
- metadata +44 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0b95e7a057d181985063308b2927ba1864942e4
|
4
|
+
data.tar.gz: 1b3521038679f1da6fd005248a83fd1cb73517df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55672011710af67346e2d12f50ae4c2dd842a66106c3b81d2e38425781b32ca8e313353e67c16ebbfb66b873b5b3863ece632a384054840dca794e7266db8360
|
7
|
+
data.tar.gz: 80b8b6f75f2c5a4e4cad4dbc3eadf4eda0d28ea9aabe164d353d55b979d3c96d0725f561cab5d9855c30935f679ec00068446ae533f79783f2c6b115654f4541
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,3 +1,21 @@
|
|
1
|
-
language:
|
1
|
+
language:
|
2
|
+
- ruby
|
2
3
|
rvm:
|
3
4
|
- 2.1.2
|
5
|
+
- 2.2.0
|
6
|
+
- ruby-head
|
7
|
+
gemfile:
|
8
|
+
- gemfiles/rails_32.gemfile
|
9
|
+
- gemfiles/rails_40.gemfile
|
10
|
+
- gemfiles/rails_41.gemfile
|
11
|
+
- gemfiles/rails_42.gemfile
|
12
|
+
- gemfiles/rails_edge.gemfile
|
13
|
+
matrix:
|
14
|
+
exclude:
|
15
|
+
- rvm: 2.2.0
|
16
|
+
gemfile: gemfiles/rails_32.gemfile
|
17
|
+
- rvm: ruby-head
|
18
|
+
gemfile: gemfiles/rails_32.gemfile
|
19
|
+
allow_failures:
|
20
|
+
- rvm: ruby-head
|
21
|
+
- gemfile: gemfiles/rails_edge.gemfile
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -1 +1,16 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
Dir.glob('lib/awesome_admin_layout/tasks/*.rake').each { |r| load r }
|
5
|
+
|
6
|
+
Rake::TestTask.new(:test) do |t|
|
7
|
+
t.libs << 'test'
|
8
|
+
t.test_files = FileList['test/**/test_*.rb']
|
9
|
+
end
|
10
|
+
|
11
|
+
description = Rake::Task[:release].comment
|
12
|
+
Rake::Task[:release].clear
|
13
|
+
desc description
|
14
|
+
task release: 'awesome_admin_layout:release'
|
15
|
+
|
16
|
+
task default: :test
|
@@ -19,7 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_dependency 'sass'
|
20
20
|
spec.add_dependency 'coffee-script'
|
21
21
|
|
22
|
-
spec.add_development_dependency 'bundler', '~> 1.9'
|
23
22
|
spec.add_development_dependency 'rake', '~> 10.0'
|
24
23
|
spec.add_development_dependency 'sinatra', '~> 1.4.6'
|
24
|
+
spec.add_development_dependency 'rails', '>= 3.2.0', '< 5'
|
25
|
+
spec.add_development_dependency 'minitest', '>= 4.2.0', '<= 5.7'
|
25
26
|
end
|
@@ -18,7 +18,7 @@ module AwesomeAdminLayout
|
|
18
18
|
engine_instance = engine.instance
|
19
19
|
# Find the route to the engine, e.g. '/blog' -> Blog::Engine (a.k.a. "mount")
|
20
20
|
engine_class = engine_instance.class
|
21
|
-
engine_route = Rails.application.routes.routes.find { |r| r
|
21
|
+
engine_route = Rails.application.routes.routes.find { |r| app_class_for(r) == engine_class }
|
22
22
|
next unless engine_route
|
23
23
|
|
24
24
|
# The engine won't recognize the "mount", so strip it off the path,
|
@@ -48,5 +48,15 @@ module AwesomeAdminLayout
|
|
48
48
|
first_url.split('?').first.match(/^#{second_url.split('?').first}(\/\d*)?$/)
|
49
49
|
end
|
50
50
|
end
|
51
|
+
|
52
|
+
def app_class_for(route)
|
53
|
+
if Rails.version =~ /^4.2./
|
54
|
+
# for Rails 4.2
|
55
|
+
route.app.app
|
56
|
+
else
|
57
|
+
# for Rails 4.1, 4.0, 3.2
|
58
|
+
route.app
|
59
|
+
end
|
60
|
+
end
|
51
61
|
end
|
52
62
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'awesome_admin_layout/version'
|
2
2
|
|
3
|
-
root = File.expand_path('
|
3
|
+
root = File.expand_path('../../../../', __FILE__)
|
4
4
|
version = AwesomeAdminLayout::VERSION
|
5
5
|
tag = "v#{version}"
|
6
6
|
|
@@ -16,7 +16,7 @@ namespace :awesome_admin_layout do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
task :build => :pkg do
|
19
|
-
sh "gem build #{gemspec} && mv #{
|
19
|
+
sh "gem build #{gemspec} && mv #{gem} #{root}/pkg/"
|
20
20
|
end
|
21
21
|
|
22
22
|
task :install => :build do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_admin_layout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YOSHIDA Hiroki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slim
|
@@ -53,47 +53,73 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '10.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '10.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: sinatra
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 1.4.6
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 1.4.6
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 3.2.0
|
90
|
+
- - "<"
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '5'
|
90
93
|
type: :development
|
91
94
|
prerelease: false
|
92
95
|
version_requirements: !ruby/object:Gem::Requirement
|
93
96
|
requirements:
|
94
|
-
- - "
|
97
|
+
- - ">="
|
95
98
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
99
|
+
version: 3.2.0
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '5'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: minitest
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 4.2.0
|
110
|
+
- - "<="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: '5.7'
|
113
|
+
type: :development
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 4.2.0
|
120
|
+
- - "<="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: '5.7'
|
97
123
|
description: AwesomeAdminLayout provides a simple way to add admin panel layout to
|
98
124
|
your application.
|
99
125
|
email:
|
@@ -111,6 +137,11 @@ files:
|
|
111
137
|
- app/assets/javascripts/awesome_admin_layout.coffee
|
112
138
|
- app/assets/stylesheets/awesome_admin_layout.scss
|
113
139
|
- awesome_admin_layout.gemspec
|
140
|
+
- gemfiles/rails_32.gemfile
|
141
|
+
- gemfiles/rails_40.gemfile
|
142
|
+
- gemfiles/rails_41.gemfile
|
143
|
+
- gemfiles/rails_42.gemfile
|
144
|
+
- gemfiles/rails_edge.gemfile
|
114
145
|
- lib/awesome_admin_layout.rb
|
115
146
|
- lib/awesome_admin_layout/engine.rb
|
116
147
|
- lib/awesome_admin_layout/helpers.rb
|