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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44af5363829a9f03c57f66666cfce21f3d192dba
4
- data.tar.gz: 1a86d7dc0d4606815f023ef30eac8e8add690efa
3
+ metadata.gz: d0b95e7a057d181985063308b2927ba1864942e4
4
+ data.tar.gz: 1b3521038679f1da6fd005248a83fd1cb73517df
5
5
  SHA512:
6
- metadata.gz: 4f43a317f0986eb4d7629eecfa5c530548ddd7883207d36324e5fd2d605b2905d6b09cae6df41a1215c4652bd24ca986f726b97fcca696e224740fb4ea5e28c1
7
- data.tar.gz: e2c0cc6e8e0426f6de9220d0b23c352daab232f1d2145915ef81a708e6ca490872d00f37087995a0216c7b2d4666d9772af084a7881ae6b9c68ea037008d0d12
6
+ metadata.gz: 55672011710af67346e2d12f50ae4c2dd842a66106c3b81d2e38425781b32ca8e313353e67c16ebbfb66b873b5b3863ece632a384054840dca794e7266db8360
7
+ data.tar.gz: 80b8b6f75f2c5a4e4cad4dbc3eadf4eda0d28ea9aabe164d353d55b979d3c96d0725f561cab5d9855c30935f679ec00068446ae533f79783f2c6b115654f4541
data/.gitignore CHANGED
@@ -4,8 +4,11 @@
4
4
  /_yardoc/
5
5
  /coverage/
6
6
  /doc/
7
+ /gemfiles/.bundle/
8
+ /gemfiles/*.lock
7
9
  /pkg/
8
10
  /spec/reports/
9
11
  /test/dummy/.sass-cache/
12
+ /test/dummy/log/
10
13
  /tmp/
11
14
  /vendor/bundle/
@@ -1,3 +1,21 @@
1
- language: ruby
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
@@ -1,3 +1,8 @@
1
- ## AwesomeAdminLayout 0.4.2 (June 08, 2015) ##
1
+ ## AwesomeAdminLayout 0.1.1 (June 08, 2015) ##
2
+
3
+ * Support Rails 3.2, 4.0 and 4.1.
4
+
5
+
6
+ ## AwesomeAdminLayout 0.1.0 (June 08, 2015) ##
2
7
 
3
8
  * Initialize this gem.
data/README.md CHANGED
@@ -186,7 +186,7 @@ To set up a dummy application for development, simply do:
186
186
 
187
187
  ```sh
188
188
  $ cd test/dummy
189
- $ bundle exec ruby app.rb
189
+ $ bundle exec ruby sinatra_app.rb
190
190
  ```
191
191
 
192
192
  And go to your browser and open `http://localhost:4567`.
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
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 3.2.19'
4
+
5
+ gemspec path: '../'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.0.8'
4
+
5
+ gemspec path: '../'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.1.4'
4
+
5
+ gemspec path: '../'
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'railties', '~> 4.2.0'
4
+
5
+ gemspec path: '../'
@@ -0,0 +1,7 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git 'git://github.com/rails/rails.git' do
4
+ gem 'railties'
5
+ end
6
+
7
+ gemspec path: '../'
@@ -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.app.app == engine_class }
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('../../../', __FILE__)
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 #{gemn}.gem #{root}/pkg/"
19
+ sh "gem build #{gemspec} && mv #{gem} #{root}/pkg/"
20
20
  end
21
21
 
22
22
  task :install => :build do
@@ -1,3 +1,3 @@
1
1
  module AwesomeAdminLayout
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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-08 00:00:00.000000000 Z
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: bundler
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.9'
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: '1.9'
68
+ version: '10.0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: sinatra
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
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: '10.0'
82
+ version: 1.4.6
83
83
  - !ruby/object:Gem::Dependency
84
- name: sinatra
84
+ name: rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: 1.4.6
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: 1.4.6
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