air18n 0.0.4 → 0.0.5

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.
@@ -176,13 +176,15 @@ module Air18n
176
176
  def parse_date s, locale = nil
177
177
  return s if s.nil?
178
178
 
179
+ # `to_str` is needed for ActiveSupport::SafeBuffer coming in from controllers.
180
+ s = s.to_str
181
+
179
182
  if /\A[0-9]{4}-[0-9]{2}-[0-9]{2}\Z/.match s
180
183
  # If this looks like an ISO date, YYYY-mm-dd, let [Date.parse] handle
181
184
  # parsing since [Date.strptime] varies by platform (darwin vs. linux)
182
185
  Date.parse(s, true)
183
186
  else
184
187
  locale ||= I18n.full_locale
185
- s = s.to_str
186
188
  format = I18n.t('date.formats.default', :locale => locale.to_sym)
187
189
  begin
188
190
  date = Date.strptime(s, format)
@@ -1,3 +1,3 @@
1
1
  module Air18n
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/make_gem ADDED
@@ -0,0 +1,4 @@
1
+ # Run this to push the new version of the gem to rubygems!
2
+ v=0.0.5
3
+ gem build air18n.gemspec
4
+ gem push air18n-${v}.gem
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: air18n
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -167,6 +167,7 @@ files:
167
167
  - lib/air18n/xss_detector.rb
168
168
  - lib/generators/air18n/migration/migration_generator.rb
169
169
  - lib/generators/air18n/migration/templates/active_record/migration.rb
170
+ - make_gem
170
171
  - spec/database.yml
171
172
  - spec/factories.rb
172
173
  - spec/lib/air18n/air18n_spec.rb