aladdin 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. data/README.md +12 -4
  2. data/assets/{fonts → __font}/general_foundicons.eot +0 -0
  3. data/assets/{fonts → __font}/general_foundicons.svg +0 -0
  4. data/assets/{fonts → __font}/general_foundicons.ttf +0 -0
  5. data/assets/{fonts → __font}/general_foundicons.woff +0 -0
  6. data/assets/{images → __img}/graphic.png +0 -0
  7. data/assets/{images → __img}/no_gravatar.gif +0 -0
  8. data/assets/{javascripts → __js}/app.js +0 -0
  9. data/assets/{javascripts → __js}/foundation/app.js +0 -0
  10. data/assets/{javascripts → __js}/foundation/jquery.cookie.js +0 -0
  11. data/assets/{javascripts → __js}/foundation/jquery.event.move.js +0 -0
  12. data/assets/{javascripts → __js}/foundation/jquery.event.swipe.js +0 -0
  13. data/assets/{javascripts → __js}/foundation/jquery.foundation.accordion.js +0 -0
  14. data/assets/{javascripts → __js}/foundation/jquery.foundation.alerts.js +0 -0
  15. data/assets/{javascripts → __js}/foundation/jquery.foundation.buttons.js +0 -0
  16. data/assets/{javascripts → __js}/foundation/jquery.foundation.clearing.js +0 -0
  17. data/assets/{javascripts → __js}/foundation/jquery.foundation.forms.js +0 -0
  18. data/assets/{javascripts → __js}/foundation/jquery.foundation.joyride.js +0 -0
  19. data/assets/{javascripts → __js}/foundation/jquery.foundation.magellan.js +0 -0
  20. data/assets/{javascripts → __js}/foundation/jquery.foundation.mediaQueryToggle.js +0 -0
  21. data/assets/{javascripts → __js}/foundation/jquery.foundation.navigation.js +0 -0
  22. data/assets/{javascripts → __js}/foundation/jquery.foundation.orbit.js +0 -0
  23. data/assets/{javascripts → __js}/foundation/jquery.foundation.reveal.js +0 -0
  24. data/assets/{javascripts → __js}/foundation/jquery.foundation.tabs.js +0 -0
  25. data/assets/{javascripts → __js}/foundation/jquery.foundation.tooltips.js +0 -0
  26. data/assets/{javascripts → __js}/foundation/jquery.foundation.topbar.js +0 -0
  27. data/assets/{javascripts → __js}/foundation/jquery.js +0 -0
  28. data/assets/{javascripts → __js}/foundation/jquery.offcanvas.js +0 -0
  29. data/assets/{javascripts → __js}/foundation/jquery.placeholder.js +0 -0
  30. data/assets/{javascripts → __js}/foundation/modernizr.foundation.js +0 -0
  31. data/lib/aladdin.rb +2 -0
  32. data/lib/aladdin/app.rb +7 -5
  33. data/lib/aladdin/commands.rb +2 -0
  34. data/lib/aladdin/commands/USAGE +10 -0
  35. data/lib/aladdin/commands/new.rb +4 -4
  36. data/lib/aladdin/config.rb +49 -18
  37. data/lib/aladdin/constants.rb +1 -1
  38. data/lib/aladdin/render/markdown.rb +1 -1
  39. data/lib/aladdin/render/sanitize.rb +73 -69
  40. data/lib/aladdin/render/templates/template.rb +1 -1
  41. data/lib/aladdin/support.rb +1 -0
  42. data/lib/aladdin/support/core_ext/hash.rb +1 -0
  43. data/lib/aladdin/support/multiroute.rb +39 -0
  44. data/lib/aladdin/version.rb +1 -1
  45. data/skeleton/manifest.json +2 -1
  46. data/views/haml/layout.haml +24 -24
  47. data/views/scss/_settings.scss +1 -1
  48. metadata +33 -31
data/README.md CHANGED
@@ -34,10 +34,18 @@ Update `index.md` and provide your unit tests in the lesson directory. Finally,
34
34
  $> aladdin server
