envb-rails 0.0.2 → 0.0.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.
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Joe Bilt.
1
+ Copyright (c) 2013 Joe Bilt.
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -38,9 +38,11 @@ Or to alternatively have it render on production as well, you can pass it an emp
38
38
 
39
39
  <%= envb([]) %>
40
40
 
41
- ## Limitations
41
+ ## Customization
42
42
 
43
- Currently envb-rails will colorize the banners for the following environments, `development` (purple), `acceptance` (aqua), `staging` (orange), and `production` (red). Other custom named environments will be a default (gray) color. In future versions I will make it easier to customize/replace these defaults.
43
+ By default envb-rails will colorize the environment banners in the following combinations, development:purple, acceptance:aqua, staging:orange, and production:red. Other custom named environments will be a default (gray) color.
44
+
45
+ If you would like to customize the colors or add environment names you can run `rails generate envb:stylesheet`. Inside the generated `envb_custom.css.scss` file you will be able to specify colors and override other default styles if you so choose.
44
46
 
45
47
  ## Attribution
46
48
 
@@ -49,4 +51,4 @@ Currently envb-rails will colorize the banners for the following environments, `
49
51
 
50
52
  ----
51
53
 
52
- Copyright &copy; 2012 Joe Bilt.
54
+ Copyright &copy; 2013 Joe Bilt.
@@ -1,24 +1,10 @@
1
- /* Color Variables */
2
- $envb_gray: #969896;
3
- $envb_red: #cc6666;
4
- $envb_orange: #de935f;
5
- $envb_yellow: #f0c674;
6
- $envb_green: #b5bd68;
7
- $envb_aqua: #8abeb7;
8
- $envb_blue: #81a2be;
9
- $envb_purple: #b294bb;
10
-
11
- /* Mixins */
12
- @mixin set-color($color) {
13
- background-color: $color;
14
- border-color: darken($color, 20%);
15
- }
1
+ @import 'envb_mixins';
16
2
 
17
3
  /* Styles */
18
4
  html { padding-bottom: 25px; }
19
5
 
20
6
  #envb {
21
- @include set-color($envb_gray);
7
+ @include banner-color($envb_gray);
22
8
 
23
9
  border-top: 1px solid;
24
10
  bottom: 0;
@@ -45,8 +31,8 @@ html { padding-bottom: 25px; }
45
31
  }
46
32
 
47
33
  /* Environment Color Settings */
48
- &.development { @include set-color($envb_purple); }
49
- &.acceptance { @include set-color($envb_aqua); }
50
- &.staging { @include set-color($envb_orange); }
51
- &.production { @include set-color($envb_red); }
34
+ &.development { @include banner-color($envb_purple); }
35
+ &.acceptance { @include banner-color($envb_aqua); }
36
+ &.staging { @include banner-color($envb_orange); }
37
+ &.production { @include banner-color($envb_red); }
52
38
  }
@@ -0,0 +1,15 @@
1
+ /* Color Variables */
2
+ $envb_gray: #969896;
3
+ $envb_red: #cc6666;
4
+ $envb_orange: #de935f;
5
+ $envb_yellow: #f0c674;
6
+ $envb_green: #b5bd68;
7
+ $envb_aqua: #8abeb7;
8
+ $envb_blue: #81a2be;
9
+ $envb_purple: #b294bb;
10
+
11
+ /* Mixins */
12
+ @mixin banner-color($color) {
13
+ background-color: $color;
14
+ border-color: darken($color, 20%);
15
+ }
@@ -1,5 +1,5 @@
1
1
  module Envb
2
2
  module Rails
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
@@ -0,0 +1,14 @@
1
+ require 'rails'
2
+
3
+ module Envb
4
+ module Generators
5
+ class StylesheetGenerator < ::Rails::Generators::Base
6
+ desc 'Copies an envb-rails customization stylesheet into your application.'
7
+ source_root File.expand_path('../templates/', __FILE__)
8
+
9
+ def copy_stylesheet_file
10
+ copy_file 'envb_custom.css.scss', 'app/assets/stylesheets/envb_custom.css.scss'
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ @import 'envb_mixins';
2
+
3
+ /* Color presets are $envb_gray, $envb_red, $envb_orange, $envb_yellow,
4
+ * $envb_green, $envb_aqua, $envb_blue, and $envb_purple. Or you can pass in a
5
+ * custom color value
6
+ */
7
+
8
+ #envb {
9
+ /* default */ @include banner-color($envb_gray);
10
+
11
+ &.development { @include banner-color($envb_purple); }
12
+ &.acceptance { @include banner-color($envb_aqua); }
13
+ &.staging { @include banner-color($envb_orange); }
14
+ &.production { @include banner-color($envb_red); }
15
+ }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envb-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-02 00:00:00.000000000 Z
12
+ date: 2013-01-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: haml
@@ -41,6 +41,7 @@ files:
41
41
  - README.md
42
42
  - Screenshot.jpg
43
43
  - app/assets/stylesheets/envb.css.scss
44
+ - app/assets/stylesheets/envb_mixins.css.scss
44
45
  - app/views/envb/_banner.html.haml
45
46
  - envb-rails.gemspec
46
47
  - lib/envb-rails.rb
@@ -48,6 +49,8 @@ files:
48
49
  - lib/envb/rails/engine.rb
49
50
  - lib/envb/rails/version.rb
50
51
  - lib/envb/rails/view_helper.rb
52
+ - lib/generators/envb/stylesheet/stylesheet_generator.rb
53
+ - lib/generators/envb/stylesheet/templates/envb_custom.css.scss
51
54
  homepage: http://github.com/joedynamite/envb-rails
52
55
  licenses: []
53
56
  post_install_message: