flipside 0.3.1 → 0.3.3
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/CHANGELOG.md +8 -1
- data/README.md +1 -1
- data/lib/flipside/feature_presenter.rb +10 -0
- data/lib/flipside/version.rb +1 -1
- data/lib/flipside/views/_toggle_button.erb +1 -3
- data/lib/flipside/views/show.erb +8 -2
- data/lib/flipside/web.rb +5 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1bae223d284c0485444acb094ff4b10b6408e454c4906d00a22fc7ebd4861ef
|
4
|
+
data.tar.gz: 6df03049c53ded14ecdbc6106c9a78031e4c3a0f7bef9bc2abeef901a07c40c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f81d8c85096df462fa7143a01587a36b8cf74a7ccf528dc52257653ec93a8cd4e24bd8d302cae9f963eb26f4c25cd369ac4d32b64713de7d9c784a861bd12b26
|
7
|
+
data.tar.gz: 41c355c419cf5dbb4baa33d85a17030d22a1cca4f4a90aade2094eedaefe33099c52d7c165f81e67f5bfcfb2b2744970530bedcdb904246a35dffa56896450da
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,11 @@
|
|
1
|
-
## [0.3.
|
1
|
+
## [0.3.3] - 2025-08-21
|
2
|
+
- Move gem ownership
|
3
|
+
|
4
|
+
## [0.3.2] - 2025-05-28
|
5
|
+
- Add button to delete a feature
|
6
|
+
- Make switch light blue when feature is partially enabled
|
7
|
+
|
8
|
+
## [0.3.1] - 2025-05-15
|
2
9
|
- Remove dependency on sinatra
|
3
10
|
|
4
11
|
## [0.3.0] - 2025-05-14
|
data/README.md
CHANGED
@@ -242,7 +242,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
242
242
|
|
243
243
|
## Contributing
|
244
244
|
|
245
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
245
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/apoex/flipside.
|
246
246
|
|
247
247
|
## License
|
248
248
|
|
@@ -28,6 +28,16 @@ class FeaturePresenter
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
def switch_color
|
32
|
+
return "bg-blue-700" if feature.enabled
|
33
|
+
|
34
|
+
if (feature.entities.count + feature.roles.count) > 0
|
35
|
+
"bg-blue-300"
|
36
|
+
else
|
37
|
+
"bg-gray-200"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
31
41
|
def activated_at
|
32
42
|
feature.activated_at&.strftime("%Y-%m-%d %H:%M")
|
33
43
|
end
|
data/lib/flipside/version.rb
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
<% color = feature.enabled ? "bg-blue-700" : "bg-gray-200" %>
|
2
1
|
<% translate = feature.enabled ? "translate-x-5" : "translate-x-0" %>
|
3
|
-
<%# FIXME: How to prevent clicking the submit button from propageting? E.g. link navigation on index page. %>
|
4
2
|
|
5
3
|
<form action="<%= feature_path(feature, "toggle") %>" method="post">
|
6
4
|
<input type="hidden" name="_method" value="put" />
|
7
5
|
<button type="submit"
|
8
|
-
class="relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent <%=
|
6
|
+
class="relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent <%= feature.switch_color %>"
|
9
7
|
>
|
10
8
|
<span aria-hidden="true" class="pointer-events-none inline-block size-5 <%= translate %> transform rounded-full bg-white shadow"></span>
|
11
9
|
</button>
|
data/lib/flipside/views/show.erb
CHANGED
@@ -7,13 +7,19 @@
|
|
7
7
|
<div class="mt-2 flex justify-between items-center">
|
8
8
|
<span class="font-semibold">Name:</span>
|
9
9
|
<span class="font-bold text-lg text-slate-300"><%= feature.name %></span>
|
10
|
+
<span>
|
11
|
+
<form action="<%= feature_path(feature) %>" method="post" onsubmit="return confirm('Are you sure you want to delete this feature?')">
|
12
|
+
<input type="hidden" name="_method" value="delete" />
|
13
|
+
<button type="submit" class="px-2 py-1 rounded-lg bg-amber-800 text-xl text-slate-400 border border-amber-950 hover:bg-amber-900">Delete</button>
|
14
|
+
</form>
|
15
|
+
</span>
|
10
16
|
</div>
|
11
17
|
<div class="mt-2 flex justify-between items-center text-center" data-controller="inline-edit">
|
12
18
|
<div class="font-semibold">Description:</div>
|
13
|
-
<div data-inline-edit-target="read"><%= feature.description %></div>
|
19
|
+
<div class="-ml-6" data-inline-edit-target="read"><%= feature.description %></div>
|
14
20
|
<div class="ml-2 " data-inline-edit-target="read">
|
15
21
|
<button
|
16
|
-
class="px-
|
22
|
+
class="px-5 py-1 rounded-lg bg-blue-900 text-xl text-slate-400 border border-blue-950 hover:bg-blue-800"
|
17
23
|
data-action="inline-edit#edit" >
|
18
24
|
Edit
|
19
25
|
</button>
|
data/lib/flipside/web.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sammy Henningsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -167,13 +167,13 @@ files:
|
|
167
167
|
- lib/flipside/web.rb
|
168
168
|
- lib/generators/flipside/install/install_generator.rb
|
169
169
|
- lib/generators/flipside/install/templates/20241122_create_flipside_migration.rb
|
170
|
-
homepage: https://github.com/
|
170
|
+
homepage: https://github.com/apoex/flipside
|
171
171
|
licenses:
|
172
172
|
- MIT
|
173
173
|
metadata:
|
174
|
-
homepage_uri: https://github.com/
|
175
|
-
source_code_uri: https://github.com/
|
176
|
-
changelog_uri: https://github.com/
|
174
|
+
homepage_uri: https://github.com/apoex/flipside
|
175
|
+
source_code_uri: https://github.com/apoex/flipside
|
176
|
+
changelog_uri: https://github.com/apoex/flipside/blob/main/CHANGELOG.md
|
177
177
|
post_install_message:
|
178
178
|
rdoc_options: []
|
179
179
|
require_paths:
|