struggle 2.3.4 → 2.3.5

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: 749a77542911c479181cf568360ff7be79bc7d58
4
- data.tar.gz: e4c3a65526d87b6f5d636f0982e199f138f1e16e
3
+ metadata.gz: 9a55b2315ea94d918d91d363e65e15dd1fbe9b1b
4
+ data.tar.gz: 862affa2a11bb4c603648db4232960e0f35445bb
5
5
  SHA512:
6
- metadata.gz: 2b56a9fce16105a8e0829f8f0536852f72831e7246d322562e59ff6db25f4b351048fc71d897d31fd6870cacb74e03a7200b25ec49ace34ead2674bee7615c05
7
- data.tar.gz: 50709d9201c4d1183fcdd0c8518b11abfdb8eb586c2b1746120a4917865efec4b2ea307bbbf4ab1be0c952295c87437f3f37e689216fbf34ec263c4f734a9d5d
6
+ metadata.gz: 5a4305e0ae51fb701102a4e510478c41d507fcf5d7737d98b60b6b5a806760b88fd698502a381bca34843f162beb67aab658ac164bcdcbd24da2208cd90a5169
7
+ data.tar.gz: 12ea78da2163f44cb9409d741d2fd6387a3a05ecfe3094fb2d0797070c310548e2a60bee54494f51ad45ae85fee7b04bb37b6369d2b8cad1c7043ac694466b82
data/README.md CHANGED
@@ -24,4 +24,5 @@
24
24
  1.微信授权登录。
25
25
  2.微信企业授权登录。
26
26
  升级说明:
27
+ 2.3.5: time重构增加获取时间季度方法,Time.now.quarter => 1,2,3,4
27
28
  2.3.4:增加sql导出功能,修改验证码的字体。
@@ -0,0 +1,16 @@
1
+ module Struggle
2
+ module TimeExtend
3
+ def quarter
4
+ month = self.month
5
+ if month >= 1 && month <= 3
6
+ 1
7
+ elsif month >= 4 && month <= 6
8
+ 2
9
+ elsif month >= 7 && month <= 9
10
+ 3
11
+ elsif month >= 10 && month <= 12
12
+ 4
13
+ end
14
+ end
15
+ end
16
+ end
data/lib/struggle.rb CHANGED
@@ -19,6 +19,7 @@ require 'struggle/getui'
19
19
  require 'struggle/concerns/string_extend'
20
20
  require 'struggle/concerns/int_extend'
21
21
  require 'struggle/concerns/decimal_extend'
22
+ require 'struggle/concerns/time_extend'
22
23
  require "struggle/ftp_tool"
23
24
  require "struggle/zip_tool"
24
25
  require 'struggle/sql'
@@ -26,3 +27,4 @@ require 'pay/jd_gateway'
26
27
  String.send :include, Struggle::StringExtend
27
28
  Integer.send :include, Struggle::IntExtend
28
29
  Numeric.send :include, Struggle::DecimalExtend
30
+ Time.send :include, Struggle::TimeExtend
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: struggle
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.4
4
+ version: 2.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - lean
@@ -68,6 +68,7 @@ files:
68
68
  - lib/struggle/concerns/decimal_extend.rb
69
69
  - lib/struggle/concerns/int_extend.rb
70
70
  - lib/struggle/concerns/string_extend.rb
71
+ - lib/struggle/concerns/time_extend.rb
71
72
  - lib/struggle/font/ARIALNBI.TTF
72
73
  - lib/struggle/font/font.ttf
73
74
  - lib/struggle/ftp_tool.rb