capucine 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.6
1
+ 0.0.7
@@ -10,7 +10,8 @@ sass_line_comments: false
10
10
  sass_css_generated_style: 'compressed'
11
11
  sass_options: {cache: false}
12
12
  compass_plugins:
13
- - 'sass-capucine'
13
+ sass-capucine:
14
+ # twitter-bootstrap: twitter_bootstrap
14
15
 
15
16
  sass_import_css: false
16
17
  sass_import_formats: 'css to sass'
@@ -23,6 +24,5 @@ coffeescript_output_dir: 'js_generated'
23
24
 
24
25
  templates_erb_files_dir: 'templates'
25
26
 
26
-
27
27
  # DOCUMENTATION :
28
28
  # http:// capucine.dln.name
@@ -1,5 +1,5 @@
1
- <% if config["compass_plugins"] and config["compass_plugins"].length != 0 %>
2
- <% for plugin in config["compass_plugins"] %>
1
+ <% if config["compass_plugins_list"] and config["compass_plugins_list"].length != 0 %>
2
+ <% for plugin in config["compass_plugins_list"] %>
3
3
  require "<%= plugin %>"
4
4
  <% end %>
5
5
  <% end %>
data/lib/coffeescript.rb CHANGED
@@ -65,7 +65,12 @@ module Capucine
65
65
  settings = Capucine.settings
66
66
 
67
67
  unless file
68
+ files = Dir.glob(File.join settings.working_dir, settings.config['coffeescript_output_dir'], '*')
69
+ FileUtils.rm_r files
70
+
68
71
  self.compile_dir settings.config['coffeescript_files_dir'], settings.config['coffeescript_output_dir']
72
+
73
+
69
74
  else
70
75
  self.compile_dir file, settings.config['coffeescript_output_dir']
71
76
  end
data/lib/compass-sass.rb CHANGED
@@ -1,11 +1,9 @@
1
1
  module Capucine
2
2
  class CompassSass
3
3
 
4
- def self.update_plugins
5
- plugins = Capucine.settings.config['compass_plugins']
6
- return if not plugins
7
-
8
- plugins.each do |plugin|
4
+ def self.update_plugins gems
5
+ return if not gems
6
+ gems.each do |plugin|
9
7
  begin
10
8
  require "#{plugin}"
11
9
  rescue LoadError
@@ -18,15 +16,32 @@ module Capucine
18
16
  settings = Capucine.settings
19
17
  template_file = File.join settings.gem_content_dir, 'templates', 'compass_config.erb'
20
18
  output_file = File.join settings.working_dir, '.compass.rb'
21
- config_ = settings.config
22
19
 
20
+ settings.config['compass_plugins_list'] = []
21
+ plugins_gems = []
22
+
23
+ plugins = settings.config['compass_plugins']
24
+
25
+ if plugins.size > 0
26
+ plugins.each do |key, value|
27
+ settings.config['compass_plugins_list'].push key
28
+
29
+ if value and value.length > 0
30
+ plugins_gems.push value
31
+ else
32
+ plugins_gems.push key
33
+ end
34
+
35
+ end
36
+ end
37
+ config_ = settings.config
23
38
  result = Capucine::Tools.render_template template_file, config_
24
39
 
25
40
  f = File.open(output_file, 'w')
26
41
  f.write(result)
27
42
  f.close
28
43
 
29
- self.update_plugins
44
+ self.update_plugins plugins_gems
30
45
  end
31
46
 
32
47
  # def self.load_my_functions
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capucine
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-09 00:00:00.000000000Z
12
+ date: 2012-01-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fssm
16
- requirement: &70360377956520 !ruby/object:Gem::Requirement
16
+ requirement: &70224751987100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70360377956520
24
+ version_requirements: *70224751987100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: compass
27
- requirement: &70360377956080 !ruby/object:Gem::Requirement
27
+ requirement: &70224751986660 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70360377956080
35
+ version_requirements: *70224751986660
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: coffee-script
38
- requirement: &70360377955660 !ruby/object:Gem::Requirement
38
+ requirement: &70224751986240 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70360377955660
46
+ version_requirements: *70224751986240
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: uglifier
49
- requirement: &70360377955240 !ruby/object:Gem::Requirement
49
+ requirement: &70224751985820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70360377955240
57
+ version_requirements: *70224751985820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: packr
60
- requirement: &70360377954820 !ruby/object:Gem::Requirement
60
+ requirement: &70224751985400 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70360377954820
68
+ version_requirements: *70224751985400
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: term-ansicolor
71
- requirement: &70360377954400 !ruby/object:Gem::Requirement
71
+ requirement: &70224751984980 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70360377954400
79
+ version_requirements: *70224751984980
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: zip
82
- requirement: &70360377953980 !ruby/object:Gem::Requirement
82
+ requirement: &70224751984560 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70360377953980
90
+ version_requirements: *70224751984560
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: sass-capucine
93
- requirement: &70360377953560 !ruby/object:Gem::Requirement
93
+ requirement: &70224751984140 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70360377953560
101
+ version_requirements: *70224751984140
102
102
  description: Capucine, the missing tool for frontend developers.
103
103
  email: dam@dln.name
104
104
  executables: