remocon 0.4.4 → 0.5.0

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
  SHA1:
3
- metadata.gz: af27db310efe9e1ec7f5ba010995586cae68f52f
4
- data.tar.gz: 2d0254dc901b4de726806bf3fbe7998fd6182339
3
+ metadata.gz: c1c723a770c1ede6759e801b8e4e96ef13cd338f
4
+ data.tar.gz: c6becabe68044bab72fd31370b556143c6dee11c
5
5
  SHA512:
6
- metadata.gz: 86d802f538b56817dcabb8a49d0f3060463c4e78c359fdcf0c68613e4605e973dbc86193943453bbe44a45e7f23089e3a08a18b6abb54fc6b700c64ca3a92657
7
- data.tar.gz: 0ff0e1bd2e61e1011b03c5aba46ba0948451498cba8290e10844d0516fa35510c912b7d537ee9398d653422a04f79cd50b41f8c5dd633433d76d0e489826bfd6
6
+ metadata.gz: 19cfba1db8ce6a06417f2a93b922279056c170368ab07e76dec40b3a86b6ef2586241e67bb79960c70a3a2ab900ac306623c15c01294fe458eeba8d164c61c36
7
+ data.tar.gz: 6a81643a00d8d747a8d8c9c254a793560b34bb479843e40068f143f38e951ebe99f6c8acc6d0fed4d096b506cb98f09f201dd8a970e72566f2f0cb4a5a4d8f34
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remocon (0.4.4)
4
+ remocon (0.5.0)
5
5
  activesupport
6
6
  googleauth
7
7
  thor
data/README.md CHANGED
@@ -9,6 +9,9 @@ The goal of this gem is Remote Config as a Code. :)
9
9
 
10
10
  If you'd like to use this on CircleCI, you can use https://github.com/jmatsu/remocon-starter-kit .
11
11
 
12
+ NOTE:
13
+ v0.4.4 and lower versions contain serious bugs. Please use 0.5.0 or greater, sorry.
14
+
12
15
  ## Usage
13
16
 
14
17
  ### Get your access token
@@ -55,14 +55,14 @@ module Remocon
55
55
  unchanged_conditions, added_conditions, changed_conditions, = conditions_diff(left.conditions_to_be_compared, conditions)
56
56
  unchanged_parameters, added_parameters, changed_parameters, = parameters_diff(left.parameters_to_be_compared, parameters)
57
57
 
58
- conditions_yaml = JSON.parse(sort_conditions(unchanged_conditions + added_conditions + changed_conditions).to_json).to_yaml
59
- parameters_yaml = JSON.parse(sort_parameters(unchanged_parameters.merge(added_parameters).merge(changed_parameters)).to_json).to_yaml
58
+ conditions_array = JSON.parse(sort_conditions(unchanged_conditions + added_conditions + changed_conditions).to_json)
59
+ parameters_hash = JSON.parse(sort_parameters(unchanged_parameters.merge(added_parameters).merge(changed_parameters)).to_json)
60
60
  else
61
- conditions_yaml = JSON.parse(sort_conditions(Remocon::ConditionFileDumper.new(conditions).dump).to_json).to_yaml
62
- parameters_yaml = JSON.parse(sort_parameters(Remocon::ParameterFileDumper.new(parameters).dump).to_json).to_yaml
61
+ conditions_array = JSON.parse(sort_conditions(Remocon::ConditionFileDumper.new(conditions).dump).to_json)
62
+ parameters_hash = JSON.parse(sort_parameters(Remocon::ParameterFileDumper.new(parameters).dump).to_json)
63
63
  end
64
64
 
65
- write_to_files(conditions_yaml, parameters_yaml, etag)
65
+ write_to_files(conditions_array, parameters_hash, etag)
66
66
  end
67
67
 
68
68
  def conditions_diff(left, right)
@@ -132,19 +132,19 @@ module Remocon
132
132
 
133
133
  private
134
134
 
135
- def write_to_files(conditions_yaml, parameters_yaml, etag)
135
+ def write_to_files(conditions_array, parameters_hash, etag)
136
136
  File.open(config.conditions_file_path, "w+") do |f|
137
- f.write(conditions_yaml)
137
+ f.write(conditions_array.to_yaml)
138
138
  f.flush
139
139
  end
140
140
 
141
141
  File.open(config.parameters_file_path, "w+") do |f|
142
- f.write(parameters_yaml)
142
+ f.write(parameters_hash.to_yaml)
143
143
  f.flush
144
144
  end
145
145
 
146
146
  File.open(config.config_json_file_path, "w+") do |f|
147
- f.write(JSON.pretty_generate({ conditions: conditions_yaml, parameters: parameters_yaml }))
147
+ f.write(JSON.pretty_generate({ conditions: conditions_array, parameters: parameters_hash }))
148
148
  f.flush
149
149
  end
150
150
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Remocon
4
- VERSION = "0.4.4"
4
+ VERSION = "0.5.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remocon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jumpei Matsuda