capucine 0.1.2 → 0.1.5

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/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
1
  source "http://rubygems.org"
2
2
 
3
-
4
3
  gem 'fssm'
5
4
  gem 'compass', '0.12.rc.0'
6
5
  gem 'coffee-script'
7
6
  gem 'uglifier'
8
7
  gem 'packr'
9
-
8
+ gem 'json'
9
+ gem 'compass-capucine'
10
10
 
11
11
  group :development do
12
12
  # gem "shoulda", ">= 0"
data/Gemfile.lock CHANGED
@@ -10,6 +10,8 @@ GEM
10
10
  chunky_png (~> 1.2)
11
11
  fssm (>= 0.2.7)
12
12
  sass (~> 3.1)
13
+ compass-capucine (0.1.0)
14
+ compass
13
15
  execjs (1.3.0)
14
16
  multi_json (~> 1.0)
15
17
  fssm (0.2.8.1)
@@ -39,7 +41,9 @@ DEPENDENCIES
39
41
  bundler (~> 1.0.0)
40
42
  coffee-script
41
43
  compass (= 0.12.rc.0)
44
+ compass-capucine
42
45
  fssm
43
46
  jeweler (~> 1.8.3)
47
+ json
44
48
  packr
45
49
  uglifier
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.5
data/capucine.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "capucine"
8
- s.version = "0.1.2"
8
+ s.version = "0.1.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Damian Le Nouaille"]
12
- s.date = "2012-03-06"
12
+ s.date = "2012-03-16"
13
13
  s.description = "longer description of your gem"
14
14
  s.email = "dam@dln.name"
15
15
  s.executables = ["capucine"]
@@ -26,20 +26,19 @@ Gem::Specification.new do |s|
26
26
  "VERSION",
27
27
  "bin/capucine",
28
28
  "capucine.gemspec",
29
+ "content/shared/capucine.yaml",
29
30
  "content/shared/coffeescript/app.coffee",
30
- "content/shared/css/import/YOUR_OLD_CSS",
31
- "content/shared/images/favicon/apple-touch-icon-114x114-precomposed.png",
32
- "content/shared/images/favicon/apple-touch-icon-57x57-precomposed.png",
33
- "content/shared/images/favicon/apple-touch-icon-72x72-precomposed.png",
34
- "content/shared/images/favicon/apple-touch-icon-precomposed.png",
35
- "content/shared/images/favicon/favicon.png",
36
- "content/shared/js/app.js",
37
- "content/shared/sass/_main.sass",
38
- "content/shared/sass/_responsive.sass",
39
- "content/shared/sass/screen.sass",
40
- "content/shared/templates/_footer.html",
41
- "content/shared/templates/_header.html",
42
- "content/shared/templates/index.html.erb",
31
+ "content/shared/index.html",
32
+ "content/shared/public/css/import/YOUR_OLD_CSS",
33
+ "content/shared/public/images/favicon/apple-touch-icon-114x114-precomposed.png",
34
+ "content/shared/public/images/favicon/apple-touch-icon-57x57-precomposed.png",
35
+ "content/shared/public/images/favicon/apple-touch-icon-72x72-precomposed.png",
36
+ "content/shared/public/images/favicon/apple-touch-icon-precomposed.png",
37
+ "content/shared/public/images/favicon/favicon.png",
38
+ "content/shared/public/js/app.js",
39
+ "content/shared/sass/_main.scss",
40
+ "content/shared/sass/_responsive.scss",
41
+ "content/shared/sass/screen.scss",
43
42
  "content/templates/capucine.yaml",
44
43
  "content/templates/cmd_help.erb",
45
44
  "content/templates/compass_config.erb",
@@ -49,7 +48,6 @@ Gem::Specification.new do |s|
49
48
  "lib/compass-sass.rb",
50
49
  "lib/incloudr.rb",
51
50
  "lib/settings.rb",
52
- "lib/templates.rb",
53
51
  "lib/tools.rb",
54
52
  "lib/watch.rb"
55
53
  ]
@@ -68,6 +66,8 @@ Gem::Specification.new do |s|
68
66
  s.add_runtime_dependency(%q<coffee-script>, [">= 0"])
69
67
  s.add_runtime_dependency(%q<uglifier>, [">= 0"])
70
68
  s.add_runtime_dependency(%q<packr>, [">= 0"])
