yui-compressor-ext 0.0.1.a.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Manifest.txt ADDED
@@ -0,0 +1,30 @@
1
+ Manifest.txt
2
+ README.rdoc
3
+ Rakefile
4
+ bin/yuicompress
5
+ lib/yui/compressor/ext.rb
6
+ lib/yui/compressor/ext/cli.rb
7
+ lib/yui/compressor/ext/cli/base.rb
8
+ lib/yui/compressor/ext/cli/commands.rb
9
+ lib/yui/compressor/ext/cli/commands/abstract.rb
10
+ lib/yui/compressor/ext/cli/commands/all.rb
11
+ lib/yui/compressor/ext/cli/commands/css.rb
12
+ lib/yui/compressor/ext/cli/commands/js.rb
13
+ lib/yui/compressor/ext/config.rb
14
+ script/console
15
+ script/console.cmd
16
+ script/destroy
17
+ script/destroy.cmd
18
+ script/generate
19
+ script/generate.cmd
20
+ test/cli/commands/test_all.rb
21
+ test/cli/commands/test_css.rb
22
+ test/cli/commands/test_js.rb
23
+ test/sample/config.yml
24
+ test/sample/css-1.css
25
+ test/sample/css-2.css
26
+ test/sample/js-1.js
27
+ test/sample/js-2.js
28
+ test/test_helper.rb
29
+ test/text_config.rb
30
+ yui-compressor-ext.gemspec
data/README.rdoc ADDED
@@ -0,0 +1,122 @@
1
+ = YUI Compressor Extensions
2
+
3
+ == DESCRIPTION:
4
+
5
+ YUI Compressor Extensions is an enhancing library of {YUI Compressor}[http://github.com/sstephenson/ruby-yui-compressor/] .
6
+ The following functions can be used by this extension.
7
+ * CLI interface
8
+ * Compression and uniting of multiple assets
9
+
10
+ == REQUIREMENTS:
11
+
12
+ * yui-compressor
13
+ * cri
14
+ * win32-open3 (Only win32-Platform)
15
+
16
+ == INSTALL:
17
+
18
+ $ gem install yui-compressor-ext
19
+
20
+ == Usage
21
+
22
+ === First Step
23
+
24
+ Please see {here}[http://github.com/sstephenson/ruby-yui-compressor/] about Ruby-YUI Compressor.
25
+
26
+ === Basic Concepts
27
+
28
+ For example, it is assumed that the following files exist.
29
+
30
+ /path/to/assets/javascripts/hoge.js
31
+ /path/to/assets/javascripts/foo.js
32
+ /path/to/assets/css/base.css
33
+ /path/to/assets/css/custom.css
34
+
35
+ Create configuration file to <code>/path/to/assets/config.yml</code> (YAML Format).
36
+
37
+ output_dir: /path/to/assets
38
+ js:
39
+ base_dir: /path/to/assets/javascripts
40
+ files:
41
+ - hoge.js #=> js:base_dir + hoge.js
42
+ - foo.js #=> js:base_dir + foo.js
43
+ output: min.js #=> output_dir + min.js
44
+ css:
45
+ # When do not use "base_dir"
46
+ files:
47
+ - /path/to/assets/css/base.css
48
+ - /path/to/assets/css/custom.css
49
+ output: min.css #=> output_dir + min.css
50
+
51
+ Compress and uniting CSS and JavaScripts (All).
52
+
53
+ $ cd /path/to/assets
54
+ $ yuicompress all
55
+
56
+ Then, JavaScript and the CSS file that the compression uniting is done based on the configuration file as follows are made.
57
+
58
+ /path/to/assets/javascripts/hoge.js
59
+ /path/to/assets/javascripts/foo.js
60
+ /path/to/assets/min.js <== created
61
+ /path/to/assets/css/base.css
62
+ /path/to/assets/css/custom.css
63
+ /path/to/assets/min.css <== created
64
+
65
+ To process only CSS or JavaScript, as follows is done.
66
+
67
+ $ yuicompress css (or js)
68
+
69
+ In addition, it is also possible to execute the place of the configuration file specifying it.
70
+
71
+ $ yuicompress css /path/to/assets/config.yml
72
+
73
+ === Setting to options for YUI Compressor
74
+
75
+ Optional execution of YUI-Compressor can be described by the configuration file.
76
+ Please see {here}[http://yui.rubyforge.org/classes/YUI/CssCompressor.html] and {here}[http://yui.rubyforge.org/classes/YUI/JavaScriptCompressor.html] about the option that can be set.
77
+
78
+ # Global options. It is applied to both of these.
79
+ options:
80
+ :charset: utf-8
81
+ :line_break: 100
82
+ output_dir: /path/to/assets
83
+ js:
84
+ # Options for JavaScript. It is merge to Global options.
85
+ options:
86
+ :charset: sjis
87
+ base_dir: /path/to/assets/javascripts
88
+ files:
89
+ - hoge.js
90
+ - foo.js
91
+ output: min.js
92
+ css:
93
+ # When do not use "base_dir"
94
+ files:
95
+ - /path/to/assets/css/base.css
96
+ - /path/to/assets/css/custom.css
97
+ output: min.css
98
+
99
+ == LICENSE:
100
+
101
+ (The MIT License)
102
+
103
+ Copyright (c) 2010 Matsukei Co.,Ltd.
104
+
105
+ Permission is hereby granted, free of charge, to any person obtaining
106
+ a copy of this software and associated documentation files (the
107
+ 'Software'), to deal in the Software without restriction, including
108
+ without limitation the rights to use, copy, modify, merge, publish,
109
+ distribute, sublicense, and/or sell copies of the Software, and to
110
+ permit persons to whom the Software is furnished to do so, subject to
111
+ the following conditions:
112
+
113
+ The above copyright notice and this permission notice shall be
114
+ included in all copies or substantial portions of the Software.
115
+
116
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
117
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
118
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
119
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
120
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
121
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
122
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,30 @@
1
+ # coding: utf-8
2
+ require 'rubygems'
3
+ gem 'hoe', '>= 2.1.0'
4
+ require 'hoe'
5
+ require 'fileutils'
6
+ require './lib/yui/compressor/ext'
7
+
8
+ Hoe.plugin :newgem
9
+ Hoe.plugin :yard
10
+
11
+ # Generate all the Rake tasks
12
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
+ $hoe = Hoe.spec 'yui-compressor-ext' do
14
+ self.developer 'Matsukei Co.,Ltd', 'osc@matsukei.co.jp'
15
+ self.description = %q{YUI Compressor Extensions is an enhancing library of "YUI Compressor":http://github.com/sstephenson/ruby-yui-compressor/ .
16
+ The following functions can be used by this extension.
17
+ * CLI interface
18
+ * Compression and uniting of multiple assets}
19
+ self.summary = %q{YUI Compressor Extensions is an enhancing library of "YUI Compressor":http://github.com/sstephenson/ruby-yui-compressor/}
20
+ self.version = '0.0.1.a.1'
21
+ self.extra_deps = [['yui-compressor','>= 0.9.1'], ['cri','>= 1.0.0'], ['win32-open3', '>= 0.3.2']]
22
+ self.yard_title = "YUI-Compressor Extensions (#{self.version})"
23
+ end
24
+
25
+ require 'newgem/tasks'
26
+ Dir['tasks//*.rake'].each { |t| load t }
27
+
28
+ # TODO - want other tests/tasks run by default? Add them to the list
29
+ # remove_task :default
30
+ # task :default => [:spec, :features]
data/bin/yuicompress ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # coding: utf-8
3
+
4
+ # Add lib to load path
5
+ $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__) + '/../lib'))
6
+
7
+ require 'rubygems'
8
+ require 'yui/compressor/ext'
9
+
10
+ # Run base
11
+ YUI::Compressor::Ext::CLI::Base.shared_base.run(ARGV)
@@ -0,0 +1,21 @@
1
+ # coding: utf-8
2
+ class YUI::Compressor
3
+ module Ext::CLI
4
+ class Base < Cri::Base
5
+
6
+ def initialize
7
+ super('yuicompress')
8
+
9
+ # Add commands.
10
+ add_command(Commands::All.new)
11
+ add_command(Commands::Css.new)
12
+ add_command(Commands::Js.new)
13
+ end
14
+
15
+ # @return [Ext::Cli::Base]
16
+ def self.shared_base
17
+ @shared_base ||= self.new
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,35 @@
1
+ # coding: utf-8
2
+ class YUI::Compressor
3
+ module Ext::CLI::Commands
4
+ class Abstract < Cri::Command
5
+
6
+ def run(options, arguments)
7
+ config = Ext::Config.load_file(arguments[0])
8
+ compress(name, config)
9
+
10
+ puts 'Complete!'
11
+ end
12
+
13
+ protected
14
+
15
+ def compress(type, config)
16
+ target = config.files(type).inject('') do |t, f|
17
+ t << File.read(f)
18
+ end
19
+
20
+ File.open(config.output(type), 'w') do |cf|
21
+ cf.puts compressor(type, config.options(type)).compress(target)
22
+ end
23
+ end
24
+
25
+ def compressor(type, options)
26
+ case type
27
+ when 'js'
28
+ YUI::JavaScriptCompressor.new(options)
29
+ when 'css'
30
+ YUI::CssCompressor.new(options)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ class YUI::Compressor
3
+ module Ext::CLI::Commands
4
+ class All < Abstract
5
+ def name
6
+ 'all'
7
+ end
8
+
9
+ def aliases
10
+ name
11
+ end
12
+
13
+ def short_desc
14
+ 'compress JavaScript and CSS files'
15
+ end
16
+
17
+ def long_desc
18
+ short_desc
19
+ end
20
+
21
+ def usage
22
+ "yuicompress all [Path to configuration file. Default is './config.yml']"
23
+ end
24
+
25
+ def run(options, arguments)
26
+ config = Ext::Config.load_file(arguments[0])
27
+ compress('js', config)
28
+ compress('css', config)
29
+
30
+ puts 'Complete!'
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ class YUI::Compressor
3
+ module Ext::CLI::Commands
4
+ class Css < Abstract
5
+ def name
6
+ 'css'
7
+ end
8
+
9
+ def aliases
10
+ name
11
+ end
12
+
13
+ def short_desc
14
+ 'compress CSS files'
15
+ end
16
+
17
+ def long_desc
18
+ short_desc
19
+ end
20
+
21
+ def usage
22
+ "yuicompress css [Path to configuration file. Default is './config.yml']"
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ class YUI::Compressor
3
+ module Ext::CLI::Commands
4
+ class Js < Abstract
5
+ def name
6
+ 'js'
7
+ end
8
+
9
+ def aliases
10
+ name
11
+ end
12
+
13
+ def short_desc
14
+ 'compress JavaScript files'
15
+ end
16
+
17
+ def long_desc
18
+ short_desc
19
+ end
20
+
21
+ def usage
22
+ "yuicompress js [Path to configuration file. Default is './config.yml']"
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,10 @@
1
+ # coding: utf-8
2
+ class YUI::Compressor
3
+ module Ext::CLI::Commands
4
+ end
5
+ end
6
+
7
+ require 'ext/cli/commands/abstract'
8
+ require 'ext/cli/commands/all'
9
+ require 'ext/cli/commands/css'
10
+ require 'ext/cli/commands/js'
@@ -0,0 +1,11 @@
1
+ # coding: utf-8
2
+ require 'cri'
3
+
4
+ class YUI::Compressor
5
+ module Ext::CLI
6
+ end
7
+ end
8
+
9
+ # Load CLI
10
+ require 'ext/cli/base'
11
+ require 'ext/cli/commands'
@@ -0,0 +1,79 @@
1
+ # coding: utf-8
2
+ require 'yaml'
3
+
4
+ class YUI::Compressor
5
+ class Ext::Config
6
+ DEFAULT = 'config.yml'
7
+
8
+ class << self
9
+ # @param [String] path
10
+ # @return [Ext::Config]
11
+ def load_file(path)
12
+ path ||= DEFAULT
13
+
14
+ unless File.exist? path
15
+ raise ArgumentError,
16
+ "Not found configuration file to `#{File.expand_path(path)}`."
17
+ end
18
+
19
+ config = YAML.load_file(path)
20
+ unless validate(config)
21
+ raise 'Invalid configuration file.'
22
+ end
23
+
24
+ new(config)
25
+ end
26
+
27
+ private
28
+
29
+ def validate(config)
30
+ # TODO
31
+ true
32
+ end
33
+ end
34
+
35
+ # @param [Array, Hash] config
36
+ def initialize(config)
37
+ @config = config
38
+ end
39
+
40
+ # @param [String] type
41
+ # @return [String]
42
+ def output(type)
43
+ File.join(*[clean_path(@config['output_dir']),
44
+ clean_path(config_for(type, 'output'))].compact)
45
+ end
46
+
47
+ # @param [String] type
48
+ # @return [Array<String>]
49
+ def files(type)
50
+ base = clean_path(config_for(type, 'base_dir'))
51
+ files = config_for(type, 'files')
52
+ files.map do |file|
53
+ File.join(*[base, clean_path(file)].compact)
54
+ end
55
+ end
56
+
57
+ # @param [String] type
58
+ # @return [Hash]
59
+ def options(type)
60
+ base = @config['options'] || {}
61
+ base.merge(config_for(type, 'options') || {})
62
+ end
63
+
64
+ private
65
+
66
+ def config_for(type, config)
67
+ @config[type] && @config[type][config]
68
+ end
69
+
70
+ def clean_path(path)
71
+ if path
72
+ path = path.strip
73
+ path.empty? ? nil : path.tr("\\", '/')
74
+ else
75
+ nil
76
+ end
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ $:.unshift(File.dirname(__FILE__)) unless
3
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
4
+
5
+ require 'rubygems'
6
+ require 'yui/compressor'
7
+
8
+ # Fix to YUI Compressor, if Win32-Platform.
9
+ if (RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/)
10
+ module YUI
11
+ class Compressor
12
+ require 'win32/open3'
13
+ def initialize(options = {}) #:nodoc:
14
+ @options = self.class.default_options.merge(options)
15
+ @command = [path_to_java, "-jar", path_to_jar_file, *(command_option_for_type + command_options)].flatten.join(' ')
16
+ end
17
+ end
18
+ end
19
+ end
20
+
21
+ module YUI::Compressor::Ext
22
+ VERSION = '0.0.1.a.1'
23
+ end
24
+
25
+ # Load Ext modules.
26
+ require 'ext/config'
27
+ require 'ext/cli'
data/script/console ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/yui/compressor/ext.rb'}"
9
+ puts "Loading yui-compressor-ext gem"
10
+ exec "#{irb} #{libs} --simple-prompt"
@@ -0,0 +1,2 @@
1
+ @ruby script/console %*
2
+ pause
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
@@ -0,0 +1 @@
1
+ @ruby script/destroy %*
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
@@ -0,0 +1 @@
1
+ @ruby script/generate %*
@@ -0,0 +1,10 @@
1
+ # coding: utf-8
2
+
3
+ require File.dirname(__FILE__) + '/../test/helper'
4
+
5
+ class YUI::Compressor::Ext::CLI::AllTest < Test::Unit::TestCase
6
+
7
+ def test_truth
8
+ assert true
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # coding: utf-8
2
+
3
+ require File.dirname(__FILE__) + '/../test/helper'
4
+
5
+ class YUI::Compressor::Ext::CLI::CssTest < Test::Unit::TestCase
6
+
7
+ def test_truth
8
+ assert true
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ # coding: utf-8
2
+
3
+ require File.dirname(__FILE__) + '../test/helper'
4
+
5
+ class YUI::Compressor::Ext::CLI::JsTest < Test::Unit::TestCase
6
+
7
+ def test_truth
8
+ assert true
9
+ end
10
+ end
@@ -0,0 +1,13 @@
1
+ output_dir: .
2
+ js:
3
+ base_dir: .
4
+ files:
5
+ - js-1.js
6
+ - js-2.js
7
+ output: compiled.js
8
+ css:
9
+ base_dir: .
10
+ files:
11
+ - css-1.css
12
+ - css-2.css
13
+ output: compiled.css
@@ -0,0 +1,16 @@
1
+ /**
2
+ * author: FooBarZoo
3
+ */
4
+ body {
5
+ font-family: Meiryo, Arial;
6
+ margin: 0;
7
+ padding: 0;
8
+ }
9
+
10
+ ul, li, dl, dt, dd {
11
+ margin: 0;
12
+ }
13
+
14
+ .c1 {
15
+ color: #ff0000;
16
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * author: FooBarZoo
3
+ */
4
+ .c2 {
5
+ border: 1px solid #0000ff;
6
+ }
@@ -0,0 +1,3 @@
1
+ var j1 = function(a, b) {
2
+ return a + b;
3
+ };
@@ -0,0 +1,3 @@
1
+ var j2 = function(a, b) {
2
+ return a + b;
3
+ };
@@ -0,0 +1,5 @@
1
+ require 'stringio'
2
+ require 'test/unit'
3
+ require File.dirname(__FILE__) + '/../lib/yui/compressor/ext'
4
+
5
+ require 'yui/compressor'
@@ -0,0 +1,8 @@
1
+ require File.dirname(__FILE__) + '/test_helper.rb'
2
+
3
+ class YUI::Compressor::Ext::ConfigTest < Test::Unit::TestCase
4
+
5
+ def test_truth
6
+ assert true
7
+ end
8
+ end
@@ -0,0 +1,54 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{yui-compressor-ext}
5
+ s.version = "0.0.1.a.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Matsukei Co.,Ltd"]
9
+ s.date = %q{2010-12-28}
10
+ s.default_executable = %q{yuicompress}
11
+ s.description = %q{YUI Compressor Extensions is an enhancing library of "YUI Compressor":http://github.com/sstephenson/ruby-yui-compressor/ .
12
+ The following functions can be used by this extension.
13
+ * CLI interface
14
+ * Compression and uniting of multiple assets}
15
+ s.email = ["osc@matsukei.co.jp"]
16
+ s.executables = ["yuicompress"]
17
+ s.extra_rdoc_files = ["Manifest.txt"]
18
+ s.files = ["README.rdoc", "Manifest.txt", "Rakefile", "bin/yuicompress", "lib/yui/compressor/ext.rb", "lib/yui/compressor/ext/cli.rb", "lib/yui/compressor/ext/cli/base.rb", "lib/yui/compressor/ext/cli/commands.rb", "lib/yui/compressor/ext/cli/commands/abstract.rb", "lib/yui/compressor/ext/cli/commands/all.rb", "lib/yui/compressor/ext/cli/commands/css.rb", "lib/yui/compressor/ext/cli/commands/js.rb", "lib/yui/compressor/ext/config.rb", "script/console", "script/console.cmd", "script/destroy", "script/destroy.cmd", "script/generate", "script/generate.cmd", "test/cli/commands/test_all.rb", "test/cli/commands/test_css.rb", "test/cli/commands/test_js.rb", "test/sample/config.yml", "test/sample/css-1.css", "test/sample/css-2.css", "test/sample/js-1.js", "test/sample/js-2.js", "test/test_helper.rb", "test/text_config.rb", "yui-compressor-ext.gemspec"]
19
+ s.has_rdoc = %q{yard}
20
+ s.rdoc_options = ["--title", "YUI-Compressor Extensions (#{s.version})", "--quiet"]
21
+ s.require_paths = ["lib"]
22
+ s.rubyforge_project = %q{yui-compressor-ext}
23
+ s.rubygems_version = %q{1.3.7}
24
+ s.summary = %q{YUI Compressor Extensions is an enhancing library of "YUI Compressor":http://github.com/sstephenson/ruby-yui-compressor/}
25
+ s.test_files = ["test/cli/commands/test_all.rb", "test/cli/commands/test_css.rb", "test/cli/commands/test_js.rb", "test/test_helper.rb"]
26
+
27
+ if s.respond_to? :specification_version then
28
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
29
+ s.specification_version = 3
30
+
31
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
32
+ s.add_runtime_dependency(%q<yui-compressor>, [">= 0.9.1"])
33
+ s.add_runtime_dependency(%q<cri>, [">= 1.0.0"])
34
+ s.add_runtime_dependency(%q<win32-open3>, [">= 0.3.2"]) if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/
35
+ s.add_development_dependency(%q<rubyforge>, [">= 2.0.4"])
36
+ s.add_development_dependency(%q<hoe-yard>, [">= 0.1.2"])
37
+ s.add_development_dependency(%q<hoe>, [">= 2.6.0"])
38
+ else
39
+ s.add_dependency(%q<yui-compressor>, [">= 0.9.1"])
40
+ s.add_dependency(%q<cri>, [">= 1.0.0"])
41
+ s.add_dependency(%q<win32-open3>, [">= 0.3.2"]) if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/
42
+ s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
43
+ s.add_dependency(%q<hoe-yard>, [">= 0.1.2"])
44
+ s.add_dependency(%q<hoe>, [">= 2.6.0"])
45
+ end
46
+ else
47
+ s.add_dependency(%q<yui-compressor>, [">= 0.9.1"])
48
+ s.add_dependency(%q<cri>, [">= 1.0.0"])
49
+ s.add_dependency(%q<win32-open3>, [">= 0.3.2"]) if RUBY_PLATFORM.downcase =~ /mswin(?!ce)|mingw|cygwin|bccwin/
50
+ s.add_dependency(%q<rubyforge>, [">= 2.0.4"])
51
+ s.add_dependency(%q<hoe-yard>, [">= 0.1.2"])
52
+ s.add_dependency(%q<hoe>, [">= 2.6.0"])
53
+ end
54
+ end
metadata ADDED
@@ -0,0 +1,205 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: yui-compressor-ext
3
+ version: !ruby/object:Gem::Version
4
+ hash: 127
5
+ prerelease: true
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ - a
11
+ - 1
12
+ version: 0.0.1.a.1
13
+ platform: ruby
14
+ authors:
15
+ - Matsukei Co.,Ltd
16
+ autorequire:
17
+ bindir: bin
18
+ cert_chain: []
19
+
20
+ date: 2010-12-28 00:00:00 +09:00
21
+ default_executable: yuicompress
22
+ dependencies:
23
+ - !ruby/object:Gem::Dependency
24
+ name: yui-compressor
25
+ prerelease: false
26
+ requirement: &id001 !ruby/object:Gem::Requirement
27
+ none: false
28
+ requirements:
29
+ - - ">="
30
+ - !ruby/object:Gem::Version
31
+ hash: 57
32
+ segments:
33
+ - 0
34
+ - 9
35
+ - 1
36
+ version: 0.9.1
37
+ type: :runtime
38
+ version_requirements: *id001
39
+ - !ruby/object:Gem::Dependency
40
+ name: cri
41
+ prerelease: false
42
+ requirement: &id002 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ hash: 23
48
+ segments:
49
+ - 1
50
+ - 0
51
+ - 0
52
+ version: 1.0.0
53
+ type: :runtime
54
+ version_requirements: *id002
55
+ - !ruby/object:Gem::Dependency
56
+ name: win32-open3
57
+ prerelease: false
58
+ requirement: &id003 !ruby/object:Gem::Requirement
59
+ none: false
60
+ requirements:
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ hash: 23
64
+ segments:
65
+ - 0
66
+ - 3
67
+ - 2
68
+ version: 0.3.2
69
+ type: :runtime
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: rubyforge
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ hash: 7
80
+ segments:
81
+ - 2
82
+ - 0
83
+ - 4
84
+ version: 2.0.4
85
+ type: :development
86
+ version_requirements: *id004
87
+ - !ruby/object:Gem::Dependency
88
+ name: hoe-yard
89
+ prerelease: false
90
+ requirement: &id005 !ruby/object:Gem::Requirement
91
+ none: false
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ hash: 31
96
+ segments:
97
+ - 0
98
+ - 1
99
+ - 2
100
+ version: 0.1.2
101
+ type: :development
102
+ version_requirements: *id005
103
+ - !ruby/object:Gem::Dependency
104
+ name: hoe
105
+ prerelease: false
106
+ requirement: &id006 !ruby/object:Gem::Requirement
107
+ none: false
108
+ requirements:
109
+ - - ">="
110
+ - !ruby/object:Gem::Version
111
+ hash: 23
112
+ segments:
113
+ - 2
114
+ - 6
115
+ - 0
116
+ version: 2.6.0
117
+ type: :development
118
+ version_requirements: *id006
119
+ description: |-
120
+ YUI Compressor Extensions is an enhancing library of "YUI Compressor":http://github.com/sstephenson/ruby-yui-compressor/ .
121
+ The following functions can be used by this extension.
122
+ * CLI interface
123
+ * Compression and uniting of multiple assets
124
+ email:
125
+ - osc@matsukei.co.jp
126
+ executables:
127
+ - yuicompress
128
+ extensions: []
129
+
130
+ extra_rdoc_files:
131
+ - Manifest.txt
132
+ files:
133
+ - README.rdoc
134
+ - Manifest.txt
135
+ - Rakefile
136
+ - bin/yuicompress
137
+ - lib/yui/compressor/ext.rb
138
+ - lib/yui/compressor/ext/cli.rb
139
+ - lib/yui/compressor/ext/cli/base.rb
140
+ - lib/yui/compressor/ext/cli/commands.rb
141
+ - lib/yui/compressor/ext/cli/commands/abstract.rb
142
+ - lib/yui/compressor/ext/cli/commands/all.rb
143
+ - lib/yui/compressor/ext/cli/commands/css.rb
144
+ - lib/yui/compressor/ext/cli/commands/js.rb
145
+ - lib/yui/compressor/ext/config.rb
146
+ - script/console
147
+ - script/console.cmd
148
+ - script/destroy
149
+ - script/destroy.cmd
150
+ - script/generate
151
+ - script/generate.cmd
152
+ - test/cli/commands/test_all.rb
153
+ - test/cli/commands/test_css.rb
154
+ - test/cli/commands/test_js.rb
155
+ - test/sample/config.yml
156
+ - test/sample/css-1.css
157
+ - test/sample/css-2.css
158
+ - test/sample/js-1.js
159
+ - test/sample/js-2.js
160
+ - test/test_helper.rb
161
+ - test/text_config.rb
162
+ - yui-compressor-ext.gemspec
163
+ has_rdoc: yard
164
+ homepage:
165
+ licenses: []
166
+
167
+ post_install_message:
168
+ rdoc_options:
169
+ - --title
170
+ - YUI-Compressor Extensions (0.0.1.a.1)
171
+ - --quiet
172
+ require_paths:
173
+ - lib
174
+ required_ruby_version: !ruby/object:Gem::Requirement
175
+ none: false
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ hash: 3
180
+ segments:
181
+ - 0
182
+ version: "0"
183
+ required_rubygems_version: !ruby/object:Gem::Requirement
184
+ none: false
185
+ requirements:
186
+ - - ">"
187
+ - !ruby/object:Gem::Version
188
+ hash: 25
189
+ segments:
190
+ - 1
191
+ - 3
192
+ - 1
193
+ version: 1.3.1
194
+ requirements: []
195
+
196
+ rubyforge_project: yui-compressor-ext
197
+ rubygems_version: 1.3.7
198
+ signing_key:
199
+ specification_version: 3
200
+ summary: YUI Compressor Extensions is an enhancing library of "YUI Compressor":http://github.com/sstephenson/ruby-yui-compressor/
201
+ test_files:
202
+ - test/cli/commands/test_all.rb
203
+ - test/cli/commands/test_css.rb
204
+ - test/cli/commands/test_js.rb
205
+ - test/test_helper.rb