noodall-ui 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ source 'http://gems.github.com'
4
4
  gemspec
5
5
 
6
6
  # Required for running as demo rails app
7
- gem 'rails', '3.0.1'
7
+ gem 'rails', '~> 3.0.1'
8
8
  gem 'rmagick', :require => 'RMagick'
9
9
  gem 'dragonfly', '~> 0.7.6'
10
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- noodall-ui (0.0.16)
4
+ noodall-ui (0.0.17)
5
5
  dynamic_form
6
6
  noodall-core
7
7
  thoughtbot-sortable_table (= 0.0.6)
@@ -12,35 +12,34 @@ GEM
12
12
  remote: http://gems.github.com/
13
13
  specs:
14
14
  abstract (1.0.0)
15
- actionmailer (3.0.1)
16
- actionpack (= 3.0.1)
17
- mail (~> 2.2.5)
18
- actionpack (3.0.1)
19
- activemodel (= 3.0.1)
20
- activesupport (= 3.0.1)
15
+ actionmailer (3.0.3)
16
+ actionpack (= 3.0.3)
17
+ mail (~> 2.2.9)
18
+ actionpack (3.0.3)
19
+ activemodel (= 3.0.3)
20
+ activesupport (= 3.0.3)
21
21
  builder (~> 2.1.2)
22
22
  erubis (~> 2.6.6)
23
- i18n (~> 0.4.1)
23
+ i18n (~> 0.4)
24
24
  rack (~> 1.2.1)
25
- rack-mount (~> 0.6.12)
26
- rack-test (~> 0.5.4)
25
+ rack-mount (~> 0.6.13)
26
+ rack-test (~> 0.5.6)
27
27
  tzinfo (~> 0.3.23)
28
- activemodel (3.0.1)
29
- activesupport (= 3.0.1)
28
+ activemodel (3.0.3)
29
+ activesupport (= 3.0.3)
30
30
  builder (~> 2.1.2)
31
- i18n (~> 0.4.1)
32
- activerecord (3.0.1)
33
- activemodel (= 3.0.1)
34
- activesupport (= 3.0.1)
35
- arel (~> 1.0.0)
31
+ i18n (~> 0.4)
32
+ activerecord (3.0.3)
33
+ activemodel (= 3.0.3)
34
+ activesupport (= 3.0.3)
35
+ arel (~> 2.0.2)
36
36
  tzinfo (~> 0.3.23)
37
- activeresource (3.0.1)
38
- activemodel (= 3.0.1)
39
- activesupport (= 3.0.1)
40
- activesupport (3.0.1)
41
- arel (1.0.1)
42
- activesupport (~> 3.0.0)
43
- bson (1.1.2)
37
+ activeresource (3.0.3)
38
+ activemodel (= 3.0.3)
39
+ activesupport (= 3.0.3)
40
+ activesupport (3.0.3)
41
+ arel (2.0.6)
42
+ bson (1.1.4)
44
43
  builder (2.1.2)
45
44
  canable (0.1.1)
46
45
  capybara (0.4.0)
@@ -52,14 +51,14 @@ GEM
52
51
  rack-test (>= 0.5.4)
53
52
  selenium-webdriver (>= 0.0.27)
54
53
  xpath (~> 0.1.2)
55
- celerity (0.8.4)
54
+ celerity (0.8.5)
56
55
  childprocess (0.1.4)
57
56
  ffi (~> 0.6.3)
58
57
  configuration (1.2.0)
59
- cucumber (0.9.4)
60
- builder (~> 2.1.2)
58
+ cucumber (0.10.0)
59
+ builder (>= 2.1.2)
61
60
  diff-lcs (~> 1.1.2)
62
- gherkin (~> 2.2.9)
61
+ gherkin (~> 2.3.2)
63
62
  json (~> 1.4.6)
64
63
  term-ansicolor (~> 1.0.5)
65
64
  cucumber-rails (0.3.2)
@@ -80,12 +79,12 @@ GEM
80
79
  ffi (0.6.3)
81
80
  rake (>= 0.8.7)
82
81
  gemcutter (0.6.1)
