flipper-ui 0.2.0.beta3 → 0.2.0.beta4
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/README.md +1 -2
- data/flipper-ui.gemspec +3 -3
- data/lib/flipper/ui/action.rb +3 -3
- data/lib/flipper/ui/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c6b60c4cfdeed04d8af27669bbf2cc1b3869568d
|
4
|
+
data.tar.gz: 67aa8ef924ba8a4dd3c7d6e0403b4ffcfe463264
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc9c905b98da029bb2127eb2415220993009dc04773d9ef49945c36c4cbc9c00b23215744b5499b92250c435934bb024695a20269e10e5dec2ac1c46f9f2f20e
|
7
|
+
data.tar.gz: 79fdbe0ca929a26268717b6d4e1ba2ccb2c743df3b2b73f6c6e7ce54eceefa755be143f18a3e54d120365c2e14e76ccf2f903dd76a1f0b25ab947b76d0229f83
|
data/README.md
CHANGED
@@ -57,8 +57,7 @@ Another example of a route constrain using the current_user when using Devise or
|
|
57
57
|
class CanAccessFlipperUI
|
58
58
|
def self.matches?(request)
|
59
59
|
current_user = request.env['warden'].user
|
60
|
-
|
61
|
-
return current_user.present? && current_user.respond_to?(:is_admin?) && current_user.is_admin?
|
60
|
+
current_user.present? && current_user.respond_to?(:admin?) && current_user.admin?
|
62
61
|
end
|
63
62
|
end
|
64
63
|
|
data/flipper-ui.gemspec
CHANGED
@@ -4,8 +4,8 @@ require File.expand_path('../lib/flipper/ui/version', __FILE__)
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.authors = ["John Nunemaker"]
|
6
6
|
gem.email = ["nunemaker@gmail.com"]
|
7
|
-
gem.summary =
|
8
|
-
gem.description =
|
7
|
+
gem.summary = "UI for the Flipper gem"
|
8
|
+
gem.description = "Rack middleware that provides a fully featured web interface for the flipper gem."
|
9
9
|
gem.license = "MIT"
|
10
10
|
gem.homepage = "https://github.com/jnunemaker/flipper-ui"
|
11
11
|
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = Flipper::UI::VERSION
|
18
18
|
|
19
|
-
gem.add_dependency 'rack', '~> 1.
|
19
|
+
gem.add_dependency 'rack', '~> 1.4', '< 1.7'
|
20
20
|
gem.add_dependency 'rack-protection', '~> 1.5.3'
|
21
21
|
gem.add_dependency 'flipper', '~> 0.7.0.beta1'
|
22
22
|
gem.add_dependency 'erubis', '~> 2.7.0'
|
data/lib/flipper/ui/action.rb
CHANGED
@@ -55,7 +55,7 @@ module Flipper
|
|
55
55
|
def initialize(flipper, request)
|
56
56
|
@flipper, @request = flipper, request
|
57
57
|
@code = 200
|
58
|
-
@headers = {}
|
58
|
+
@headers = {"Content-Type" => "text/plain"}
|
59
59
|
@breadcrumbs = []
|
60
60
|
end
|
61
61
|
|
@@ -99,7 +99,7 @@ module Flipper
|
|
99
99
|
#
|
100
100
|
# Returns a response.
|
101
101
|
def view_response(name)
|
102
|
-
header
|
102
|
+
header "Content-Type", "text/html"
|
103
103
|
body = view_with_layout { view_without_layout name }
|
104
104
|
halt [@code, @headers, [body]]
|
105
105
|
end
|
@@ -121,7 +121,7 @@ module Flipper
|
|
121
121
|
# location - The String location to set the Location header to.
|
122
122
|
def redirect_to(location)
|
123
123
|
status 302
|
124
|
-
header "Location", location
|
124
|
+
header "Location", "#{script_name}#{location}"
|
125
125
|
halt [@code, @headers, [""]]
|
126
126
|
end
|
127
127
|
|
data/lib/flipper/ui/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.0.
|
4
|
+
version: 0.2.0.beta4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Nunemaker
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.4'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '1.7'
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - "~>"
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: '1.
|
29
|
+
version: '1.4'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '1.7'
|