caboose-cms 0.9.106 → 0.9.107

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: b2582096246cab8ae4b3d29739b2d2235ea7902d
4
- data.tar.gz: 6dbe124afb37cc6d8946ee06717ba08d295f5e43
3
+ metadata.gz: 12583acd997f8a6132f1387af3efa0c07a6ce6f3
4
+ data.tar.gz: 89fbb7eb4486e4f2acd2408c028af2dd38da3407
5
5
  SHA512:
6
- metadata.gz: 16f7e167f36b59ce3667f8ed377d57d58470f0e240aff437f8062a07583b69b20a8ae3fb33cc09798d26d6543fdcb3308e22a63e11e5a39ce6d24cb3a4d385cc
7
- data.tar.gz: f72a582447399cbd4f8dae7d7ae6208070bffa9792f3ebd1724b7f7d396d32dea964f78c690de28c8ad23f4af0d48202f6554568338b03422e75f217c7c33330
6
+ metadata.gz: 23ded9d6c59f8716eb2631bea82874d10310e021ff4149a75bd8af68dee1c069abf6824892492e102224c40e1ed0e8c61cb39aa0bb514b557bda025ab2e851c6
7
+ data.tar.gz: 86999fd96799a86fe721e7cf973b401ee7519582cd65ff368858f99ca9f4170090a4214fe2dd27f5c3a7ade206390fb7baaea32fe5254e84d2824ac7dc279813
@@ -33,6 +33,8 @@
33
33
  font-size: 15px;
34
34
  display: block;
35
35
  text-transform: uppercase;
36
+ color: #252525;
37
+ line-height: 16px;
36
38
  }
37
39
  }
