nesta 0.9.7 → 0.9.8

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/.gitignore CHANGED
@@ -3,6 +3,7 @@
3
3
  .*.swp
4
4
  .bundle
5
5
  .DS_Store
6
+ .rbenv-version
6
7
  .rvmrc
7
8
  .sass-cache
8
9
  config/config.yml
data/CHANGES CHANGED
@@ -1,3 +1,14 @@
1
+ = 0.9.8 / (22 August 2011)
2
+
3
+ * Bug fix: The Sinatra app's root directory wasn't set which meant
4
+ that Nesta couldn't always find the ./public directory (such as when
5
+ running on Heroku).
6
+
7
+ The modifications made in 0.9.6 to make Nesta easier to mount inside
8
+ another Rack application moved Nesta::App.root to the (new)
9
+ Nesta::Env class. In 0.9.6 I forgot to actually set Nesta::App.root
10
+ as well, which was a big mistake. Whoops.
11
+
1
12
  = 0.9.7 / (19 August 2011)
2
13
 
3
14
  * No code changes from 0.9.6; version number increased to allow new gem
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nesta (0.9.7)
4
+ nesta (0.9.8)
5
5
  RedCloth (~> 4.2)
6
6
  haml (~> 3.1)
7
7
  maruku (>= 0.6.0)
@@ -19,6 +19,7 @@ module Nesta
19
19
  class App < Sinatra::Base
20
20
  register Sinatra::Cache
21
21
 
22
+ set :root, Nesta::Env.root
22
23
  set :views, File.expand_path('../../views', File.dirname(__FILE__))
23
24
  set :cache_enabled, Config.cache
24
25
  set :haml, { :format => :html5 }
@@ -83,11 +84,11 @@ module Nesta
83
84
 
84
85
  def local_stylesheet?
85
86
  Nesta.deprecated('local_stylesheet?', 'use local_stylesheet_link_tag')
86
- File.exist?(File.expand_path('views/local.sass', Nesta::Env.root))
87
+ File.exist?(File.expand_path('views/local.sass', Nesta::App.root))
87
88
  end
88
89
 
89
90
  def local_stylesheet_link_tag(name)
90
- pattern = File.expand_path("views/#{name}.s{a,c}ss", Nesta::Env.root)
91
+ pattern = File.expand_path("views/#{name}.s{a,c}ss", Nesta::App.root)
91
92
  if Dir.glob(pattern).size > 0
92
93
  haml_tag :link, :href => "/css/#{name}.css", :rel => "stylesheet"
93
94
  end
@@ -46,7 +46,7 @@ module Nesta
46
46
  end
47
47
 
48
48
  def self.yaml_path
49
- File.expand_path('config/config.yml', Nesta::Env.root)
49
+ File.expand_path('config/config.yml', Nesta::App.root)
50
50
  end
51
51
 
52
52
  def self.from_environment(setting)
@@ -1,11 +1,11 @@
1
1
  module Nesta
2
2
  class Path
3
3
  def self.local(*args)
4
- File.expand_path(File.join(args), Nesta::Env.root)
4
+ File.expand_path(File.join(args), Nesta::App.root)
5
5
  end
6
6
 
7
7
  def self.themes(*args)
8
- File.expand_path(File.join('themes', *args), Nesta::Env.root)
8
+ File.expand_path(File.join('themes', *args), Nesta::App.root)
9
9
  end
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module Nesta
2
- VERSION = '0.9.7'
2
+ VERSION = '0.9.8'
3
3
  end
@@ -115,7 +115,7 @@ describe "nesta" do
115
115
  FileUtils.mkdir_p(File.dirname(@config_path))
116
116
  Nesta::Config.stub!(:yaml_path).and_return(@config_path)
117
117
  create_config_yaml('content: path/to/content')
118
- Nesta::Env.stub!(:root).and_return(@project_path)
118
+ Nesta::App.stub!(:root).and_return(@project_path)
119
119
  @repo_url = 'git://github.com/gma/nesta-demo-content.git'
120
120
  @demo_path = project_path('content-demo')
121
121
  @command = Nesta::Commands::Demo::Content.new
@@ -265,7 +265,7 @@ describe "nesta" do
265
265
  end
266
266
 
267
267
  before(:each) do
268
- Nesta::Env.stub!(:root).and_return(FixtureHelper::FIXTURE_DIR)
268
+ Nesta::App.stub!(:root).and_return(FixtureHelper::FIXTURE_DIR)
269
269
  @name = 'my-new-theme'
