blueprint-generators-rails 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d800389259cd4f2c7deb3ccee4d9b8fad2d547dd
4
- data.tar.gz: 91e0960b4fd8af98abf10ddf4294f1072a6699b2
3
+ metadata.gz: 7979966a1179fb0151f24c2052504ae1002f828c
4
+ data.tar.gz: 8a0a20bfe69f69c88a77586816b9506df633ae5b
5
5
  SHA512:
6
- metadata.gz: c210d07d0afb8d16cf2b0c8508232cacc228504edbf0565b260eeceb9f7e7fffe2d107924753718d56d48d70fa3af6a19586be80db21fada2cfc68c6d65603e9
7
- data.tar.gz: 70d7c70e613cd3a7dfdd175fdd87a4df79908b74518b22f0c0935af0f1821c5cc4e8eabce39ba01ad4b6556fde60ecd2cd10b25618e6b749fde575e681b1889e
6
+ metadata.gz: 84aa02824e5dde41c90d25a07eda14e6aded5624e972dffd1a755d355be4a368ae26fdd35b17767462f8fa74bbe6130c86d445861f8ac8401ca2a702f441a2df
7
+ data.tar.gz: ebfab1d789f8a3e7af73c77cd716f5997c0efc85ffa608c6837db531b6b8b582e63579038b2b02942df12edd1bc76e8c9ac19f7f1d92eeb8496f15802e88669e
@@ -1,7 +1,7 @@
1
1
  module Blueprint
2
2
  module Generators
3
3
  module Rails
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.4"
5
5
  end
6
6
  end
7
7
  end
@@ -57,7 +57,7 @@ namespace :blueprint do
57
57
  print_debug step_count, "Adding concept " + concept_name
58
58
  step_count += 1
59
59
 
60
- unless super_clazz == 'ActiveRecord::Base'
60
+ unless super_clazz.strip == 'ActiveRecord::Base'
61
61
  is_a_name = super_clazz.singularize
62
62
 
63
63
  # add the node relationship to the concept
@@ -71,7 +71,7 @@ namespace :blueprint do
71
71
  # search for a 'has_one' or 'belongs_to' declaration
72
72
  a, has_one_clazz = line.match(/(has_one|belongs_to) :([^,]+)/).try(:captures)
73
73
  unless has_one_clazz.nil?
74
- has_one_name = has_one_clazz.capitalize.singularize.strip
74
+ has_one_name = has_one_clazz.classify.singularize.strip
75
75
 
76
76
  # add the node relationship to the concept
77
77
  model[concept_name].push({ :type => 'has one', :name => has_one_name })
@@ -83,7 +83,7 @@ namespace :blueprint do
83
83
  # search for a 'has_many' declaration
84
84
  b, has_many_clazz = line.match(/(has_many) :([^,]+)/).try(:captures)
85
85
  unless has_many_clazz.nil?
86
- has_many_name = has_many_clazz.capitalize.pluralize.strip
86
+ has_many_name = has_many_clazz.classify.pluralize.strip
87
87
 
88
88
  # add the node relationship to the concept
89
89
  model[concept_name].push({ :type => 'has many', :name => has_many_name })
@@ -96,7 +96,7 @@ namespace :blueprint do
96
96
  c, habtm_clazz = line.match(/(has_and_belongs_to_many) :([^,]+)/).try(:captures)
97
97
  unless habtm_clazz.nil?
98
98
  # this is a many-to-many, so we add two 'has many' relationships (one of each side)
99
- habtm_name = habtm_clazz.capitalize.pluralize.strip
99
+ habtm_name = habtm_clazz.classify.pluralize.strip
100
100
 
101
101
  # add the first side of the 'has many' if it does not already exist
102
102
  if model[concept_name].find { |v| v[:type] == 'has many' && v[:name] == habtm_name }.nil?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blueprint-generators-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - benjii