gumdrop 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ # v0.2.8
2
+ - Added better support for site reloading in server
3
+
1
4
  # v0.2.7
2
5
  - Added support for `yield` in templates
3
6
  - Added support for content_for -- only tested in SLIM
@@ -37,7 +37,9 @@ module Gumdrop
37
37
  src= File.join root, 'source'
38
38
  $: << "#{root}/lib"
39
39
  if File.exists? "#{root}/lib/view_helpers.rb"
40
- require 'view_helpers'
40
+ # In server mode, we want to reload it every time... right?
41
+ load "#{root}/lib/view_helpers.rb"
42
+ #require 'view_helpers'
41
43
  end
42
44
 
43
45
  @site = Hash.new {|h,k| h[k]= nil }
@@ -47,13 +49,11 @@ module Gumdrop
47
49
  @root_path = root.split '/'
48
50
  @source_path = src.split '/'
49
51
  @data = Gumdrop::DeferredLoader.new()
50
-
52
+
51
53
  if File.exists? "#{root}/lib/site.rb"
52
54
  # In server mode, we want to reload it every time... right?
53
55
  source= IO.readlines("#{root}/lib/site.rb").join('')
54
-
55
56
  GenerationDSL.class_eval source
56
-
57
57
  #load "#{root}/lib/site.rb"
58
58
  # require 'site'
59
59
  end
@@ -35,7 +35,7 @@ module Gumdrop
35
35
 
36
36
  def set(key, value, opts={})
37
37
  @cache[key]= value
38
- @persisted[key]= value if opts[:persist]
38
+ @persisted[key]= value #unless opts[:persist] == false
39
39
  end
40
40
 
41
41
  def reset
@@ -11,13 +11,18 @@ module Gumdrop
11
11
  # get '/' do
12
12
  # redirect '/index.html'
13
13
  # end
14
+
15
+ Gumdrop.run :dry_run=>true
14
16
 
15
17
  get '/*' do
16
-
17
- Gumdrop.run :dry_run=>true if Gumdrop.config.force_reload
18
-
19
18
  file_path= get_content_path params[:splat].join('/')
20
19
 
20
+ if Gumdrop.config.force_reload
21
+ unless %w(.css .js .jpg .jpe .jpeg .gif .ico .png).include? File.extname(file_path).to_s
22
+ Gumdrop.run :dry_run=>true
23
+ end
24
+ end
25
+
21
26
  if Gumdrop.site.has_key? file_path
22
27
  content= Gumdrop.site[file_path]
23
28
  if content.useLayout?
@@ -1,5 +1,5 @@
1
1
  module Gumdrop
2
2
 
3
- VERSION = "0.2.7" unless defined?(::Gumdrop::VERSION)
3
+ VERSION = "0.2.8" unless defined?(::Gumdrop::VERSION)
4
4
 
5
5
  end
metadata CHANGED
@@ -1,89 +1,109 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gumdrop
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.7
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 2
8
+ - 8
9
+ version: 0.2.8
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Matt McCray
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2011-07-22 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2011-07-22 00:00:00 -05:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: sinatra
16
- requirement: &70267787964340 !ruby/object:Gem::Requirement
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
19
- - - ! '>='
20
- - !ruby/object:Gem::Version
21
- version: '0'
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 0
30
+ version: "0"
22
31
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70267787964340
25
- - !ruby/object:Gem::Dependency
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
26
34
  name: tilt
27
- requirement: &70267787963900 !ruby/object:Gem::Requirement
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
28
37
  none: false
29
- requirements:
30
- - - ! '>='
31
- - !ruby/object:Gem::Version
32
- version: '0'
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
33
44
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70267787963900
36
- - !ruby/object:Gem::Dependency
45
+ version_requirements: *id002
46
+ - !ruby/object:Gem::Dependency
37
47
  name: active_support
38
- requirement: &70267787963400 !ruby/object:Gem::Requirement
48
+ prerelease: false
49
+ requirement: &id003 !ruby/object:Gem::Requirement
39
50
  none: false
