compressit 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/lib/compressit.rb CHANGED
@@ -1,4 +1,4 @@
1
- Dir["#{File.dirname(__FILE__)}/compressit/*"].each {|file| require(file)}
1
+ Dir["#{File.dirname(__FILE__)}/compressit/**/*"].each {|file| require(file)}
2
2
 
3
3
  require 'optparse'
4
4
 
@@ -12,6 +12,14 @@ module Compressit
12
12
 
13
13
  opts.banner = "Usage: compressit [option] [FOLDER] [VERSION]"
14
14
 
15
+ arguments.each do |argument|
16
+ if argument.empty? || !argument.include?('-')
17
+ opts.on('') do
18
+ puts optparser
19
+ end
20
+ end
21
+ end
22
+
15
23
  opts.on('-h', '--help', 'Display this help') do
16
24
  puts optparser
17
25
  end
@@ -32,7 +40,7 @@ module Compressit
32
40
 
33
41
  begin optparser.parse!(arguments)
34
42
  rescue OptionParser::InvalidOption => error
35
- puts "Oops! #{error}, try this: "
43
+ puts "#{error}, try one of this: "
36
44
  puts optparser
37
45
  exit 1
38
46
  end
@@ -3,7 +3,7 @@ module Compressit
3
3
  class << self
4
4
 
5
5
  def compressit(options)
6
- @version, @ext, @folder = options[:version], options[:ext], options[:folder]
6
+ @folder, @version, @ext = options[:folder], options[:version], options[:ext]
7
7
 
8
8
  @java, @yuicompressor = '/usr/bin/java', File.expand_path(File.dirname(__FILE__) + './../yuicompressor-2.4.6.jar')
9
9
 
@@ -1,3 +1,3 @@
1
1
  module Compressit
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,38 +1,38 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: compressit
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.3
4
5
  prerelease:
5
- version: 1.0.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - sdomino
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-08-03 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2011-09-09 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: rspec
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70099512844740 !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
24
22
  type: :development
25
- version_requirements: *id001
26
- description: Compressit uses the yuicompressor-2.4.6.jar java file created by Yahoo to compress all of your .css and .js files into single compressed files respectively. This not only reduces the size of your files, but also results in less http requests at load time resulting in an overall faster site.
27
- email:
23
+ prerelease: false
24
+ version_requirements: *70099512844740
25
+ description: Compressit uses the yuicompressor-2.4.6.jar java file created by Yahoo
26
+ to compress all of your .css and .js files into single compressed files respectively.
27
+ This not only reduces the size of your files, but also results in less http requests
28
+ at load time resulting in an overall faster site.
29
+ email:
28
30
  - sdomino@pagodabox.com
29
- executables:
31
+ executables:
30
32
  - compressit
31
33
  extensions: []
32
-
33
34
  extra_rdoc_files: []
34
-
35
- files:
35
+ files:
36
36
  - .gitignore
37
37
  - Gemfile
38
38
  - LICENSE.txt
@@ -48,32 +48,29 @@ files:
48
48
  - spec/spec_helper.rb
49
49
  homepage: http://github.com/sdomino/compressit
50
50
  licenses: []
51
-
52
51
  post_install_message:
53
52
  rdoc_options: []
54
-
55
- require_paths:
53
+ require_paths:
56
54
  - .
57
55
  - lib
58
- required_ruby_version: !ruby/object:Gem::Requirement
56
+ required_ruby_version: !ruby/object:Gem::Requirement
59
57
  none: false
60
- requirements:
61
- - - ">="
62
- - !ruby/object:Gem::Version
63
- version: "0"
64
- required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
63
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- version: "0"
64
+ requirements:
65
+ - - ! '>='
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
70
68
  requirements: []
71
-
72
69
  rubyforge_project: compressit
73
- rubygems_version: 1.7.2
70
+ rubygems_version: 1.8.10
74
71
  signing_key:
75
72
  specification_version: 3
76
73
  summary: Compressit is a simple gem that will compress all of your .css and .js.
77
- test_files:
74
+ test_files:
78
75
  - spec/compressit_spec.rb
79
76
  - spec/spec_helper.rb