refinerycms-generators 0.9.9.5 → 0.9.9.6

Sign up to get free protection for your applications and to get access to all the features.
data/lib/gemspec.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- version = '0.9.9.5'
2
+ version = '0.9.9.6'
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$/
@@ -10,6 +10,17 @@ class RefineryEngineGenerator < Rails::Generators::NamedBase
10
10
  argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
11
11
 
12
12
  def generate
13
+ if singular_name == plural_name
14
+ puts ""
15
+ if singular_name.singularize != singular_name
16
+ puts "Please specify the singular name '#{singular_name.singularize}' instead of '#{plural_name}'."
17
+ else
18
+ puts "The engine name you specified will not work as the singular name is equal to the plural name."
19
+ end
20
+ puts ""
21
+ exit(1)
22
+ end
23
+
13
24
  unless attributes.empty? and self.behavior != :revoke
14
25
  if (engine = attributes.detect{|a| a.type.to_s == 'engine'}).present? and attributes.reject!{|a| a.type.to_s == 'engine'}.present?
15
26
  engine = engine.name.pluralize
@@ -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.5}
4
- s.date = %q{2011-02-21}
3
+ s.version = %q{0.9.9.6}
4
+ s.date = %q{2011-03-04}
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
@@ -2,7 +2,7 @@
2
2
  name: refinerycms-generators
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.9.5
5
+ version: 0.9.9.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Resolve Digital
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-21 00:00:00 +13:00
13
+ date: 2011-03-04 00:00:00 +13:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  requirements: []
89
89
 
90
90
  rubyforge_project:
91
- rubygems_version: 1.5.2
91
+ rubygems_version: 1.6.0
92
92
  signing_key:
93
93
  specification_version: 3
94
94
  summary: Core generators for the Refinery CMS project.