refinerycms-generators 0.9.9 → 0.9.9.1

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/lib/gemspec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- version = '0.9.9'
2
+ version = '0.9.9.1'
3
3
  raise "Could not get version so gemspec can not be built" if version.nil?
4
4
  files = Dir.glob("**/*").flatten.reject do |file|
5
5
  file =~ /\.gem$/
@@ -1,8 +1,10 @@
1
- class Admin::<%= class_name.pluralize %>Controller < Admin::BaseController
1
+ module Admin
2
+ class <%= class_name.pluralize %>Controller < Admin::BaseController
2
3
 
3
- crudify :<%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? and title.name != 'title' %>,
4
- :title_attribute => '<%= title.name %>'<% end %><% if plural_name == singular_name %>,
5
- :redirect_to_url => :admin_<%= singular_name %>_index_url
4
+ crudify :<%= singular_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? and title.name != 'title' %>,
5
+ :title_attribute => '<%= title.name %>'<% end %><% if plural_name == singular_name %>,
6
+ :redirect_to_url => :admin_<%= singular_name %>_index_url
6
7
  <% end %>
7
8
 
9
+ end
8
10
  end
@@ -3,7 +3,7 @@ Given /^I have no <%= plural_name %>$/ do
3
3
  end
4
4
 
5
5
  <% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? -%>
6
- Given /^I (only )?have <%= plural_name %> titled "?([^"]*)"?$/ do |only, titles|
6
+ Given /^I (only )?have <%= plural_name %> titled "?([^\"]*)"?$/ do |only, titles|
7
7
  <%= class_name %>.delete_all if only
8
8
  titles.split(', ').each do |title|
9
9
  <%= class_name %>.create(:<%= title.name %> => title)
@@ -11,6 +11,6 @@ Given /^I (only )?have <%= plural_name %> titled "?([^"]*)"?$/ do |only, titles|
11
11
  end
12
12
  <% end -%>
13
13
 
14
- Then /^I should have ([0-9]+) <%= plural_name %>?$/ do |count|
14
+ Then /^I should have ([0-9]+) <%= plural_name.to_s.gsub(/ies$/, '(ies|y)') %>?$/ do |count|
15
15
  <%= class_name %>.count.should == count.to_i
16
16
  end
@@ -10,9 +10,10 @@ module Refinery
10
10
  config.after_initialize do
11
11
  Refinery::Plugin.register do |plugin|
12
12
  plugin.name = "<%= class_name.pluralize.underscore.downcase %>"
13
- plugin.activity = {:class => <%= class_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? and title.name != 'title' %>,
14
- :title => '<%= title.name %>'
15
- <% end %>}
13
+ plugin.activity = {
14
+ :class => <%= class_name %><% if (title = attributes.detect { |a| a.type.to_s == "string" }).present? and title.name != 'title' %>,
15
+ :title => '<%= title.name %>'
16
+ <% end %>}
16
17
  end
17
18
  end
18
19
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{refinerycms-generators}
3
- s.version = %q{0.9.9}
4
- s.date = %q{2011-01-26}
3
+ s.version = %q{0.9.9.1}
4
+ s.date = %q{2011-01-27}
5
5
  s.summary = %q{Core generators for the Refinery CMS project.}
6
6
  s.description = %q{Core generators for Refinery CMS including refinery_engine.}
7
7
  s.homepage = %q{http://refinerycms.com}
metadata CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 0
7
7
  - 9
8
8
  - 9
9
- version: 0.9.9
9
+ - 1
10
+ version: 0.9.9.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Resolve Digital
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2011-01-26 00:00:00 +13:00
18
+ date: 2011-01-27 00:00:00 +13:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency