sinatra-minify 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -15,7 +15,19 @@ Add these to your app's main file:
15
15
 
16
16
  Add this to your app's `Rakefile`:
17
17
 
18
- load 'vendor/sinatra-minify/lib/tasks.rake'
18
+ desc "Builds the minified CSS and JS assets."
19
+ task :minify do
20
+ require 'init.rb' # <= change this
21
+ puts "Building..."
22
+
23
+ files = Sinatra::Minify::Package.build(Main) # <= change this
24
+ files.each { |f| puts " * #{File.basename f}" }
25
+ puts "Construction complete!"
26
+ end
27
+
28
+ # Be sure to change the values above. They assume that your main
29
+ # file is called 'init.rb' and that your Application class is called
30
+ # 'Main'.
19
31
 
20
32
  Now add your JS/CSS packages in `config/assets.yml` (relative to your app's root path).
21
33
  The files are are assumed to be in `public/js` and `public/css` by default.
@@ -58,13 +70,15 @@ Usage tips
58
70
  Building minified files
59
71
  -----------------------
60
72
 
61
- Minified files are built by typing:
73
+ After editing your Rakefile, the minified files can be built by typing:
62
74
 
63
- rake minify:build
75
+ rake minify
64
76
 
65
77
  This creates files called `<package_name>.min.js` (and `.css`) in your `public/js` and
66
78
  `public/css` folders.
67
79
 
80
+ Make sure your app is running on `http://localhost:4567` before doing this!
81
+
68
82
  NOTE: Building of minified files is NOT done automatically! You must call this explicitly.
69
83
  Add it to your Capistrano deploy scripts or something.
70
84
 
@@ -147,4 +161,4 @@ See more of our work on [www.sinefunc.com](http://www.sinefunc.com)!
147
161
  Copyright
148
162
  ---------
149
163
 
150
- (c) 2010 Rico Sta. Cruz, Cyril David and Sinefunc, Inc. See the LICENSE file for more details.
164
+ (c) 2010 Rico Sta. Cruz, Cyril David and Sinefunc, Inc. See the LICENSE file for more details.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
@@ -4,7 +4,9 @@ require 'open-uri'
4
4
  module Sinatra
5
5
  module Minify
6
6
  class Compressor
7
- attr :type, :package, :file
7
+ attr :type
8
+ attr :package
9
+ attr :file
8
10
 
9
11
  def initialize(type, file, package)
10
12
  @type = type.to_s
@@ -1,7 +1,10 @@
1
1
  module Sinatra
2
2
  module Minify
3
3
  class Package
4
- attr :type, :set, :compressor, :filename
4
+ attr :type
5
+ attr :set
6
+ attr :compressor
7
+ attr :filename
5
8
 
6
9
  class << self
7
10
  # Deletes all the different packaged and minified files
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sinatra-minify}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rico Sta. Cruz", "Cyril David", "Sinefunc, Inc."]
12
- s.date = %q{2010-05-22}
12
+ s.date = %q{2010-06-02}
13
13
  s.description = %q{sinatra-minify is an extension for Sinatra to compress assets.}
14
14
  s.email = %q{info@sinefunc.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Rico Sta. Cruz
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-05-22 00:00:00 +08:00
19
+ date: 2010-06-02 00:00:00 +08:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency