inline_forms 1.3.33 → 1.3.34

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/inline_forms.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
21
21
  s.require_paths = ["lib"]
22
22
 
23
+ s.add_dependency('rvm', '~> 1.11.3.3')
23
24
  s.add_development_dependency(%q<rspec-rails>, [">= 0"])
24
25
  s.add_development_dependency(%q<shoulda>, [">= 0"])
25
26
  s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
@@ -107,7 +107,8 @@ module InlineForms
107
107
  @inline_forms_attribute_list = String.new
108
108
 
109
109
  for attribute in attributes
110
- if attribute.column_type == :belongs_to # :drop_down, :references and :belongs_to all end up with the column_type :belongs_to
110
+ if attribute.column_type == :belongs_to
111
+ ## :drop_down, :references and :belongs_to all end up with the column_type :belongs_to
111
112
  @belongs_to << ' belongs_to :' + attribute.name + "\n"
112
113
  end
113
114
  if attribute.type == :image_field # upload images via carrierwave
@@ -204,6 +205,10 @@ module InlineForms
204
205
  :after => "<%= tabs_tag :open_tabs => { :id => \"tabs\" } do |tab| %>\n"
205
206
  end
206
207
  end
208
+
209
+ def generate_test
210
+ template "test.erb", "test/unit/#{test_file_name}.rb"
211
+ end
207
212
 
208
213
  def generate_controller
209
214
  template "controller.erb", "app/controllers/#{controller_file_name}.rb" if @flag_create_controller
@@ -226,6 +231,14 @@ module InlineForms
226
231
  def controller_file_name
227
232
  controller_name.underscore
228
233
  end
234
+
235
+ def test_name
236
+ name + 'Test'
237
+ end
238
+
239
+ def test_file_name
240
+ test_name.underscore
241
+ end
229
242
 
230
243
  def table_name
231
244
  name.pluralize.underscore
@@ -0,0 +1,6 @@
1
+ class <%= test_name %> < ActiveSupport::TestCase
2
+ # Replace this with your real tests.
3
+ test "the truth" do
4
+ assert true
5
+ end
6
+ end
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.3.33"
3
+ VERSION = "1.3.34"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.33
4
+ version: 1.3.34
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,24 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-18 00:00:00.000000000 Z
12
+ date: 2012-05-20 00:00:00.000000000 Z
13
13
  dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rvm
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 1.11.3.3
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 1.11.3.3
14
30
  - !ruby/object:Gem::Dependency
15
31
  name: rspec-rails
16
32
  requirement: !ruby/object:Gem::Requirement
@@ -225,6 +241,7 @@ files:
225
241
  - lib/generators/templates/deploy.rb
226
242
  - lib/generators/templates/migration.erb
227
243
  - lib/generators/templates/model.erb
244
+ - lib/generators/templates/test.erb
228
245
  - lib/generators/templates/unicorn.rb
229
246
  - lib/inline_forms.rb
230
247
  - lib/inline_forms/version.rb