69
+ s.add_runtime_dependency(%q<json>, [">= 0"])
70
+ s.add_runtime_dependency(%q<compass-capucine>, [">= 0"])
71
71
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
72
72
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.3"])
73
73
  else
@@ -76,6 +76,8 @@ Gem::Specification.new do |s|
76
76
  s.add_dependency(%q<coffee-script>, [">= 0"])
77
77
  s.add_dependency(%q<uglifier>, [">= 0"])
78
78
  s.add_dependency(%q<packr>, [">= 0"])
79
+ s.add_dependency(%q<json>, [">= 0"])
80
+ s.add_dependency(%q<compass-capucine>, [">= 0"])
79
81
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
80
82
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
81
83
  end
@@ -85,6 +87,8 @@ Gem::Specification.new do |s|
85
87
  s.add_dependency(%q<coffee-script>, [">= 0"])
86
88
  s.add_dependency(%q<uglifier>, [">= 0"])
87
89
  s.add_dependency(%q<packr>, [">= 0"])
90
+ s.add_dependency(%q<json>, [">= 0"])
91
+ s.add_dependency(%q<compass-capucine>, [">= 0"])
88
92
  s.add_dependency(%q<bundler>, ["~> 1.0.0"])
89
93
  s.add_dependency(%q<jeweler>, ["~> 1.8.3"])
90
94
  end
@@ -0,0 +1,30 @@
1
+ sass: true
2
+ # coffeescript: true
3
+ # incloudr: true
4
+
5
+ # # ----------------------------------------
6
+ # sass_images_dir: public/images
7
+ # sass_files_dir: sass
8
+ # sass_output_dir: public/css_generated
9
+ # sass_line_comments: false
10
+ # sass_css_generated_style: expanded # compact | expanded | compressed
11
+ # sass_options: '{:cache => false}'
12
+
13
+ # compass_config: {}
14
+ # compass_plugins:
15
+ # - compass-capucine
16
+
17
+ # sass_import_css: false
18
+ # sass_import_formats: css to sass
19
+ # sass_import_css_dir: public/css/import
20
+ # sass_import_output_dir: sass/converted
21
+
22
+ # coffeescript_bare: false
23
+ # coffeescript_files_dir: coffeescript
24
+ # coffeescript_output_dir: public/js_generated
25
+
26
+ # incloudr_output_dir: public/js_generated/modules
27
+ # incloudr_libs:
28
+ # - jquery
29
+
30
+ # DOCUMENTATION : http:// capucine.dln.name
@@ -1,3 +1,7 @@
1
- window.AppCoffee =
1
+ AppCoffee =
2
2
  initialize: ->
3
3
 
4
+
5
+ # AppCoffee.initialize()
6
+ # OR
7
+ # jQuery AppCoffee.initialize
@@ -0,0 +1,43 @@
1
+ <!doctype html>
2
+ <html class="no-js" dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
+ <title>-</title>
8
+
9
+ <meta name="description" content="">
10
+ <meta name="author" content="">
11
+
12
+ <!-- <meta property="og:url" content=""/> -->
13
+ <!-- <meta property="og:site_name" content=""/> -->
14
+ <!-- <meta property="og:title" content=""/> -->
15
+ <!-- <meta property="og:description" content=""/> -->
16
+ <!-- <meta property="og:image" content=""/> -->
17
+ <!-- <meta property="og:type" content=""/> -->
18
+ <!-- <meta property="fb:admins" content=""/> -->
19
+
20
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
21
+ <link rel="shortcut icon" href="public/images/favicon/favicon.png">
22
+ <!-- <link rel="apple-touch-icon" href="public/images/favicon/apple-touch-icon-precomposed.png"> -->
23
+ <!-- <link rel="apple-touch-icon" href="public/images/favicon/apple-touch-icon-57x57-precomposed.png" sizes="57x57"> -->
24
+ <!-- <link rel="apple-touch-icon" href="public/images/favicon/apple-touch-icon-72x72-precomposed.png" sizes="72x72"> -->
25
+ <!-- <link rel="apple-touch-icon" href="public/images/favicon/apple-touch-icon-114x114-precomposed.png" sizes="114x114"> -->
26
+ <link rel="stylesheet" href="public/css_generated/screen.css">
27
+ </head>
28
+ <body>
29
+ <div class="wrap">
30
+
31
+ <div role="main" id="content">
32
+ </div>
33
+
34
+ </div>
35
+ <script src="public/js_generated/app.js"></script>
36
+ <!-- <script src="public/js_generated/app.min.js"></script> -->
37
+
38
+ <!--[if lt IE 7 ]>
39
+ <script defer src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
40
+ <script defer>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
41
+ <![endif]-->
42
+ </body>
43
+ </html>
@@ -0,0 +1,11 @@
1
+ (function() {
2
+ var App = {
3
+ initialize: function() {
4
+ console.log('hello');
5
+ },
6
+ };
7
+
8
+ // App.initialize();
9
+ // OR
10
+ // jQuery(App.initialize);
11
+ }).call(this);
@@ -0,0 +1,22 @@
1
+ // @include font-face('my_font',font-files('../fonts/my_font.ttf', truetype, '../fonts/my_font.otf', opentype), '../fonts/my_font.eot')
2
+
3
+ $WIDTH_MIN: 320px;
4
+ $WIDTH_MAX: 960px;
5
+
6
+ $FONT_0: "Lucida Grande", "Tahoma", Arial, sans-serif;
7
+ $COLOR_0: #111;
8
+
9
+
10
+ body {
11
+ font: normal 12px $FONT_0;
12
+ color: $COLOR_0;
13
+ }
14
+
15
+ a { @include pressed-effect;}
16
+
17
+ p, b, strong, i, blockquote {line-height: 1.5em;}
18
+
19
+ .wrap {
20
+ @include centerX;
21
+ @include min-max-width($WIDTH_MIN, $WIDTH_MAX);
22
+ }
@@ -1,20 +1,20 @@
1
1
  //----------[ MOBILE ONLY ]----