83
- gherkin (2.2.9)
82
+ gherkin (2.3.2)
84
83
  json (~> 1.4.6)
85
84
  term-ansicolor (~> 1.0.5)
86
85
  git (1.2.5)
87
86
  haml (3.0.24)
88
- i18n (0.4.2)
87
+ i18n (0.5.0)
89
88
  jeweler (1.4.0)
90
89
  gemcutter (>= 0.1.0)
91
90
  git (>= 1.2.5)
@@ -97,22 +96,22 @@ GEM
97
96
  launchy (0.3.7)
98
97
  configuration (>= 0.0.5)
99
98
  rake (>= 0.8.1)
100
- mail (2.2.10)
99
+ mail (2.2.12)
101
100
  activesupport (>= 2.3.6)
102
- i18n (~> 0.4.1)
101
+ i18n (>= 0.4.0)
103
102
  mime-types (~> 1.16)
104
103
  treetop (~> 1.4.8)
105
104
  mime-types (1.16)
106
105
  mm-multi-parameter-attributes (0.1.1)
107
106
  mongo_mapper
108
- mongo (1.1.2)
107
+ mongo (1.1.4)
109
108
  bson (>= 1.1.1)
110
109
  mongo_mapper (0.8.6)
111
110
  activesupport (>= 2.3.4)
112
111
  jnunemaker-validatable (~> 1.8.4)
113
112
  plucky (~> 0.3.6)
114
113
  nokogiri (1.4.4)
115
- noodall-core (0.3.2)
114
+ noodall-core (0.3.6)
116
115
  canable (= 0.1.1)
117
116
  mm-multi-parameter-attributes (~> 0.1.1)
118
117
  mongo_mapper (~> 0.8.6)
@@ -126,19 +125,19 @@ GEM
126
125
  rack (>= 1.0.0)
127
126
  rack-test (0.5.6)
128
127
  rack (>= 1.0)
129
- rails (3.0.1)
130
- actionmailer (= 3.0.1)
131
- actionpack (= 3.0.1)
132
- activerecord (= 3.0.1)
133
- activeresource (= 3.0.1)
134
- activesupport (= 3.0.1)
135
- bundler (~> 1.0.0)
136
- railties (= 3.0.1)
137
- railties (3.0.1)
138
- actionpack (= 3.0.1)
139
- activesupport (= 3.0.1)
140
- rake (>= 0.8.4)
141
- thor (~> 0.14.0)
128
+ rails (3.0.3)
129
+ actionmailer (= 3.0.3)
130
+ actionpack (= 3.0.3)
131
+ activerecord (= 3.0.3)
132
+ activeresource (= 3.0.3)
133
+ activesupport (= 3.0.3)
134
+ bundler (~> 1.0)
135
+ railties (= 3.0.3)
136
+ railties (3.0.3)
137
+ actionpack (= 3.0.3)
138
+ activesupport (= 3.0.3)
139
+ rake (>= 0.8.7)
140
+ thor (~> 0.14.4)
142
141
  rake (0.8.7)
143
142
  ramdiv-mongo_mapper_acts_as_tree (0.1.2)
144
143
  mongo_mapper (>= 0.6.8)
@@ -159,14 +158,14 @@ GEM
159
158
  rubyforge (2.0.4)
160
159
  json_pure (>= 1.1.7)
161
160
  rubyzip (0.9.4)
162
- selenium-webdriver (0.1.0)
161
+ selenium-webdriver (0.1.1)
163
162
  childprocess (= 0.1.4)
164
163
  ffi (~> 0.6.3)
165
164
  json_pure
166
165
  rubyzip
167
166
  spork (0.8.4)
168
167
  term-ansicolor (1.0.5)
169
- thor (0.14.4)
168
+ thor (0.14.6)
170
169
  thoughtbot-sortable_table (0.0.6)
171
170
  treetop (1.4.9)
172
171
  polyglot (>= 0.3.1)
@@ -193,7 +192,7 @@ DEPENDENCIES
193
192
  launchy
194
193
  noodall-core
195
194
  noodall-ui!
196
- rails (= 3.0.1)
195
+ rails (~> 3.0.1)
197
196
  rmagick
