development_ribbon 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +6 -0
- data/app/helpers/development_ribbon_helper.rb +1 -13
- data/lib/development_ribbon.rb +13 -1
- data/lib/development_ribbon/version.rb +1 -1
- metadata +9 -57
- data/.gitignore +0 -17
- data/Rakefile +0 -5
- data/development_ribbon.gemspec +0 -22
- data/example_image.png +0 -0
- data/spec/development_ribbon_spec.rb +0 -1
- data/spec/helpers/development_ribbon_helper_spec.rb +0 -5
- data/spec/spec_helper.rb +0 -1
data/CHANGELOG
CHANGED
@@ -1,15 +1,3 @@
|
|
1
1
|
module DevelopmentRibbonHelper
|
2
|
-
|
3
|
-
options.reverse_merge! position: "right", color: "red", text: Rails.env
|
4
|
-
|
5
|
-
content_tag :div, :id => "development-ribbon" do
|
6
|
-
content_tag :div, class: "#{options[:position]} ribbon-holder" do
|
7
|
-
content_tag :div, class: "#{options[:color]} ribbon" do
|
8
|
-
content_tag :div, class: "text" do
|
9
|
-
options[:text]
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
2
|
+
include DevelopmentRibbon
|
15
3
|
end
|
data/lib/development_ribbon.rb
CHANGED
@@ -2,5 +2,17 @@ require "development_ribbon/version"
|
|
2
2
|
require "development_ribbon/engine" if defined? Rails
|
3
3
|
|
4
4
|
module DevelopmentRibbon
|
5
|
-
|
5
|
+
def development_ribbon(options = {})
|
6
|
+
options.reverse_merge! position: "right", color: "red", text: defined?(Rails) ? ::Rails.env : "development"
|
7
|
+
|
8
|
+
content_tag :div, id: "development-ribbon" do
|
9
|
+
content_tag :div, class: "#{options[:position]} ribbon-holder" do
|
10
|
+
content_tag :div, class: "#{options[:color]} ribbon" do
|
11
|
+
content_tag :div, class: "text" do
|
12
|
+
options[:text]
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
6
18
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: development_ribbon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,40 +9,8 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-09-
|
13
|
-
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rake
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ! '>='
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '0'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
|
-
requirements:
|
27
|
-
- - ! '>='
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '0'
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: rspec
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '0'
|
38
|
-
type: :development
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '0'
|
12
|
+
date: 2012-09-22 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
46
14
|
description: Use a banner to indicate that you are using the development environment.
|
47
15
|
email:
|
48
16
|
- thomas.preissler@gmx.de
|
@@ -50,22 +18,15 @@ executables: []
|
|
50
18
|
extensions: []
|
51
19
|
extra_rdoc_files: []
|
52
20
|
files:
|
53
|
-
- .gitignore
|
54
|
-
- CHANGELOG
|
55
|
-
- Gemfile
|
56
|
-
- LICENSE.txt
|
57
|
-
- README.md
|
58
|
-
- Rakefile
|
59
21
|
- app/helpers/development_ribbon_helper.rb
|
60
|
-
- development_ribbon.gemspec
|
61
|
-
- example_image.png
|
62
|
-
- lib/development_ribbon.rb
|
63
22
|
- lib/development_ribbon/engine.rb
|
64
23
|
- lib/development_ribbon/version.rb
|
65
|
-
-
|
66
|
-
- spec/helpers/development_ribbon_helper_spec.rb
|
67
|
-
- spec/spec_helper.rb
|
24
|
+
- lib/development_ribbon.rb
|
68
25
|
- vendor/assets/stylesheets/development_ribbon.css.sass
|
26
|
+
- LICENSE.txt
|
27
|
+
- Gemfile
|
28
|
+
- README.md
|
29
|
+
- CHANGELOG
|
69
30
|
homepage: https://github.com/ding280/development-ribbon
|
70
31
|
licenses: []
|
71
32
|
post_install_message:
|
@@ -78,18 +39,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
39
|
- - ! '>='
|
79
40
|
- !ruby/object:Gem::Version
|
80
41
|
version: '0'
|
81
|
-
segments:
|
82
|
-
- 0
|
83
|
-
hash: 2392280989151051712
|
84
42
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
43
|
none: false
|
86
44
|
requirements:
|
87
45
|
- - ! '>='
|
88
46
|
- !ruby/object:Gem::Version
|
89
47
|
version: '0'
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
hash: 2392280989151051712
|
93
48
|
requirements: []
|
94
49
|
rubyforge_project:
|
95
50
|
rubygems_version: 1.8.24
|
@@ -97,7 +52,4 @@ signing_key:
|
|
97
52
|
specification_version: 3
|
98
53
|
summary: Displays a banner at the top corner to indicate that your app is running
|
99
54
|
in development environment.
|
100
|
-
test_files:
|
101
|
-
- spec/development_ribbon_spec.rb
|
102
|
-
- spec/helpers/development_ribbon_helper_spec.rb
|
103
|
-
- spec/spec_helper.rb
|
55
|
+
test_files: []
|
data/.gitignore
DELETED
data/Rakefile
DELETED
data/development_ribbon.gemspec
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'development_ribbon/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |gem|
|
7
|
-
gem.name = "development_ribbon"
|
8
|
-
gem.version = DevelopmentRibbon::VERSION
|
9
|
-
gem.authors = ["Thomas Preißler"]
|
10
|
-
gem.email = ["thomas.preissler@gmx.de"]
|
11
|
-
gem.description = %q{Use a banner to indicate that you are using the development environment.}
|
12
|
-
gem.summary = %q{Displays a banner at the top corner to indicate that your app is running in development environment.}
|
13
|
-
gem.homepage = "https://github.com/ding280/development-ribbon"
|
14
|
-
|
15
|
-
gem.files = `git ls-files`.split($/)
|
16
|
-
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
-
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
-
gem.require_paths = ["lib"]
|
19
|
-
|
20
|
-
gem.add_development_dependency "rake"
|
21
|
-
gem.add_development_dependency "rspec"
|
22
|
-
end
|
data/example_image.png
DELETED
Binary file
|
@@ -1 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
data/spec/spec_helper.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require 'development_ribbon'
|