2
- @media only screen and (max-width: 767px) and (max-device-width: 1000px)
2
+ @media only screen and (max-width: 767px) and (max-device-width: 1000px) {}
3
3
 
4
4
  //----------[ MOBILE LANDSCAPE ]----
5
- @media only screen and (min-width: 480px) and (max-width: 767px)
5
+ @media only screen and (min-width: 480px) and (max-width: 767px) {}
6
6
 
7
7
  //----------[ MOBILE ONLY & LANDSCAPE ]----
8
- @media only screen and (min-width: 480px) and (max-width: 767px) and (max-device-width: 1023px)
8
+ @media only screen and (min-width: 480px) and (max-width: 767px) and (max-device-width: 1023px) {}
9
9
 
10
10
  //----------[ IPAD ONLY & PORTRAIT ]----
11
- @media only screen and (min-width: 768px) and (max-width: 991px) and (max-device-width: 1023px)
11
+ @media only screen and (min-width: 768px) and (max-width: 991px) and (max-device-width: 1023px) {}
12
12
 
13
13
  //----------[ IPAD PORTRAIT BROWSER ]----
14
- @media only screen and (min-width: 768px) and (max-width: 991px)
14
+ @media only screen and (min-width: 768px) and (max-width: 991px) {}
15
15
 
16
16
  //----------[ - 960px ]----
17
- @media only screen and (max-width: 959px)
17
+ @media only screen and (max-width: 959px) {}
18
18
 
19
19
  //----------[ - 767px ]----
20
- @media only screen and (max-width: 767px)
20
+ @media only screen and (max-width: 767px) {}
@@ -0,0 +1,6 @@
1
+ @import "compass"; // COMPASS CORE
2
+ @import "compass-capucine/normalize";
3
+ @import "compass-capucine"; // CAPUCINE HELPERS =>
4
+
5
+ @import "./main";
6
+ @import "./responsive";
@@ -1,49 +1,31 @@
1
- sass_enable: true
2
- coffeescript_enable: true
3
- incloudr_enable: true
4
- templates_enable: true
1
+ sass: false
2
+ coffeescript: false
3
+ incloudr: false
4
+ templates: false
5
5
 
6
6
  # ----------------------------------------
7
- sass_images_dir: 'images'
8
- sass_files_dir: 'sass'
9
- sass_output_dir: 'css_generated'
7
+ sass_images_dir: public/images
8
+ sass_files_dir: sass
9
+ sass_output_dir: public/css_generated
10
10
  sass_line_comments: false
11
- sass_css_generated_style: 'expanded' # compact | expanded | compressed
11
+ sass_css_generated_style: expanded # compact | expanded | compressed
12
12
  sass_options: '{:cache => false}'