40
- requirements:
41
- - - ! '>='
42
- - !ruby/object:Gem::Version
43
- version: '0'
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ segments:
55
+ - 0
56
+ version: "0"
44
57
  type: :runtime
45
- prerelease: false
46
- version_requirements: *70267787963400
47
- - !ruby/object:Gem::Dependency
58
+ version_requirements: *id003
59
+ - !ruby/object:Gem::Dependency
48
60
  name: trollop
49
- requirement: &70267787962920 !ruby/object:Gem::Requirement
61
+ prerelease: false
62
+ requirement: &id004 !ruby/object:Gem::Requirement
50
63
  none: false
51
- requirements:
52
- - - ! '>='
53
- - !ruby/object:Gem::Version
54
- version: '0'
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ segments:
68
+ - 0
69
+ version: "0"
55
70
  type: :runtime
56
- prerelease: false
57
- version_requirements: *70267787962920
58
- - !ruby/object:Gem::Dependency
71
+ version_requirements: *id004
72
+ - !ruby/object:Gem::Dependency
59
73
  name: haml
60
- requirement: &70267787962460 !ruby/object:Gem::Requirement
74
+ prerelease: false
75
+ requirement: &id005 !ruby/object:Gem::Requirement
61
76
  none: false
62
- requirements:
63
- - - ! '>='
64
- - !ruby/object:Gem::Version
65
- version: '0'
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ segments:
81
+ - 0
82
+ version: "0"
66
83
  type: :runtime
67
- prerelease: false
68
- version_requirements: *70267787962460
69
- - !ruby/object:Gem::Dependency
84
+ version_requirements: *id005
85
+ - !ruby/object:Gem::Dependency
70
86
  name: sass
71
- requirement: &70267787962000 !ruby/object:Gem::Requirement
87
+ prerelease: false
88
+ requirement: &id006 !ruby/object:Gem::Requirement
72
89
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ segments:
94
+ - 0
95
+ version: "0"
77
96
  type: :runtime
78
- prerelease: false
79
- version_requirements: *70267787962000
97
+ version_requirements: *id006
80
98
  description: A simple cms/prototyping tool.
81
99
  email: matt@elucidata.net
82
- executables:
100
+ executables:
83
101
  - gumdrop
84
102
  extensions: []
103
+
85
104
  extra_rdoc_files: []
86
- files:
105
+
106
+ files:
87
107
  - .gitignore
88
108
  - ChangeLog.md
89
109
  - Gemfile
@@ -141,28 +161,37 @@ files:
141
161
  - lib/gumdrop/utils.rb
142
162
  - lib/gumdrop/version.rb
143
163
  - lib/gumdrop/view_helpers.rb
164
+ has_rdoc: true
144
165
  homepage: https://github.com/darthapo/gumdrop
145
166
  licenses: []
167
+
146
168
  post_install_message:
147
169
  rdoc_options: []
148
- require_paths:
170
+
171
+ require_paths:
149
172
  - lib
150
- required_ruby_version: !ruby/object:Gem::Requirement
173
+ required_ruby_version: !ruby/object:Gem::Requirement
151
174
  none: false
152
- requirements:
153
- - - ! '>='
154
- - !ruby/object:Gem::Version
155
- version: '0'
156
- required_rubygems_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ segments:
179
+ - 0
180
+ version: "0"
181
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
182
  none: false
158
- requirements:
159
- - - ! '>='
160
- - !ruby/object:Gem::Version
161
- version: '0'
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ segments:
187
+ - 0
188
+ version: "0"
162
189
  requirements: []
190
+
163
191
  rubyforge_project: gumdrop
164
- rubygems_version: 1.8.6
192
+ rubygems_version: 1.3.7
165
193
  signing_key:
166
194
  specification_version: 3
167
195
  summary: A simple cms/prototyping tool.
168
196
  test_files: []
197
+