csso-rails 0.4.0 → 0.4.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: 38bf321ba8374e47a1f0c899e0d437ee04de5ddd
4
- data.tar.gz: 4925f034d8b9fb98cb0fdcb8f3422b433171ed82
3
+ metadata.gz: 2a4e671786a2bdaebda60f673b55565de3e8a074
4
+ data.tar.gz: 923beac5520261d02c2408b5f359ac4eaea0d14d
5
5
  SHA512:
6
- metadata.gz: d9428931300b3a2d07e4abb838351592f11b0df827225ece7448b57d69cb1abbb1a9e98e185f7f98a92b4f1b7e031c593e8ca0fe573f8fe0529601de976bb2ed
7
- data.tar.gz: 0a48e62e8b2860c2714714d4960dd948bad2cca2cf4eb591cc43fe71348c6a56903c2081856cacfc586eaf20f11a4e4e49997d44befd23882f1c7a68e038545d
6
+ metadata.gz: 56a35b3944f6b0426418a337aa7f78ccb6463efff18df744d96a5d00808a6ca62efe51c04ed9d85238628377ea20547256835a0b82b273336369fa7a0117f2f7
7
+ data.tar.gz: c9a48b7596b6cf770c7bd7cc57dfbd07cf9b43163fd5dee088288ef1fef27ee12f921b25a60017bd6710720d64b81ab94b3ad27bd689359eecb36e5dd852208f
data/.gitignore CHANGED
@@ -7,4 +7,5 @@ pkg/
7
7
  .rvmrc
8
8
  .bundle
9
9
  tmp
10
- /csso/
10
+ /csso/
11
+ /log/
data/Appraisals CHANGED
@@ -10,6 +10,15 @@ appraise "sprockets-3" do
10
10
  gem "sprockets", "~>3.0"
11
11
  end
12
12
 
13
+ appraise "sprockets-4" do
14
+ gem "sprockets", "~>4.0.0.beta2"
15
+ end
16
+
17
+ appraise "rails-4" do
18
+ gem "rails", '4.2.5.1'
19
+ end
20
+
21
+
13
22
  appraise "therubyracer" do
14
23
  #TODO: currently rubyracer segfaults on my machine, fix that and start testing
15
24
  # gem "therubyracer"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csso-rails (0.4.0)