13
- # compass_config:
14
- # '': ''
15
- compass_plugins:
16
- sass-capucine:
17
- # gem-name: plugin-name
18
- # OR simply
19
- # plugin-name: if gem-anem = plugin-name
20
13
 
21
- # twitter-bootstrap: twitter_bootstrap
14
+ compass_config: {}
15
+ compass_plugins:
16
+ - compass-capucine
22
17
 
23
18
  sass_import_css: false
24
- sass_import_formats: 'css to sass'
25
- sass_import_css_dir: 'css/import'
26
- sass_import_output_dir: 'sass/converted'
19
+ sass_import_formats: css to sass
20
+ sass_import_css_dir: public/css/import
21
+ sass_import_output_dir: sass/converted
27
22
 
28
23
  coffeescript_bare: false
29
- coffeescript_files_dir: 'coffeescript'
30
- coffeescript_output_dir: 'js_generated'
31
-
32
- incloudr_output_dir: 'js_generated/modules'
33
- incloudr_libs:
34
- -
35
- name: jquery
36
- source: http://code.jquery.com/jquery.min.js
37
-
38
- -
39
- name: underscore
40
- source: http://documentcloud.github.com/underscore/underscore-min.js
41
-
42
- -
43
- name: backbone
44
- source: http://documentcloud.github.com/backbone/backbone-min.js
24
+ coffeescript_files_dir: coffeescript
25
+ coffeescript_output_dir: public/js_generated
45
26
 
46
- templates_erb_files_dir: 'templates'
27
+ incloudr_output_dir: public/js_generated/modules
28
+ incloudr_libs: []
47
29
 
48
30
  # DOCUMENTATION :
49
31
  # http:// capucine.dln.name
data/lib/compass-sass.rb CHANGED
@@ -23,17 +23,18 @@ module Capucine
23
23
  plugins = settings.config['compass_plugins']
24
24
 
25
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
26
+ plugins.each do |p|
27
+ p = p.split('|')
28
+ settings.config['compass_plugins_list'].push p[0]
29
+ if p[1]
30
+ plugins_gems.push p[1]
31
31
  else
32
- plugins_gems.push key
32
+ plugins_gems.push p[0]
33
33
  end
34
34
 
35
35
  end
36
36
  end
37
+
37
38
  config_ = settings.config
38
39
  result = Capucine::Tools.render_template template_file, config_
39
40
 
data/lib/incloudr.rb CHANGED
@@ -3,9 +3,10 @@ module Capucine
3
3
  require 'open-uri'
4
4
  require 'fileutils'
5
5
  require 'json'
6
- # require 'uglifier'
7
6
  require 'packr'
7
+
8
8
  @@noderoot = 'http://registry.npmjs.org/'
9
+ @@cdnjsroot = 'https://raw.github.com/cdnjs/cdnjs/master/ajax/libs/'
9
10
 
10
11
  def self.run_once
11
12
  files = Capucine.settings.config['incloudr_libs']
@@ -14,34 +15,58 @@ module Capucine
14
15
  FileUtils.rm_r dir if File.exist?(dir)
15
16
  FileUtils.mkdir_p dir
16
17
 
18
+ @file = nil
17
19
  files.each {|file| self.pack file}
18
20
  puts "[incloudr] - Packaged"
19
21
  end
20
22
 
21
23
  def self.pack file
22
- type = file['type'] || 'url'
23
- self.url(file) if type == 'url'
24
+ @file = file
25
+
26
+ if @file.kind_of? String # CDNJS
27
+ @file = {}
28
+ @file['name'] = file
29
+ @file['type'] = 'cdnjs'
30
+ else
31
+ @file['type'] = 'npm' unless @file['source'] # NPM
32
+ end
33
+
34
+ @file['type'] = @file['type'] || 'url' # URL
35
+
36
+ @output = File.join(Capucine.settings.working_dir, Capucine.settings.config['incloudr_output_dir'], @file['name'].gsub(/$/, '.js'))
37
+ @output_min = File.join(Capucine.settings.working_dir, Capucine.settings.config['incloudr_output_dir'], @file['name'].gsub(/$/, '.min.js'))
38
+
39
+ self.cdnjs if @file['type'] == 'cdnjs'
40
+ self.url if @file['type'] == 'url'
24
41
  # self.npm(file) if type == 'npm'
25
42
  end
26
43
 
27
44
 
28
- def self.url file
29
- output = File.join(Capucine.settings.working_dir, Capucine.settings.config['incloudr_output_dir'], file['name'].gsub(/$/, '.js'))
30
- output_min = File.join(Capucine.settings.working_dir, Capucine.settings.config['incloudr_output_dir'], file['name'].gsub(/$/, '.min.js'))
31
-
32
- content = open(file['source']).read
45
+ def self.url raw_content = nil
46
+ content = raw_content || open(@file['source']).read
33
47
  content_min = ""
34
48
  content_min << Packr.pack(content)
35
49
 
36
- f1 = File.open(output, 'w+')
50
+ f1 = File.open(@output, 'w+')
37
51
  f1.write(content)
38
52
  f1.close
39
53
 
40
- f2 = File.open(output_min, 'w+')
54
+ f2 = File.open(@output_min, 'w+')
41
55
  f2.write(content_min)
42
56
  f2.close
43
57
  end
44
58
 
59
+
60
+ def self.cdnjs
61
+ cdnjs_url_pkg = "#{@@cdnjsroot}#{@file['name']}/package.json"
62
+ content = JSON.parse open(cdnjs_url_pkg).read
63
+ version = @file['version'] || content['version']
64
+ filename = content['filename']
65
+ raw_file_url = "#{@@cdnjsroot}#{@file['name']}/#{version}/#{filename}"
66
+ raw_content = open(raw_file_url).read
67
+ self.url raw_content
68
+ end
69
+
45
70
  def self.npm file
46
71
  # infos = JSON.parse open("#{@@noderoot}#{file['name']}").read
47
72
  # version = file['version'] || infos['dist-tags']['lastest']
@@ -50,55 +75,9 @@ module Capucine
50
75
 
51
76
  # tarball = open(tarball_url).read
52
77
 
53
- p version
78
+ # p version
54
79
 
55
80
  end
56
81
 
57
-
58
- # def self.pack files
59
- # s = Capucine.settings
60
- # out = File.join s.working_dir, s.config['incloudr_output_dir']
61
-
62
- # output_file = File.join out, base
63
- # output_file_min = File.join out, base.gsub('.js', '.min.js')
64
-
65
- # FileUtils.mkdir_p out if not File.exist?(out)
66
-
67
- # content = ""
68
-
69
- # files.each do |js_file|
70
- # extended = File.join s.working_dir, js_file
71
- # content << File.read(extended) if File.exist?(extended)
72
- # end
73
-
74
- # f = File.open(output_file, 'w')
75
- # f.write('')
76
- # f.write(content)
77
- # f.close
78
- # end
79
-
80
- # def self.lib_root
81
- # return "http://dln.name/"
82
- # end
83
-
84
- # def self.compress file
85
- # return if not File.exist?(file)
86
- # file_name = file.gsub '.js', ''
87
- # output_file = "#{file_name}.js"
88
- # output_file_min = "#{file_name}.min.js"
89
- # end
90
-
91
- # def self.get_lib lib
92
- # lib_name = lib[0]
93
- # lib_version = lib[1]
94
- # lib_url = "#{self.lib_root}#{lib_name}/#{lib_version}"
95
- # lib_url_min = "#{lib_url}/min"
96
- # lib_url_cdn = open(lib_url).read
97
- # lib_url_cdn_min = open(lib_url_min).read
98
- # lib_content = open(lib_url_cdn).read
99
- # lib_content_min = open(lib_url_cdn_min).read
100
- # total = [lib_content, lib_content_min]
101
- # end
102
-
103
82
  end
104
83
  end
data/lib/tools.rb CHANGED
@@ -8,7 +8,6 @@ module Capucine
8
8
  require "compass-sass.rb"
9
9
  require "coffeescript.rb"
10
10
  require "incloudr.rb"
11
- require "templates.rb"
12
11
 
13
12
  def self.new_project name = nil
14
13
 
@@ -27,24 +26,14 @@ module Capucine
27
26
  end
28
27
 
29
28
  def self.init all = nil
30
- files = []
31
- content_files = []
32
-
33
29
  self.archive_file File.join Capucine.settings.working_dir, 'capucine.yaml'
34
30
 
35
31
  if all