270
270
  Nesta::Commands::Theme::Create.new(@name).execute
271
271
  end
@@ -27,8 +27,8 @@ describe "Rendering" do
27
27
  end
28
28
 
29
29
  before(:each) do
30
- @app_root = Nesta::Env.root
31
- Nesta::Env.root = File.expand_path('fixtures/tmp', File.dirname(__FILE__))
30
+ @app_root = Nesta::App.root
31
+ Nesta::App.root = File.expand_path('fixtures/tmp', File.dirname(__FILE__))
32
32
  @theme = 'my-theme'
33
33
  @fixtures = []
34
34
  stub_configuration
@@ -36,7 +36,7 @@ describe "Rendering" do
36
36
 
37
37
  after(:each) do
38
38
  @fixtures.each { |path| FileUtils.rm(path) if File.exist?(path) }
39
- Nesta::Env.root = @app_root
39
+ Nesta::App.root = @app_root
40
40
  end
41
41
 
42
42
  describe "when rendering stylesheets" do
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nesta
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 43
4
5
  prerelease:
5
- version: 0.9.7
6
+ segments:
7
+ - 0
8
+ - 9
9
+ - 8
10
+ version: 0.9.8
6
11
  platform: ruby
7
12
  authors:
8
13
  - Graham Ashton
@@ -10,130 +15,180 @@ autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
17
 
13
- date: 2011-08-19 00:00:00 +01:00
18
+ date: 2011-08-22 00:00:00 +01:00
14
19
  default_executable:
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
17
- name: haml
18
22
  requirement: &id001 !ruby/object:Gem::Requirement
19
23
  none: false
20
24
  requirements:
21
25
  - - ~>
22
26
  - !ruby/object:Gem::Version
27
+ hash: 5
28
+ segments:
29
+ - 3
30
+ - 1
23
31
  version: "3.1"
24
- type: :runtime
25
- prerelease: false
26
32
  version_requirements: *id001
33
+ name: haml
34
+ prerelease: false
35
+ type: :runtime
27
36
  - !ruby/object:Gem::Dependency
28
- name: sass
29
37
  requirement: &id002 !ruby/object:Gem::Requirement
30
38
  none: false
31
39
  requirements:
32
40
  - - ~>
33
41
  - !ruby/object:Gem::Version
42
+ hash: 5
43
+ segments:
44
+ - 3
45
+ - 1
34
46
  version: "3.1"
35
- type: :runtime
36
- prerelease: false
37
47
  version_requirements: *id002
48
+ name: sass
49
+ prerelease: false
50
+ type: :runtime
38
51
  - !ruby/object:Gem::Dependency
39
- name: maruku
40
52
  requirement: &id003 !ruby/object:Gem::Requirement
41
53
  none: false
42
54
  requirements:
43
55
  - - ">="
44
56
  - !ruby/object:Gem::Version
57
+ hash: 7
58
+ segments:
59
+ - 0
60
+ - 6
61
+ - 0
45
62
  version: 0.6.0
46
- type: :runtime
47
- prerelease: false
48
63
  version_requirements: *id003
64
+ name: maruku
65
+ prerelease: false
66
+ type: :runtime
49
67
  - !ruby/object:Gem::Dependency
50
- name: RedCloth
51
68
  requirement: &id004 !ruby/object:Gem::Requirement
52
69
  none: false
53
70
  requirements:
54
71
  - - ~>
55
72
  - !ruby/object:Gem::Version
73
+ hash: 31
74
+ segments:
75
+ - 4
76
+ - 2
56
77
  version: "4.2"
57
- type: :runtime
58
- prerelease: false
59
78
  version_requirements: *id004
79
+ name: RedCloth
80
+ prerelease: false
81
+ type: :runtime
60
82
  - !ruby/object:Gem::Dependency
61
- name: sinatra
62
83
  requirement: &id005 !ruby/object:Gem::Requirement
63
84
  none: false
64
85
  requirements:
65
86
  - - "="
66
87
  - !ruby/object:Gem::Version
88
+ hash: 23
89
+ segments:
90
+ - 1
91
+ - 1
92
+ - 2
67
93
  version: 1.1.2
68
- type: :runtime
69
- prerelease: false
70
94
  version_requirements: *id005
95
+ name: sinatra
96
+ prerelease: false
97
+ type: :runtime
71
98
  - !ruby/object:Gem::Dependency
