sga_fields_synchronizer 0.1.0 → 0.1.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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
@@ -12,7 +12,8 @@ class <%= migration_name %> < ActiveRecord::Migration
12
12
  end
13
13
 
14
14
  def options_from_target_column hash
15
- hash.map{|el| el[0]=":#{el[0]}"; el * " => "} * ", "
15
+ return if hash.nil?
16
+ " ," + hash.map{|el| el[0]=":#{el[0]}"; el * " => "} * ", "
16
17
  end
17
18
  %>
18
19
  def self.up
@@ -21,11 +22,11 @@ class <%= migration_name %> < ActiveRecord::Migration
21
22
  <% end %>
22
23
 
23
24
  <% added_columns.each_pair do |col, col_info| %>
24
- add_column :<%=table_name%>, :<%=col%>, :<%=col_info[1]%>, <%= options_from_target_column col_info[2] %>
25
+ add_column :<%=table_name%>, :<%=col%>, :<%=col_info[1]%> <%= options_from_target_column col_info[2] %>
25
26
  <% end %>
26
27
 
27
28
  <% changed_columns.each_pair do |col, col_info| %>
28
- change_column :<%=table_name%>, :<%=col%>, :<%=col_info[0][1]%>, <%= options_from_target_column col_info[0][2]%>
29
+ change_column :<%=table_name%>, :<%=col%>, :<%=col_info[0][1]%> <%= options_from_target_column col_info[0][2]%>
29
30
  <% end %>
30
31
  end
31
32
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sga_fields_synchronizer}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["tim.teng"]
12
- s.date = %q{2010-06-23}
12
+ s.date = %q{2010-06-25}
13
13
  s.description = %q{ A synchronizer for most frequently edited columns based on yml file}
14
14
  s.email = %q{tim.rubist@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - tim.teng
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-23 00:00:00 +08:00
17
+ date: 2010-06-25 00:00:00 +08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency