ffe 1.2.0 → 1.2.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e0ee9418e38992156676df623a03c624388ee2aeb1c379858fa05e654a4ecf4a
|
|
4
|
+
data.tar.gz: e966549f2ba914fee851dc66197b608697d0422d66783db56a1d2c3a46ad40ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 97f1f865bf1d40724241e48f2f4ae34fd7f90da9e066f258f0d1490045f3bd9f1a9a35e9d50245147f7b56a09b84ca6c9492168f5b3c561502ffad1558b79dc8
|
|
7
|
+
data.tar.gz: 0a62d490a388cd41775abaf14004afaaa61d2881e5b5ff170b9d0bac6086cce192f0e1654dcff6b07f7aa55637b84d731c300d991ea5059f189ca4b97338c82c
|
|
@@ -19,24 +19,37 @@ module Ffe
|
|
|
19
19
|
def create
|
|
20
20
|
@feature_flag = Ffe::FeatureFlag.new(feature_flag_params.except(:milieus, :clear_expires_at))
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
respond_to do |format|
|
|
23
|
+
if @feature_flag.save
|
|
24
|
+
format.html { redirect_to feature_flags_path, notice: 'FFE created.' }
|
|
25
|
+
format.turbo_stream { render turbo_stream: turbo_stream.prepend(:feature_flags, partial: 'ffe/feature_flags/feature_flag', locals: { feature_flag: @feature_flag }) } # rubocop:disable Layout/LineLength
|
|
26
|
+
format.json { render json: @feature_flag, status: :created }
|
|
27
|
+
else
|
|
28
|
+
format.html { render :new, status: :unprocessable_content }
|
|
29
|
+
format.json { render json: @feature_flag.errors, status: :unprocessable_content }
|
|
30
|
+
end
|
|
26
31
|
end
|
|
27
32
|
end
|
|
28
33
|
|
|
29
34
|
def update
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
respond_to do |format|
|
|
36
|
+
if @feature_flag.update(feature_flag_params.except(:milieus, :clear_expires_at))
|
|
37
|
+
format.html { redirect_to feature_flags_path, notice: 'FFE updated.' }
|
|
38
|
+
format.turbo_stream { render turbo_stream: turbo_stream.replace(ActionView::RecordIdentifier.dom_id(@feature_flag), partial: 'ffe/feature_flags/feature_flag', locals: { feature_flag: @feature_flag }) }
|
|
39
|
+
format.json { render json: @feature_flag, status: :ok }
|
|
40
|
+
else
|
|
41
|
+
format.html { render :edit, status: :unprocessable_content }
|
|
42
|
+
format.json { render json: @feature_flag.errors, status: :unprocessable_content }
|
|
43
|
+
end
|
|
34
44
|
end
|
|
35
45
|
end
|
|
36
46
|
|
|
37
47
|
def destroy
|
|
38
48
|
@feature_flag.destroy
|
|
39
|
-
|
|
49
|
+
respond_to do |format|
|
|
50
|
+
format.html { redirect_to feature_flags_path, notice: 'FFE destroyed.' }
|
|
51
|
+
format.turbo_stream { render turbo_stream: turbo_stream.remove(ActionView::RecordIdentifier.dom_id(@feature_flag)) }
|
|
52
|
+
end
|
|
40
53
|
end
|
|
41
54
|
|
|
42
55
|
def dump
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%# locals: (feature_flag:) %>
|
|
2
|
+
|
|
3
|
+
<tr id="<%= dom_id(feature_flag) %>">
|
|
4
|
+
<td><%= link_to feature_flag.name, ffe.feature_flag_path(feature_flag) %></td>
|
|
5
|
+
<td><%= feature_flag.description %></td>
|
|
6
|
+
<td><%= feature_flag.enabled %></td>
|
|
7
|
+
<td><%= feature_flag.expires_at&.strftime('%Y-%m-%dT%H:%M') %></td>
|
|
8
|
+
<td><%= feature_flag.readable_milieus %></td>
|
|
9
|
+
<td>
|
|
10
|
+
<%= link_to 'Bearbeiten', ffe.edit_feature_flag_path(feature_flag) %>
|
|
11
|
+
<%= button_to 'Löschen', ffe.feature_flag_path(feature_flag), method: :delete %>
|
|
12
|
+
</td>
|
|
13
|
+
</tr>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<h1>Feature Flags</h1>
|
|
2
2
|
|
|
3
|
-
<div><%= link_to 'Neues Feature Flag anlegen', new_feature_flag_path %></div>
|
|
4
|
-
<div><%= link_to 'dump', dump_feature_flags_path, download: 'feature_flags.json' %></div>
|
|
3
|
+
<div class="block"><%= link_to 'Neues Feature Flag anlegen', new_feature_flag_path %></div>
|
|
4
|
+
<div class="block"><%= link_to 'dump', dump_feature_flags_path, download: 'feature_flags.json' %></div>
|
|
5
5
|
|
|
6
6
|
<table>
|
|
7
7
|
<thead>
|
|
@@ -14,19 +14,9 @@
|
|
|
14
14
|
<th>Actions</th>
|
|
15
15
|
</tr>
|
|
16
16
|
</thead>
|
|
17
|
-
<tbody>
|
|
17
|
+
<tbody id="feature_flags">
|
|
18
18
|
<% @feature_flags.each do |feature_flag| %>
|
|
19
|
-
|
|
20
|
-
<td><%= link_to feature_flag.name, feature_flag_path(feature_flag) %></td>
|
|
21
|
-
<td><%= feature_flag.description %></td>
|
|
22
|
-
<td><%= feature_flag.enabled %></td>
|
|
23
|
-
<td><%= feature_flag.expires_at&.strftime('%Y-%m-%dT%H:%M') %></td>
|
|
24
|
-
<td><%= feature_flag.readable_milieus %></td>
|
|
25
|
-
<td>
|
|
26
|
-
<%= link_to 'Bearbeiten', edit_feature_flag_path(feature_flag) %>
|
|
27
|
-
<%= button_to 'Löschen', feature_flag_path(feature_flag), method: :delete %>
|
|
28
|
-
</td>
|
|
29
|
-
</tr>
|
|
19
|
+
<%= render 'feature_flag', feature_flag: feature_flag %>
|
|
30
20
|
<% end %>
|
|
31
21
|
</tbody>
|
|
32
22
|
</table>
|
data/lib/ffe/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ffe
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LeFnord
|
|
@@ -46,6 +46,7 @@ files:
|
|
|
46
46
|
- app/models/ffe/application_record.rb
|
|
47
47
|
- app/models/ffe/feature_flag.rb
|
|
48
48
|
- app/models/ffe/user.rb
|
|
49
|
+
- app/views/ffe/feature_flags/_feature_flag.html.erb
|
|
49
50
|
- app/views/ffe/feature_flags/_form.html.erb
|
|
50
51
|
- app/views/ffe/feature_flags/edit.html.erb
|
|
51
52
|
- app/views/ffe/feature_flags/index.html.erb
|
|
@@ -84,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
84
85
|
- !ruby/object:Gem::Version
|
|
85
86
|
version: '0'
|
|
86
87
|
requirements: []
|
|
87
|
-
rubygems_version: 4.0.
|
|
88
|
+
rubygems_version: 4.0.20
|
|
88
89
|
specification_version: 4
|
|
89
90
|
summary: A minimal Feature Flag Engine for Rails
|
|
90
91
|
test_files: []
|