panoramic 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -6,3 +6,4 @@ spec/dummy/log/*.log
6
6
  spec/dummy/tmp/
7
7
  .rspec
8
8
  coverage/*
9
+ .rvmrc
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.9.2
5
+ - 1.8.7
6
+ - ree
data/Gemfile CHANGED
@@ -1,14 +1,6 @@
1
- source "http://rubygems.org"
2
-
3
- gem "rails", "3.2.0"
1
+ source :rubygems
2
+ gemspec
4
3
 
5
4
  group :test do
6
- gem "capybara", ">= 0.4.0"
7
- gem 'factory_girl'
8
- gem 'simplecov'
9
- end
10
-
11
- group :development, :test do
12
- gem "sqlite3"
13
- gem 'rspec-rails', '~> 2.8.0'
5
+ gem 'rake'
14
6
  end
data/Gemfile.lock CHANGED
@@ -1,34 +1,40 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ panoramic (0.0.4)
5
+ rails (>= 3.0.7)
6
+
1
7
  GEM
2
8
  remote: http://rubygems.org/
3
9
  specs:
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
+ actionmailer (3.2.6)
11
+ actionpack (= 3.2.6)
12
+ mail (~> 2.4.4)
13
+ actionpack (3.2.6)
14
+ activemodel (= 3.2.6)
15
+ activesupport (= 3.2.6)
10
16
  builder (~> 3.0.0)
11
17
  erubis (~> 2.7.0)
12
- journey (~> 1.0.0)
18
+ journey (~> 1.0.1)
13
19
  rack (~> 1.4.0)
14
- rack-cache (~> 1.1)
20
+ rack-cache (~> 1.2)
15
21
  rack-test (~> 0.6.1)
16
- sprockets (~> 2.1.2)
17
- activemodel (3.2.0)
18
- activesupport (= 3.2.0)
22
+ sprockets (~> 2.1.3)
23
+ activemodel (3.2.6)
24
+ activesupport (= 3.2.6)
19
25
  builder (~> 3.0.0)
20
- activerecord (3.2.0)
21
- activemodel (= 3.2.0)
22
- activesupport (= 3.2.0)
23
- arel (~> 3.0.0)
26
+ activerecord (3.2.6)
27
+ activemodel (= 3.2.6)
28
+ activesupport (= 3.2.6)
29
+ arel (~> 3.0.2)
24
30
  tzinfo (~> 0.3.29)
25
- activeresource (3.2.0)
26
- activemodel (= 3.2.0)
27
- activesupport (= 3.2.0)
28
- activesupport (3.2.0)
31
+ activeresource (3.2.6)
32
+ activemodel (= 3.2.6)
33
+ activesupport (= 3.2.6)
34
+ activesupport (3.2.6)
29
35
  i18n (~> 0.6)
30
36
  multi_json (~> 1.0)
31
- arel (3.0.0)
37
+ arel (3.0.2)
32
38
  builder (3.0.0)
33
39
  capybara (1.1.2)
34
40
  mime-types (>= 1.16)
@@ -46,54 +52,54 @@ GEM
46
52
  ffi (1.0.11)
47
53
  hike (1.2.1)
48
54
  i18n (0.6.0)
49
- journey (1.0.1)
50
- json (1.6.5)
51
- mail (2.4.1)
55
+ journey (1.0.4)
56
+ json (1.7.3)
57
+ mail (2.4.4)
52
58
  i18n (>= 0.4.0)
53
59
  mime-types (~> 1.16)
54
60
  treetop (~> 1.4.8)
55
- mime-types (1.17.2)
61
+ mime-types (1.19)
56
62
  multi_json (1.0.4)
57
63
  nokogiri (1.5.0)
58
64
  polyglot (0.3.3)
59
65
  rack (1.4.1)
60
- rack-cache (1.1)
66
+ rack-cache (1.2)
61
67
  rack (>= 0.4)
62
68
  rack-ssl (1.3.2)
63
69
  rack
64
70
  rack-test (0.6.1)
65
71
  rack (>= 1.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
+ rails (3.2.6)
73
+ actionmailer (= 3.2.6)
74
+ actionpack (= 3.2.6)
75
+ activerecord (= 3.2.6)
76
+ activeresource (= 3.2.6)
77
+ activesupport (= 3.2.6)
72
78
  bundler (~> 1.0)
73
- railties (= 3.2.0)
74
- railties (3.2.0)
75
- actionpack (= 3.2.0)
76
- activesupport (= 3.2.0)
79
+ railties (= 3.2.6)
80
+ railties (3.2.6)
81
+ actionpack (= 3.2.6)
82
+ activesupport (= 3.2.6)
77
83
  rack-ssl (~> 1.3.2)
78
84
  rake (>= 0.8.7)
79
85
  rdoc (~> 3.4)
80
- thor (~> 0.14.6)
86
+ thor (>= 0.14.6, < 2.0)
81
87
  rake (0.9.2.2)
82
88
  rdoc (3.12)
83
89
  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)
90
- diff-lcs (~> 1.1.2)
91
- rspec-mocks (2.8.0)
92
- rspec-rails (2.8.1)
90
+ rspec (2.10.0)
91
+ rspec-core (~> 2.10.0)
92
+ rspec-expectations (~> 2.10.0)
93
+ rspec-mocks (~> 2.10.0)
94
+ rspec-core (2.10.1)
95
+ rspec-expectations (2.10.0)
96
+ diff-lcs (~> 1.1.3)
97
+ rspec-mocks (2.10.1)
98
+ rspec-rails (2.10.1)
93
99
  actionpack (>= 3.0)
94
100
  activesupport (>= 3.0)
95
101
  railties (>= 3.0)
96
- rspec (~> 2.8.0)
102
+ rspec (~> 2.10.0)
97
103
  rubyzip (0.9.5)
98
104
  selenium-webdriver (2.18.0)
99
105
  childprocess (>= 0.2.5)
@@ -104,17 +110,17 @@ GEM
104
110
  multi_json (~> 1.0.3)
105
111
  simplecov-html (~> 0.5.3)
106
112
  simplecov-html (0.5.3)
107
- sprockets (2.1.2)
113
+ sprockets (2.1.3)
108
114
  hike (~> 1.2)
109
115
  rack (~> 1.0)
110
116
  tilt (~> 1.1, != 1.3.0)
111
117
  sqlite3 (1.3.5)
112
- thor (0.14.6)
118
+ thor (0.15.4)
113
119
  tilt (1.3.3)
114
120
  treetop (1.4.10)
115
121
  polyglot
116
122
  polyglot (>= 0.3.1)
117
- tzinfo (0.3.31)
123
+ tzinfo (0.3.33)
118
124
  xpath (0.1.4)
119
125
  nokogiri (~> 1.3)
120
126
 
@@ -122,9 +128,10 @@ PLATFORMS
122
128
  ruby
123
129
 
124
130
  DEPENDENCIES
125
- capybara (>= 0.4.0)
131
+ capybara (~> 1.1.2)
126
132
  factory_girl
127
- rails (= 3.2.0)
128
- rspec-rails (~> 2.8.0)
133
+ panoramic!
134
+ rake
135
+ rspec-rails (~> 2.10.0)
129
136
  simplecov
130
137
  sqlite3
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.3'
5
+ s.version ='0.0.4'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ["Andrea Pavoni"]
8
8
  s.email = ["andrea.pavoni@gmail.com"]
@@ -10,7 +10,12 @@ 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.2.0"
13
+ s.add_dependency 'rails', ">= 3.0.7"
14
+ s.add_development_dependency "capybara", "~> 1.1.2"
15
+ s.add_development_dependency "factory_girl"
16
+ s.add_development_dependency "simplecov"
17
+ s.add_development_dependency "sqlite3"
18
+ s.add_development_dependency "rspec-rails", '~> 2.10.0'
14
19
 
15
20
  s.files = `git ls-files`.split("\n")
16
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -6,7 +6,7 @@ describe FooController do
6
6
 
7
7
  context "renders views fetched from database with" do
8
8
  it "a basic template" do
9
- Factory.create(:database_template, :path => 'foo/default_layout')
9
+ FactoryGirl.create(:database_template, :path => 'foo/default_layout')
10
10
 
11
11
  visit '/foo/default_layout'
12
12
 
@@ -15,8 +15,8 @@ describe FooController do
15
15
  end
16
16
 
17
17
  it "a custom layout" do
18
- Factory.create(:database_template, :path => 'foo/custom_layout')
19
- Factory.create(:database_template, :path => 'layouts/custom', :body => 'This is a layout with body: <%= yield %>')
18
+ FactoryGirl.create(:database_template, :path => 'foo/custom_layout')
19
+ FactoryGirl.create(:database_template, :path => 'layouts/custom', :body => 'This is a layout with body: <%= yield %>')
20
20
 
21
21
  visit '/foo/custom_layout'
22
22
 
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe Panoramic::Orm::ActiveRecord do
4
4
  context "validations" do
5
- let(:template) { Factory.build :database_template }
5
+ let(:template) { FactoryGirl.build :database_template }
6
6
 
7
7
  it "has body present" do
8
8
  template.body = nil
@@ -13,7 +13,7 @@ describe Panoramic::Orm::ActiveRecord do
13
13
  it "is valid" do
14
14
  template.format = 'notknown'
15
15
  template.should have(1).errors_on(:format)
16
- end
16
+ end
17
17
 
18
18
  it "is present" do
19
19
  template.format = nil
@@ -47,11 +47,15 @@ describe Panoramic::Orm::ActiveRecord do
47
47
  end
48
48
 
49
49
  context "cache" do
50
+ before do
51
+ DatabaseTemplate.delete_all
52
+ end
53
+
50
54
  it "is expired on update" do
51
55
  resolver = DatabaseTemplate.resolver
52
56
 
53
57
  cache_key = Object.new
54
- db_template = Factory.create(:database_template, :path => 'foo/some_list', :body => 'Listing something')
58
+ db_template = FactoryGirl.create(:database_template, :path => 'foo/some_list', :body => 'Listing something')
55
59
 
56
60
  details = { :formats => [:html], :locale => [:en], :handlers => [:erb] }
57
61
 
@@ -5,7 +5,7 @@ describe Panoramic::Resolver do
5
5
 
6
6
  context ".find_templates" do
7
7
  it "lookups templates for given params" do
8
- template = Factory.create(:database_template, :path => 'foo/example')
8
+ template = FactoryGirl.create(:database_template, :path => 'foo/example')
9
9
  details = { :formats => [:html], :locale => [:en], :handlers => [:erb] }
10
10
  resolver.find_templates('example', 'foo', false, details).first.should_not be_nil
11
11
  end
@@ -32,7 +32,7 @@ describe_private Panoramic::Resolver, '(private methods)' do
32
32
  end
33
33
 
34
34
  context "#initialize_template" do
35
- let(:template) { Factory :database_template }
35
+ let(:template) { FactoryGirl.create :database_template }
36
36
 
37
37
  it "initializes an ActionView::Template object" do
38
38
  resolver.initialize_template(template).should be_a(ActionView::Template)
@@ -1,8 +1,11 @@
1
- Factory.define :database_template do |t|
2
- t.path 'foo/index'
3
- t.format 'html'
4
- t.locale 'en'
5
- t.handler 'erb'
6
- t.partial 'false'
7
- t.body "something here in the body of the page: <%= 2 + 2 %>"
1
+ # FactoryGirl.define :database_template do |t|
2
+ FactoryGirl.define do
3
+ factory :database_template do
4
+ path 'foo/index'
5
+ format 'html'
6
+ locale 'en'
7
+ handler 'erb'
8
+ partial 'false'
9
+ body "something here in the body of the page: <%= 2 + 2 %>"
10
+ end
8
11
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panoramic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,19 +9,104 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-30 00:00:00.000000000 Z
12
+ date: 2012-07-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &13747920 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ~>
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 3.2.0
21
+ version: 3.0.7
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13747920
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 3.0.7
30
+ - !ruby/object:Gem::Dependency
31
+ name: capybara
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 1.1.2
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.1.2
46
+ - !ruby/object:Gem::Dependency
47
+ name: factory_girl
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: simplecov
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: sqlite3
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: rspec-rails
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ~>
100
+ - !ruby/object:Gem::Version
101
+ version: 2.10.0
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 2.10.0
25
110
  description: Stores rails views on database
26
111
  email:
27
112
  - andrea.pavoni@gmail.com
@@ -30,6 +115,7 @@ extensions: []
30
115
  extra_rdoc_files: []
31
116
  files:
32
117
  - .gitignore
118
+ - .travis.yml
33
119
  - Gemfile
34
120
  - Gemfile.lock
35
121
  - MIT-LICENSE
@@ -83,16 +169,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
83
169
  version: '0'
84
170
  segments:
85
171
  - 0
86
- hash: 2874889868222870232
172
+ hash: -106334275974701259
87
173
  required_rubygems_version: !ruby/object:Gem::Requirement
88
174
  none: false
89
175
  requirements:
90
176
  - - ! '>='
91
177
  - !ruby/object:Gem::Version
92
178
  version: '0'
179
+ segments:
180
+ - 0
181
+ hash: -106334275974701259
93
182
  requirements: []
94
183
  rubyforge_project:
95
- rubygems_version: 1.8.10
184
+ rubygems_version: 1.8.24
96
185
  signing_key:
97
186
  specification_version: 3
98
187
  summary: Stores rails views on database