coyote 1.2.0 → 1.2.2.rc1

Sign up to get free protection for your applications and to get access to all the features.
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  # /.rspec
2
- --color
2
+ --color
3
+ --format progress
data/README.md CHANGED
@@ -11,20 +11,24 @@ Coyote combines your source files into a single script or stylesheet to reduce H
11
11
 
12
12
  ###Installation
13
13
 
14
- $ gem install coyote
15
-
14
+ ```bash
15
+ $ gem install coyote
16
+ ```
16
17
 
17
18
 
18
19
  ###Command Line Interface
19
20
 
20
21
  **Syntax:**
21
22
 
22
- $ coyote [input_filepath]:[output_filepath]
23
+ ```bash
24
+ $ coyote [input_filepath]:[output_filepath]
25
+ ```
23
26
 
24
27
  **Example**
25
28
 
26
- $ coyote src/application.coffee:build/application.min.js
27
-
29
+ ```bash
30
+ $ coyote src/application.coffee:build/application.min.js
31
+ ```
28
32
 
29
33
 
30
34
  ###Options
@@ -52,7 +56,7 @@ Coyote combines your source files into a single script or stylesheet to reduce H
52
56
  <td>Get the version of your Coyote gem</td>
53
57
  </tr>
54
58
  </tbody>
55
- </table>
59
+ </table>
56
60
 
57
61
 
58
62
 
