panoramic 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.
- data/Gemfile +2 -2
- data/Gemfile.lock +101 -90
- data/README.md +5 -4
- data/panoramic.gemspec +2 -2
- data/spec/controllers/rendering_spec.rb +1 -1
- metadata +28 -39
- data/spec/dummy/public/favicon.ico +0 -0
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
source "http://rubygems.org"
|
|
2
2
|
|
|
3
|
-
gem "rails", "3.0
|
|
3
|
+
gem "rails", "3.2.0"
|
|
4
4
|
|
|
5
5
|
group :test do
|
|
6
6
|
gem "capybara", ">= 0.4.0"
|
|
@@ -10,5 +10,5 @@ end
|
|
|
10
10
|
|
|
11
11
|
group :development, :test do
|
|
12
12
|
gem "sqlite3"
|
|
13
|
-
gem 'rspec-rails', '~> 2.
|
|
13
|
+
gem 'rspec-rails', '~> 2.8.0'
|
|
14
14
|
end
|
data/Gemfile.lock
CHANGED
|
@@ -1,109 +1,120 @@
|
|
|
1
1
|
GEM
|
|
2
2
|
remote: http://rubygems.org/
|
|
3
3
|
specs:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
rack (~> 1.
|
|
15
|
-
rack-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
arel (
|
|
32
|
-
builder (
|
|
33
|
-
capybara (
|
|
34
|
-
celerity (>= 0.7.9)
|
|
35
|
-
culerity (>= 0.2.4)
|
|
4
|
+
actionmailer (3.2.0)
|
|
5
|
+
actionpack (= 3.2.0)
|
|
6
|
+
mail (~> 2.4.0)
|
|
7
|
+
actionpack (3.2.0)
|
|
8
|
+
activemodel (= 3.2.0)
|
|
9
|
+
activesupport (= 3.2.0)
|
|
10
|
+
builder (~> 3.0.0)
|
|
11
|
+
erubis (~> 2.7.0)
|
|
12
|
+
journey (~> 1.0.0)
|
|
13
|
+
rack (~> 1.4.0)
|
|
14
|
+
rack-cache (~> 1.1)
|
|
15
|
+
rack-test (~> 0.6.1)
|
|
16
|
+
sprockets (~> 2.1.2)
|
|
17
|
+
activemodel (3.2.0)
|
|
18
|
+
activesupport (= 3.2.0)
|
|
19
|
+
builder (~> 3.0.0)
|
|
20
|
+
activerecord (3.2.0)
|
|
21
|
+
activemodel (= 3.2.0)
|
|
22
|
+
activesupport (= 3.2.0)
|
|
23
|
+
arel (~> 3.0.0)
|
|
24
|
+
tzinfo (~> 0.3.29)
|
|
25
|
+
activeresource (3.2.0)
|
|
26
|
+
activemodel (= 3.2.0)
|
|
27
|
+
activesupport (= 3.2.0)
|
|
28
|
+
activesupport (3.2.0)
|
|
29
|
+
i18n (~> 0.6)
|
|
30
|
+
multi_json (~> 1.0)
|
|
31
|
+
arel (3.0.0)
|
|
32
|
+
builder (3.0.0)
|
|
33
|
+
capybara (1.1.2)
|
|
36
34
|
mime-types (>= 1.16)
|
|
37
35
|
nokogiri (>= 1.3.3)
|
|
38
36
|
rack (>= 1.0.0)
|
|
39
37
|
rack-test (>= 0.5.4)
|
|
40
|
-
selenium-webdriver (
|
|
41
|
-
xpath (~> 0.1.
|
|
42
|
-
|
|
43
|
-
childprocess (0.1.9)
|
|
38
|
+
selenium-webdriver (~> 2.0)
|
|
39
|
+
xpath (~> 0.1.4)
|
|
40
|
+
childprocess (0.3.0)
|
|
44
41
|
ffi (~> 1.0.6)
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
i18n (0.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
diff-lcs (1.1.3)
|
|
43
|
+
erubis (2.7.0)
|
|
44
|
+
factory_girl (2.5.0)
|
|
45
|
+
activesupport
|
|
46
|
+
ffi (1.0.11)
|
|
47
|
+
hike (1.2.1)
|
|
48
|
+
i18n (0.6.0)
|
|
49
|
+
journey (1.0.1)
|
|
50
|
+
json (1.6.5)
|
|
51
|
+
mail (2.4.1)
|
|
55
52
|
i18n (>= 0.4.0)
|
|
56
53
|
mime-types (~> 1.16)
|
|
57
54
|
treetop (~> 1.4.8)
|
|
58
|
-
mime-types (1.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
rack
|
|
63
|
-
|
|
64
|
-
|
|
55
|
+
mime-types (1.17.2)
|
|
56
|
+
multi_json (1.0.4)
|
|
57
|
+
nokogiri (1.5.0)
|
|
58
|
+
polyglot (0.3.3)
|
|
59
|
+
rack (1.4.1)
|
|
60
|
+
rack-cache (1.1)
|
|
61
|
+
rack (>= 0.4)
|
|
62
|
+
rack-ssl (1.3.2)
|
|
63
|
+
rack
|
|
64
|
+
rack-test (0.6.1)
|
|
65
65
|
rack (>= 1.0)
|
|
66
|
-
rails (3.0
|
|
67
|
-
actionmailer (= 3.0
|
|
68
|
-
actionpack (= 3.0
|
|
69
|
-
activerecord (= 3.0
|
|
70
|
-
activeresource (= 3.0
|
|
71
|
-
activesupport (= 3.0
|
|
66
|
+
rails (3.2.0)
|
|
67
|
+
actionmailer (= 3.2.0)
|
|
68
|
+
actionpack (= 3.2.0)
|
|
69
|
+
activerecord (= 3.2.0)
|
|
70
|
+
activeresource (= 3.2.0)
|
|
71
|
+
activesupport (= 3.2.0)
|
|
72
72
|
bundler (~> 1.0)
|
|
73
|
-
railties (= 3.0
|
|
74
|
-
railties (3.0
|
|
75
|
-
actionpack (= 3.0
|
|
76
|
-
activesupport (= 3.0
|
|
73
|
+
railties (= 3.2.0)
|
|
74
|
+
railties (3.2.0)
|
|
75
|
+
actionpack (= 3.2.0)
|
|
76
|
+
activesupport (= 3.2.0)
|
|
77
|
+
rack-ssl (~> 1.3.2)
|
|
77
78
|
rake (>= 0.8.7)
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
rdoc (~> 3.4)
|
|
80
|
+
thor (~> 0.14.6)
|
|
81
|
+
rake (0.9.2.2)
|
|
82
|
+
rdoc (3.12)
|
|
83
|
+
json (~> 1.4)
|
|
84
|
+
rspec (2.8.0)
|
|
85
|
+
rspec-core (~> 2.8.0)
|
|
86
|
+
rspec-expectations (~> 2.8.0)
|
|
87
|
+
rspec-mocks (~> 2.8.0)
|
|
88
|
+
rspec-core (2.8.0)
|
|
89
|
+
rspec-expectations (2.8.0)
|
|
86
90
|
diff-lcs (~> 1.1.2)
|
|
87
|
-
rspec-mocks (2.
|
|
88
|
-
rspec-rails (2.
|
|
89
|
-
actionpack (
|
|
90
|
-
activesupport (
|
|
91
|
-
railties (
|
|
92
|
-
rspec (~> 2.
|
|
93
|
-
rubyzip (0.9.
|
|
94
|
-
selenium-webdriver (
|
|
95
|
-
childprocess (>= 0.
|
|
96
|
-
ffi (
|
|
97
|
-
|
|
91
|
+
rspec-mocks (2.8.0)
|
|
92
|
+
rspec-rails (2.8.1)
|
|
93
|
+
actionpack (>= 3.0)
|
|
94
|
+
activesupport (>= 3.0)
|
|
95
|
+
railties (>= 3.0)
|
|
96
|
+
rspec (~> 2.8.0)
|
|
97
|
+
rubyzip (0.9.5)
|
|
98
|
+
selenium-webdriver (2.18.0)
|
|
99
|
+
childprocess (>= 0.2.5)
|
|
100
|
+
ffi (~> 1.0.9)
|
|
101
|
+
multi_json (~> 1.0.4)
|
|
98
102
|
rubyzip
|
|
99
|
-
simplecov (0.4
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
simplecov (0.5.4)
|
|
104
|
+
multi_json (~> 1.0.3)
|
|
105
|
+
simplecov-html (~> 0.5.3)
|
|
106
|
+
simplecov-html (0.5.3)
|
|
107
|
+
sprockets (2.1.2)
|
|
108
|
+
hike (~> 1.2)
|
|
109
|
+
rack (~> 1.0)
|
|
110
|
+
tilt (~> 1.1, != 1.3.0)
|
|
111
|
+
sqlite3 (1.3.5)
|
|
103
112
|
thor (0.14.6)
|
|
104
|
-
|
|
113
|
+
tilt (1.3.3)
|
|
114
|
+
treetop (1.4.10)
|
|
115
|
+
polyglot
|
|
105
116
|
polyglot (>= 0.3.1)
|
|
106
|
-
tzinfo (0.3.
|
|
117
|
+
tzinfo (0.3.31)
|
|
107
118
|
xpath (0.1.4)
|
|
108
119
|
nokogiri (~> 1.3)
|
|
109
120
|
|
|
@@ -113,7 +124,7 @@ PLATFORMS
|
|
|
113
124
|
DEPENDENCIES
|
|
114
125
|
capybara (>= 0.4.0)
|
|
115
126
|
factory_girl
|
|
116
|
-
rails (= 3.0
|
|
117
|
-
rspec-rails (~> 2.
|
|
127
|
+
rails (= 3.2.0)
|
|
128
|
+
rspec-rails (~> 2.8.0)
|
|
118
129
|
simplecov
|
|
119
130
|
sqlite3
|
data/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Panoramic
|
|
2
2
|
An [ActionView::Resolver] implementation to store rails views (layouts, templates and partials) on database. Simply put: what you can do with views on filesystem, can be done on database.
|
|
3
3
|
|
|
4
|
-
**NOTE:** at the moment, only ActiveRecord is supported, I've planned to add more ORMs (see Todo). If you can't wait, adding other ORMs should be very trivial.
|
|
4
|
+
**NOTE:** at the moment, only ActiveRecord is supported, I've planned to add more ORMs (see Todo). If you can't wait, adding other ORMs should be very trivial.
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
Add the following line to Gemfile:
|
|
8
8
|
|
|
9
9
|
```
|
|
10
|
-
gem
|
|
10
|
+
gem "panoramic", "~> 0.0.3"
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Usage
|
|
@@ -23,6 +23,7 @@ Your model should have the following fields:
|
|
|
23
23
|
(erb, haml, etc...)
|
|
24
24
|
* partial (boolean): determines if it's a partial or not (false by
|
|
25
25
|
default)
|
|
26
|
+
* format (string): A valid mimetype from Mime::SET.symbols
|
|
26
27
|
|
|
27
28
|
they're what the rails' Resolver API needs to lookup templates.
|
|
28
29
|
|
|
@@ -35,7 +36,7 @@ class TemplateStorage < ActiveRecord::Base
|
|
|
35
36
|
end
|
|
36
37
|
```
|
|
37
38
|
|
|
38
|
-
### Controller
|
|
39
|
+
### Controller
|
|
39
40
|
To add Panoramic::Resolver in controller, depending on your needs, you may choose:
|
|
40
41
|
|
|
41
42
|
* [prepend_view_path]: search for templates *first* in your resolver, *then* on filesystem
|
|
@@ -56,7 +57,7 @@ class SomeController < ApplicationController
|
|
|
56
57
|
# explicit render
|
|
57
58
|
render :template => 'custom_template'
|
|
58
59
|
end
|
|
59
|
-
|
|
60
|
+
|
|
60
61
|
def custom_template
|
|
61
62
|
# use another model to fetch templates
|
|
62
63
|
prepend_view_path AnotherModel.resolver
|
data/panoramic.gemspec
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |s|
|
|
4
4
|
s.name = "panoramic"
|
|
5
|
-
s.version ='0.0.
|
|
5
|
+
s.version ='0.0.3'
|
|
6
6
|
s.platform = Gem::Platform::RUBY
|
|
7
7
|
s.authors = ["Andrea Pavoni"]
|
|
8
8
|
s.email = ["andrea.pavoni@gmail.com"]
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
|
10
10
|
s.summary = %q{Stores rails views on database}
|
|
11
11
|
s.description = %q{Stores rails views on database}
|
|
12
12
|
|
|
13
|
-
s.add_dependency 'rails', "~> 3.0
|
|
13
|
+
s.add_dependency 'rails', "~> 3.2.0"
|
|
14
14
|
|
|
15
15
|
s.files = `git ls-files`.split("\n")
|
|
16
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
metadata
CHANGED
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: panoramic
|
|
3
|
-
version: !ruby/object:Gem::Version
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.3
|
|
4
5
|
prerelease:
|
|
5
|
-
version: 0.0.2
|
|
6
6
|
platform: ruby
|
|
7
|
-
authors:
|
|
7
|
+
authors:
|
|
8
8
|
- Andrea Pavoni
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
dependencies:
|
|
16
|
-
- !ruby/object:Gem::Dependency
|
|
12
|
+
date: 2012-01-30 00:00:00.000000000 Z
|
|
13
|
+
dependencies:
|
|
14
|
+
- !ruby/object:Gem::Dependency
|
|
17
15
|
name: rails
|
|
18
|
-
requirement: &
|
|
16
|
+
requirement: &13747920 !ruby/object:Gem::Requirement
|
|
19
17
|
none: false
|
|
20
|
-
requirements:
|
|
18
|
+
requirements:
|
|
21
19
|
- - ~>
|
|
22
|
-
- !ruby/object:Gem::Version
|
|
23
|
-
version: 3.0
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: 3.2.0
|
|
24
22
|
type: :runtime
|
|
25
23
|
prerelease: false
|
|
26
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *13747920
|
|
27
25
|
description: Stores rails views on database
|
|
28
|
-
email:
|
|
26
|
+
email:
|
|
29
27
|
- andrea.pavoni@gmail.com
|
|
30
28
|
executables: []
|
|
31
|
-
|
|
32
29
|
extensions: []
|
|
33
|
-
|
|
34
30
|
extra_rdoc_files: []
|
|
35
|
-
|
|
36
|
-
files:
|
|
31
|
+
files:
|
|
37
32
|
- .gitignore
|
|
38
33
|
- Gemfile
|
|
39
34
|
- Gemfile.lock
|
|
@@ -68,43 +63,37 @@ files:
|
|
|
68
63
|
- spec/dummy/config/routes.rb
|
|
69
64
|
- spec/dummy/db/migrate/20110526132353_create_database_templates.rb
|
|
70
65
|
- spec/dummy/db/schema.rb
|
|
71
|
-
- spec/dummy/public/favicon.ico
|
|
72
66
|
- spec/dummy/script/rails
|
|
73
67
|
- spec/orm/active_record_spec.rb
|
|
74
68
|
- spec/resolver_spec.rb
|
|
75
69
|
- spec/spec_helper.rb
|
|
76
70
|
- spec/support/describe_private.rb
|
|
77
71
|
- spec/support/factories.rb
|
|
78
|
-
has_rdoc: true
|
|
79
72
|
homepage: http://github.com/apeacox/panoramic
|
|
80
73
|
licenses: []
|
|
81
|
-
|
|
82
74
|
post_install_message:
|
|
83
75
|
rdoc_options: []
|
|
84
|
-
|
|
85
|
-
require_paths:
|
|
76
|
+
require_paths:
|
|
86
77
|
- lib
|
|
87
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
79
|
none: false
|
|
89
|
-
requirements:
|
|
90
|
-
- -
|
|
91
|
-
- !ruby/object:Gem::Version
|
|
92
|
-
|
|
93
|
-
segments:
|
|
80
|
+
requirements:
|
|
81
|
+
- - ! '>='
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: '0'
|
|
84
|
+
segments:
|
|
94
85
|
- 0
|
|
95
|
-
|
|
96
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
|
+
hash: 2874889868222870232
|
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
88
|
none: false
|
|
98
|
-
requirements:
|
|
99
|
-
- -
|
|
100
|
-
- !ruby/object:Gem::Version
|
|
101
|
-
version:
|
|
89
|
+
requirements:
|
|
90
|
+
- - ! '>='
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: '0'
|
|
102
93
|
requirements: []
|
|
103
|
-
|
|
104
94
|
rubyforge_project:
|
|
105
|
-
rubygems_version: 1.
|
|
95
|
+
rubygems_version: 1.8.10
|
|
106
96
|
signing_key:
|
|
107
97
|
specification_version: 3
|
|
108
98
|
summary: Stores rails views on database
|
|
109
99
|
test_files: []
|
|
110
|
-
|
|
File without changes
|