38
40
  li.blocktype {
@@ -48,7 +50,7 @@
48
50
  padding: 6px;
49
51
  background-color: #f9f8f6;
50
52
  span[class*=" icon-"] {
51
-
53
+ color: #3e3e3e;
52
54
  }
53
55
  span.bname {
54
56
  margin-top: 3px;
@@ -56,7 +58,9 @@
56
58
  font-family: 'Roboto';
57
59
  font-weight: 300;
58
60
  font-size: 12px;
61
+ line-height: 14px;
59
62
  border: 0;
63
+ color: #252525;
60
64
  }
61
65
  &.divider {
62
66
 
@@ -22,6 +22,7 @@ require caboose/spectrum
22
22
  .mb_container .mb_fake option,
23
23
  .mb_container option {
24
24
  font-size: 15px !important;
25
+ max-width: 100%;
25
26
  }
26
27
 
27
28
  .mb_container input.mb_dirty,
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.9.106'
2
+ VERSION = '0.9.107'
3
3
  end
@@ -529,77 +529,100 @@ end
529
529
  namespace :assets do
530
530
 
531
531
  desc "Precompile assets, upload to S3, then remove locally"
532
- task :purl, [:filename] => :environment do |t, args|
533
-
534
- # PURL a single file
535
- if args.filename
536
- dest = "#{Rails.root}/tmp/#{args.filename}"
537
-
538
- # Compile the file
539
- puts "Compiling #{args.filename}..."
540
- File.write(dest, Uglifier.compile(Rails.application.assets.find_asset(args.filename).to_s))
541
-
542
- # Copy the file from dest to s3/assets
543
- puts "Copying #{args.filename} to s3..."
544
- config = YAML.load(File.read(Rails.root.join('config', 'aws.yml')))['production']
545
- AWS.config({ :access_key_id => config['access_key_id'], :secret_access_key => config['secret_access_key'] })
546
- bucket = AWS::S3::Bucket.new(config['bucket'])
547
- obj = bucket.objects["assets/#{args.filename}"]
548
- obj.write(:file => dest, :acl => :public_read)
532
+ task :purl, [:sitename, :sitename2, :sitename3, :sitename4] => :environment do |t, args|
533
+
534
+ sitenames = []
535
+ sitenames << args.sitename if !args.sitename.blank?
536
+ sitenames << args.sitename2 if !args.sitename2.blank?
537
+ sitenames << args.sitename3 if !args.sitename3.blank?
538
+ sitenames << args.sitename4 if !args.sitename4.blank?
539
+ where = args.sitename.blank? ? "" : "name = '#{args.sitename}'"
540
+ where += " OR name = '#{args.sitename2}'" if !args.sitename2.blank?
541
+ where += " OR name = '#{args.sitename3}'" if !args.sitename3.blank?
542
+ where += " OR name = '#{args.sitename4}'" if !args.sitename4.blank?
543
+
544
+ `mv #{Rails.root.join('public', 'assets', 'manifest.yml')} #{Rails.root.join('public', 'manifest1.yml')}`
545
+
546
+ puts "Copying site assets into host assets..."
547
+ Caboose::Site.where(where).all.each do |site|
548
+ site_js = Rails.root.join(Caboose::site_assets_path, site.name, 'js')
549
+ site_css = Rails.root.join(Caboose::site_assets_path, site.name, 'css')
550
+ site_images = Rails.root.join(Caboose::site_assets_path, site.name, 'images')
551
+ site_fonts = Rails.root.join(Caboose::site_assets_path, site.name, 'fonts')
552
+
553
+ host_js = Rails.root.join('app', 'assets', 'javascripts' , site.name)
554
+ host_css = Rails.root.join('app', 'assets', 'stylesheets' , site.name)
555
+ host_images = Rails.root.join('app', 'assets', 'images' , site.name)
556
+ host_fonts = Rails.root.join('app', 'assets', 'fonts' , site.name)
549
557
 
550
- # Remove the temp file
551
- puts "Cleaning up..."
552
- `rm -rf #{dest}`
553
-
554
- else # Otherwise do a full PURL
555
-
556
- # Copy any site assets into the host app assets directory first
557
- puts "Copying site assets into host assets..."
558
- Caboose::Site.all.each do |site|
559
- site_js = Rails.root.join(Caboose::site_assets_path, site.name, 'js')
560
- site_css = Rails.root.join(Caboose::site_assets_path, site.name, 'css')
561
- site_images = Rails.root.join(Caboose::site_assets_path, site.name, 'images')
562
- site_fonts = Rails.root.join(Caboose::site_assets_path, site.name, 'fonts')
558
+ `mkdir -p #{host_js }` if File.directory?(site_js)
559
+ `mkdir -p #{host_css }` if File.directory?(site_css)
560
+ `mkdir -p #{host_images }` if File.directory?(site_images)
561
+ `mkdir -p #{host_fonts }` if File.directory?(site_fonts)
562
+
563
+ `cp -R #{site_js } #{host_js }` if File.directory?(site_js)
564
+ `cp -R #{site_css } #{host_css }` if File.directory?(site_css)
565
+ `cp -R #{site_images } #{host_images }` if File.directory?(site_images)
566
+ `cp -R #{site_fonts } #{host_fonts }` if File.directory?(site_fonts)
567
+ end
563
568
 
564
- host_js = Rails.root.join('app', 'assets', 'javascripts' , site.name)
565
- host_css = Rails.root.join('app', 'assets', 'stylesheets' , site.name)
566
- host_images = Rails.root.join('app', 'assets', 'images' , site.name)
567
- host_fonts = Rails.root.join('app', 'assets', 'fonts' , site.name)
568
-
569
- `mkdir -p #{host_js }` if File.directory?(site_js)
570
- `mkdir -p #{host_css }` if File.directory?(site_css)
571
- `mkdir -p #{host_images }` if File.directory?(site_images)
572
- `mkdir -p #{host_fonts }` if File.directory?(site_fonts)
573
-
574
- `cp -R #{site_js } #{host_js }` if File.directory?(site_js)
575
- `cp -R #{site_css } #{host_css }` if File.directory?(site_css)
576
- `cp -R #{site_images } #{host_images }` if File.directory?(site_images)
577
- `cp -R #{site_fonts } #{host_fonts }` if File.directory?(site_fonts)
569
+ puts "Running precompile..."
570
+ Rake::Task['assets:precompile'].invoke
571
+
572
+ if !sitenames.blank?
573
+
574
+ puts "Moving manifest.yml to public > manifest2.yml"
575
+ `mv #{Rails.root.join('public', 'assets', 'manifest.yml')} #{Rails.root.join('public', 'manifest2.yml')}`
576
+
577
+ new_string = ""
578
+
579
+ prefixes = sitenames.map{ |sn| sn + "/"}
580
+
581
+ File.readlines("#{Rails.root.join('public', 'manifest1.yml')}").each do |line|
582
+ if !line.starts_with?(*prefixes)
583
+ new_string += (line)
584
+ end
578
585
  end
579
-
580
- puts "Running precompile..."
581
- Rake::Task['assets:precompile'].invoke
582
-
583
- puts "Removing assets from public/assets, but leaving manifest file..."
586
+
587
+ File.readlines("#{Rails.root.join('public', 'manifest2.yml')}").each do |line|
588
+ if line.starts_with?(*prefixes)
589
+ new_string += (line)
590
+ end
591
+ end
592
+
593
+ puts "Writing to public > manifest3.yml"
594
+ `touch #{Rails.root.join('public', 'manifest3.yml')}`
595
+ File.open("#{Rails.root.join('public', 'manifest3.yml')}", "w") { |f| f.write(new_string)}
596
+
597
+ puts "Removing assets from public/assets, but leaving manifest file..."
598
+ `rm -rf #{Rails.root.join('public', 'assets')}`
599
+ `rm #{Rails.root.join('public', 'manifest1.yml')}`
600
+ `rm #{Rails.root.join('public', 'manifest2.yml')}`
601
+ `mkdir #{Rails.root.join('public', 'assets')}`
602
+ `mv #{Rails.root.join('public', 'manifest3.yml')} #{Rails.root.join('public', 'assets', 'manifest.yml')}`
603
+
604
+ else
605
+ puts "Removing assets from public/assets, but leaving manifest file..."
606
+ `rm #{Rails.root.join('public', 'manifest1.yml')}`
584
607
  `mv #{Rails.root.join('public', 'assets', 'manifest.yml')} #{Rails.root.join('public', 'manifest.yml')}`
585
608
  `rm -rf #{Rails.root.join('public', 'assets')}`
586
609
  `mkdir #{Rails.root.join('public', 'assets')}`
587
610
  `mv #{Rails.root.join('public', 'manifest.yml')} #{Rails.root.join('public', 'assets', 'manifest.yml')}`
588
-
589
- # Clean up
590
- puts "Removing site assets from host assets..."
591
- Caboose::Site.all.each do |site|
592
- host_js = Rails.root.join('app', 'assets', 'javascripts' , site.name)
593
- host_css = Rails.root.join('app', 'assets', 'stylesheets' , site.name)
594
- host_images = Rails.root.join('app', 'assets', 'images' , site.name)
595
- host_fonts = Rails.root.join('app', 'assets', 'fonts' , site.name)
596
-
597
- `rm -rf #{host_js }`
598
- `rm -rf #{host_css }`
599
- `rm -rf #{host_images }`
600
- `rm -rf #{host_fonts }`
601
- end
602
611
  end
612
+
613
+ puts "Removing site assets from host assets..."
614
+ Caboose::Site.where(where).all.each do |site|
615
+ host_js = Rails.root.join('app', 'assets', 'javascripts' , site.name)
616
+ host_css = Rails.root.join('app', 'assets', 'stylesheets' , site.name)
617
+ host_images = Rails.root.join('app', 'assets', 'images' , site.name)
618
+ host_fonts = Rails.root.join('app', 'assets', 'fonts' , site.name)
619
+
620
+ `rm -rf #{host_js }`
621
+ `rm -rf #{host_css }`
622
+ `rm -rf #{host_images }`
623
+ `rm -rf #{host_fonts }`
624
+ end
625
+
603
626
  end
604
627
 
605
628
  desc "Create .gz versions of assets"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.106
4
+ version: 0.9.107
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-16 00:00:00.000000000 Z
11
+ date: 2018-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg