rack-dev-mark 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +2 -2
- data/lib/generators/rack/dev-mark/install_generator.rb +4 -1
- data/lib/rack/dev-mark/theme/README.md +20 -0
- data/lib/rack/dev-mark/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NzNhNjI3ZWU2ZjY5MjJiNTkwNGUwYjE3NjdlNjg4YmIwNjMxZjhhNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjI0OTZkZjFjZmIwY2Y0MmRmOWUwNGEyNmNlMDQ5Mjc1MGRlZTBjNA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTFhODFmMDRjZWZjNTYzMTEyNTFkOTE2ZWIxMTBiYWE0N2UxNzNhZjk1MzNh
|
10
|
+
MjkyZGZiMTAwMWFmZmMwNWExYTc3ZDQ4NDczMDE2M2Y3NDU5ZmRiYWI2OThk
|
11
|
+
Njc5M2NiM2ZmZTAxZmQ3ZjI2MjE3MTA1NzcwMmNjZTRjYzdiNDQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjIwYWVlYzIwYzEwNTVhOTBmZTI1ZDIyZWRiZTViYzNlODdhNDJlNmY3NjE3
|
14
|
+
MmY3NGFjZWE3NGZhY2Q4NGY4MDVhMThjYmFlNDBlNTcyMGViMmM1NWFhOWU5
|
15
|
+
ODg4ODkzNmVjYjA3ODhiMjVkMzUyZjIzZjFjMTUxZjFmNGNjMTI=
|
data/README.md
CHANGED
@@ -58,7 +58,7 @@ Or
|
|
58
58
|
Alternatively, use generator
|
59
59
|
|
60
60
|
```bash
|
61
|
-
bundle exec rails g rack
|
61
|
+
bundle exec rails g rack:dev-mark:install
|
62
62
|
```
|
63
63
|
|
64
64
|
The middleware sets [title](lib/rack/dev-mark/theme/title.rb) and [github_fork_ribbon](lib/rack/dev-mark/theme/github_fork_ribbon.rb) themes as default.
|
@@ -99,7 +99,7 @@ class AnotherTheme < Rack::DevMark::Theme::Base
|
|
99
99
|
end
|
100
100
|
```
|
101
101
|
|
102
|
-
Then, insert
|
102
|
+
Then, insert them in your app.
|
103
103
|
|
104
104
|
### For your Rack app
|
105
105
|
|
@@ -8,7 +8,10 @@ module Rack
|
|
8
8
|
desc "Install rack-dev-mark."
|
9
9
|
def insert_enable
|
10
10
|
insert_into_file 'config/application.rb', after: "< Rails::Application\n" do <<-EOS
|
11
|
-
|
11
|
+
# Enable rack-dev-mark
|
12
|
+
config.rack_dev_mark.enable = !Rails.env.production?
|
13
|
+
# Customize themes if you want to do so
|
14
|
+
# config.rack_dev_mark.custom_theme = [:title, :github_fork_ribbon]
|
12
15
|
|
13
16
|
EOS
|
14
17
|
end
|
@@ -1,5 +1,25 @@
|
|
1
1
|
# Theme
|
2
2
|
|
3
|
+
You can set options when you add the themes into your app. Otherwise, just put the symbol of the theme filename.
|
4
|
+
|
5
|
+
### For your Rack app
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
use Rack::DevMark::Middleware, [:title, Rack::DevMark::Theme::GithubForkRibbon.new(position: 'right')]
|
9
|
+
```
|
10
|
+
|
11
|
+
### For your Rails app
|
12
|
+
|
13
|
+
In config/application.rb
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
module MyApp
|
17
|
+
class Application < Rails::Application
|
18
|
+
config.rack_dev_mark.custom_theme = [:title, Rack::DevMark::Theme::GithubForkRibbon.new(position: 'right')]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
```
|
22
|
+
|
3
23
|
## title
|
4
24
|
|
5
25
|
Just add the environment into the page title.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rack-dev-mark
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daisuke Taniwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|