coercion 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/LICENSE +1 -1
  2. data/lib/coercion.rb +3 -2
  3. data/lib/coercion/version.rb +3 -0
  4. metadata +52 -56
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2008-2011 Tyler Hunt
1
+ Copyright (c) 2008-2012 Tyler Hunt
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,3 +1,4 @@
1
+ require 'coercion/version'
1
2
  require 'coercion/railtie' if defined?(::Rails::Railtie)
2
3
 
3
4
  module Coercion
@@ -10,8 +11,8 @@ module Coercion
10
11
 
11
12
  module StripStrings
12
13
  def write_attribute(attr_name, value)
13
- value.strip! if value.is_a?(String)
14
- super
14
+ value = value.strip if value.is_a?(String)
15
+ super(attr_name, value)
15
16
  end
16
17
  end
17
18
  end
@@ -0,0 +1,3 @@
1
+ module Coercion
2
+ VERSION = '0.0.4'
3
+ end
metadata CHANGED
@@ -1,86 +1,82 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: coercion
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.4
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Tyler Hunt
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2011-07-19 00:00:00 -04:00
13
- default_executable:
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-03-12 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: activerecord
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
20
- requirements:
16
+ requirement: &70310506921560 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
21
19
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: "3.0"
24
- version:
25
- - !ruby/object:Gem::Dependency
26
- name: activesupport
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
27
22
  type: :runtime
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
23
+ prerelease: false
24
+ version_requirements: *70310506921560
25
+ - !ruby/object:Gem::Dependency
26
+ name: activesupport
27
+ requirement: &70310506921060 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
31
30
  - - ~>
32
- - !ruby/object:Gem::Version
33
- version: "3.0"
34
- version:
35
- - !ruby/object:Gem::Dependency
36
- name: railties
31
+ - !ruby/object:Gem::Version
32
+ version: '3.0'
37
33
  type: :runtime
38
- version_requirement:
39
- version_requirements: !ruby/object:Gem::Requirement
40
- requirements:
34
+ prerelease: false
35
+ version_requirements: *70310506921060
36
+ - !ruby/object:Gem::Dependency
37
+ name: railties
38
+ requirement: &70310506958460 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
41
  - - ~>
42
- - !ruby/object:Gem::Version
43
- version: "3.0"
44
- version:
42
+ - !ruby/object:Gem::Version
43
+ version: '3.0'
44
+ type: :runtime
45
+ prerelease: false
46
+ version_requirements: *70310506958460
45
47
  description:
46
48
  email:
47
49
  executables: []
48
-
49
50
  extensions: []
50
-
51
51
  extra_rdoc_files: []
52
-
53
- files:
52
+ files:
54
53
  - LICENSE
55
54
  - lib/coercion/railtie.rb
55
+ - lib/coercion/version.rb
56
56
  - lib/coercion.rb
57
- has_rdoc: true
58
57
  homepage: http://github.com/tylerhunt/coercion
59
58
  licenses: []
60
-
61
59
  post_install_message:
62
60
  rdoc_options: []
63
-
64
- require_paths:
61
+ require_paths:
65
62
  - lib
66
- required_ruby_version: !ruby/object:Gem::Requirement
67
- requirements:
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: "0"
71
- version:
72
- required_rubygems_version: !ruby/object:Gem::Requirement
73
- requirements:
74
- - - ">="
75
- - !ruby/object:Gem::Version
76
- version: "0"
77
- version:
63
+ required_ruby_version: !ruby/object:Gem::Requirement
64
+ none: false
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ required_rubygems_version: !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
78
75
  requirements: []
79
-
80
76
  rubyforge_project:
81
- rubygems_version: 1.3.5
77
+ rubygems_version: 1.8.6
82
78
  signing_key:
83
79
  specification_version: 3
84
- summary: A plugin for ActiveRecord to strip string and coerce empty strings to nil on assignment.
80
+ summary: An ActiveRecord plugin to strip whitespace from strings and coerce empty
81
+ strings to nil values on assignment.
85
82
  test_files: []
86
-