jquery-nested-rails 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
data/lib/generators/{jquery-nested-rails → jquery_nested_rails}/install/install_generator.rb
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'rails'
|
2
2
|
|
3
3
|
# Supply generator for Rails 3.0.x or if asset pipeline is not enabled
|
4
|
-
if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
|
4
|
+
if ::Rails.version < "3.1" || !::Rails.application.config.assets.enabled
|
5
5
|
module JqueryNestedRails
|
6
6
|
module Generators
|
7
7
|
class InstallGenerator < ::Rails::Generators::Base
|
@@ -23,9 +23,14 @@ else
|
|
23
23
|
desc "This generator add Jquery Nested #{JqueryNestedRails::Rails::JQUERY_NESTED_VERSION} to application.js or application.js.coffee"
|
24
24
|
source_root File.expand_path('../../../../../vendor/assets/javascripts', __FILE__)
|
25
25
|
def add_assets
|
26
|
-
|
26
|
+
if detect_js_format.nil?
|
27
|
+
say_status("copying", "Jquery Nested (#{JqueryNestedRails::Rails::JQUERY_NESTED_VERSION})", :green)
|
28
|
+
copy_file "jquery.nested.min.js", "app/assets/javascripts/jquery.nested.min.js"
|
29
|
+
else
|
30
|
+
insert_into_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[1]} require jquery.nested\n", :after => "jquery_ujs\n"
|
31
|
+
end
|
27
32
|
end
|
28
|
-
|
33
|
+
|
29
34
|
def detect_js_format
|
30
35
|
return ['.js.coffee', '#='] if File.exist?('app/assets/javascripts/application.js.coffee')
|
31
36
|
return ['.js', '//='] if File.exist?('app/assets/javascripts/application.js')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-nested-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-10-09 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
16
|
-
requirement: &
|
16
|
+
requirement: &74748670 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '3.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *74748670
|
25
25
|
description: ! 'Nested is a jQuery plugin which allows you to create multi-column,
|
26
26
|
dynamic grid layouts. '
|
27
27
|
email:
|
@@ -36,7 +36,7 @@ files:
|
|
36
36
|
- README.md
|
37
37
|
- Rakefile
|
38
38
|
- jquery-nested-rails.gemspec
|
39
|
-
- lib/generators/
|
39
|
+
- lib/generators/jquery_nested_rails/install/install_generator.rb
|
40
40
|
- lib/jquery-nested-rails.rb
|
41
41
|
- lib/jquery-nested-rails/assert_select.rb
|
42
42
|
- lib/jquery-nested-rails/rails.rb
|