radiant-templates-extension 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -9,6 +9,7 @@ The current version of the Templates extension is intended for use with Radiant
9
9
 
10
10
  h2. Version History
11
11
 
12
+ * 1.0.7 - fixed spec deprecations, confirmed compatible with Radiant 1.1.3
12
13
  * 1.0.0 - gemified by Andrew vonderLuft, March 2011
13
14
  * 0.9 - Radiant 0.9 Blade UI, i18n additions Andrew vonderLuft, January 2011 -
14
15
  * -- Radiant 0.8 compatible, Andrew vonderLuft, May 2010
@@ -17,28 +18,31 @@ h2. Version History
17
18
  * -- Radiant 0.7 Compatible, March 2009 ("radiant-0.7.1 branch":https://github.com/avonderluft/radiant-templates-extension/tree/radiant-0.7.1)
18
19
  * -- Created by Sean Cribbs, September 2007
19
20
 
21
+ h3. To do
22
+
23
+ * add template selectors to Add Child dropdown in Admin Page index
24
+
20
25
  h3. Installation
21
26
 
22
- h4. From github:
27
+ h4. Using bundler
23
28
 
24
- * From your Radiant root run:
29
+ * add radiant-templates-extension to your Gemfile and run `bundle`
25
30
 
26
- <pre>git clone git://github.com/avonderluft/radiant-templates-extension.git ./vendor/extensions/templates
31
+ <pre>
27
32
  rake radiant:extensions:templates:migrate
28
33
  rake radiant:extensions:templates:update
29
34
  </pre>
30
35
 
31
- * Restart your radiant app, and you should be good to go.
32
-
33
- h4. Using the gem
34
-
35
- * Install the gem
36
+ h4. From github
36
37
 
37
- <pre>gem install radiant-concurrent_draft-extension</pre>
38
+ * From your Radiant root run:
38
39
 
39
- * Update your Radiant config: add to environment.rb with other gem.configs
40
+ <pre>git clone git://github.com/avonderluft/radiant-templates-extension.git ./vendor/extensions/templates
41
+ rake radiant:extensions:templates:migrate
42
+ rake radiant:extensions:templates:update
43
+ </pre>
40
44
 
41
- <pre>config.gem 'radiant-concurrent_draft-extension', :lib => false</pre>
45
+ * Restart your radiant app, and you should be good to go.
42
46
 
43
47
  h2. Usage
44
48
 
data/Rakefile CHANGED
@@ -34,7 +34,7 @@ unless defined? RADIANT_ROOT
34
34
  end
35
35
 
36
36
  require 'rake'
37
- require 'rake/rdoctask'
37
+ require 'rdoc/task'
38
38
  require 'rake/testtask'
39
39
 
40
40
  rspec_base = File.expand_path(RADIANT_ROOT + '/vendor/plugins/rspec/lib')
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.7
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{radiant-templates-extension}
8
- s.version = "1.0.6"
7
+ s.name = "radiant-templates-extension"
8
+ s.version = "1.0.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Andrew vonderLuft", "Sean Cribbs"]
12
- s.date = %q{2011-07-19}
13
- s.description = %q{Imposes structure on pages via content templates.}
14
- s.email = %q{avonderluft@avlux.net}
12
+ s.date = "2013-02-20"
13
+ s.description = "Imposes structure on pages via content templates."
14
+ s.email = "avonderluft@avlux.net"
15
15
  s.extra_rdoc_files = [
16
16
  "README.textile"
17
17
  ]
@@ -142,24 +142,10 @@ Gem::Specification.new do |s|
142
142
  "vendor/plugins/make_resourceful/spec/spec_helper.rb",
143
143
  "vendor/plugins/make_resourceful/spec/urls_spec.rb"
144
144
  ]
