tipsy 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ module SiteHelper
2
+ end
@@ -35,7 +35,7 @@
35
35
 
36
36
  </footer>
37
37
  </div>
38
- <%= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" %>
38
+ <%= javascript_include_tag "//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" %>
39
39
  <%= javascript_include_tag 'site' %>
40
40
  </body>
41
41
  </html>
@@ -27,8 +27,9 @@ module Tipsy
27
27
 
28
28
  private
29
29
 
30
- def make_attributes(hash)
30
+ def make_attributes(hash = {})
31
31
  attrs = []
32
+ hash ||= {}
32
33
  hash.each_pair do |key, value|
33
34
  attrs << "#{key}=#{value.inspect}"
34
35
  end
data/lib/tipsy/runner.rb CHANGED
@@ -27,12 +27,25 @@ module Tipsy
27
27
  require 'rack'
28
28
 
29
29
  conf = Tipsy::Site.config
30
- require 'rack-legacy' if conf.enable_php
30
+ missing_legacy_message = "Rack::Legacy could not be loaded. Add it to your gemfile or set conf.enable_php to false in config.rb"
31
+
32
+ if conf.enable_php
33
+ begin
34
+ require 'rack-legacy'
35
+ rescue LoadError
36
+ puts missing_legacy_message
37
+ end
38
+ end
31
39
 
32
40
  app = Rack::Builder.new {
33
41
  use Rack::Reloader
34
42
  use Rack::ShowStatus
35
- (use Rack::Legacy::Php, Tipsy::Site.config.public_path) if conf.enable_php
43
+ if conf.enable_php
44
+ begin
45
+ use Rack::Legacy::Php, Tipsy::Site.config.public_path
46
+ rescue
47
+ end
48
+ end
36
49
  use Rack::ShowExceptions
37
50
  use Tipsy::Handler::StaticHandler, :root => conf.public_path, :urls => %w[/]
38
51
  run Rack::Cascade.new([
data/lib/tipsy/server.rb CHANGED
@@ -31,7 +31,7 @@ module Tipsy
31
31
  exit(0)
32
32
  rescue LoadError
33
33
  handler = Rack::Handler.get('webrick')
34
- handler.run app, server_opts do |server|
34
+ handler.run app, options do |server|
35
35
  puts "Running Tipsy with Webrick. To use Mongrel or Thin (recommended), add them to your Gemfile"
36
36
  trap("INT"){ server.shutdown }
37
37
  end
data/lib/tipsy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tipsy
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tipsy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
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: 2011-10-08 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: rack
16
- requirement: &70194631990440 !ruby/object:Gem::Requirement
16
+ requirement: &70107775393640 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70194631990440
24
+ version_requirements: *70107775393640
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rack-test
27
- requirement: &70194631989920 !ruby/object:Gem::Requirement
27
+ requirement: &70107775393140 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.6'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70194631989920
35
+ version_requirements: *70107775393140
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: tilt
38
- requirement: &70194631989460 !ruby/object:Gem::Requirement
38
+ requirement: &70107775341020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.3'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70194631989460
46
+ version_requirements: *70107775341020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: i18n
49
- requirement: &70194631988940 !ruby/object:Gem::Requirement
49
+ requirement: &70107775340440 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0.6'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70194631988940
57
+ version_requirements: *70107775340440
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sass
60
- requirement: &70194631988480 !ruby/object:Gem::Requirement
60
+ requirement: &70107775339860 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '3.1'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70194631988480
68
+ version_requirements: *70107775339860
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: activesupport
71
- requirement: &70194631988000 !ruby/object:Gem::Requirement
71
+ requirement: &70107775339280 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '3.1'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70194631988000
79
+ version_requirements: *70107775339280
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: sprockets
82
- requirement: &70194631983360 !ruby/object:Gem::Requirement
82
+ requirement: &70107775338700 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '2.0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *70194631983360
90
+ version_requirements: *70107775338700
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: hike
93
- requirement: &70194631982780 !ruby/object:Gem::Requirement
93
+ requirement: &70107775338120 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ~>
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '1.2'
99
99
  type: :runtime
100
100
  prerelease: false
101
- version_requirements: *70194631982780
101
+ version_requirements: *70107775338120
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: erubis
104
- requirement: &70194631982280 !ruby/object:Gem::Requirement
104
+ requirement: &70107775337540 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ~>
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '2.7'
110
110
  type: :runtime
111
111
  prerelease: false
112
- version_requirements: *70194631982280
112
+ version_requirements: *70107775337540
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: minitest
115
- requirement: &70194631981720 !ruby/object:Gem::Requirement
115
+ requirement: &70107775336960 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ~>
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: '2.5'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70194631981720
123
+ version_requirements: *70107775336960
124
124
  description: Tipsy is a mini Rack application for working with static websites using
125
125
  Tilt, and Sprockets.
126
126
  email:
@@ -141,6 +141,7 @@ files:
141
141
  - lib/templates/site/assets/stylesheets/screen.css.scss
142
142
  - lib/templates/site/config.rb
143
143
  - lib/templates/site/deploy.yml
144
+ - lib/templates/site/helpers/site_helper.rb
144
145
  - lib/templates/site/layouts/default.html.erb
145
146
  - lib/templates/site/public/.gitkeep
146
147
  - lib/templates/site/views/index.html.erb