obbistrano 1.1.71 → 1.1.72
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/obbistrano_tasks.rb +73 -37
- data/obbistrano.gemspec +1 -1
- metadata +3 -3
data/lib/obbistrano_tasks.rb
CHANGED
@@ -516,53 +516,89 @@ Capistrano::Configuration.instance(:must_exist).load do
|
|
516
516
|
|
517
517
|
task :css, :roles => [:web] do
|
518
518
|
paths = get_top_level_directories("#{build_to}/public/stylesheets")
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
519
|
+
if defined? "#{newdeploy}" then
|
520
|
+
paths << "#{build_to}/public/stylesheets/"
|
521
|
+
if defined? "#{plugins}"
|
522
|
+
plugins.each do |plugin|
|
523
|
+
paths << "#{build_to}/plugins/#{plugin}/resources/public/stylesheets"
|
524
|
+
end
|
524
525
|
end
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
526
|
+
Dir.mkdir("#{build_to}/public/stylesheets/build") rescue ""
|
527
|
+
paths.each do |bundle_directory|
|
528
|
+
bundle_name = bundle_directory.gsub(/(\/plugins)|(resources)|(public)|(stylesheets)|(\/)/i, "")
|
529
|
+
bundle_name = if(bundle_name.index(".") == 0) then bundle_name[1..bundle_name.length] else bundle_name end
|
530
|
+
next if bundle_name.empty?
|
531
|
+
files = recursive_file_list(bundle_directory, ".css")
|
532
|
+
next if files.empty? || bundle_name == 'dev'
|
533
|
+
bundle = ''
|
534
|
+
files.each do |file_path|
|
535
|
+
bundle << File.read(file_path) << "\n"
|
536
|
+
end
|
537
|
+
target = "#{build_to}/public/stylesheets/build/#{bundle_name}_combined.css"
|
538
|
+
File.open(target, 'w') { |f| f.write(bundle) }
|
539
|
+
end
|
540
|
+
else
|
541
|
+
paths = paths | get_top_level_directories("#{build_to}/plugins/cms/resources/public/stylesheets") if defined? "#{cms}"
|
542
|
+
paths << "#{build_to}/public/stylesheets/"
|
543
|
+
Dir.mkdir("#{build_to}/public/stylesheets/build") rescue ""
|
544
|
+
paths.each do |bundle_directory|
|
545
|
+
bundle_name = if bundle_directory.index("plugins") then bundle_directory.gsub("#{build_to}/plugins/cms/resources/public/stylesheets", "") else bundle_directory.gsub("#{build_to}/public/stylesheets/", "") end
|
546
|
+
bundle_name = if bundle_name.index("/") then bundle_name[0..bundle_name.index("/")-1] else bundle_name end
|
547
|
+
next if bundle_name.empty?
|
548
|
+
files = recursive_file_list(bundle_directory, ".css")
|
549
|
+
next if files.empty? || bundle_name == 'dev'
|
550
|
+
bundle = ''
|
551
|
+
files.each do |file_path|
|
552
|
+
bundle << File.read(file_path) << "\n"
|
553
|
+
end
|
554
|
+
target = "#{build_to}/public/stylesheets/build/#{bundle_name}_combined.css"
|
555
|
+
File.open(target, 'w') { |f| f.write(bundle) }
|
536
556
|
end
|
537
|
-
target = "#{build_to}/public/stylesheets/build/#{bundle_name}_combined.css"
|
538
|
-
File.open(target, 'w') { |f| f.write(bundle) }
|
539
557
|
end
|
540
558
|
upload "#{build_to}/public/stylesheets/build", "#{deploy_to}/public/stylesheets/", :via => :scp, :recursive=>true
|
541
559
|
end
|
542
560
|
|
543
561
|
task :js , :roles => [:web] do
|
544
562
|
paths = get_top_level_directories("#{build_to}/public/javascripts")
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
563
|
+
if defined? "#{newdeploy}" then
|
564
|
+
paths << "#{build_to}/public/javascripts/"
|
565
|
+
if defined? "#{plugins}"
|
566
|
+
plugins.each do |plugin|
|
567
|
+
paths << "#{build_to}/plugins/#{plugin}/resources/public/javascripts"
|
568
|
+
end
|
550
569
|
end
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
570
|
+
Dir.mkdir("#{build_to}/public/javascripts/build") rescue ""
|
571
|
+
paths.each do |bundle_directory|
|
572
|
+
puts bundle_directory
|
573
|
+
bundle_name = bundle_directory.gsub(/(\/plugins)|(resources)|(public)|(javascripts)|(\/)/i, "")
|
574
|
+
bundle_name = if(bundle_name.index(".") == 0) then bundle_name[1..bundle_name.length] else bundle_name end
|
575
|
+
next if bundle_name.empty?
|
576
|
+
files = recursive_file_list(bundle_directory, ".js")
|
577
|
+
next if files.empty? || bundle_name == 'dev'
|
578
|
+
bundle = ''
|
579
|
+
files.each do |file_path|
|
580
|
+
bundle << File.read(file_path) << "\n"
|
581
|
+
end
|
582
|
+
target = "#{build_to}/public/javascripts/build/#{bundle_name}_combined.js"
|
583
|
+
File.open(target, 'w') { |f| f.write(bundle) }
|
584
|
+
end
|
585
|
+
else
|
586
|
+
paths = paths | get_top_level_directories("#{build_to}/plugins/cms/resources/public/javascripts") if defined? "#{cms}"
|
587
|
+
paths << "#{build_to}/public/javascripts/"
|
588
|
+
Dir.mkdir("#{build_to}/public/javascripts/build") rescue ""
|
589
|
+
paths.each do |bundle_directory|
|
590
|
+
bundle_name = if bundle_directory.index("plugins") then bundle_directory.gsub("#{build_to}/plugins/cms/resources/public/javascripts", "") else bundle_directory.gsub("#{build_to}/public/javascripts/", "") end
|
591
|
+
bundle_name = if bundle_name.index("/") then bundle_name[0..bundle_name.index("/")-1] else bundle_name end
|
592
|
+
next if bundle_name.empty?
|
593
|
+
files = recursive_file_list(bundle_directory, ".js")
|
594
|
+
next if files.empty? || bundle_name == 'dev'
|
595
|
+
bundle = ''
|
596
|
+
files.each do |file_path|
|
597
|
+
bundle << File.read(file_path) << "\n"
|
598
|
+
end
|
599
|
+
target = "#{build_to}/public/javascripts/build/#{bundle_name}_combined.js"
|
600
|
+
File.open(target, 'w') { |f| f.write(bundle) }
|
563
601
|
end
|
564
|
-
target = "#{build_to}/public/javascripts/build/#{bundle_name}_combined.js"
|
565
|
-
File.open(target, 'w') { |f| f.write(bundle) }
|
566
602
|
end
|
567
603
|
upload "#{build_to}/public/javascripts/build", "#{deploy_to}/public/javascripts/", :via => :scp, :recursive=>true
|
568
604
|
|
data/obbistrano.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{obbistrano}
|
5
|
-
s.version = "1.1.
|
5
|
+
s.version = "1.1.72"
|
6
6
|
s.authors = ["Ross Riley", "One Black Bear"]
|
7
7
|
s.date = Time.now
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 1
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 1.1.
|
8
|
+
- 72
|
9
|
+
version: 1.1.72
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Ross Riley
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-23 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|