rollout-ui 0.8.2 → 0.9.1
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/.github/workflows/release.yml +10 -3
- data/.github/workflows/test.yml +2 -2
- data/README.md +14 -2
- data/config.ru +6 -2
- data/lib/rollout/ui/version.rb +1 -1
- data/lib/rollout/ui/web.rb +3 -3
- data/rollout-ui.gemspec +3 -1
- metadata +39 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e63cbca0b53def021d093e24434d1c3857515164a82f92878f0b832c09b7319a
|
|
4
|
+
data.tar.gz: 05a822fb2f9ed0e8032681e255fc981dfa70d23f2e061bec5bf59bad6c54f722
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3472089c2fe218f5c1bc35911a15239ed79e3c243d91903d2c04f53d09e816893dc2f841ad7d287d7debece8b53d77d39a3b725db27f0f92039cea8959a01db7
|
|
7
|
+
data.tar.gz: 3844e1d841186b55edb5757f92e3cb48c517ba94beb26c06dcc97ea4ebbe1af44665aed0e882dc61584113dd52ca44aeeef28118a9e49e7c943adbc5a8e5f89a
|
|
@@ -23,7 +23,7 @@ jobs:
|
|
|
23
23
|
--health-retries 5
|
|
24
24
|
steps:
|
|
25
25
|
- name: Checkout code
|
|
26
|
-
uses: actions/checkout@
|
|
26
|
+
uses: actions/checkout@v6
|
|
27
27
|
with:
|
|
28
28
|
persist-credentials: false
|
|
29
29
|
- name: Setup Ruby
|
|
@@ -34,10 +34,17 @@ jobs:
|
|
|
34
34
|
run: bundle exec rspec
|
|
35
35
|
- name: Release to RubyGems
|
|
36
36
|
uses: rubygems/release-gem@v1
|
|
37
|
+
|
|
38
|
+
github-release:
|
|
39
|
+
needs: release
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
permissions:
|
|
42
|
+
contents: write
|
|
43
|
+
steps:
|
|
37
44
|
- name: Create GitHub Release
|
|
38
|
-
uses: softprops/action-gh-release@
|
|
45
|
+
uses: softprops/action-gh-release@v3
|
|
39
46
|
with:
|
|
40
|
-
tag_name: ${{ github.
|
|
47
|
+
tag_name: ${{ github.ref_name }}
|
|
41
48
|
name: ${{ github.ref_name }}
|
|
42
49
|
generate_release_notes: true
|
|
43
50
|
draft: false
|
data/.github/workflows/test.yml
CHANGED
|
@@ -23,10 +23,10 @@ jobs:
|
|
|
23
23
|
--health-retries 5
|
|
24
24
|
steps:
|
|
25
25
|
- name: Checkout code
|
|
26
|
-
uses: actions/checkout@
|
|
26
|
+
uses: actions/checkout@v6
|
|
27
27
|
- name: Setup Ruby
|
|
28
28
|
uses: ruby/setup-ruby@v1
|
|
29
29
|
with:
|
|
30
30
|
bundler-cache: true
|
|
31
31
|
- name: Run tests
|
|
32
|
-
run: bundle exec rspec
|
|
32
|
+
run: bundle exec rspec
|
data/README.md
CHANGED
|
@@ -12,9 +12,13 @@ you can just mount as a Rack app and it will just work.
|
|
|
12
12
|
Add it to your application's Gemfile:
|
|
13
13
|
|
|
14
14
|
```ruby
|
|
15
|
-
gem
|
|
15
|
+
gem "rollout", "~> 3.1"
|
|
16
|
+
gem "rollout-redis-adapter", "~> 0.1"
|
|
17
|
+
gem "rollout-ui"
|
|
16
18
|
```
|
|
17
19
|
|
|
20
|
+
`rollout-ui` 0.9+ requires Rollout 3.1 and does not support Rollout 2.x. The UI is backend-neutral: applications using Redis should add `rollout-redis-adapter` and pass a configured Rollout instance into the UI.
|
|
21
|
+
|
|
18
22
|
Mount it
|
|
19
23
|
|
|
20
24
|
```ruby
|
|
@@ -73,7 +77,15 @@ To get the most out of **rollout-ui**, we recommend you to turn on logging
|
|
|
73
77
|
on your rollout instance to see history of changes in the UI.
|
|
74
78
|
|
|
75
79
|
```ruby
|
|
76
|
-
|
|
80
|
+
require "redis"
|
|
81
|
+
require "rollout"
|
|
82
|
+
require "rollout/adapters/redis"
|
|
83
|
+
|
|
84
|
+
$redis = Redis.new
|
|
85
|
+
$rollout = Rollout.new(
|
|
86
|
+
adapter: Rollout::Adapters::Redis.new($redis),
|
|
87
|
+
logging: { history_length: 100, global: true },
|
|
88
|
+
)
|
|
77
89
|
```
|
|
78
90
|
|
|
79
91
|
To also see who updated states of your rollouts, you can configure `actor` and
|
data/config.ru
CHANGED
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
require_relative 'lib/rollout/ui'
|
|
4
4
|
require 'redis'
|
|
5
|
+
require 'rollout/adapters/redis'
|
|
5
6
|
|
|
6
7
|
redis_host = ENV.fetch('REDIS_HOST', 'localhost')
|
|
7
8
|
redis_port = ENV.fetch('REDIS_PORT', '6379')
|
|
8
9
|
redis_db = ENV.fetch('REDIS_DB', '10')
|
|
9
10
|
|
|
10
|
-
redis = Redis.new(host: redis_host, port: redis_port, db: redis_db)
|
|
11
|
-
rollout = Rollout.new(
|
|
11
|
+
redis = ::Redis.new(host: redis_host, port: redis_port, db: redis_db)
|
|
12
|
+
rollout = Rollout.new(
|
|
13
|
+
adapter: Rollout::Adapters::Redis.new(redis),
|
|
14
|
+
logging: { history_length: 100, global: true },
|
|
15
|
+
)
|
|
12
16
|
|
|
13
17
|
%i[employees developers subscribers].each do |group|
|
|
14
18
|
rollout.define_group(group) { }
|
data/lib/rollout/ui/version.rb
CHANGED
data/lib/rollout/ui/web.rb
CHANGED
|
@@ -60,8 +60,8 @@ module Rollout::UI
|
|
|
60
60
|
if params[:users]
|
|
61
61
|
feature.users = params[:users].split(',').map(&:strip).uniq.sort
|
|
62
62
|
end
|
|
63
|
-
feature.data
|
|
64
|
-
feature.data
|
|
63
|
+
feature.data["description"] = params[:description]
|
|
64
|
+
feature.data["updated_at"] = Time.now.to_i
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
67
|
|
|
@@ -75,7 +75,7 @@ module Rollout::UI
|
|
|
75
75
|
with_rollout_context(rollout, actor: actor) do
|
|
76
76
|
rollout.with_feature(params[:feature_name]) do |feature|
|
|
77
77
|
feature.percentage = params[:percentage].to_f.clamp(0.0, 100.0)
|
|
78
|
-
feature.data
|
|
78
|
+
feature.data["updated_at"] = Time.now.to_i
|
|
79
79
|
end
|
|
80
80
|
end
|
|
81
81
|
|
data/rollout-ui.gemspec
CHANGED
|
@@ -22,10 +22,12 @@ 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', '
|
|
25
|
+
spec.add_dependency 'rollout', '>= 3.1', '< 4'
|
|
26
26
|
spec.add_dependency 'sinatra', ['>= 2.0', '< 5.0']
|
|
27
27
|
spec.add_dependency 'sinatra-contrib', ['>= 2.0', '< 5.0']
|
|
28
28
|
|
|
29
|
+
spec.add_development_dependency 'rollout-redis-adapter', '~> 0.1'
|
|
30
|
+
spec.add_development_dependency 'redis-namespace'
|
|
29
31
|
spec.add_development_dependency 'bundler', '>= 1.17'
|
|
30
32
|
spec.add_development_dependency 'rake'
|
|
31
33
|
spec.add_development_dependency 'rspec', '~> 3.13'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rollout-ui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- FetLife
|
|
@@ -13,16 +13,22 @@ dependencies:
|
|
|
13
13
|
name: rollout
|
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
|
15
15
|
requirements:
|
|
16
|
-
- - "
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '3.1'
|
|
19
|
+
- - "<"
|
|
17
20
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '
|
|
21
|
+
version: '4'
|
|
19
22
|
type: :runtime
|
|
20
23
|
prerelease: false
|
|
21
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
25
|
requirements:
|
|
23
|
-
- - "
|
|
26
|
+
- - ">="
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '3.1'
|
|
29
|
+
- - "<"
|
|
24
30
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '
|
|
31
|
+
version: '4'
|
|
26
32
|
- !ruby/object:Gem::Dependency
|
|
27
33
|
name: sinatra
|
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -63,6 +69,34 @@ dependencies:
|
|
|
63
69
|
- - "<"
|
|
64
70
|
- !ruby/object:Gem::Version
|
|
65
71
|
version: '5.0'
|
|
72
|
+
- !ruby/object:Gem::Dependency
|
|
73
|
+
name: rollout-redis-adapter
|
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
|
75
|
+
requirements:
|
|
76
|
+
- - "~>"
|
|
77
|
+
- !ruby/object:Gem::Version
|
|
78
|
+
version: '0.1'
|
|
79
|
+
type: :development
|
|
80
|
+
prerelease: false
|
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
82
|
+
requirements:
|
|
83
|
+
- - "~>"
|
|
84
|
+
- !ruby/object:Gem::Version
|
|
85
|
+
version: '0.1'
|
|
86
|
+
- !ruby/object:Gem::Dependency
|
|
87
|
+
name: redis-namespace
|
|
88
|
+
requirement: !ruby/object:Gem::Requirement
|
|
89
|
+
requirements:
|
|
90
|
+
- - ">="
|
|
91
|
+
- !ruby/object:Gem::Version
|
|
92
|
+
version: '0'
|
|
93
|
+
type: :development
|
|
94
|
+
prerelease: false
|
|
95
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
96
|
+
requirements:
|
|
97
|
+
- - ">="
|
|
98
|
+
- !ruby/object:Gem::Version
|
|
99
|
+
version: '0'
|
|
66
100
|
- !ruby/object:Gem::Dependency
|
|
67
101
|
name: bundler
|
|
68
102
|
requirement: !ruby/object:Gem::Requirement
|