rollout-ui 0.5.1 → 0.5.3

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
  SHA256:
3
- metadata.gz: 23d80e49f2a5b8224f029c2f3345e19028947ae8e2db02c38240cb4b3a93b3a9
4
- data.tar.gz: 4e1bf428271120df8b39f797b43cdb0031539779dfac48a9d1d2d8e4e117c364
3
+ metadata.gz: 430208ab6c2c78a3dfefae45356c79cc7abbc5f17e40a40e7cd323600f047a34
4
+ data.tar.gz: 689a020b5bd39bc5c36c354c246fdced50256e1a6a2a36e7af5321914dbe69b8
5
5
  SHA512:
6
- metadata.gz: 0cb581a7d9caa5bf22d3fa404561dbbc221db7a39f0a85438a47c0033a293924c00484457e1fb5f11e995d8d1e61b7b8e2881eff094adad6265415aacd78d465
7
- data.tar.gz: 8f8acc759b488724625a5b2c5ac147523db44ccf0f3105b4a4418f74d5f43a52fb1a23772636ec5dab13f0006a3b70d41136525050e3256dc5659037173663e5
6
+ metadata.gz: ab080e881109763570dcc17ce0d057dd7701a46881e98e71d64b67d5e04a867719e5356731f462b6929b888feb2d74870d7dbe4121f0de44cc4999af44c0c594
7
+ data.tar.gz: 41503d04961b90420098b6da4d5cfcc9f8ad5691cf931e4b0f7e957ab95c914bbaa743a56224f03abe3fa86dd3c70e2ad4d7292ac4d5a195ec46864ab483ed57
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 3.1.2
1
+ 3.1.0
@@ -108,5 +108,9 @@ module Rollout::UI
108
108
  percentage: feature.percentage
109
109
  }
110
110
  end
111
+
112
+ def sanitized_name(feature_name)
113
+ Rack::Utils.escape_html(feature_name)
114
+ end
111
115
  end
112
116
  end
@@ -1,5 +1,5 @@
1
1
  class Rollout
2
2
  module UI
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.3"
4
4
  end
5
5
  end
@@ -45,13 +45,13 @@ h2.font-semibold.text-xl.text-gray-500.pt-12.flex.items-center
45
45
  = time_ago(@rollout.logging.updated_at(feature_name))
46
46
  td.flex.items-center.py-2.justify-end.whitespace-no-wrap.pl-3
47
47
  form action=activate_percentage_feature_path(feature_name, 100) method='POST'
48
- button.p-3.bg-gray-100.ml-1.rounded-sm.font-bold.leading-none.transition-colors.duration-150(class='hover:bg-gray-200' type='submit' onclick="return confirm('Are you sure you want activate #{feature_name} to 100%?')")
48
+ button.p-3.bg-gray-100.ml-1.rounded-sm.font-bold.leading-none.transition-colors.duration-150(class='hover:bg-gray-200' type='submit' onclick="return confirm('Are you sure you want activate #{sanitized_name(feature_name)} to 100%?')")
49
49
  ' 100%
50
50
  form action=activate_percentage_feature_path(feature_name, 0) method='POST'
51
- button.p-3.bg-gray-100.ml-1.rounded-sm.font-bold.leading-none.transition-colors.duration-150(class='hover:bg-gray-200' type='submit' onclick="return confirm('Are you sure you want activate #{feature_name} to 0%?')")
51
+ button.p-3.bg-gray-100.ml-1.rounded-sm.font-bold.leading-none.transition-colors.duration-150(class='hover:bg-gray-200' type='submit' onclick="return confirm('Are you sure you want activate #{sanitized_name(feature_name)} to 0%?')")
52
52
  ' 0%
53
53
  form action=delete_feature_path(feature_name) method='POST'
54
- button.p-3.bg-gray-100.ml-1.rounded-sm.font-bold.leading-none.transition-colors.duration-150(class='hover:bg-gray-200' type='submit' onclick="return confirm('Are you sure you want to delete #{feature_name}?')")
54
+ button.p-3.bg-gray-100.ml-1.rounded-sm.font-bold.leading-none.transition-colors.duration-150(class='hover:bg-gray-200' type='submit' onclick="return confirm('Are you sure you want to delete #{sanitized_name(feature_name)}?')")
55
55
  ' Delete
56
56
 
57
57
  - global_history_events = @rollout.respond_to?(:logging) ? @rollout.logging.global_events.reverse : []
@@ -63,7 +63,7 @@ main.p-6.bg-gray-100.max-w-lg.w-full.text-sm.rounded-sm
63
63
 
64
64
  .flex.items-center.justify-end
65
65
  form action=delete_feature_path(@feature.name) method='POST'
66
- button.mr-5.text-gray-600(class='hover:underline' type='submit' onclick="return confirm('Are you sure you want to delete #{@feature.name}?')")
66
+ button.mr-5.text-gray-600(class='hover:underline' type='submit' onclick="return confirm('Are you sure you want to delete #{sanitized_name(@feature.name)}?')")
67
67
  | Delete
68
68
  button.py-4.px-5.bg-gray-700.text-gray-200.rounded-sm.font-bold.leading-none.transition-colors.duration-200(
69
69
  type='submit'
@@ -50,7 +50,7 @@ module Rollout::UI
50
50
  rollout = config.get(:instance)
51
51
  actor = config.get(:actor, scope: self)
52
52
  feature_data = rollout.get(params[:feature_name]).data
53
- if feature_data['updated_at'] && params[:last_updated_at] != feature_data['updated_at']
53
+ if feature_data['updated_at'] && params[:last_updated_at].to_s != feature_data['updated_at'].to_s
54
54
  redirect "#{feature_path(params[:feature_name])}?error=Rollout version outdated. Review changes below and try again."
55
55
  end
56
56
  with_rollout_context(rollout, actor: actor) do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rollout-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - FetLife
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-16 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rollout
@@ -220,7 +220,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0'
222
222
  requirements: []
223
- rubygems_version: 3.3.21
223
+ rubygems_version: 3.4.6
224
224
  signing_key:
225
225
  specification_version: 4
226
226
  summary: ''