36
- content_files = Dir.glob("#{Capucine.settings.gem_content_dir}/shared/**")
37
- content_files.each do |file|
38
- relative_path = file.gsub(File.join(Capucine.settings.gem_content_dir, 'shared', '/'),'')
39
- destination = File.join Capucine.settings.working_dir, relative_path
40
- self.archive_file destination
41
- end
32
+ files = Dir.glob File.join(Capucine.settings.gem_content_dir, 'shared', '**')
33
+ self.archive_file Capucine.settings.working_dir
34
+ FileUtils.cp_r files, Capucine.settings.working_dir
42
35
  end
43
36
 
44
- files << File.join(Capucine.settings.gem_content_dir, 'templates', 'capucine.yaml')
45
- content_files.each {|file| files << file}
46
-
47
- FileUtils.cp_r files, Capucine.settings.working_dir
48
37
  Capucine::Watchr.compile if all
49
38
  Capucine.settings.reset_working_dir
50
39
  end
data/lib/watch.rb CHANGED
@@ -3,7 +3,6 @@ module Capucine
3
3
  require 'compass-sass.rb'
4
4
  require 'coffeescript.rb'
5
5
  require 'incloudr.rb'
6
- require "templates.rb"
7
6
 
8
7
  def self.watch config_file = nil
9
8
  self.compile config_file
@@ -16,13 +15,11 @@ module Capucine
16
15
 
17
16
  @config = Capucine.settings.config
18
17
 
19
- sass_proc = Capucine::CompassSass.proc_watch if @config['sass_enable']
20
- coffeescript_proc = Capucine::Coffee.proc_watch if @config['coffeescript_enable']
21
- templates_proc = Capucine::Templates.proc_watch if @config['templates_enable']
18
+ sass_proc = Capucine::CompassSass.proc_watch if @config['sass']
19
+ coffeescript_proc = Capucine::Coffee.proc_watch if @config['coffeescript']
22
20
 
23
21
  sass_proc.join if sass_proc
24
22
  coffeescript_proc.join if coffeescript_proc
25
- templates_proc.join if templates_proc
26
23
  end
27
24
 
28
25
  def self.compile config_file = nil
@@ -34,10 +31,9 @@ module Capucine
34
31
 
35
32
  @config = Capucine.settings.config
36
33
 
37
- Capucine::CompassSass.run_once if @config['sass_enable']
38
- Capucine::Coffee.run_once if @config['coffeescript_enable']
39
- Capucine::Templates.run_once if @config['templates_enable']
40
- Capucine::Incloudr.run_once if @config['incloudr_enable']
34
+ Capucine::CompassSass.run_once if @config['sass']
35
+ Capucine::Coffee.run_once if @config['coffeescript']
36
+ Capucine::Incloudr.run_once if @config['incloudr']
41
37
  end
42
38
  end
43
39
  end
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.1.2
4
+ version: 0.1.5
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-03-06 00:00:00.000000000 Z
12
+ date: 2012-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fssm
16
- requirement: &70140593993640 !ruby/object:Gem::Requirement
16
+ requirement: &70353584068020 !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: *70140593993640
24
+ version_requirements: *70353584068020
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: compass
27
- requirement: &70140593993100 !ruby/object:Gem::Requirement
27
+ requirement: &70353584066420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.12.rc.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70140593993100
35
+ version_requirements: *70353584066420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: coffee-script
38
- requirement: &70140593992540 !ruby/object:Gem::Requirement
38
+ requirement: &70353584065120 !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: *70140593992540
46
+ version_requirements: *70353584065120
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: uglifier
49
- requirement: &70140593991820 !ruby/object:Gem::Requirement
49
+ requirement: &70353584064200 !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: *70140593991820
57
+ version_requirements: *70353584064200
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: packr
60
- requirement: &70140593999040 !ruby/object:Gem::Requirement
60
+ requirement: &70353584063380 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,32 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70140593999040
68
+ version_requirements: *70353584063380
69
+ - !ruby/object:Gem::Dependency
70
+ name: json
71
+ requirement: &70353584062240 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: *70353584062240
80
+ - !ruby/object:Gem::Dependency
81
+ name: compass-capucine
82
+ requirement: &70353584061120 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :runtime
89
+ prerelease: false
90
+ version_requirements: *70353584061120
69
91
  - !ruby/object:Gem::Dependency
70
92
  name: bundler
