better_date_picker 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a13f6ba7a24b35c079e940d00619f566d227607
4
- data.tar.gz: a6d6ad474ea7a7e8c797dc59caeadccbcb096ec2
3
+ metadata.gz: 2616de8938c241c1a0df6886e80243d1b27ef78d
4
+ data.tar.gz: 1abbe7e488e811510d0147776f725399e6a0fe3d
5
5
  SHA512:
6
- metadata.gz: 957a7c8d15f3b8fd5639005de7ac0e6639f6ac744475520ffc28fc58cb6efbc87a3893237043f8c02d71b89e81954aa96d8ade8f20461488a2ec8384f8ffe070
7
- data.tar.gz: c365e4bd80bd2b4f327441f39b905271f1c603f418fe0c2709793331066d953905d7bbb7311b4d63adf1adb7ce1031fd1a74ea5236d60835a14874bd01db54b6
6
+ metadata.gz: b2983ee5573052224ff64125de9ca8f4b07c0a469617374541b45eb4f2a4a98989381cd4ba812caec98992d4ab471cc9bfb79b26219acb99135f79623e2f8d7a
7
+ data.tar.gz: ddbc00fef08e5bcd8be3752bfb9c41eaedf97e4fcce8888bc576c5220a90f365d0356ae96546ff4c9e030e2ee29121ad48e98a7a2c59a4fae2fd59e382864932
@@ -19,10 +19,8 @@ module BetterDatePicker
19
19
 
20
20
  define_method "#{field}=" do |date_val|
21
21
  #we don't want to clobber the ivar if we're setting via the string
22
- unless setting_via_string?
23
- val_to_set = date_val.nil? ? nil : date_val.strftime(self.class.better_date_format)
24
- instance_variable_set("@#{field}_date", val_to_set)
25
- end
22
+ val_to_set = date_val.nil? ? nil : date_val.strftime(self.class.better_date_format)
23
+ instance_variable_set("@#{field}_date", val_to_set)
26
24
 
27
25
  #if the setter is not defined as a method, just set the ivar
28
26
  begin
@@ -45,10 +43,8 @@ module BetterDatePicker
45
43
  end
46
44
 
47
45
  define_method "#{field}_date=" do |stringified_date|
48
- setting_via_string do
49
- instance_variable_set("@#{field}_date", stringified_date)
50
- self.send("#{field}=", Chronic.parse(stringified_date))
51
- end
46
+ instance_variable_set("@#{field}_date", stringified_date)
47
+ self.send("#{field}=", Chronic.parse(stringified_date))
52
48
  stringified_date
53
49
  end
54
50
 
@@ -60,19 +56,5 @@ module BetterDatePicker
60
56
  "%m/%d/%Y"
61
57
  end
62
58
  end
63
-
64
- protected
65
- def setting_via_string(&block)
66
- begin
67
- @setting_via_string = true
68
- block.call
69
- ensure
70
- @setting_via_string = false
71
- end
72
- end
73
-
74
- def setting_via_string?
75
- @setting_via_string
76
- end
77
59
  end
78
60
  end
@@ -1,3 +1,3 @@
1
1
  module BetterDatePicker
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,125 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: better_date_picker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Pickett
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-01 00:00:00.000000000 Z
11
+ date: 2014-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: chronic
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '1.3'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: yard
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - '>='
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - '>='
108
+ - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: pry
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - '>='
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
117
  version: '0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - '>='
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  description: Assign Dates with Chronic Strings
@@ -129,8 +129,8 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
- - .gitignore
133
- - .rspec
132
+ - ".gitignore"
133
+ - ".rspec"
134
134
  - Gemfile
135
135
  - LICENSE.txt
136
136
  - README.md
@@ -151,17 +151,17 @@ require_paths:
151
151
  - lib
152
152
  required_ruby_version: !ruby/object:Gem::Requirement
153
153
  requirements:
154
- - - '>='
154
+ - - ">="
155
155
  - !ruby/object:Gem::Version
156
156
  version: '0'
157
157
  required_rubygems_version: !ruby/object:Gem::Requirement
158
158
  requirements:
159
- - - '>='
159
+ - - ">="
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
163
  rubyforge_project:
164
- rubygems_version: 2.0.6
164
+ rubygems_version: 2.2.2
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Use Chronic Strings to Assign Dates