72
- name: shotgun
73
99
  requirement: &id006 !ruby/object:Gem::Requirement
74
100
  none: false
75
101
  requirements:
76
102
  - - ">="
77
103
  - !ruby/object:Gem::Version
104
+ hash: 27
105
+ segments:
106
+ - 0
107
+ - 8
78
108
  version: "0.8"
79
- type: :runtime
80
- prerelease: false
81
109
  version_requirements: *id006
110
+ name: shotgun
111
+ prerelease: false
112
+ type: :runtime
82
113
  - !ruby/object:Gem::Dependency
83
- name: hpricot
84
114
  requirement: &id007 !ruby/object:Gem::Requirement
85
115
  none: false
86
116
  requirements:
87
117
  - - "="
88
118
  - !ruby/object:Gem::Version
119
+ hash: 57
120
+ segments:
121
+ - 0
122
+ - 8
123
+ - 3
89
124
  version: 0.8.3
90
- type: :development
91
- prerelease: false
92
125
  version_requirements: *id007
126
+ name: hpricot
127
+ prerelease: false
128
+ type: :development
93
129
  - !ruby/object:Gem::Dependency
94
- name: rack-test
95
130
  requirement: &id008 !ruby/object:Gem::Requirement
96
131
  none: false
97
132
  requirements:
98
133
  - - "="
99
134
  - !ruby/object:Gem::Version
135
+ hash: 5
136
+ segments:
137
+ - 0
138
+ - 5
139
+ - 7
100
140
  version: 0.5.7
101
- type: :development
102
- prerelease: false
103
141
  version_requirements: *id008
142
+ name: rack-test
143
+ prerelease: false
144
+ type: :development
104
145
  - !ruby/object:Gem::Dependency
105
- name: rspec
106
146
  requirement: &id009 !ruby/object:Gem::Requirement
107
147
  none: false
108
148
  requirements:
109
149
  - - "="
110
150
  - !ruby/object:Gem::Version
151
+ hash: 27
152
+ segments:
153
+ - 1
154
+ - 3
155
+ - 0
111
156
  version: 1.3.0
112
- type: :development
113
- prerelease: false
114
157
  version_requirements: *id009
158
+ name: rspec
159
+ prerelease: false
160
+ type: :development
115
161
  - !ruby/object:Gem::Dependency
116
- name: rspec_hpricot_matchers
117
162
  requirement: &id010 !ruby/object:Gem::Requirement
118
163
  none: false
119
164
  requirements:
120
165
  - - "="
121
166
  - !ruby/object:Gem::Version
167
+ hash: 15
168
+ segments:
169
+ - 1
170
+ - 0
122
171
  version: "1.0"
123
- type: :development
124
- prerelease: false
125
172
  version_requirements: *id010
173
+ name: rspec_hpricot_matchers
174
+ prerelease: false
175
+ type: :development
126
176
  - !ruby/object:Gem::Dependency
127
- name: test-unit
128
177
  requirement: &id011 !ruby/object:Gem::Requirement
129
178
  none: false
130
179
  requirements:
131
180
  - - "="
132
181
  - !ruby/object:Gem::Version
182
+ hash: 25
183
+ segments:
184
+ - 1
185
+ - 2
186
+ - 3
133
187
  version: 1.2.3
134
- type: :development
135
- prerelease: false
136
188
  version_requirements: *id011
189
+ name: test-unit
190
+ prerelease: false
191
+ type: :development
137
192
  description: |
138
193
  Nesta is a lightweight Content Management System, written in Ruby using
139
194
  the Sinatra web framework. Nesta has the simplicity of a static site
@@ -231,7 +286,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
231
286
  requirements:
232
287
  - - ">="
233
288
  - !ruby/object:Gem::Version
234
- hash: -3003652627560154656
289
+ hash: 3
235
290
  segments:
236
291
  - 0
237
292
  version: "0"
@@ -240,14 +295,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
295
  requirements:
241
296
  - - ">="
242
297
  - !ruby/object:Gem::Version
243
- hash: -3003652627560154656
298
+ hash: 3
244
299
  segments:
245
300
  - 0
246
301
  version: "0"
247
302
  requirements: []
248
303
 
249
304
  rubyforge_project: nesta
250
- rubygems_version: 1.5.0
305
+ rubygems_version: 1.6.2
251
306
  signing_key:
252
307
  specification_version: 3
253
308
  summary: Ruby CMS, written in Sinatra