35
35
  ```
36
36
 
37
- Note that the following directory names are reserved:
37
+ A short guide can be obtained using
38
38
 
39
- - javascripts
40
- - stylesheets
39
+ ```sh
40
+ $> aladdin --help
41
+ ```
42
+
43
+ Note that the following filenames are reserved:
44
+
45
+ - `__js`
46
+ - `__css`
47
+ - `__font`
48
+ - `__img`
41
49
  - verify
42
50
 
43
51
  ## Contributing
@@ -53,4 +61,4 @@ Note that the following directory names are reserved:
53
61
  1. Launch an Ubuntu instance
54
62
  1. Install ruby through rvm
55
63
  1. Install build-essentials
56
- 1. install libxslt-dev libxml2-dev
64
+ 1. Install libxslt-dev libxml2-dev
File without changes
File without changes
File without changes
@@ -1,6 +1,7 @@
1
1
  # ~*~ encoding: utf-8 ~*~
2
2
  require 'json'
3
3
  require 'active_support/core_ext/hash'
4
+ require 'active_support/core_ext/string'
4
5
 
5
6
  require 'aladdin/constants'
6
7
  require 'aladdin/config'
@@ -22,6 +23,7 @@ module Aladdin
22
23
  root = opts[:from] || Dir.pwd
23
24
  @config = Config.new root
24
25
  require 'aladdin/app'
26
+ Aladdin::App.set :root, root
25
27
  Aladdin::App.set :views, Aladdin::VIEWS.merge(markdown: root)
26
28
  Aladdin::App.run!
27
29
  rescue => e
@@ -10,6 +10,7 @@ module Aladdin
10
10
  # +bin/aladdin+ executable.
11
11
  # Adapted from https://github.com/jerodsanto/sinatra-foundation-skeleton/
12
12
  class App < Sinatra::Base
13
+ extend Support::OneOfPattern
13
14
 
14
15
  # Default page
15
16
  INDEX = :index
@@ -46,6 +47,7 @@ module Aladdin
46
47
  # @return [void]
47
48
  def configure_assets
48
49
  set :public_folder, Aladdin::PATHS.assets
50
+ set :static_paths, Proc.new { Aladdin.config['static_paths'] }
49
51
  end
50
52
 
51
53
  # Configures ZURB's compass to compile aladdin's scss assets.
@@ -53,7 +55,7 @@ module Aladdin
53
55
  def configure_compass
54
56
  Compass.configuration do |config|
55
57
  config.http_path = '/'
56
- config.http_images_path = '/images'
58
+ config.http_images_path = '/__img'
57
59
  end
58
60
  set :scss, Compass.sass_engine_options
59
61
  end
@@ -87,18 +89,18 @@ module Aladdin
87
89
  configure_compass
88
90
  end
89
91
 
90
- get '/stylesheets/*.css' do |path|
92
+ get '/__css/*.css' do |path|
91
93
  render_or_pass { scss path.to_sym }
92
94
  end
93
95
 
94
- get '/img/*' do |path|
95
- send_file File.join('img', path)
96
+ get one_of(settings.static_paths) do |path|
97
+ send_file File.join(settings.root, path)
96
98
  end
97
99
 
98
100
  get '/*' do |path|
99
101
  path = path.empty? ? INDEX : path.to_sym
100
102
  render_or_pass do
101
- markdown(path, locals: Aladdin.config.to_hash)
103
+ markdown(path, locals: Aladdin.config)
102
104
  end
103
105
  end
104
106
 
@@ -1,4 +1,6 @@
1
1
  # ~*~ encoding: utf-8 ~*~
2
+ require 'aladdin/version'
3
+
2
4
  Signal.trap('INT') { puts; exit(1) }
3
5
 
4
6
  module Aladdin
@@ -0,0 +1,10 @@
1
+ Usage:
2
+ aladdin COMMAND [options]
3
+
4
+ Commands:
5
+ new # generates the skeleton for a new lesson
6
+ server # launches a preview server
7
+
8
+ Aladdin Options:
9
+ -v, [--version] # show version number and quit
10
+ -h, [--help] # show this help message and quit
@@ -17,12 +17,12 @@ module Aladdin
17
17
  # Array of dot files to be copied over and renamed.
18
18
  DOT_FILES = %w(gitignore)
19
19
 
20
- # Flags for {FileUtils.cp_r}
20
+ # Flags for {::FileUtils.cp_r}
21
21
  COPY_FLAGS = {verbose: true}
22
22
 
23
23
  # Copies skeleton files to given destination.
24
24
  # @param [String] dest destination path
25
- # @param [Hash] flags options for {FileUtils.cp_r}
25
+ # @param [Hash] flags options for {::FileUtils.cp_r}
26
26
  # @return [Void]
27
27
  def copy_files(dest, flags={})
28
28
  flags = COPY_FLAGS.merge flags
@@ -33,8 +33,8 @@ module Aladdin
33
33
  end
34
34
  end
35
35
 
36
- # Prefixes +filename+ with the skeleton directory.
37
- # @param [String] filename name of file to resolve
36
+ # Prefixes +file+ with the skeleton directory.
37
+ # @param [String] file name of file to resolve
38
38
  # @return [String] path
39
39
  def path_to(file)
40
40
  File.expand_path file, Aladdin::PATHS.skeleton
@@ -1,12 +1,13 @@
1
1
  # ~*~ encoding: utf-8 ~*~
2
-
3
2
  module Aladdin
4
3
 
5
4
  # Raised when there is a configuration error.
6
5
  class ConfigError < StandardError; end
7
6
 
8
- # Configuration options for Aladdin.
9
- class Config
7
+ # Configuration options for Aladdin. Gets all of its values from {FILE}.
8
+ # Values in this file should not be trusted because they are given by the
9
+ # user.
10
+ class Config < Hash
10
11
 
11
12
  # Name of configuration file.
12
13
  FILE = 'manifest.json'
@@ -19,7 +20,8 @@ module Aladdin
19
20
  },
20
21
  'title' => 'Lesson X',
21
22
  'description' => 'This is a placeholder description. You should provide your own',
22
- 'categories' => []
23
+ 'categories' => [],
24
+ 'static_paths' => %w(images)
23
25
  }
24
26
 
25
27
  # Creates a new configuration from the file at the given path. Merges the
@@ -27,24 +29,53 @@ module Aladdin
27
29
  # {ConfigError} if the file could not be read or parsed.
28
30
  # @param [String] root path to lesson root
29
31
  def initialize(root)
30
- path = File.expand_path FILE, root
31
- case
32
- when (not File.exist? path)
33
- ConfigError.new("We couldn't find a manifest file at #{path}")
34
- when (not File.readable? path)
35
- ConfigError.new("We found a manifest file at #{path}, but couldn't " +
36
- "read it. Please ensure that the permissions are set correctly.")
37
- else
38
- config = ::JSON.parse(File.read path)
39
- @config = DEFAULTS.deep_merge config
40
- end
32
+ @path = File.expand_path FILE, root
33
+ ensure_readable
34
+ super nil
35
+ merge! DEFAULTS.deep_merge ::JSON.parse File.read @path
36
+ ensure_valid
41
37
  rescue ::JSON::JSONError => e
42
38
  raise ConfigError.new e.message
43
39
  end
44
40
 
45
- # @return [Hash] a hash copy of the configuration options
46
- def to_hash
47
- @config.clone
41
+ private
42
+
43
+ # Raises {ConfigError} unless the configuration file exists and is
44
+ # readable.
45
+ def ensure_readable
46
+ missing unless File.exist? @path
47
+ not_readable unless File.readable? @path
48
+ end
49
+
50
+ # Raises {ConfigError} unless the all of the values in the supplied
51
+ # configuration have the same type as those in {DEFAULTS}.
52
+ def ensure_valid(defaults=DEFAULTS, supplied=self)
53
+ supplied.each do |key, value|
54
+ bad_type(key, defaults[key], value) unless value.is_a? defaults[key].class
55
+ ensure_valid(defaults[key], value) if Hash === value
56
+ end
57
+ end
58
+
59
+ def missing
60
+ raise ConfigError.new <<-eos.squish
61
+ We expected a manifest file at #{@path}, but couldn't find it. Please
62
+ ensure that you have a file named #{Aladdin::Config::File} at the root
63
+ of your lesson directory.
64
+ eos
65
+ end
66
+
67
+ def not_readable
68
+ raise ConfigError.new <<-eos.squish
69
+ We found a manifest file at #{@path}, but couldn't open it for reading.
70
+ Please ensure that you have the permissions to read the file.
71
+ eos
72
+ end
73
+
74
+ def bad_type(key, expected, actual)
75
+ raise ConfigError.new <<-eos.squish
76
+ The #{key} option in the manifest file should be a #{expected.class.name}
77
+ instead of a #{actual.class.name}.
78
+ eos
48
79
  end
49
80
 
50
81
  end
@@ -19,8 +19,8 @@ module Aladdin
19
19
  default: File.expand_path('views', root)
20
20
  }
21
21
 
22
- # @todo TODO allow configuration?
23
22
  require 'tmpdir'
23
+ # @todo TODO allow configuration?
24
24
  DATA_DIR = Dir.tmpdir
25
25
 
26
26
  # File extension for solution files.
@@ -19,7 +19,7 @@ module Aladdin
19
19
  class HTML < ::Redcarpet::Render::HTML
20
20
  include Aladdin::Support::Logger
21
21
 
22
- @sanitize = Aladdin::Sanitize.new
22
+ @sanitize = Sanitize.new
23
23
  @entities = HTMLEntities.new
24
24
 
25
25
  class << self; attr_reader :sanitize, :entities; end
@@ -2,83 +2,87 @@
2
2
 
3
3
  module Aladdin
4
4
 
5
- # Encapsulate sanitization options.
6
- # Adapted from
7
- # https://github.com/github/gollum/blob/master/lib/gollum/sanitization.rb
8
- class Sanitize < ::Sanitize
5
+ module Render
9
6
 
10
- # white-listed elements
11
- ELEMENTS = [
12
- 'a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',
13
- 'blockquote', 'br', 'button', 'caption', 'center', 'cite',
14
- 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir',
15
- 'div', 'dl', 'dt', 'em', 'fieldset', 'font', 'form', 'h1',
16
- 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input',
17
- 'ins', 'kbd', 'label', 'legend', 'li', 'map', 'menu',
18
- 'ol', 'optgroup', 'option', 'p', 'pre', 'q', 's', 'samp',
19
- 'select', 'small', 'span', 'strike', 'strong', 'sub',
20
- 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th',
21
- 'thead', 'tr', 'tt', 'u', 'ul', 'var'
22
- ].freeze
7
+ # Encapsulate sanitization options.
8
+ # Adapted from
9
+ # https://github.com/github/gollum/blob/master/lib/gollum/sanitization.rb
10
+ class Sanitize < ::Sanitize
23
11
 
24
- # white-listed attributes
25
- ATTRIBUTES = {
26
- 'a' => ['href', 'name', 'data-magellan-destination'],
27
- 'dd' => ['data-magellan-arrival'],
28
- 'dl' => ['data-magellan-expedition'],
29
- 'img' => ['src'],
30
- :all => ['abbr', 'accept', 'accept-charset',
31
- 'accesskey', 'action', 'align', 'alt', 'axis',
32
- 'border', 'cellpadding', 'cellspacing', 'char',
33
- 'charoff', 'class', 'charset', 'checked', 'cite',
34
- 'clear', 'cols', 'colspan', 'color',
35
- 'compact', 'coords', 'datetime', 'dir',
36
- 'disabled', 'enctype', 'for', 'frame',
37
- 'headers', 'height', 'hreflang',
38
- 'hspace', 'id', 'ismap', 'label', 'lang',
39
- 'longdesc', 'maxlength', 'media', 'method',
40
- 'multiple', 'name', 'nohref', 'noshade',
41
- 'nowrap', 'prompt', 'readonly', 'rel', 'rev',
42
- 'rows', 'rowspan', 'rules', 'scope',
43
- 'selected', 'shape', 'size', 'span',
44
- 'start', 'summary', 'tabindex', 'target',
45
- 'title', 'type', 'usemap', 'valign', 'value',
46
- 'vspace', 'width']
47
- }.freeze
12
+ # white-listed elements
13
+ ELEMENTS = [
14
+ 'a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',
15
+ 'blockquote', 'br', 'button', 'caption', 'center', 'cite',
16
+ 'code', 'col', 'colgroup', 'dd', 'del', 'dfn', 'dir',
17
+ 'div', 'dl', 'dt', 'em', 'fieldset', 'font', 'form', 'h1',
18
+ 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'img', 'input',
19
+ 'ins', 'kbd', 'label', 'legend', 'li', 'map', 'menu',
20
+ 'ol', 'optgroup', 'option', 'p', 'pre', 'q', 's', 'samp',
21
+ 'select', 'small', 'span', 'strike', 'strong', 'sub',
22
+ 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th',
23
+ 'thead', 'tr', 'tt', 'u', 'ul', 'var'
24
+ ].freeze
48
25
 
49
- # white-listed protocols
50
- PROTOCOLS = {
51
- 'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', 'apt', :relative]},
52
- 'img' => {'src' => ['http', 'https', :relative]}
53
- }.freeze
26
+ # white-listed attributes
27
+ ATTRIBUTES = {
28
+ 'a' => ['href', 'name', 'data-magellan-destination'],
29
+ 'dd' => ['data-magellan-arrival'],
30
+ 'dl' => ['data-magellan-expedition'],
31
+ 'img' => ['src'],
32
+ :all => ['abbr', 'accept', 'accept-charset',
33
+ 'accesskey', 'action', 'align', 'alt', 'axis',
34
+ 'border', 'cellpadding', 'cellspacing', 'char',
35
+ 'charoff', 'class', 'charset', 'checked', 'cite',
36
+ 'clear', 'cols', 'colspan', 'color',
37
+ 'compact', 'coords', 'datetime', 'dir',
38
+ 'disabled', 'enctype', 'for', 'frame',
39
+ 'headers', 'height', 'hreflang',
40
+ 'hspace', 'id', 'ismap', 'label', 'lang',
41
+ 'longdesc', 'maxlength', 'media', 'method',
42
+ 'multiple', 'name', 'nohref', 'noshade',
43
+ 'nowrap', 'prompt', 'readonly', 'rel', 'rev',
44
+ 'rows', 'rowspan', 'rules', 'scope',
45
+ 'selected', 'shape', 'size', 'span',
46
+ 'start', 'summary', 'tabindex', 'target',
47
+ 'title', 'type', 'usemap', 'valign', 'value',
48
+ 'vspace', 'width']
49
+ }.freeze
54
50
 
55
- # elements to remove (incl. contents)
56
- REMOVE_CONTENTS = [
57
- 'script',
58
- 'style'
59
- ].freeze
51
+ # white-listed protocols
52
+ PROTOCOLS = {
53
+ 'a' => {'href' => ['http', 'https', 'mailto', 'ftp', 'irc', 'apt', :relative]},
54
+ 'img' => {'src' => ['http', 'https', :relative]}
55
+ }.freeze
60
56
 
61
- # attributes to add to elements
62
- ADD_ATTRIBUTES = {
63
- 'a' => {'rel' => 'nofollow'}
64
- }
57
+ # elements to remove (incl. contents)
58
+ REMOVE_CONTENTS = [
59
+ 'script',
60
+ 'style'
61
+ ].freeze
65
62
 
66
- # Creates a new sanitizer with Aladdin's configuration.
67
- def initialize
68
- super config
69
- end
63
+ # attributes to add to elements
64
+ ADD_ATTRIBUTES = {
65
+ 'a' => {'rel' => 'nofollow'}
66
+ }
70
67
 
71
- private
68
+ # Creates a new sanitizer with Aladdin's configuration.
69
+ def initialize
70
+ super config
71
+ end
72
+
73
+ private
74
+
75
+ # @return [Hash] configuration hash.
76
+ def config
77
+ { elements: ELEMENTS.dup,
78
+ attributes: ATTRIBUTES.dup,
79
+ protocols: PROTOCOLS.dup,
80
+ add_attributes: ADD_ATTRIBUTES.dup,
81
+ remove_contents: REMOVE_CONTENTS.dup,
82
+ allow_comments: false
83
+ }
84
+ end
72
85
 
73
- # Returns a configuration hash.
74
- def config
75
- { elements: ELEMENTS.dup,
76
- attributes: ATTRIBUTES.dup,
77
- protocols: PROTOCOLS.dup,
78
- add_attributes: ADD_ATTRIBUTES.dup,
79
- remove_contents: REMOVE_CONTENTS.dup,
80
- allow_comments: false
81
- }
82
86
  end
83
87
 
84
88
  end
@@ -10,7 +10,7 @@ module Aladdin
10
10
  # Renders the given problem using {#view}.
11
11
  # @todo TODO should probably show some error message in the preview,
12
12
  # so that the author doesn't have to read the logs.
13
- # @params [Hash] locals local variables to pass to the template
13
+ # @param [Hash] locals local variables to pass to the template
14
14
  def render(locals={})
15
15
  view.render Object.new, locals
16
16
  end
@@ -2,6 +2,7 @@
2
2
  require 'aladdin/support/core_ext'
3
3
  require 'aladdin/support/logger'
4
4
  require 'aladdin/support/weak_comparator'
5
+ require 'aladdin/support/multiroute'
5
6
 
6
7
  module Aladdin
7
8
  # aladdin-support is a collection of utility classes and modules for use in
@@ -1,4 +1,5 @@
1
1
  # ~*~ encoding: utf-8 ~*~
2
+ # @see ::Hash
2
3
  class Hash
3
4
 
4
5
  # Returns a struct representation of the receiver.
@@ -0,0 +1,39 @@
1
+ # ~*~ encoding: utf-8 ~*~
2
+ module Aladdin
3
+
4
+ module Support
5
+
6
+ # Sinatra route matcher that matches mutltiple paths given in an array.
7
+ class OneOfMatcher
8
+
9
+ Match = Struct.new(:captures)
10
+
11
+ # Creates a new matcher for +routes+.
12
+ # @param [Array] routes array of static paths
13
+ def initialize(routes)
14
+ @routes = routes.map { |r| '/' + r }
15
+ @captures = Match.new []
16
+ end
17
+
18
+ # Matches +routes+ against +str+.
19
+ def match(str)
20
+ @captures[:captures] = [str]
21
+ @captures if @routes.any? { |r| str.starts_with? r }
22
+ end
23
+
24
+ end
25
+
26
+ # Sinatra route matcher that matches mutltiple paths given in an array.
27
+ module OneOfPattern
28
+ # @example
29
+ # get one_of(%w(x y z)) do
30
+ # puts 'Hello!'
31
+ # end
32
+ def one_of(routes)
33
+ OneOfMatcher.new routes
34
+ end
35
+ end
36
+
37
+ end
38
+
39
+ end
@@ -1,4 +1,4 @@
1
1
  module Aladdin
2
2
  # Version number.
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
@@ -5,5 +5,6 @@
5
5
  "ruby",
6
6
  "programming",
7
7
  "software"
8
- ]
8
+ ],
9
+ "static_paths": ["images"]
9
10
  }
@@ -12,12 +12,12 @@
12
12
  %meta{name: 'viewport', content: 'width=device-width'}
13
13
 
14
14
  %title= title
15
- %link{rel: 'stylesheet', href:'stylesheets/app.css'}
16
- %link{rel: 'stylesheet', href:'stylesheets/general_foundicons.css'}
15
+ %link{rel: 'stylesheet', href:'__css/app.css'}
16
+ %link{rel: 'stylesheet', href:'__css/general_foundicons.css'}
17
17
  /[if lt IE 8]
18
- %link{rel: 'stylesheet', href:'stylesheets/general_foundicons_ie7.css'}
18
+ %link{rel: 'stylesheet', href:'__css/general_foundicons_ie7.css'}
19
19
 
20
- %script{src: 'javascripts/foundation/modernizr.foundation.js'}
20
+ %script{src: '__js/foundation/modernizr.foundation.js'}
21
21
 
22
22
  %body
23
23
 
@@ -29,7 +29,7 @@
29
29
  %h1= title
30
30
  %h4
31
31
  <!-- TODO: user gravatar -->
32
- %img{src: 'images/no_gravatar.gif', width: 20, height: 20, alt: 'John Doe'}
32
+ %img{src: '__img/no_gravatar.gif', width: 20, height: 20, alt: 'John Doe'}
33
33
  <!-- TOOD: user name -->
34
34
  %small John Doe
35
35
  %h4.subheader= description
@@ -43,7 +43,7 @@
43
43
  %h1
44
44
  %a.th.hero{href: '#'}
45
45
  <!-- TODO: graphic from user's repo -->
46
- %img{src: 'images/graphic.png'}
46
+ %img{src: '__img/graphic.png'}
47
47
 
48
48
  %hr/
49
49
  %section{role: 'lesson'}
@@ -61,27 +61,27 @@
61
61
  %span <!-- TODO: score goes here -->
62
62
 
63
63
  -# foundation
64
- %script{src: 'javascripts/foundation/jquery.js'}
65
- %script{src: 'javascripts/foundation/jquery.cookie.js'}
66
- %script{src: 'javascripts/foundation/jquery.event.move.js'}
67
- %script{src: 'javascripts/foundation/jquery.event.swipe.js'}
68
- %script{src: 'javascripts/foundation/jquery.foundation.accordion.js'}
69
- %script{src: 'javascripts/foundation/jquery.foundation.alerts.js'}
70
- %script{src: 'javascripts/foundation/jquery.foundation.buttons.js'}
71
- %script{src: 'javascripts/foundation/jquery.foundation.clearing.js'}
72
- %script{src: 'javascripts/foundation/jquery.foundation.forms.js'}
73
- %script{src: 'javascripts/foundation/jquery.foundation.magellan.js'}
74
- %script{src: 'javascripts/foundation/jquery.foundation.mediaQueryToggle.js'}
75
- %script{src: 'javascripts/foundation/jquery.foundation.navigation.js'}
76
- %script{src: 'javascripts/foundation/jquery.foundation.tabs.js'}
77
- %script{src: 'javascripts/foundation/jquery.foundation.tooltips.js'}
78
- %script{src: 'javascripts/foundation/jquery.foundation.topbar.js'}
79
- %script{src: 'javascripts/foundation/jquery.placeholder.js'}
80
- %script{src: 'javascripts/foundation/app.js'}
64
+ %script{src: '__js/foundation/jquery.js'}
65
+ %script{src: '__js/foundation/jquery.cookie.js'}
66
+ %script{src: '__js/foundation/jquery.event.move.js'}
67
+ %script{src: '__js/foundation/jquery.event.swipe.js'}
68
+ %script{src: '__js/foundation/jquery.foundation.accordion.js'}
69
+ %script{src: '__js/foundation/jquery.foundation.alerts.js'}
70
+ %script{src: '__js/foundation/jquery.foundation.buttons.js'}
71
+ %script{src: '__js/foundation/jquery.foundation.clearing.js'}
72
+ %script{src: '__js/foundation/jquery.foundation.forms.js'}
73
+ %script{src: '__js/foundation/jquery.foundation.magellan.js'}
74
+ %script{src: '__js/foundation/jquery.foundation.mediaQueryToggle.js'}
75
+ %script{src: '__js/foundation/jquery.foundation.navigation.js'}
76
+ %script{src: '__js/foundation/jquery.foundation.tabs.js'}
77
+ %script{src: '__js/foundation/jquery.foundation.tooltips.js'}
78
+ %script{src: '__js/foundation/jquery.foundation.topbar.js'}
79
+ %script{src: '__js/foundation/jquery.placeholder.js'}
80
+ %script{src: '__js/foundation/app.js'}
81
81
 
82
82
  -# mathjax
83
83
  %script{src: 'https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'}
84
- %script{src: 'javascripts/app.js'}
84
+ %script{src: '__js/app.js'}
85
85
 
86
86
  :plain
87
87
  </html>
@@ -241,7 +241,7 @@
241
241
  // http://www.modularscale.com by Tim Brown
242
242
  // https://github.com/scottkellum/modular-scale by scottkellum
243
243
 
244
- $fontFileName: "/fonts/general_foundicons";
244
+ $fontFileName: "/__font/general_foundicons";
245
245
  $fontName: "GeneralFoundicons";
246
246
  $classPrefix: "foundicon-";
247
247
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aladdin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-26 00:00:00.000000000 Z
12
+ date: 2012-12-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
@@ -264,6 +264,7 @@ files:
264
264
  - lib/aladdin/app.rb
265
265
  - lib/aladdin/commands/new.rb
266
266
  - lib/aladdin/commands/server.rb
267
+ - lib/aladdin/commands/USAGE
267
268
  - lib/aladdin/commands.rb
268
269
  - lib/aladdin/config.rb
269
270
  - lib/aladdin/constants.rb
@@ -284,40 +285,41 @@ files:
284
285
  - lib/aladdin/support/core_ext/hash.rb
285
286
  - lib/aladdin/support/core_ext.rb
286
287
  - lib/aladdin/support/logger.rb
288
+ - lib/aladdin/support/multiroute.rb
287
289
  - lib/aladdin/support/weak_comparator.rb
288
290
  - lib/aladdin/support.rb
289
291
  - lib/aladdin/version.rb
290
292
  - lib/aladdin.rb
293
+ - assets/__font/general_foundicons.eot
294
+ - assets/__font/general_foundicons.svg
295
+ - assets/__font/general_foundicons.ttf
296
+ - assets/__font/general_foundicons.woff
297
+ - assets/__img/graphic.png
298
+ - assets/__img/no_gravatar.gif
299
+ - assets/__js/app.js
300
+ - assets/__js/foundation/app.js
301
+ - assets/__js/foundation/jquery.cookie.js
302
+ - assets/__js/foundation/jquery.event.move.js
303
+ - assets/__js/foundation/jquery.event.swipe.js
304
+ - assets/__js/foundation/jquery.foundation.accordion.js
305
+ - assets/__js/foundation/jquery.foundation.alerts.js
306
+ - assets/__js/foundation/jquery.foundation.buttons.js
307
+ - assets/__js/foundation/jquery.foundation.clearing.js
308
+ - assets/__js/foundation/jquery.foundation.forms.js
309
+ - assets/__js/foundation/jquery.foundation.joyride.js
310
+ - assets/__js/foundation/jquery.foundation.magellan.js
311
+ - assets/__js/foundation/jquery.foundation.mediaQueryToggle.js
312
+ - assets/__js/foundation/jquery.foundation.navigation.js
313
+ - assets/__js/foundation/jquery.foundation.orbit.js
314
+ - assets/__js/foundation/jquery.foundation.reveal.js
315
+ - assets/__js/foundation/jquery.foundation.tabs.js
316
+ - assets/__js/foundation/jquery.foundation.tooltips.js
317
+ - assets/__js/foundation/jquery.foundation.topbar.js
318
+ - assets/__js/foundation/jquery.js
319
+ - assets/__js/foundation/jquery.offcanvas.js
320
+ - assets/__js/foundation/jquery.placeholder.js
321
+ - assets/__js/foundation/modernizr.foundation.js
291
322
  - assets/favicon.ico
292
- - assets/fonts/general_foundicons.eot
293
- - assets/fonts/general_foundicons.svg
294
- - assets/fonts/general_foundicons.ttf
295
- - assets/fonts/general_foundicons.woff
296
- - assets/images/graphic.png
297
- - assets/images/no_gravatar.gif
298
- - assets/javascripts/app.js
299
- - assets/javascripts/foundation/app.js
300
- - assets/javascripts/foundation/jquery.cookie.js
301
- - assets/javascripts/foundation/jquery.event.move.js
302
- - assets/javascripts/foundation/jquery.event.swipe.js
303
- - assets/javascripts/foundation/jquery.foundation.accordion.js
304
- - assets/javascripts/foundation/jquery.foundation.alerts.js
305
- - assets/javascripts/foundation/jquery.foundation.buttons.js
306
- - assets/javascripts/foundation/jquery.foundation.clearing.js
307
- - assets/javascripts/foundation/jquery.foundation.forms.js
308
- - assets/javascripts/foundation/jquery.foundation.joyride.js
309
- - assets/javascripts/foundation/jquery.foundation.magellan.js
310
- - assets/javascripts/foundation/jquery.foundation.mediaQueryToggle.js
311
- - assets/javascripts/foundation/jquery.foundation.navigation.js
312
- - assets/javascripts/foundation/jquery.foundation.orbit.js
313
- - assets/javascripts/foundation/jquery.foundation.reveal.js
314
- - assets/javascripts/foundation/jquery.foundation.tabs.js
315
- - assets/javascripts/foundation/jquery.foundation.tooltips.js
316
- - assets/javascripts/foundation/jquery.foundation.topbar.js
317
- - assets/javascripts/foundation/jquery.js
318
- - assets/javascripts/foundation/jquery.offcanvas.js
319
- - assets/javascripts/foundation/jquery.placeholder.js
320
- - assets/javascripts/foundation/modernizr.foundation.js
321
323
  - views/haml/exe.haml
322
324
  - views/haml/header.haml
323
325
  - views/haml/img.haml