145
- s.homepage = %q{https://github.com/avonderluft/radiant-templates-extension}
145
+ s.homepage = "https://github.com/avonderluft/radiant-templates-extension"
146
146
  s.require_paths = ["lib"]
147
- s.rubygems_version = %q{1.5.2}
148
- s.summary = %q{Templates Extension for Radiant CMS}
149
- s.test_files = [
150
- "spec/controllers/admin_page_controller_extensions_spec.rb",
151
- "spec/controllers/part_types_controller_spec.rb",
152
- "spec/controllers/templates_controller_spec.rb",
153
- "spec/datasets/part_types_dataset.rb",
154
- "spec/datasets/templates_dataset.rb",
155
- "spec/helpers/templates_helper_spec.rb",
156
- "spec/models/page_extensions_spec.rb",
157
- "spec/models/part_type_spec.rb",
158
- "spec/models/tags_spec.rb",
159
- "spec/models/template_part_spec.rb",
160
- "spec/models/template_spec.rb",
161
- "spec/spec_helper.rb"
162
- ]
147
+ s.rubygems_version = "1.8.24"
148
+ s.summary = "Templates Extension for Radiant CMS"
163
149
 
164
150
  if s.respond_to? :specification_version then
165
151
  s.specification_version = 3
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  # We only have this spec because setting up an isolated view spec would be too
4
4
  # complicated. Instead we have a quasi-integration test.
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe Admin::PartTypesController do
4
4
  dataset :users, :part_types
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  # Re-raise errors caught by the controller.
4
4
  Admin::TemplatesController.class_eval { def rescue_action(e) raise e end }
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe Templates::Helper do
4
4
  dataset :pages, :templates
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe Page, "extended with templates" do
4
4
  it "should be associated to its template" do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe PartType do
4
4
  before :each do
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe "Templates::Tags" do
4
4
  dataset :pages
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe TemplatePart do
4
4
  dataset :part_types
@@ -1,4 +1,4 @@
1
- require File.dirname(__FILE__) + '/../spec_helper'
1
+ require 'spec_helper'
2
2
 
3
3
  describe ::Template do
4
4
  dataset :templates, :pages
data/spec/spec_helper.rb CHANGED
@@ -11,10 +11,13 @@ unless defined? RADIANT_ROOT
11
11
  end
12
12
  require "#{RADIANT_ROOT}/spec/spec_helper"
13
13
 
14
- # if File.directory?(File.dirname(__FILE__) + "/scenarios")
15
- # Scenario.load_paths.unshift File.dirname(__FILE__) + "/scenarios"
16
- # end
17
14
  Dataset::Resolver.default << (File.dirname(__FILE__) + "/datasets")
15
+ # Include any datasets from loaded extensions
16
+ Radiant::Extension.descendants.each do |extension|
17
+ if File.directory?(extension.root + "/spec/datasets")
18
+ Dataset::Resolver.default << (extension.root + "/spec/datasets")
19
+ end
20
+ end
18
21
 
19
22
  if File.directory?(File.dirname(__FILE__) + "/matchers")
20
23
  Dir[File.dirname(__FILE__) + "/matchers/*.rb"].each {|file| require file }
@@ -125,7 +125,7 @@ module Resourceful
125
125
  @current_object = if current_model.respond_to? :build
126
126
  current_model.build(object_parameters)
127
127
  else
128
- returning(current_model.new(object_parameters)) do |obj|
128
+ current_model.new(object_parameters).tap do |obj|
129
129
  if singular? && parent?
130
130
  obj.send("#{parent_name}_id=", parent_object.id)
131
131
  obj.send("#{parent_name}_type=", parent_object.class.to_s) if polymorphic_parent?
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: radiant-templates-extension
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 6
10
- version: 1.0.6
9
+ - 7
10
+ version: 1.0.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew vonderLuft
@@ -16,17 +16,16 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-07-19 00:00:00 -07:00
20
- default_executable:
19
+ date: 2013-02-20 00:00:00 Z
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
23
- type: :runtime
22
+ prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
27
26
  - - ">="
28
27
  - !ruby/object:Gem::Version
29
- hash: 15424049
28
+ hash: 2988022751
30
29
  segments:
31
30
  - 1
32
31
  - 0
@@ -34,9 +33,9 @@ dependencies:
34
33
  - rc
35
34
  - 2
36
35
  version: 1.0.0.rc2
36
+ type: :runtime
37
37
  name: radiant
38
38
  version_requirements: *id001
39
- prerelease: false
40
39
  description: Imposes structure on pages via content templates.
41
40
  email: avonderluft@avlux.net
42
41
  executables: []
@@ -171,7 +170,6 @@ files:
171
170
  - vendor/plugins/make_resourceful/spec/serialize_spec.rb
172
171
  - vendor/plugins/make_resourceful/spec/spec_helper.rb
173
172
  - vendor/plugins/make_resourceful/spec/urls_spec.rb
174
- has_rdoc: true
175
173
  homepage: https://github.com/avonderluft/radiant-templates-extension
176
174
  licenses: []
177
175
 
@@ -201,20 +199,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
201
199
  requirements: []
202
200
 
203
201
  rubyforge_project:
204
- rubygems_version: 1.5.2
202
+ rubygems_version: 1.8.24
205
203
  signing_key:
206
204
  specification_version: 3
207
205
  summary: Templates Extension for Radiant CMS
208
- test_files:
209
- - spec/controllers/admin_page_controller_extensions_spec.rb
210
- - spec/controllers/part_types_controller_spec.rb
211
- - spec/controllers/templates_controller_spec.rb
212
- - spec/datasets/part_types_dataset.rb
213
- - spec/datasets/templates_dataset.rb
214
- - spec/helpers/templates_helper_spec.rb
215
- - spec/models/page_extensions_spec.rb
216
- - spec/models/part_type_spec.rb
217
- - spec/models/tags_spec.rb
218
- - spec/models/template_part_spec.rb
219
- - spec/models/template_spec.rb
220
- - spec/spec_helper.rb
206
+ test_files: []
207
+