rollout-ui 0.5.3 → 0.7.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 +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/README.md +1 -1
- data/lib/rollout/ui/config.rb +12 -2
- data/lib/rollout/ui/version.rb +1 -1
- data/lib/rollout/ui/views/features/index.slim +1 -1
- data/lib/rollout/ui/views/features/partials/event_log.slim +9 -9
- data/rollout-ui.gemspec +8 -7
- metadata +47 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ff86241a71a40f4c2300c7ba47119d6cc6e18aa1e1b3c68fb4d5b587daac0d7
|
4
|
+
data.tar.gz: 7b6ca985c2d7f31e8f436bca041c180d1a89a0bd80586ce8a916860a08b8a937
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 675cc0df4e5079e5d3b619a06ae44ef0cd703ef029ba0892d663ff3889fdde4955ecd2b44807d829e1bc9cb078b417b19cf26ae52e02fe6183aeced63820241d
|
7
|
+
data.tar.gz: 449b29ebeb854d4764c29947db9f84009e4e88e6d32db8bd3bed43dc58c72e58311d5eb47da885cdbe5d7864e96919a8be5840bf8fe22ebdf49aaf75d38d2e41
|
data/.gitignore
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.
|
1
|
+
3.3.0
|
data/README.md
CHANGED
@@ -104,7 +104,7 @@ And visit [http://localhost:9292/](http://localhost:9292/).
|
|
104
104
|
Alternatively you can also configure which Redis with:
|
105
105
|
|
106
106
|
```sh
|
107
|
-
REDIS_HOST=localhost REDIS_PORT=6379 REDIS_DB=10
|
107
|
+
REDIS_HOST=localhost REDIS_PORT=6379 REDIS_DB=10 bundle exec rerun rackup
|
108
108
|
```
|
109
109
|
|
110
110
|
## License
|
data/lib/rollout/ui/config.rb
CHANGED
@@ -9,14 +9,21 @@ module Rollout::UI
|
|
9
9
|
instance
|
10
10
|
actor
|
11
11
|
actor_url
|
12
|
+
timestamp_format
|
12
13
|
].freeze
|
13
14
|
|
15
|
+
DEFAULT_VALUES = {
|
16
|
+
timestamp_format: '%Y-%m-%d %H:%M %Z'
|
17
|
+
}.freeze
|
18
|
+
|
14
19
|
KEYS.each do |key|
|
15
20
|
define_method(key) do |&block|
|
16
21
|
@blocks ||= {}
|
17
22
|
|
18
23
|
if block
|
19
24
|
@blocks[key] = block
|
25
|
+
elsif DEFAULT_VALUES.key?(key)
|
26
|
+
DEFAULT_VALUES[key]
|
20
27
|
else
|
21
28
|
raise ArgumentError, "#{key}: block is required"
|
22
29
|
end
|
@@ -29,7 +36,10 @@ module Rollout::UI
|
|
29
36
|
@blocks ||= {}
|
30
37
|
block = @blocks[key]
|
31
38
|
|
32
|
-
|
39
|
+
if block.nil?
|
40
|
+
return DEFAULT_VALUES[key] if DEFAULT_VALUES.key?(key)
|
41
|
+
return nil
|
42
|
+
end
|
33
43
|
|
34
44
|
if scope
|
35
45
|
scope.instance_eval(&block)
|
@@ -39,7 +49,7 @@ module Rollout::UI
|
|
39
49
|
end
|
40
50
|
|
41
51
|
def defined?(key)
|
42
|
-
|
52
|
+
(@blocks&.key?(key)) || DEFAULT_VALUES.key?(key)
|
43
53
|
end
|
44
54
|
end
|
45
55
|
end
|
data/lib/rollout/ui/version.rb
CHANGED
@@ -42,7 +42,7 @@ h2.font-semibold.text-xl.text-gray-500.pt-12.flex.items-center
|
|
42
42
|
= feature.users.count
|
43
43
|
- if @rollout.respond_to?(:logging)
|
44
44
|
td.py-2.whitespace-no-wrap
|
45
|
-
= time_ago(@rollout.logging.updated_at(feature_name))
|
45
|
+
span title=@rollout.logging.updated_at(feature_name).strftime(Rollout::UI.config.timestamp_format) = 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
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%?')")
|
@@ -7,22 +7,22 @@
|
|
7
7
|
.w-8.h-1.bg-gray-300.my-10
|
8
8
|
|
9
9
|
.overflow-auto.scrolling-touch
|
10
|
-
table.text-sm.w-100.text-left.w-full
|
10
|
+
table.text-sm.w-100.text-left.w-full.table-fixed
|
11
11
|
- if show_header
|
12
12
|
thead.font-semibold.text-gray-600.border-b.border-gray-200
|
13
13
|
- if show_feature
|
14
|
-
th.pb-2.pr-3 Feature
|
15
|
-
th.pb-2.pr-3 Action
|
16
|
-
th.pl-2
|
14
|
+
th.pb-2.pr-3.w-1/6 Feature
|
15
|
+
th.pb-2.pr-3.w-2/3 Action
|
16
|
+
th.pl-2.w-1/6
|
17
17
|
|
18
18
|
tbody.text-gray-600.border-t.border-gray-200
|
19
19
|
- events.each do |event|
|
20
20
|
tr.border-b.border-gray-200
|
21
21
|
- if show_feature
|
22
|
-
td.py-2.whitespace-no-wrap
|
22
|
+
td.py-2.whitespace-no-wrap.w-1/6
|
23
23
|
a.text-blue-600(href=feature_path(event.feature) class='hover:text-blue-700 hover:underline')
|
24
24
|
= event.feature
|
25
|
-
td.py-2.pr-3.whitespace-
|
25
|
+
td.py-2.pr-3.whitespace-normal.w-2/3
|
26
26
|
- if event.name == "update"
|
27
27
|
- if event.context && event.context[:actor]
|
28
28
|
- if config.defined?(:actor_url)
|
@@ -32,7 +32,7 @@
|
|
32
32
|
' #{event.context[:actor]}
|
33
33
|
- else
|
34
34
|
' unidentified user
|
35
|
-
- changes = event.data.fetch(:before).keys.map do |key|
|
35
|
+
- changes = event.data.fetch(:before).keys.reject { |key| key.to_s == 'data.updated_at' }.map do |key|
|
36
36
|
- before = format_change_value(event.data.fetch(:before).fetch(key))
|
37
37
|
- after = format_change_value(event.data.fetch(:after).fetch(key))
|
38
38
|
- "#{format_change_key(key)} from #{before} to #{after}"
|
@@ -42,5 +42,5 @@
|
|
42
42
|
- else
|
43
43
|
= event.data
|
44
44
|
|
45
|
-
td.
|
46
|
-
= time_ago(event.created_at)
|
45
|
+
td.py-2.text-right.whitespace-nowrap.pl-3.w-1/6
|
46
|
+
span title=event.created_at.strftime(Rollout::UI.config.timestamp_format) = time_ago(event.created_at)
|
data/rollout-ui.gemspec
CHANGED
@@ -22,16 +22,17 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
|
-
spec.add_dependency 'rollout', '~> 2.
|
26
|
-
spec.add_dependency 'sinatra', '
|
27
|
-
spec.add_dependency 'sinatra-contrib', '
|
28
|
-
spec.add_dependency 'slim', ['>= 3.0', '<
|
25
|
+
spec.add_dependency 'rollout', '~> 2.6'
|
26
|
+
spec.add_dependency 'sinatra', ['>= 2.0', '< 5.0']
|
27
|
+
spec.add_dependency 'sinatra-contrib', ['>= 2.0', '< 5.0']
|
28
|
+
spec.add_dependency 'slim', ['>= 3.0', '< 6.0']
|
29
29
|
|
30
30
|
spec.add_development_dependency 'bundler', '>= 1.17'
|
31
|
-
spec.add_development_dependency 'rake'
|
32
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
33
|
-
spec.add_development_dependency 'rerun', '~> 0.
|
31
|
+
spec.add_development_dependency 'rake'
|
32
|
+
spec.add_development_dependency 'rspec', '~> 3.13'
|
33
|
+
spec.add_development_dependency 'rerun', '~> 0.14'
|
34
34
|
spec.add_development_dependency 'rack-test'
|
35
|
+
spec.add_development_dependency 'rackup'
|
35
36
|
spec.add_development_dependency 'puma'
|
36
37
|
spec.add_development_dependency 'pry'
|
37
38
|
end
|
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.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FetLife
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rollout
|
@@ -16,42 +16,54 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.6'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sinatra
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '2.0'
|
34
|
+
- - "<"
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: '5.0'
|
34
37
|
type: :runtime
|
35
38
|
prerelease: false
|
36
39
|
version_requirements: !ruby/object:Gem::Requirement
|
37
40
|
requirements:
|
38
|
-
- - "
|
41
|
+
- - ">="
|
39
42
|
- !ruby/object:Gem::Version
|
40
43
|
version: '2.0'
|
44
|
+
- - "<"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '5.0'
|
41
47
|
- !ruby/object:Gem::Dependency
|
42
48
|
name: sinatra-contrib
|
43
49
|
requirement: !ruby/object:Gem::Requirement
|
44
50
|
requirements:
|
45
|
-
- - "
|
51
|
+
- - ">="
|
46
52
|
- !ruby/object:Gem::Version
|
47
|
-
version: '2.
|
53
|
+
version: '2.0'
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '5.0'
|
48
57
|
type: :runtime
|
49
58
|
prerelease: false
|
50
59
|
version_requirements: !ruby/object:Gem::Requirement
|
51
60
|
requirements:
|
52
|
-
- - "
|
61
|
+
- - ">="
|
53
62
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
63
|
+
version: '2.0'
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '5.0'
|
55
67
|
- !ruby/object:Gem::Dependency
|
56
68
|
name: slim
|
57
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -61,7 +73,7 @@ dependencies:
|
|
61
73
|
version: '3.0'
|
62
74
|
- - "<"
|
63
75
|
- !ruby/object:Gem::Version
|
64
|
-
version: '
|
76
|
+
version: '6.0'
|
65
77
|
type: :runtime
|
66
78
|
prerelease: false
|
67
79
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -71,7 +83,7 @@ dependencies:
|
|
71
83
|
version: '3.0'
|
72
84
|
- - "<"
|
73
85
|
- !ruby/object:Gem::Version
|
74
|
-
version: '
|
86
|
+
version: '6.0'
|
75
87
|
- !ruby/object:Gem::Dependency
|
76
88
|
name: bundler
|
77
89
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,44 +102,44 @@ dependencies:
|
|
90
102
|
name: rake
|
91
103
|
requirement: !ruby/object:Gem::Requirement
|
92
104
|
requirements:
|
93
|
-
- - "
|
105
|
+
- - ">="
|
94
106
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
107
|
+
version: '0'
|
96
108
|
type: :development
|
97
109
|
prerelease: false
|
98
110
|
version_requirements: !ruby/object:Gem::Requirement
|
99
111
|
requirements:
|
100
|
-
- - "
|
112
|
+
- - ">="
|
101
113
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
114
|
+
version: '0'
|
103
115
|
- !ruby/object:Gem::Dependency
|
104
116
|
name: rspec
|
105
117
|
requirement: !ruby/object:Gem::Requirement
|
106
118
|
requirements:
|
107
119
|
- - "~>"
|
108
120
|
- !ruby/object:Gem::Version
|
109
|
-
version: '3.
|
121
|
+
version: '3.13'
|
110
122
|
type: :development
|
111
123
|
prerelease: false
|
112
124
|
version_requirements: !ruby/object:Gem::Requirement
|
113
125
|
requirements:
|
114
126
|
- - "~>"
|
115
127
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
128
|
+
version: '3.13'
|
117
129
|
- !ruby/object:Gem::Dependency
|
118
130
|
name: rerun
|
119
131
|
requirement: !ruby/object:Gem::Requirement
|
120
132
|
requirements:
|
121
133
|
- - "~>"
|
122
134
|
- !ruby/object:Gem::Version
|
123
|
-
version: '0.
|
135
|
+
version: '0.14'
|
124
136
|
type: :development
|
125
137
|
prerelease: false
|
126
138
|
version_requirements: !ruby/object:Gem::Requirement
|
127
139
|
requirements:
|
128
140
|
- - "~>"
|
129
141
|
- !ruby/object:Gem::Version
|
130
|
-
version: '0.
|
142
|
+
version: '0.14'
|
131
143
|
- !ruby/object:Gem::Dependency
|
132
144
|
name: rack-test
|
133
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,6 +154,20 @@ dependencies:
|
|
142
154
|
- - ">="
|
143
155
|
- !ruby/object:Gem::Version
|
144
156
|
version: '0'
|
157
|
+
- !ruby/object:Gem::Dependency
|
158
|
+
name: rackup
|
159
|
+
requirement: !ruby/object:Gem::Requirement
|
160
|
+
requirements:
|
161
|
+
- - ">="
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '0'
|
164
|
+
type: :development
|
165
|
+
prerelease: false
|
166
|
+
version_requirements: !ruby/object:Gem::Requirement
|
167
|
+
requirements:
|
168
|
+
- - ">="
|
169
|
+
- !ruby/object:Gem::Version
|
170
|
+
version: '0'
|
145
171
|
- !ruby/object:Gem::Dependency
|
146
172
|
name: puma
|
147
173
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
246
|
- !ruby/object:Gem::Version
|
221
247
|
version: '0'
|
222
248
|
requirements: []
|
223
|
-
rubygems_version: 3.
|
249
|
+
rubygems_version: 3.5.3
|
224
250
|
signing_key:
|
225
251
|
specification_version: 4
|
226
252
|
summary: ''
|