miasma 0.3.6 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a471e7134e77e97f6033f06d6824da13f855cbc19c168b02c31ea5793357d7c1
4
- data.tar.gz: 51870ee9bab612af01b632be5316e585a22d508e94c398eb22042c52a96dca9d
3
+ metadata.gz: 46deb745b69c629be1c378cd1a8d638afc9c7bab3c89bcafec9e628a8ceafab2
4
+ data.tar.gz: 0d55b8a6db1986778ed9c1380c74a1900c526b5280d6e69197c2aaad499b9a51
5
5
  SHA512:
6
- metadata.gz: 543ddacf9eaa53433430bde752406cefa6699ae850e9ee28ed82a23ba4ccd0c373e55f4de2bde3cfca359b54a10422aa2bbe529e7c7a04d063c45f2682a216bd
7
- data.tar.gz: b4033baa376b004ad9caf250afe703866a18175962c282bead06eec01d1eddf53e4c207e6c93c9b9cbdf43c7c90f9740909c122919a155f194776c3f8a08db0b
6
+ metadata.gz: 2e742f62a1f1420ec2d213f239fd58e8de190d4908dad33a33b5f431a954dbbd4e9ddb10ea62b0554d6053c1f105cf54ad1b093e08505c354715eb7d1677f988
7
+ data.tar.gz: 43fa28edb5b5aa1ce3f0de051cfda64a3ca439d95c8e6e099a0d078cfb8619b40ea3688abfafcb4acbed95c550f5f3f64530434eb2ca3644679249486cbb8574
@@ -1,3 +1,6 @@
1
+ # v0.3.8
2
+ * Return coerced time values in local time
3
+
1
4
  # v0.3.6
2
5
  * Add logging to API
3
6
 
@@ -26,7 +26,7 @@ module Miasma
26
26
  end
27
27
 
28
28
  attribute :name, String, :required => true
29
- attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s) }
29
+ attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
30
30
  attribute :load_balancers, Balancer, :multiple => true, :coerce => lambda { |v, obj| Balancer.new(obj.api, v) }
31
31
  attribute :minimum_size, Integer, :coerce => lambda { |v| v.to_i }
32
32
  attribute :maximum_size, Integer, :coerce => lambda { |v| v.to_i }
@@ -45,8 +45,8 @@ module Miasma
45
45
  attribute :private_addresses, Address, :multiple => true, :coerce => lambda { |v| Address.new(v) }
46
46
  attribute :health_check, HealthCheck, :coerce => lambda { |v| HealthCheck.new(v) }
47
47
  attribute :listeners, Listener, :coerce => lambda { |v| Listener.new(v) }, :multiple => true
48
- attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s) }
49
- attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s) }
48
+ attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
49
+ attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
50
50
  attribute :server_states, ServerState, :multiple => true, :coerce => lambda { |v| ServerState.new(v) }
51
51
 
52
52
  on_missing :reload
@@ -7,7 +7,7 @@ module Miasma
7
7
 
8
8
  # Stack event
9
9
  class Event < Types::Model
10
- attribute :time, Time, :required => true
10
+ attribute :time, Time, :required => true, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
11
11
  attribute :resource_id, [String, Numeric], :required => true
12
12
  attribute :resource_logical_id, [String, Numeric]
13
13
  attribute :resource_name, String
@@ -37,7 +37,7 @@ module Miasma
37
37
  attribute :state, String, :coerce => lambda { |x| x.to_s }
38
38
  attribute :parameters, Smash, :default => Smash.new
39
39
  attribute :template, Smash, :default => Smash.new
40
- attribute :created_at, Time, :coerce => lambda { |x| Time.parse(x.to_s) }
40
+ attribute :created_at, Time, :coerce => lambda { |x| Time.parse(x.to_s).localtime }
41
41
 
42
42
  DIFF_ATTRIBUTES = [
43
43
  :add, :remove, :replace, :interrupt, :unavailable, :unknown,
@@ -13,7 +13,7 @@ module Miasma
13
13
  attribute :state, Symbol, :required => true, :allowed_values => Orchestration::VALID_RESOURCE_STATES
14
14
  attribute :status, [String, Symbol], :required => true, :coerce => lambda { |v| v.to_s.to_sym }
15
15
  attribute :status_reason, String
16
- attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s) }
16
+ attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
17
17
 
18
18
  on_missing :reload
19
19
 
@@ -41,8 +41,8 @@ module Miasma
41
41
  attribute :outputs, Output, :coerce => lambda { |v, stack| Output.new(stack, v) }, :multiple => true
42
42
  attribute :status, String
43
43
  attribute :status_reason, String
44
- attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s) }
45
- attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s) }
44
+ attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
45
+ attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
46
46
  attribute :parameters, Smash, :coerce => lambda { |v| v.to_smash }
47
47
  attribute :template, Smash, :depends => :perform_template_load, :coerce => lambda { |v| v = MultiJson.load(v) if v.is_a?(String); v.to_smash }
48
48
  attribute :template_url, String
@@ -8,8 +8,8 @@ module Miasma
8
8
  class Message < Types::Data
9
9
  attribute :origin, Queue, :required => true
10
10
  attribute :content, String, :required => true
11
- attribute :created, Time
12
- attribute :updated, Time
11
+ attribute :created, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
12
+ attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
13
13
  attribute :timeout, Integer
14
14
  end
15
15
 
@@ -19,8 +19,8 @@ module Miasma
19
19
  end
20
20
 
21
21
  attribute :name, String, :required => true
22
- attribute :created, Time, :required => true
23
- attribute :updated, Time
22
+ attribute :created, Time, :required => true, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
23
+ attribute :updated, Time, :coerce => lambda { |v| Time.parse(v.to_s).localtime }
24
24
  attribute :maximum_message_size, Integer
25
25
  attribute :messages_available, Integer
26
26
 
@@ -6,7 +6,7 @@ module Miasma
6
6
  # Abstract bucket
7
7
  class Bucket < Types::Model
8
8
  attribute :name, String, :required => true
9
- attribute :created, Time, :coerce => lambda { |t| Time.parse(t.to_s) }
9
+ attribute :created, Time, :coerce => lambda { |t| Time.parse(t.to_s).localtime }
10
10
  attribute :metadata, Smash, :coerce => lambda { |o| o.to_smash }
11
11
 
12
12
  # @return [Files]
@@ -48,7 +48,7 @@ module Miasma
48
48
  attribute :content_disposition, String
49
49
  attribute :content_encoding, String
50
50
  attribute :etag, String
51
- attribute :updated, Time, :coerce => lambda { |t| Time.parse(t.to_s) }
51
+ attribute :updated, Time, :coerce => lambda { |t| Time.parse(t.to_s).localtime }
52
52
  attribute :size, Integer
53
53
  attribute :metadata, Smash, :coerce => lambda { |o| o.to_smash }
54
54
 
@@ -1,4 +1,4 @@
1
1
  module Miasma
2
2
  # current library version
3
- VERSION = Gem::Version.new("0.3.6")
3
+ VERSION = Gem::Version.new("0.3.8")
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miasma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Roberts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-08 00:00:00.000000000 Z
11
+ date: 2019-08-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -243,8 +243,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  - !ruby/object:Gem::Version
244
244
  version: '0'
245
245
  requirements: []
246
- rubyforge_project:
247
- rubygems_version: 2.7.6
246
+ rubygems_version: 3.0.3
248
247
  signing_key:
249
248
  specification_version: 4
250
249
  summary: Smoggy API