transilien_microservices 0.0.6 → 0.0.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/Gemfile.lock +4 -4
- data/lib/transilien/time.rb +3 -0
- data/lib/transilien/version.rb +1 -1
- data/spec/time_spec.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57960fb00242ddd3df6ccaa4771a6c288e6d4745
|
4
|
+
data.tar.gz: b8aad89e1f894874be95e82265e2c3a7d7d49c73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27a3fbb5e779c25fb9fb66d9fe838cf5fa839d9fd798e0d60d1fdb4adc785103b256c35ebdb4c32970e6c5aa13ca4cd480709feeb7519e8e7d9cdccb17f577ea
|
7
|
+
data.tar.gz: 100ebd60aa8ac7b8c733f7b7ad0ae079f5ca05f18c4e70a293840416a86a5d7bbac016304b3ae80d9594a0cc65ceb7d43b75645106bf73f721c6c5e6cc2b6a81
|
data/CHANGELOG
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
transilien_microservices (0.0.
|
4
|
+
transilien_microservices (0.0.7)
|
5
5
|
faraday (>= 0.8.4)
|
6
6
|
nokogiri (>= 1.5.5)
|
7
7
|
|
@@ -12,8 +12,8 @@ GEM
|
|
12
12
|
timers (~> 1.1.0)
|
13
13
|
coderay (1.1.0)
|
14
14
|
diff-lcs (1.2.5)
|
15
|
-
faraday (0.
|
16
|
-
multipart-post (
|
15
|
+
faraday (0.9.0)
|
16
|
+
multipart-post (>= 1.2, < 3)
|
17
17
|
ffi (1.9.3)
|
18
18
|
formatador (0.2.4)
|
19
19
|
guard (2.2.5)
|
@@ -32,7 +32,7 @@ GEM
|
|
32
32
|
lumberjack (1.0.4)
|
33
33
|
method_source (0.8.2)
|
34
34
|
mini_portile (0.5.2)
|
35
|
-
multipart-post (
|
35
|
+
multipart-post (2.0.0)
|
36
36
|
nokogiri (1.6.1)
|
37
37
|
mini_portile (~> 0.5.0)
|
38
38
|
pry (0.9.12.4)
|
data/lib/transilien/time.rb
CHANGED
@@ -29,6 +29,9 @@ class Transilien::Time < Transilien::FakeMicroService
|
|
29
29
|
# Since the current time is not known, set it to `Time.new` year, month and day
|
30
30
|
def time
|
31
31
|
now = Time.new
|
32
|
+
this_month_days_count = Date.new(now.year, now.month, -1).day
|
33
|
+
return Time.local(now.year + 1, 1, 1, hour, minute) if day == 1 && now.month == 12 && now.day == this_month_days_count
|
34
|
+
return Time.local(now.year, now.month + 1, 1, hour, minute) if day == 1 && this_month_days_count == now.day
|
32
35
|
Time.local(now.year, now.month, now.day + day, hour, minute)
|
33
36
|
end
|
34
37
|
end
|
data/lib/transilien/version.rb
CHANGED
data/spec/time_spec.rb
CHANGED
@@ -10,6 +10,12 @@ describe Transilien::Time do
|
|
10
10
|
now = Time.new
|
11
11
|
tt.time.should eql(Time.local(now.year, now.month, now.day, 14, 42))
|
12
12
|
tt.day = 1
|
13
|
-
|
13
|
+
this_month_days_count = Date.new(now.year, now.month, -1).day
|
14
|
+
if now.day == this_month_days_count
|
15
|
+
tt.time.should eql(Time.local(now.year, now.month+1, 1, 14, 42))
|
16
|
+
else
|
17
|
+
tt.time.should eql(Time.local(now.year, now.month, now.day+1, 14, 42))
|
18
|
+
end
|
14
19
|
end
|
20
|
+
|
15
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: transilien_microservices
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Lecavelier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|