mobox 0.0.2 → 0.0.3

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.
Files changed (3) hide show
  1. data/lib/mobox/version.rb +1 -1
  2. metadata +2 -3
  3. data/template/config.ru +0 -76
@@ -1,3 +1,3 @@
1
1
  module Mobox
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mobox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
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-08-12 00:00:00.000000000 Z
12
+ date: 2012-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
@@ -195,7 +195,6 @@ files:
195
195
  - mobox.gemspec
196
196
  - template/.mobox
197
197
  - template/Gemfile
198
- - template/config.ru
199
198
  - template/src/assets/images/mobox-logo-inkscape.svg
200
199
  - template/src/assets/images/mobox-logo.pdf
201
200
  - template/src/assets/images/mobox-logo.png
@@ -1,76 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- Bundler.require if File.exist? "Gemfile"
4
- require 'pathname'
5
- require 'logger'
6
- require 'compass'
7
- require 'sprockets'
8
- require 'sprockets-sass'
9
- require 'haml-sprockets'
10
- require 'sass'
11
- require 'compass'
12
- require 'compass-sprockets'
13
- require 'yaml'
14
- require 'json'
15
- begin
16
- require 'fileutils'
17
- rescue LoadError => e
18
- require 'ftools'
19
- end
20
-
21
- Sass::Engine::DEFAULT_OPTIONS[:load_paths].tap do |paths|
22
- paths.push *Compass.sass_engine_options[:load_paths]
23
- end
24
-
25
- ROOT = Pathname(File.dirname(__FILE__))
26
- LOGGER = Logger.new(STDOUT)
27
- BUNDLES = %w[ application.css application.js ]
28
- BUILD_DIR = ROOT.join("www")
29
- SOURCE_DIR = ROOT.join("src")
30
- ASSETS_SOURCE_DIR = SOURCE_DIR.join "assets"
31
-
32
- assets = Sprockets::Environment.new(SOURCE_DIR) do |env|
33
- env.logger = Logger.new(STDOUT)
34
- end
35
-
36
- # Sprockets render scope
37
- require ROOT.join("lib", "mobox", "helpers")
38
- assets.context_class.instance_eval do
39
- include Mobox::Helpers
40
- end
41
-
42
- # Haml render scope
43
- render_scope = Object.new
44
- class << render_scope
45
- include Mobox::Helpers
46
- end
47
-
48
- assets.append_path(File.join(SOURCE_DIR, 'assets'))
49
- assets.append_path(File.join(SOURCE_DIR, 'assets', 'javascripts'))
50
- assets.append_path(File.join(SOURCE_DIR, 'assets', 'stylesheets'))
51
- assets.append_path(File.join(SOURCE_DIR, 'assets', 'images'))
52
-
53
- map "/javascripts" do
54
- run assets
55
- end
56
-
57
- map "/stylesheets" do
58
- run assets
59
- end
60
-
61
- map "/images" do
62
- run assets
63
- end
64
-
65
- map "/" do
66
- run lambda { |env|
67
- [
68
- 200,
69
- {
70
- 'Content-Type' => 'text/html',
71
- 'Cache-Control' => 'public, max-age=60'
72
- },
73
- Haml::Engine.new(File.open(SOURCE_DIR.join('index.haml'), File::RDONLY).read).render(render_scope)
74
- ]
75
- }
76
- end