71
- requirement: &70140593998380 !ruby/object:Gem::Requirement
93
+ requirement: &70353584075540 !ruby/object:Gem::Requirement
72
94
  none: false
73
95
  requirements:
74
96
  - - ~>
@@ -76,10 +98,10 @@ dependencies:
76
98
  version: 1.0.0
77
99
  type: :development
78
100
  prerelease: false
79
- version_requirements: *70140593998380
101
+ version_requirements: *70353584075540
80
102
  - !ruby/object:Gem::Dependency
81
103
  name: jeweler
82
- requirement: &70140593997400 !ruby/object:Gem::Requirement
104
+ requirement: &70353584073060 !ruby/object:Gem::Requirement
83
105
  none: false
84
106
  requirements:
85
107
  - - ~>
@@ -87,7 +109,7 @@ dependencies:
87
109
  version: 1.8.3
88
110
  type: :development
89
111
  prerelease: false
90
- version_requirements: *70140593997400
112
+ version_requirements: *70353584073060
91
113
  description: longer description of your gem
92
114
  email: dam@dln.name
93
115
  executables:
@@ -105,20 +127,19 @@ files:
105
127
  - VERSION
106
128
  - bin/capucine
107
129
  - capucine.gemspec
130
+ - content/shared/capucine.yaml
108
131
  - content/shared/coffeescript/app.coffee
109
- - content/shared/css/import/YOUR_OLD_CSS
110
- - content/shared/images/favicon/apple-touch-icon-114x114-precomposed.png
111
- - content/shared/images/favicon/apple-touch-icon-57x57-precomposed.png
112
- - content/shared/images/favicon/apple-touch-icon-72x72-precomposed.png
113
- - content/shared/images/favicon/apple-touch-icon-precomposed.png
114
- - content/shared/images/favicon/favicon.png
115
- - content/shared/js/app.js
116
- - content/shared/sass/_main.sass
117
- - content/shared/sass/_responsive.sass
118
- - content/shared/sass/screen.sass
119
- - content/shared/templates/_footer.html
120
- - content/shared/templates/_header.html
121
- - content/shared/templates/index.html.erb
132
+ - content/shared/index.html
133
+ - content/shared/public/css/import/YOUR_OLD_CSS
134
+ - content/shared/public/images/favicon/apple-touch-icon-114x114-precomposed.png
135
+ - content/shared/public/images/favicon/apple-touch-icon-57x57-precomposed.png
136
+ - content/shared/public/images/favicon/apple-touch-icon-72x72-precomposed.png
137
+ - content/shared/public/images/favicon/apple-touch-icon-precomposed.png
138
+ - content/shared/public/images/favicon/favicon.png
139
+ - content/shared/public/js/app.js
140
+ - content/shared/sass/_main.scss
141
+ - content/shared/sass/_responsive.scss
142
+ - content/shared/sass/screen.scss
122
143
  - content/templates/capucine.yaml
123
144
  - content/templates/cmd_help.erb
124
145
  - content/templates/compass_config.erb
@@ -128,7 +149,6 @@ files:
128
149
  - lib/compass-sass.rb
129
150
  - lib/incloudr.rb
130
151
  - lib/settings.rb
131
- - lib/templates.rb
132
152
  - lib/tools.rb
133
153
  - lib/watch.rb
134
154
  homepage: http://capucine.dln.name
@@ -146,7 +166,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
166
  version: '0'
147
167
  segments:
148
168
  - 0
149
- hash: 2029649888001666821
169
+ hash: -1628039647774186190
150
170
  required_rubygems_version: !ruby/object:Gem::Requirement
151
171
  none: false
152
172
  requirements:
