sprockets-rainpress 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +20 -0
- data/README.md +25 -0
- data/lib/sprockets-rainpress.rb +25 -0
- data/sprockets-rainpress.gemspec +18 -0
- metadata +75 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6ba5ba4c91c00bd9c2760a70e4a18274bdc0c5ce
|
4
|
+
data.tar.gz: 2ef81008a42401139c45fba35a17076a21ce97ea
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0ad0452c9cfd6f5e4be36f66cf278e5878954261b308affff2b60b14b1c05dce16e69d08d3dcffaef8a63991b61cd9559e083bdc9d3e2e98e9e99d95533785dc
|
7
|
+
data.tar.gz: 66fdcd624431a7fa2b93b667e23ded9e6f3d101b0803673dd18ed675ee69c51fa080bc9f60eec45b346a16384382cd51bbc3c74a5537b30979f5660c8e703389
|
data/.gitignore
ADDED
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# sprockets-rainpress
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
```ruby
|
6
|
+
# Gemfile
|
7
|
+
gem 'sprockets-rainpress'
|
8
|
+
```
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'sprockets-rainpress'
|
14
|
+
Sprockets::Environment.new do |env|
|
15
|
+
env.css_compressor = Sprockets::Rainpress
|
16
|
+
end
|
17
|
+
```
|
18
|
+
|
19
|
+
## Contributing
|
20
|
+
|
21
|
+
1. Fork it
|
22
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
23
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
24
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
25
|
+
5. Create new Pull Request
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'tilt'
|
2
|
+
|
3
|
+
module Sprockets
|
4
|
+
class Rainpress < Tilt::Template
|
5
|
+
def self.engine_initialized?
|
6
|
+
defined?(::Rainpress)
|
7
|
+
end
|
8
|
+
|
9
|
+
def initialize_engine
|
10
|
+
require_template_library 'rainpress'
|
11
|
+
end
|
12
|
+
|
13
|
+
def prepare
|
14
|
+
end
|
15
|
+
|
16
|
+
def evaluate(context, locals, &block)
|
17
|
+
case context.content_type
|
18
|
+
when 'text/css'
|
19
|
+
::Rainpress.compress(data)
|
20
|
+
else
|
21
|
+
data
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
Gem::Specification.new do |gem|
|
3
|
+
gem.name = "sprockets-rainpress"
|
4
|
+
gem.version = '0.0.1'
|
5
|
+
gem.authors = ["Jesse Stuart"]
|
6
|
+
gem.email = ["jesse@jessestuart.ca"]
|
7
|
+
gem.description = %q{Rainpress adapter for Sprockets for CSS compression}
|
8
|
+
gem.summary = %q{Rainpress adapter for Sprockets}
|
9
|
+
gem.homepage = ""
|
10
|
+
|
11
|
+
gem.files = `git ls-files`.split($/)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.require_paths = ["lib"]
|
15
|
+
|
16
|
+
gem.add_runtime_dependency 'sprockets'
|
17
|
+
gem.add_runtime_dependency 'rainpress'
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sprockets-rainpress
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Jesse Stuart
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-07-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sprockets
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rainpress
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Rainpress adapter for Sprockets for CSS compression
|
42
|
+
email:
|
43
|
+
- jesse@jessestuart.ca
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- .gitignore
|
49
|
+
- README.md
|
50
|
+
- lib/sprockets-rainpress.rb
|
51
|
+
- sprockets-rainpress.gemspec
|
52
|
+
homepage: ''
|
53
|
+
licenses: []
|
54
|
+
metadata: {}
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options: []
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - '>='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '0'
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 2.0.2
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Rainpress adapter for Sprockets
|
75
|
+
test_files: []
|