198
197
  rspec-rails (~> 2.0.0.beta.22)
199
198
  spork
@@ -1,6 +1,6 @@
1
1
  module Noodall
2
2
  class NodesController < ApplicationController
3
- rescue_from MongoMapper::DocumentNotFound, :with => :render_404
3
+ rescue_from MongoMapper::DocumentNotFound, ActionView::MissingTemplate, :with => :render_404
4
4
 
5
5
  def show
6
6
  if flash.any? or published_states_changed_since_global_update? or stale?(:last_modified => GlobalUpdateTime::Stamp.read, :public => true)
@@ -12,8 +12,8 @@ module Noodall
12
12
  @page_keywords = @node.keywords
13
13
 
14
14
  respond_to do |format|
15
- format.html { render "nodes/#{@node.class.name.underscore}" }
16
- format.rss { render "nodes/#{@node.class.name.underscore}" }
15
+ format.json { render :json => @node }
16
+ format.any { render "nodes/#{@node.class.name.underscore}" }
17
17
  end
18
18
  end
19
19
 
@@ -48,7 +48,7 @@ module Noodall
48
48
  logger.info "Rendering 404: #{exception.message}"
49
49
  end
50
50
 
51
- render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
51
+ render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false, :content_type => "text/html"
52
52
  end
53
53
 
54
54
  end
@@ -0,0 +1,8 @@
1
+ xml.instruct! :xml, :version=>"1.0"
2
+ xml.rss(:version=>"2.0") do
3
+ xml.channel do
4
+ xml.title(@node.title)
5
+ xml.link(node_url(@node))
6
+ xml.language('en-gb')
7
+ end
8
+ end
@@ -16,6 +16,7 @@ Feature: Groups access control
16
16
  | Update | Update, create children of |
17
17
  | Destroy | Delete |
18
18
  | Publish | Publish |
19
+ | View | View |
19
20
 
20
21
  Scenario: Inherited Permissions
21
22
  Given content exists with permissions set
@@ -0,0 +1,12 @@
1
+ Feature: Respond with the correct format
2
+ In order that the developers can add node views in different formats viewing a node should render a registered format if a template for it exists
3
+
4
+ Scenario: Render correct format
5
+ Given a page a exists with a title of "My Formatted Page"
6
+ When I view the page "My Formatted Page" as "html"
7
+ Then I should see "My Formatted Page"
8
+ When I view the page "My Formatted Page" as "rss"
9
+ Then I should see "My Formatted Page"
10
+ When I view the page "My Formatted Page" as "xml"
11
+ Then I should see "The page you were looking for doesn't exist"
12
+
@@ -28,3 +28,8 @@ end
28
28
  Then /^I should see a page of xml$/ do
29
29
  page.should have_xpath("//urlset")
30
30
  end
