railsbuilder 0.1.16 → 0.1.17

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0542d81aceec2bf0ed09cc7705e73e4f0b5efb7f
4
- data.tar.gz: 7e580cafc11d40047a12d07bd637e8d0db138eaa
3
+ metadata.gz: b24c03e8ac1c406a08b8c3591a3e49419df5d612
4
+ data.tar.gz: bc1b3623facea7eed81231ee0a2b474d9896f53e
5
5
  SHA512:
6
- metadata.gz: ed064ac04fb8209dd9aaa2d276bdc5c2b44a9760556fc3f3c576fcb27a0edc8df041409e4a8a530331887ec734344271e55168efeda7453bc5acf60249aa3b8f
7
- data.tar.gz: 0f6f804ebbb4f6d52ea520f544ba97efbeb27b6b65c9f5d263939988c7f9956bf0b9f86b2568fe3207b3cb994b2b806e1985eec681f178b992eb61dc0966d2d0
6
+ metadata.gz: 2eedbcc52213f89f9c5103ae388cceadfc65115d0a27a447b5ac9547ffdd234dd729ed927e7af6008117956e85fba814d969d5ed05f8eaf95f169381aa88f6de
7
+ data.tar.gz: 169e888e78d54ef0bdb825dc5ebda64891595fb1864c84e146489410a0103fc7fea104c47054a3d6ba13bfb42df4cb0ff6eddf65fc3141c408dd6ac053c5763f
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/railsbuilder.rb CHANGED
@@ -135,6 +135,7 @@ class RailsBuilder
135
135
  case child.name.to_sym
136
136
 
137
137
  when :model
138
+ puts 'inside :model'
138
139
 
139
140
  # does the controller exitst?
140
141
 
@@ -154,12 +155,16 @@ class RailsBuilder
154
155
  # if the model fields are defined let's generate the model
155
156
  model = child.element('model_class')
156
157
  next unless model
158
+ puts 'we have a model'
157
159
 
158
160
  class_name = model.attributes[:class_name]
159
161
  next unless class_name
162
+ puts 'we have a class name'
160
163
 
161
164
  attributes = model.xpath('.').map {|x| x.attributes.values}
162
- next unless attributes.empty?
165
+ puts 'attributes : ' + attributes.inspect
166
+ next if attributes.empty?
167
+ puts 'we have attributes'
163
168
 
164
169
  s = class_name + ' ' + attributes.map{|x| x.join ':'}.join(' ')
165
170
 
@@ -170,8 +175,8 @@ class RailsBuilder
170
175
  r = shell command
171
176
  next if r == :abort
172
177
 
173
- trigger = "config: a new model with associated entries has "
174
- + "been created"
178
+ trigger = "config: a new model with associated entries has "\
179
+ + "been found"
175
180
  activity = "file: created app/models/#{class_name.downcase}.rb"
176
181
  @notifications << [trigger, activity]
177
182
 
@@ -180,12 +185,11 @@ class RailsBuilder
180
185
  command = "rake db:migrate"
181
186
 
182
187
  puts ":: preparing to execute shell command: `#{command}`"
183
- puts 'Are you sure you want to commit this '
188
+ puts 'Are you sure you want to commit this '\
184
189
  + 'database operation? (Y/n)'
185
190
  shell command
186
191
 
187
- trigger = "config: a new model with associated entries has "
188
- + "been created"
192
+ trigger = "... continuation from previous trigger"
189
193
  activity = "database: created"
190
194
  @notifications << [trigger, activity]
191
195
 
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsbuilder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.16
4
+ version: 0.1.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file