rack-app 7.3.1 → 7.3.2

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: 79271c60c490af09f3db3df4e6907210529bf0d0
4
- data.tar.gz: b14fc9c9169e980aee20a59c1384dadc27166df6
3
+ metadata.gz: 29ab9521da605cc10dd970e9f8736ee48804c212
4
+ data.tar.gz: bd0a104987412fd77c16f7517ffc38a1ebc19504
5
5
  SHA512:
6
- metadata.gz: e02bcb5f6aba359290b0231bd22a0b4cdab6def0b885f7ee05383024027d5044308453d9c1a8df35b654f08b96283546330fd7032603ee8a35ed339f87a83f7c
7
- data.tar.gz: 135399af68864242bb24bd985a07e8b83b8767c8e484715d99a2f3c21acfb0d0448ade94f5a5072f5ef6612a2fc4ee6ac10d88bddce108f45e0f11c827e47173
6
+ metadata.gz: 0cbbcc149f4d751691b86db4183687e1a787768dab8fafbd172d83988dc91f27d0c6b631a83afbfb995b573d7e5d05d8db4314ee45d1afd7a131b928451b626a
7
+ data.tar.gz: 4213b29c6b75f3e3f812252ffa0a6a5522d2a1383a0c7b98b68e9385087ef71ca18cd5211b254bcde881131395403167fd8f92217ddb405d1abd5eec43755bab
data/VERSION CHANGED
@@ -1 +1 @@
1
- 7.3.1
1
+ 7.3.2
@@ -1,12 +1,10 @@
1
+ require 'time'
1
2
  module Rack::App::Utils::Parser
2
3
  extend(self)
3
4
 
4
5
  require 'rack/app/utils/parser/custom'
5
6
  require 'rack/app/utils/parser/string'
6
7
  require 'rack/app/utils/parser/boolean'
7
- require 'rack/app/utils/parser/date'
8
- require 'rack/app/utils/parser/time'
9
- require 'rack/app/utils/parser/date_time'
10
8
  require 'rack/app/utils/parser/float'
11
9
  require 'rack/app/utils/parser/integer'
12
10
  require 'rack/app/utils/parser/numeric'
@@ -26,12 +24,12 @@ module Rack::App::Utils::Parser
26
24
  self::String.new
27
25
  when [::TrueClass, ::FalseClass, :boolean].include?(type)
28
26
  self::Boolean.new
29
- when [::Date, :date].include?(type)
30
- self::Date.new
31
- when [::Time, :time].include?(type)
32
- self::Time.new
33
- when [::DateTime, :date_time, :datetime].include?(type)
34
- self::DateTime.new
27
+ when type == :date
28
+ self::Custom.new(::Date)
29
+ when type == :time
30
+ self::Custom.new(::Time)
31
+ when [:date_time, :datetime].include?(type)
32
+ self::Custom.new(::DateTime)
35
33
  when [::Integer, :integer].include?(type)
36
34
  self::Integer.new
37
35
  when [::Float, :float].include?(type)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-app
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.3.1
4
+ version: 7.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Luzsi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-06 00:00:00.000000000 Z
11
+ date: 2017-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -188,13 +188,10 @@ files:
188
188
  - lib/rack/app/utils/parser.rb
189
189
  - lib/rack/app/utils/parser/boolean.rb
190
190
  - lib/rack/app/utils/parser/custom.rb
191
- - lib/rack/app/utils/parser/date.rb
192
- - lib/rack/app/utils/parser/date_time.rb
193
191
  - lib/rack/app/utils/parser/float.rb
194
192
  - lib/rack/app/utils/parser/integer.rb
195
193
  - lib/rack/app/utils/parser/numeric.rb
196
194
  - lib/rack/app/utils/parser/string.rb
197
- - lib/rack/app/utils/parser/time.rb
198
195
  - lib/rack/app/version.rb
199
196
  - old_ruby.sh
200
197
  - rack-app.gemspec
@@ -1,15 +0,0 @@
1
- require 'date'
2
- class Rack::App::Utils::Parser::Date
3
- def parse(str)
4
- ::Date.parse(str)
5
- end
6
-
7
- def validate(str)
8
- [
9
- /^\d+-\d\d-\d\d$/,
10
- /^\w+, \d+ \w+ \d+$/
11
- ].any? do |regexp|
12
- !!(str =~ regexp)
13
- end
14
- end
15
- end
@@ -1,18 +0,0 @@
1
- require 'date'
2
- class Rack::App::Utils::Parser::DateTime
3
- def parse(str)
4
- ::DateTime.parse(str)
5
- end
6
-
7
- def validate(str)
8
- [
9
- /(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2})\:(\d{2})/,
10
- /^\w+, \d+ \w+ \d+ \d\d:\d\d:\d\d \+\d+$/,
11
- /^-?\d+-\d\d-\d\d\w\d\d:\d\d:\d\d\+\d\d:\d\d$/,
12
- /\w+ \w+ \d+ \d+ \d+:\d+:\d+ \w+\+\d+ \(\w+\)/,
13
- /^-?\d+-\d\d?-\d\d?\w\d\d?:\d\d?:\d\d?\w$/
14
- ].any? do |regexp|
15
- !!(str =~ regexp)
16
- end
17
- end
18
- end
@@ -1,15 +0,0 @@
1
- require 'time'
2
- class Rack::App::Utils::Parser::Time
3
- def parse(str)
4
- ::Time.parse(str)
5
- end
6
-
7
- def validate(str)
8
- [
9
- /(\d{4})-(\d{2})-(\d{2})T(\d{2})\:(\d{2})\:(\d{2})[+-](\d{2})\:(\d{2})/,
10
- /^\d+-\d\d-\d\d \d\d:\d\d:\d\d \+\d+$/
11
- ].any? do |regexp|
12
- !!(str =~ regexp)
13
- end
14
- end
15
- end