31
+
32
+ When /^I view the page "([^"]*)" as "([^"]*)"$/ do |title, format|
33
+ visit node_path(Noodall::Node.find_by_title(title), format)
34
+ end
35
+
@@ -0,0 +1,14 @@
1
+ Factory.factories.values.each do |factory|
2
+ if factory.build_class.respond_to?(:keys)
3
+ factory.build_class.keys.each_key do |key|
4
+ human_column_name = key.downcase.gsub('_', ' ')
5
+ Given /^an? #{factory.human_name} exists with an? #{human_column_name} of "([^"]*)"$/i do |value|
6
+ Factory(factory.factory_name, key => value)
7
+ end
8
+
9
+ Given /^(\d+) #{factory.human_name.pluralize} exist with an? #{human_column_name} of "([^"]*)"$/i do |count, value|
10
+ count.to_i.times { Factory(factory.factory_name, key => value) }
11
+ end
12
+ end
13
+ end
14
+ end
@@ -7,7 +7,7 @@ module Noodall
7
7
  namespace 'noodall/admin', :as => 'noodall_admin', :path => 'admin' do
8
8
  resources :nodes do
9
9
  resources :nodes
10
- member do
10
+ member do
11
11
  get :change_template
12
12
  get :move_up
13
13
  get :move_down
@@ -17,7 +17,7 @@ module Noodall
17
17
  get :tree
18
18
  end
19
19
  end
20
-
20
+
21
21
  resources :assets do
22
22
  collection do
23
23
  get :images
@@ -34,13 +34,14 @@ module Noodall
34
34
  match 'assets/:asset_type/tags' => 'assets#tags', :as => :asset_tags
35
35
 
36
36
  match 'components/form/:type' => 'components#form'
37
-
37
+
38
38
  resources :groups
39
39
  end
40
-
40
+
41
41
  get "search" => "noodall/nodes#search", :as => :noodall_search
42
42
  get "sitemap" => "noodall/nodes#sitemap", :as => :noodall_sitemap
43
- get "*permalink(.:format)" => 'noodall/nodes#show', :as => :node_permalink
43
+ get "*permalink.:format" => 'noodall/nodes#show'
44
+ get "*permalink" => 'noodall/nodes#show', :as => :node_permalink
44
45
  end
45
46
  end
46
47
  end
@@ -1,5 +1,5 @@
1
1
  module Noodall
2
2
  module UI
3
- VERSION = "0.0.16"
3
+ VERSION = "0.0.17"
4
4
  end
5
5
  end
@@ -232,6 +232,7 @@ p.remove span{
232
232
  left:20px;
233
233
  border:none;
234
234
  position:absolute;
235
+ cursor:pointer;
235
236
  }
236
237
 
237
238
  #content form .fixed-form input.update {
@@ -403,6 +404,10 @@ div#flash a {
403
404
  padding:9px;
404
405
  }
405
406
 
407
+ a, button, input[type="select"] {
408
+ cursor:pointer;
409
+ }
410
+
406
411
  /* -------------- JQUERY TRANSFROM -------------- */
407
412
 
408
413
  p.template span.input-wrap {
@@ -1,4 +1,4 @@
1
- Factory.define :node do |node|
1
+ Factory.define :node, :class => Noodall::Node do |node|
2
2
  node.title { Faker::Lorem.words(3).join(' ') }
3
3
  node.body { Faker::Lorem.paragraphs(6) }
4
4
  node.published_at { Time.now }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: noodall-ui
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 16
10
- version: 0.0.16
9
+ - 17
10
+ version: 0.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Steve England
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-13 00:00:00 +00:00
18
+ date: 2010-12-14 00:00:00 +00:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -190,6 +190,7 @@ files:
190
190
  - demo/views/components/_promo.html.erb
191
191
  - demo/views/layouts/application.html.erb
192
192
  - demo/views/nodes/page_a.html.erb
193
+ - demo/views/nodes/page_a.rss.builder
193
194
  - demo/views/nodes/page_b.html.erb
194
195
  - demo/views/nodes/page_c.html.erb
195
196
  - features/change_templates.feature
@@ -200,6 +201,7 @@ files:
200
201
  - features/preview.feature
201
202
  - features/promo_component.feature
202
203
  - features/publish_content.feature
204
+ - features/respond_with_correct_format.feature
203
205
  - features/search.feature
204
206
  - features/sitemap.feature
205
207
  - features/step_definitions/asset_steps.rb
@@ -217,6 +219,7 @@ files:
217
219
  - features/support/cucumber.css
218
220
  - features/support/env.rb
219
221
  - features/support/logo.png
222
+ - features/support/mm_factory_steps.rb
220
223
  - features/support/paths.rb
221
224
  - features/support/sevenfeatures.rb
222
225
  - lib/generators/noodall/component/USAGE
@@ -633,7 +636,6 @@ files:
633
636
  - script/cucumber
634
637
  - script/rails
635
638
  - spec/factories/asset.rb
636
- - spec/factories/component.rb
637
639
  - spec/factories/node.rb
638
640
  - spec/factories/user.rb
639
641
  - spec/files/beef.png
@@ -1,9 +0,0 @@
1
- # Factory.define :asset do |asset|
2
- # asset.tags { Faker::Lorem.words(4) }
3
- # asset.title { "Image asset" }
4
- # asset.file { File.new("#{Rails.root}/public/images/rails.png") }
5
- # end
6
-
7
- Factory.define :component do |component|
8
-
9
- end