fusion 0.0.8 → 0.0.9
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/lib/basic.rb +16 -6
- data/lib/fusion.rb +1 -0
- data/lib/pretty.rb +17 -0
- metadata +63 -38
data/lib/basic.rb
CHANGED
@@ -10,16 +10,26 @@ module Fusion
|
|
10
10
|
|
11
11
|
class Basic
|
12
12
|
|
13
|
-
def initialize
|
14
|
-
|
15
|
-
|
13
|
+
def initialize(bundle_config=nil, project_path=nil)
|
14
|
+
|
15
|
+
if bundle_config && project_path
|
16
16
|
|
17
|
-
|
18
|
-
@
|
17
|
+
@bundle_configs = [bundle_config]
|
18
|
+
@bundle_options = { :project_path => project_path }
|
19
19
|
else
|
20
|
-
|
20
|
+
|
21
|
+
@bundle_options = Fusion.instance_variable_get('@options')
|
22
|
+
|
23
|
+
if @bundle_options[:bundle_configs]
|
24
|
+
@bundle_configs = @bundle_options[:bundle_configs]
|
25
|
+
else
|
26
|
+
@bundle_configs = YAML::load(File.open(@bundle_options[:bundle_file_path]))
|
27
|
+
end
|
28
|
+
|
21
29
|
end
|
22
30
|
|
31
|
+
@log = @bundle_options[:logger] || Logger.new(STDOUT)
|
32
|
+
|
23
33
|
end
|
24
34
|
|
25
35
|
def run
|
data/lib/fusion.rb
CHANGED
data/lib/pretty.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
module Fusion
|
2
|
+
class Pretty < Fusion::Optimized
|
3
|
+
|
4
|
+
private
|
5
|
+
|
6
|
+
def get_options(config)
|
7
|
+
options = super(config)
|
8
|
+
|
9
|
+
compilation_level_index = options.find_index {|opt| opt =~ /compilation_level/}
|
10
|
+
options[compilation_level_index] = ["--compilation_level WHITESPACE_ONLY"]
|
11
|
+
options << "--formatting PRETTY_PRINT"
|
12
|
+
|
13
|
+
options
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
metadata
CHANGED
@@ -1,76 +1,101 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: fusion
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 13
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 9
|
10
|
+
version: 0.0.9
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Sean Jezewski
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2011-12-02 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: open4
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
22
32
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
26
35
|
name: mechanize
|
27
|
-
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
38
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
33
46
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
concatenation) and optimized (google closure compiler's SIMPLE_OPTIMIZATIONS level
|
38
|
-
email:
|
47
|
+
version_requirements: *id002
|
48
|
+
description: Fusion bundles and re-bundles your javascript in two modes - quick (dumb concatenation) and optimized (google closure compiler's SIMPLE_OPTIMIZATIONS level
|
49
|
+
email:
|
39
50
|
- sean@moovweb.com
|
40
51
|
executables: []
|
52
|
+
|
41
53
|
extensions: []
|
54
|
+
|
42
55
|
extra_rdoc_files: []
|
43
|
-
|
56
|
+
|
57
|
+
files:
|
44
58
|
- README.md
|
45
59
|
- lib/basic.rb
|
46
60
|
- lib/fusion.rb
|
47
61
|
- lib/optimized.rb
|
62
|
+
- lib/pretty.rb
|
48
63
|
- lib/quick.rb
|
49
64
|
- compiler/compiler.jar
|
50
65
|
- compiler/COPYING
|
51
66
|
- compiler/README
|
52
67
|
homepage: http://github.com/moovweb/fusion
|
53
68
|
licenses: []
|
69
|
+
|
54
70
|
post_install_message:
|
55
71
|
rdoc_options: []
|
56
|
-
|
72
|
+
|
73
|
+
require_paths:
|
57
74
|
- lib
|
58
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
75
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
59
76
|
none: false
|
60
|
-
requirements:
|
61
|
-
- -
|
62
|
-
- !ruby/object:Gem::Version
|
63
|
-
|
64
|
-
|
77
|
+
requirements:
|
78
|
+
- - ">="
|
79
|
+
- !ruby/object:Gem::Version
|
80
|
+
hash: 3
|
81
|
+
segments:
|
82
|
+
- 0
|
83
|
+
version: "0"
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
85
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
92
|
+
version: "0"
|
70
93
|
requirements: []
|
94
|
+
|
71
95
|
rubyforge_project:
|
72
|
-
rubygems_version: 1.8.
|
96
|
+
rubygems_version: 1.8.11
|
73
97
|
signing_key:
|
74
98
|
specification_version: 3
|
75
99
|
summary: Simple javascript bundler plugin.
|
76
100
|
test_files: []
|
101
|
+
|