kuhsaft 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,6 +6,12 @@
6
6
 
7
7
  - fix README on how to integrate devise (rails31) ([@effkay][])
8
8
 
9
+ ## 0.2.5 - August 29, 2011
10
+
11
+ ### Bug fixes
12
+
13
+ - fix a bug where virtual page tree wasn't available ([@manufaktor][])
14
+
9
15
  ## 0.2.4 - August 29, 2011
10
16
 
11
17
  ### Improvements
@@ -2,4 +2,14 @@ module CmsHelper
2
2
  def admin_tab title, path
3
3
  content_tag :li, link_to(title, path), :class => (:current if request.path.include?(path))
4
4
  end
5
+
6
+ def available_parent_pages
7
+ pages = []
8
+ pages << { :title => t('kuhsaft.cms.pages.new.pages'), :link => cms_pages_path(:locale => :en) }
9
+ if params[:parent_id].present?
10
+ parent_page = Kuhsaft::Page.find(params[:parent_id])
11
+ pages += parent_page.parent_pages
12
+ end
13
+ pages << { :title => t('kuhsaft.cms.pages.new.new_page'), :link => '#' }
14
+ end
5
15
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_development_dependency 'rspec-rails', '>= 2.6'
23
- s.add_development_dependency 'factory_girl_rails', '>= 2.0'
23
+ s.add_development_dependency 'factory_girl_rails'
24
24
  s.add_development_dependency 'capybara', '>= 0.4.0'
25
25
  s.add_development_dependency 'ruby-debug'
26
26
  s.add_development_dependency 'sqlite3-ruby', '1.2.5'
@@ -1,3 +1,3 @@
1
1
  module Kuhsaft
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -1,11 +1,2 @@
1
1
  module ApplicationHelper
2
- def available_parent_pages
3
- pages = []
4
- pages << { :title => t('kuhsaft.cms.pages.new.pages'), :link => cms_pages_path(:locale => :en) }
5
- if params[:parent_id].present?
6
- parent_page = Kuhsaft::Page.find(params[:parent_id])
7
- pages += parent_page.parent_pages
8
- end
9
- pages << { :title => t('kuhsaft.cms.pages.new.new_page'), :link => '#' }
10
- end
11
2
  end
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe ApplicationHelper do
3
+ describe CmsHelper do
4
4
  context 'when the user creates a toplevel page' do
5
5
  describe '#available_parent_pages' do
6
6
  it 'should return the 2 pages' do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuhsaft
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
4
+ hash: 29
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 4
10
- version: 0.2.4
9
+ - 5
10
+ version: 0.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Immanuel H\xC3\xA4ussermann"
@@ -44,9 +44,8 @@ dependencies:
44
44
  - !ruby/object:Gem::Version
45
45
  hash: 3
46
46
  segments:
47
- - 2
48
47
  - 0
49
- version: "2.0"
48
+ version: "0"
50
49
  type: :development
51
50
  version_requirements: *id002
52
51
  - !ruby/object:Gem::Dependency
@@ -412,7 +411,7 @@ files:
412
411
  - spec/dummy/public/stylesheets/.gitkeep
413
412
  - spec/dummy/script/rails
414
413
  - spec/factories.rb
415
- - spec/helpers/application_helper_spec.rb
414
+ - spec/helpers/cms_helper_spec.rb
416
415
  - spec/helpers/pages_helper_spec.rb
417
416
  - spec/integration/navigation_spec.rb
418
417
  - spec/kuhsaft_spec.rb
@@ -494,7 +493,7 @@ test_files:
494
493
  - spec/dummy/public/stylesheets/.gitkeep
495
494
  - spec/dummy/script/rails
496
495
  - spec/factories.rb
497
- - spec/helpers/application_helper_spec.rb
496
+ - spec/helpers/cms_helper_spec.rb
498
497
  - spec/helpers/pages_helper_spec.rb
499
498
  - spec/integration/navigation_spec.rb
500
499
  - spec/kuhsaft_spec.rb