@@ -63,13 +67,17 @@ Coyote has support for [Sprockets-style](https://github.com/sstephenson/sprocket
63
67
 
64
68
  **Syntax:** (JavaScript)
65
69
 
66
- //= require other_file.js
67
- //= require some_directory
70
+ ```javascript
71
+ //= require other_file.js
72
+ //= require some_directory
73
+ ```
68
74
 
69
75
  **Syntax:** (CoffeeScript)
70
76
 
71
- #= require other_file.coffee
72
- #= require some_directory
77
+ ```coffee
78
+ #= require other_file.coffee
79
+ #= require some_directory
80
+ ```
73
81
 
74
82
  Paths used in `require` statements are evaluated relative to the file which contains them.
75
83
 
@@ -78,30 +86,33 @@ Paths used in `require` statements are evaluated relative to the file which cont
78
86
 
79
87
  Coyote ships with convenience methods for neatly defining tasks in your Rakefile:
80
88
 
89
+ ```ruby
90
+ require 'coyote/rake'
81
91
 
82
- require 'coyote/rake'
83
-
84
- coyote :build do |config|
85
- config.input = "src/application.coffee"
86
- config.output = "build/application.min.js"
87
- config.options = { :compress => true }
88
- end
92
+ coyote :build do |config|
93
+ config.input = "src/application.coffee"
94
+ config.output = "build/application.min.js"
95
+ config.options = { :compress => true }
96
+ end
97
+ ```
89
98
 
90
- coyote :watch do |config|
91
- config.input = "src/application.coffee"
92
- config.output = "build/application.min.js"
93
- config.options = { :quiet => true }
94
- end
99
+ This will create two Rake tasks, `build` and `watch`, which you can run as standard tasks: `rake build` and `rake watch`.
95
100
 
101
+ ```bash
102
+ $ rake build
103
+ ```
96
104
 
97
- This will create two Rake tasks, `build` and `watch`, which you can run as standard tasks: `rake build` and `rake watch`.
105
+ ```bash
106
+ $ rake watch
107
+ ```
98
108
 
99
109
 
100
110
  ###Contribute
101
111
  **We'd love your help. Fork us so we can make Coyote better.**
102
112
 
103
- $ git clone git://github.com/imulus/coyote
104
-
113
+ ```bash
114
+ $ git clone git://github.com/imulus/coyote
115
+ ```
105
116
 
106
117
  ###Download
107
118
 
@@ -6,7 +6,7 @@ module Coyote::Bundles
6
6
  notify "Compressing bundle...", :warning, :timestamp
7
7
  tmp = "#{@target}.#{Time.now.to_i}.less"
8
8
  File.open(tmp, 'w+') { |f| f.write contents }
9
- self.contents = `lessc #{tmp} -x`
9
+ self.contents = `lessc #{tmp} --yui-compress`
10
10
  File.delete tmp
11
11
  end
12
12
 
@@ -15,7 +15,9 @@ module Coyote::Bundles
15
15
  notify "Google closure API failed to compile, creating uncompressed file\n", :failure
16
16
  notify "Errors:", :failure
17
17
  notify "#{compiler.errors.to_s}", :failure
18
- end
18
+ else
19
+ notify "Google closure API failed to compile, creating uncompressed file\n", :failure
20
+ end
19
21
  end
20
- end
21
- end
22
+ end
23
+ end
@@ -11,7 +11,7 @@ module Coyote
11
11
  def compile(content)
12
12
  @content = content
13
13
  params = {
14
- 'compilation_level' => 'SIMPLE_OPTIMIZATIONS',
14
+ 'compilation_level' => 'ADVANCED_OPTIMIZATIONS',
15
15
  'output_format' => 'xml',
16
16
  'output_info' => 'compiled_code',
17
17
  'js_code' => @content
@@ -2,19 +2,26 @@ require 'coyote/dsl'
2
2
 
3
3
  def coyote(*args, &block)
4
4
  runner = Coyote::DSL.new(&block)
5
-
5
+
6
6
  args ||= []
7
7
 
8
8
  args.insert 0, :build
9
9
  Rake::Task.define_task(*args) do
10
10
  runner.options[:watch] = false
11
- runner.run
11
+ runner.run
12
12
  end
13
13
 
14
14
  args[0] = :watch
15
15
  Rake::Task.define_task(*args) do
16
16
  runner.options[:watch] = true
17
- runner.run
18
- end
19
-
20
- end
17
+ runner.run
18
+ end
19
+
20
+ args[0] = :compress
21
+ Rake::Task.define_task(*args) do
22
+ runner.options[:compress] = true
23
+ runner.options[:watch] = false
24
+ runner.run
25
+ end
26
+
27
+ end
@@ -1,3 +1,3 @@
1
1
  module Coyote
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.2.rc1"
3
3
  end
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coyote
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
5
- prerelease:
4
+ version: 1.2.2.rc1
5
+ prerelease: 6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Imulus
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-10 00:00:00.000000000Z
13
+ date: 2012-09-24 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rb-fsevent
17
- requirement: &2156839120 !ruby/object:Gem::Requirement
17
+ requirement: &2152111100 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.4.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2156839120
25
+ version_requirements: *2152111100
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: colored
28
- requirement: &2156838620 !ruby/object:Gem::Requirement
28
+ requirement: &2152109220 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '1.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2156838620
36
+ version_requirements: *2152109220
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rb-fsevent
39
- requirement: &2156838100 !ruby/object:Gem::Requirement
39
+ requirement: &2152106820 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 0.4.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2156838100
47
+ version_requirements: *2152106820
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: colored
50
- requirement: &2156837580 !ruby/object:Gem::Requirement
50
+ requirement: &2152104360 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '1.2'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2156837580
58
+ version_requirements: *2152104360
59
59
  description: A speedy tool for combining and compressing your JavaScript, CoffeeScript,
60
60
  CSS and LESS source files.
61
61
  email:
@@ -169,9 +169,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
169
169
  required_rubygems_version: !ruby/object:Gem::Requirement
170
170
  none: false
171
171
  requirements:
172
- - - ! '>='
172
+ - - ! '>'
173
173
  - !ruby/object:Gem::Version
174
- version: '0'
174
+ version: 1.3.1
175
175
  requirements: []
176
176
  rubyforge_project: coyote
177
177
  rubygems_version: 1.8.17