@@ -1,6 +0,0 @@
1
- window.AppJS = {
2
- initialize: function() {
3
-
4
-
5
- }
6
- }
@@ -1,26 +0,0 @@
1
- // +font-face('my_font',font-files('../fonts/my_font.ttf', truetype, '../fonts/my_font.otf', opentype), '../fonts/my_font.eot')
2
-
3
- $WIDTH_MIN: 320px
4
- $WIDTH_MAX: 960px
5
-
6
- $FONT_0: "Lucida Grande", "Tahoma", Arial, sans-serif
7
-
8
- $COLOR_0: #111
9
-
10
- // TAGS
11
-
12
- body
13
- font: normal 12px $FONT_0
14
- color: $COLOR_0
15
-
16
- a
17
- +pressed-effect
18
-
19
- p, b, strong, i, blockquote
20
- line-height: 1.5em
21
-
22
- // CLASS
23
-
24
- .wrap
25
- +centerX
26
- +min-max-width($WIDTH_MIN, $WIDTH_MAX)
@@ -1,5 +0,0 @@
1
- @import "compass"
2
- @import "sass-capucine"
3
-
4
- @import "main"
5
- @import "responsive"
@@ -1,11 +0,0 @@
1
-
2
- </div>
3
- <script src="js_generated/app.js"></script>
4
- <!-- <script src="js_generated/app.min.js"></script> -->
5
-
6
- <!--[if lt IE 7 ]>
7
- <script defer src="//ajax.googleapis.com/ajax/libs/chrome-frame/1.0.3/CFInstall.min.js"></script>
8
- <script defer>window.attachEvent('onload',function(){CFInstall.check({mode:'overlay'})})</script>
9
- <![endif]-->
10
- </body>
11
- </html>
@@ -1,29 +0,0 @@
1
- <!doctype html>
2
- <html class="no-js" dir="ltr" lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml">
3
-
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
- <title>-</title>
8
-
9
- <meta name="description" content="">
10
- <meta name="author" content="">
11
-
12
- <!-- <meta property="og:url" content=""/> -->
13
- <!-- <meta property="og:site_name" content=""/> -->
14
- <!-- <meta property="og:title" content=""/> -->
15
- <!-- <meta property="og:description" content=""/> -->
16
- <!-- <meta property="og:image" content=""/> -->
17
- <!-- <meta property="og:type" content=""/> -->
18
- <!-- <meta property="fb:admins" content=""/> -->
19
-
20
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
21
- <link rel="shortcut icon" href="images/favicon/favicon.png">
22
- <!-- <link rel="apple-touch-icon" href="images/favicon/apple-touch-icon-precomposed.png"> -->
23
- <!-- <link rel="apple-touch-icon" href="images/favicon/apple-touch-icon-57x57-precomposed.png" sizes="57x57"> -->
24
- <!-- <link rel="apple-touch-icon" href="images/favicon/apple-touch-icon-72x72-precomposed.png" sizes="72x72"> -->
25
- <!-- <link rel="apple-touch-icon" href="images/favicon/apple-touch-icon-114x114-precomposed.png" sizes="114x114"> -->
26
- <link rel="stylesheet" href="css_generated/screen.css">
27
- </head>
28
- <body>
29
- <div class="wrap">
@@ -1,7 +0,0 @@
1
- <%= File.read("#{config}/_header.html") %>
2
-
3
- <div role="main" id="main">
4
-
5
- </div>
6
-
7
- <%= File.read("#{config}/_footer.html") %>
data/lib/templates.rb DELETED
@@ -1,55 +0,0 @@
1
- module Capucine
2
- class Templates
3
-
4
- def self.run_once
5
- settings = Capucine.settings
6
-
7
- files_to_watch = "#{settings.working_dir}/#{settings.config['templates_erb_files_dir']}/*.erb"
8
- templates = Dir.glob(files_to_watch)
9
-
10
- templates.each do |template|
11
- return if not File.exist? template
12
- html_name = File.basename(template).gsub('.erb', '')
13
- new_file = File.join settings.working_dir, html_name
14
- template_root = File.join settings.working_dir, settings.config['templates_erb_files_dir'] #for ERB binding
15
-
16
- result = Capucine::Tools.render_template template, template_root
17
-
18
- f = File.open(new_file, 'w+')
19
- f.write(result)
20
- f.close
21
-
22
- end
23
-
24
- puts "[template] - Rendered"
25
-
26
- end
27
-
28
- def self.proc_watch
29
- require 'fssm'
30
-
31
- watchr_thread = Thread.new {
32
- files_to_lookat = File.join Capucine.settings.working_dir, Capucine.settings.config['templates_erb_files_dir']
33
-
34
- FSSM.monitor(files_to_lookat, :directories => true) do
35
- update do |b, r|
36
- Capucine::Templates.run_once
37
- end
38
-
39
- create do |b, r|
40
- Capucine::Templates.run_once
41
- end
42
-
43
- delete do |b, r|
44
- Capucine::Templates.run_once
45
- end
46
- end
47
- }
48
- return watchr_thread
49
-
50
- end
51
-
52
-
53
-
54
- end
55
- end