sequel-crushyform 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/lib/sequel_crushyform.rb +5 -3
- data/sequel-crushyform.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -360,6 +360,7 @@ CHANGE LOG
|
|
360
360
|
0.1.0 Add `:select` type and make `:parent` type overridable through `set_schema`
|
361
361
|
0.1.1 Use strftime fordate/time (do not know why I did not !!!)
|
362
362
|
0.1.2 Monkey patch, just prevent to have text areas instead of text fields when using PostgreSQL
|
363
|
+
0.1.3 Still use the @schema value for :text type when :schema plugin is used
|
363
364
|
|
364
365
|
COPYRIGHT
|
365
366
|
=========
|
data/lib/sequel_crushyform.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module ::Sequel::Plugins::Crushyform
|
2
2
|
|
3
3
|
module ClassMethods
|
4
|
-
def crushyform_version; [0,1,
|
4
|
+
def crushyform_version; [0,1,3]; end
|
5
5
|
# Schema
|
6
6
|
def crushyform_schema
|
7
7
|
@crushyform_schema ||= default_crushyform_schema
|
@@ -9,8 +9,10 @@ module ::Sequel::Plugins::Crushyform
|
|
9
9
|
def default_crushyform_schema
|
10
10
|
out = {}
|
11
11
|
db_schema.each do |k,v|
|
12
|
-
out[k] = if
|
13
|
-
{:type=>:text}
|
12
|
+
out[k] = if respond_to?(:schema) && @schema.columns.find{|c|c[:name]==k}[:type]==:text
|
13
|
+
{:type=>:text} # Using :schema plugin is the safest
|
14
|
+
elsif [:sqlite,:mysql].include?(@db.database_type) && v[:db_type]=='text'
|
15
|
+
{:type=>:text} # Without :schema plugin Postgres uses text even for strings
|
14
16
|
else
|
15
17
|
{:type=>v[:type]}
|
16
18
|
end
|
data/sequel-crushyform.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'sequel-crushyform'
|
3
|
-
s.version = "0.1.
|
3
|
+
s.version = "0.1.3"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.summary = "A Sequel plugin that helps building forms"
|
6
6
|
s.description = "A Sequel plugin that helps building forms. It basically does them for you so that you can forget about the boring part. The kind of thing which is good to have in your toolbox for building a CMS."
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-crushyform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mickael Riga
|