4
+ csso-rails (0.4.1)
5
5
  execjs (>= 1)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # csso-rails: Stylesheet Optimizer (CSSO) for Rails Asset pipeline
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/csso-rails.svg)](https://badge.fury.io/rb/csso-rails)
4
+ [![Gemnasium](https://img.shields.io/gemnasium/Vasfed/csso-rails.svg)](https://gemnasium.com/Vasfed/csso-rails)
5
+
3
6
  Ruby adapter for [github.com/css/csso](https://github.com/css/csso).
4
7
 
5
8
  CSSO does structure-optimization for CSS.
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "4.2.5.1"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,118 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ csso-rails (0.4.0)
5
+ execjs (>= 1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actionmailer (4.2.5.1)
11
+ actionpack (= 4.2.5.1)
12
+ actionview (= 4.2.5.1)
13
+ activejob (= 4.2.5.1)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ rails-dom-testing (~> 1.0, >= 1.0.5)
16
+ actionpack (4.2.5.1)
17
+ actionview (= 4.2.5.1)
18
+ activesupport (= 4.2.5.1)
19
+ rack (~> 1.6)
20
+ rack-test (~> 0.6.2)
21
+ rails-dom-testing (~> 1.0, >= 1.0.5)
22
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
+ actionview (4.2.5.1)
24
+ activesupport (= 4.2.5.1)
25
+ builder (~> 3.1)
26
+ erubis (~> 2.7.0)
27
+ rails-dom-testing (~> 1.0, >= 1.0.5)
28
+ rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
+ activejob (4.2.5.1)
30
+ activesupport (= 4.2.5.1)
31
+ globalid (>= 0.3.0)
32
+ activemodel (4.2.5.1)
33
+ activesupport (= 4.2.5.1)
34
+ builder (~> 3.1)
35
+ activerecord (4.2.5.1)
36
+ activemodel (= 4.2.5.1)
37
+ activesupport (= 4.2.5.1)
38
+ arel (~> 6.0)
39
+ activesupport (4.2.5.1)
40
+ i18n (~> 0.7)
41
+ json (~> 1.7, >= 1.7.7)
42
+ minitest (~> 5.1)
43
+ thread_safe (~> 0.3, >= 0.3.4)
44
+ tzinfo (~> 1.1)
45
+ appraisal (2.1.0)
46
+ bundler
47
+ rake
48
+ thor (>= 0.14.0)
49
+ arel (6.0.3)
50
+ builder (3.2.2)
51
+ concurrent-ruby (1.0.1)
52
+ erubis (2.7.0)
53
+ execjs (2.6.0)
54
+ globalid (0.3.6)
55
+ activesupport (>= 4.1.0)
56
+ i18n (0.7.0)
57
+ json (1.8.3)
58
+ loofah (2.0.3)
59
+ nokogiri (>= 1.5.9)
60
+ mail (2.6.3)
61
+ mime-types (>= 1.16, < 3)
62
+ mime-types (2.99.1)
63
+ mini_portile2 (2.0.0)
64
+ minitest (5.8.4)
65
+ nokogiri (1.6.7.2)
66
+ mini_portile2 (~> 2.0.0.rc2)
67
+ rack (1.6.4)
68
+ rack-test (0.6.3)
69
+ rack (>= 1.0)
70
+ rails (4.2.5.1)
71
+ actionmailer (= 4.2.5.1)
72
+ actionpack (= 4.2.5.1)
73
+ actionview (= 4.2.5.1)
74
+ activejob (= 4.2.5.1)
75
+ activemodel (= 4.2.5.1)
76
+ activerecord (= 4.2.5.1)
77
+ activesupport (= 4.2.5.1)
78
+ bundler (>= 1.3.0, < 2.0)
79
+ railties (= 4.2.5.1)
80
+ sprockets-rails
81
+ rails-deprecated_sanitizer (1.0.3)
82
+ activesupport (>= 4.2.0.alpha)
83
+ rails-dom-testing (1.0.7)
84
+ activesupport (>= 4.2.0.beta, < 5.0)
85
+ nokogiri (~> 1.6.0)
86
+ rails-deprecated_sanitizer (>= 1.0.1)
87
+ rails-html-sanitizer (1.0.3)
88
+ loofah (~> 2.0)
89
+ railties (4.2.5.1)
90
+ actionpack (= 4.2.5.1)
91
+ activesupport (= 4.2.5.1)
92
+ rake (>= 0.8.7)
93
+ thor (>= 0.18.1, < 2.0)
94
+ rake (11.1.0)
95
+ sprockets (3.5.2)
96
+ concurrent-ruby (~> 1.0)
97
+ rack (> 1, < 3)
98
+ sprockets-rails (3.0.4)
99
+ actionpack (>= 4.0)
100
+ activesupport (>= 4.0)
101
+ sprockets (>= 3.0.0)
102
+ thor (0.19.1)
103
+ thread_safe (0.3.5)
104
+ tzinfo (1.2.2)
105
+ thread_safe (~> 0.1)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ appraisal
112
+ csso-rails!
113
+ minitest
114
+ rails (= 4.2.5.1)
115
+ rake
116
+
117
+ BUNDLED WITH
118
+ 1.10.6
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sprockets", "~>4.0.0.beta2"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,35 @@
1
+ PATH
2
+ remote: ../
3
+ specs:
4
+ csso-rails (0.4.0)
5
+ execjs (>= 1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ appraisal (2.1.0)
11
+ bundler
12
+ rake
13
+ thor (>= 0.14.0)
14
+ concurrent-ruby (1.0.1)
15
+ execjs (2.6.0)
16
+ minitest (5.8.4)
17
+ rack (1.6.4)
18
+ rake (11.1.0)
19
+ sprockets (4.0.0.beta2)
20
+ concurrent-ruby (~> 1.0)
21
+ rack (> 1, < 3)
22
+ thor (0.19.1)
23
+
24
+ PLATFORMS
25
+ ruby
26
+
27
+ DEPENDENCIES
28
+ appraisal
29
+ csso-rails!
30
+ minitest
31
+ rake
32
+ sprockets (~> 4.0.0.beta2)
33
+
34
+ BUNDLED WITH
35
+ 1.10.6
data/lib/csso.rb CHANGED
@@ -9,6 +9,11 @@ module Csso
9
9
  end
10
10
 
11
11
  def self.install(sprockets)
12
+ unless sprockets
13
+ raise "no compatible sprockets found" unless Sprockets.respond_to? :register_compressor
14
+ Sprockets.register_compressor('text/css', :csso, Compressor)
15
+ return
16
+ end
12
17
  if sprockets.respond_to? :register_compressor
13
18
  sprockets.register_compressor('text/css', :csso, Compressor)
14
19
  sprockets.css_compressor = :csso
data/lib/csso/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Csso
2
- VERSION = '0.4.0'
2
+ VERSION = '0.4.1'
3
3
  CSSO_JS_LIB = 'vendor/csso/csso.js'
4
- end
4
+ end
@@ -3,7 +3,7 @@
3
3
  require 'minitest/autorun'
4
4
  require 'csso'
5
5
 
6
- Encoding.default_external = Encoding::UTF_8
6
+ # Encoding.default_external = Encoding::UTF_8
7
7
 
8
8
  describe Csso do
9
9
 
@@ -4,7 +4,7 @@ require 'minitest/autorun'
4
4
  require 'fileutils'
5
5
  require 'csso'
6
6
 
7
- Encoding.default_external = Encoding::UTF_8
7
+ # Encoding.default_external = Encoding::UTF_8
8
8
 
9
9
  describe Csso do
10
10
 
@@ -46,6 +46,21 @@ describe Csso do
46
46
  manifest.clobber
47
47
  end
48
48
 
49
+ it "loads into rails" do
50
+ begin
51
+ require "rails"
52
+ rescue LoadError
53
+ skip "no rails in this env"
54
+ end
55
+ require "sprockets/railtie"
56
+ require 'csso/railtie'
49
57
 
50
-
58
+ app = Class.new(Rails::Application) do
59
+ config.eager_load = false
60
+ config.assets.enabled = true
61
+ end
62
+ app.initialize!
63
+ app.config.assets.css_compressor.must_equal :csso
64
+ app.assets.css_compressor.must_equal Csso::Compressor
65
+ end
51
66
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csso-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasily Fedoseyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-03-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: execjs
@@ -83,10 +83,14 @@ files:
83
83
  - Rakefile
84
84
  - bin/ruby_csso
85
85
  - csso-rails.gemspec
86
+ - gemfiles/rails_4.gemfile
87
+ - gemfiles/rails_4.gemfile.lock
86
88
  - gemfiles/sprockets_2.gemfile
87
89
  - gemfiles/sprockets_2.gemfile.lock
88
90
  - gemfiles/sprockets_3.gemfile
89
91
  - gemfiles/sprockets_3.gemfile.lock
92
+ - gemfiles/sprockets_4.gemfile
93
+ - gemfiles/sprockets_4.gemfile.lock
90
94
  - gemfiles/therubyracer.gemfile
91
95
  - gemfiles/therubyracer.gemfile.lock
92
96
  - lib/csso-rails.rb
@@ -121,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
125
  version: '0'
122
126
  requirements: []
123
127
  rubyforge_project: csso-rails
124
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.4.5
125
129
  signing_key:
126
130
  specification_version: 4
127
131
  summary: CSS Stylesheet optimizer/compressor for Rails