active_admin_environment 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/.ruby-version +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +33 -0
- data/Rakefile +1 -0
- data/active_admin_environment.gemspec +28 -0
- data/lib/active_admin_environment.rb +11 -0
- data/lib/active_admin_environment/engine.rb +12 -0
- data/lib/active_admin_environment/version.rb +3 -0
- data/lib/rails/generators/active_admin_environment/install/install_generator.rb +18 -0
- data/lib/rails/generators/active_admin_environment/install/templates/active_admin_development.css.scss +28 -0
- data/lib/rails/generators/active_admin_environment/install/templates/active_admin_production.css.scss +32 -0
- data/lib/rails/generators/active_admin_environment/install/templates/active_admin_staging.css.scss +32 -0
- data/spec/active_admin_environment_spec.rb +6 -0
- data/spec/spec_helper.rb +8 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 30f8762ae67853404b158cbec0f2affdbe43a275
|
4
|
+
data.tar.gz: 4bef84a8355c396990ca5e642cb70de5409be025
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5ec6acd9d584f84add90c39f234996a37be492d99569dd81d418df37eb3f51197f13ed9d205fd4edfc26ff9da8fe887a860380c7e8a17559d0d27a0ab2489b57
|
7
|
+
data.tar.gz: b32a6c4e62e46f09e60180a2816c0a7240805032958e1d90cf4f56b87099fba035890e9c0e65a12d590adb43a14ebd0c6965f7eec1a134a43841a7e5e6a76567
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0-p247
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2013 Keishake
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# ActiveAdminEnvironment
|
2
|
+
|
3
|
+
TODO: Write a gem description
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'active_admin_environment'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install active_admin_environment
|
18
|
+
|
19
|
+
After installed gem, execute:
|
20
|
+
|
21
|
+
$ rails generate active_admin_environment:install
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Contributing
|
28
|
+
|
29
|
+
1. Fork it
|
30
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
31
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
32
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
33
|
+
5. Create new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'active_admin_environment/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "active_admin_environment"
|
8
|
+
spec.version = ActiveAdminEnvironment::VERSION
|
9
|
+
spec.authors = ["Keishake"]
|
10
|
+
spec.email = ["keishake0925@gmail.com"]
|
11
|
+
spec.description = %q{Change ActiveAdmin page style by environment}
|
12
|
+
spec.summary = %q{Change ActiveAdmin page style by environment}
|
13
|
+
spec.homepage = "https://github.com/Keishake/active_admin_environment"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency 'activeadmin', '>= 0.4.4'
|
22
|
+
spec.add_dependency "railties", ">= 3.1"
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
25
|
+
spec.add_development_dependency "rake"
|
26
|
+
spec.add_development_dependency "rspec"
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module ActiveAdminEnvironment
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
if Rails.version >= "3.1"
|
4
|
+
initializer "ActiveAdminEnvironment precompile hook" do |app|
|
5
|
+
if Rails.env.production? || Rails.env.development? || Rails.env.staging?
|
6
|
+
app.config.assets.precompile += %W(active_admin_environment/active_admin_#{Rails.env.to_s}.css)
|
7
|
+
ActiveAdmin.application.register_stylesheet "active_admin_#{Rails.env.to_s}.css"
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module ActiveAdminEnvironment
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
desc "Installs ActiveAdminEnvironment in a rails 3 application"
|
5
|
+
|
6
|
+
def self.source_root
|
7
|
+
@_active_admin_environment_source_root ||= File.expand_path("../templates", __FILE__)
|
8
|
+
end
|
9
|
+
|
10
|
+
def copy_css_files
|
11
|
+
%w(development staging production).each do |e|
|
12
|
+
template "active_admin_#{e}.css.scss", "app/assets/stylesheets/active_admin_#{e}.css.scss"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
body.active_admin {
|
2
|
+
#page_title {
|
3
|
+
position: relative;
|
4
|
+
}
|
5
|
+
#page_title:before {
|
6
|
+
content: "Development - ";
|
7
|
+
padding-left: 40px;
|
8
|
+
color: #5e6469;
|
9
|
+
}
|
10
|
+
#page_title:after {
|
11
|
+
position: absolute;
|
12
|
+
top: -8px;
|
13
|
+
left: 0;
|
14
|
+
width: 30px;
|
15
|
+
height: 30px;
|
16
|
+
padding: 0;
|
17
|
+
-webkit-border-radius: 100%;
|
18
|
+
-moz-border-radius: 100%;
|
19
|
+
border-radius: 100%;
|
20
|
+
background: #5e6469;
|
21
|
+
content: "!";
|
22
|
+
color: #ffffff;
|
23
|
+
text-align: center;
|
24
|
+
line-height: 30px;
|
25
|
+
font-weight: normal;
|
26
|
+
font-size: 24px
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
body.active_admin {
|
2
|
+
#header{
|
3
|
+
background: -webkit-linear-gradient(-90deg, #6a7176, #ff0000);
|
4
|
+
}
|
5
|
+
|
6
|
+
#page_title {
|
7
|
+
position: relative;
|
8
|
+
}
|
9
|
+
#page_title:before {
|
10
|
+
content: "Production - ";
|
11
|
+
padding-left: 40px;
|
12
|
+
color: #ff6600;
|
13
|
+
}
|
14
|
+
#page_title:after {
|
15
|
+
position: absolute;
|
16
|
+
top: -8px;
|
17
|
+
left: 0;
|
18
|
+
width: 30px;
|
19
|
+
height: 30px;
|
20
|
+
padding: 0;
|
21
|
+
-webkit-border-radius: 100%;
|
22
|
+
-moz-border-radius: 100%;
|
23
|
+
border-radius: 100%;
|
24
|
+
background: #ff6600;
|
25
|
+
content: "!";
|
26
|
+
color: #ffffff;
|
27
|
+
text-align: center;
|
28
|
+
line-height: 30px;
|
29
|
+
font-weight: normal;
|
30
|
+
font-size: 24px
|
31
|
+
}
|
32
|
+
}
|
data/lib/rails/generators/active_admin_environment/install/templates/active_admin_staging.css.scss
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
body.active_admin {
|
2
|
+
#header{
|
3
|
+
background: -webkit-linear-gradient(-90deg, #6a7176, #0000ff);
|
4
|
+
}
|
5
|
+
|
6
|
+
#page_title {
|
7
|
+
position: relative;
|
8
|
+
}
|
9
|
+
#page_title:before {
|
10
|
+
content: "Staging - ";
|
11
|
+
padding-left: 40px;
|
12
|
+
color: #0066ff;
|
13
|
+
}
|
14
|
+
#page_title:after {
|
15
|
+
position: absolute;
|
16
|
+
top: -8px;
|
17
|
+
left: 0;
|
18
|
+
width: 30px;
|
19
|
+
height: 30px;
|
20
|
+
padding: 0;
|
21
|
+
-webkit-border-radius: 100%;
|
22
|
+
-moz-border-radius: 100%;
|
23
|
+
border-radius: 100%;
|
24
|
+
background: #0066ff;
|
25
|
+
content: "!";
|
26
|
+
color: #ffffff;
|
27
|
+
text-align: center;
|
28
|
+
line-height: 30px;
|
29
|
+
font-weight: normal;
|
30
|
+
font-size: 24px
|
31
|
+
}
|
32
|
+
}
|
data/spec/spec_helper.rb
ADDED
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: active_admin_environment
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Keishake
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-09-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activeadmin
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.4.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.4.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: railties
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '3.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.3'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.3'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: Change ActiveAdmin page style by environment
|
84
|
+
email:
|
85
|
+
- keishake0925@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- .gitignore
|
91
|
+
- .ruby-version
|
92
|
+
- Gemfile
|
93
|
+
- LICENSE.txt
|
94
|
+
- README.md
|
95
|
+
- Rakefile
|
96
|
+
- active_admin_environment.gemspec
|
97
|
+
- lib/active_admin_environment.rb
|
98
|
+
- lib/active_admin_environment/engine.rb
|
99
|
+
- lib/active_admin_environment/version.rb
|
100
|
+
- lib/rails/generators/active_admin_environment/install/install_generator.rb
|
101
|
+
- lib/rails/generators/active_admin_environment/install/templates/active_admin_development.css.scss
|
102
|
+
- lib/rails/generators/active_admin_environment/install/templates/active_admin_production.css.scss
|
103
|
+
- lib/rails/generators/active_admin_environment/install/templates/active_admin_staging.css.scss
|
104
|
+
- spec/active_admin_environment_spec.rb
|
105
|
+
- spec/spec_helper.rb
|
106
|
+
homepage: https://github.com/Keishake/active_admin_environment
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - '>='
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.0.3
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: Change ActiveAdmin page style by environment
|
130
|
+
test_files:
|
131
|
+
- spec/active_admin_environment_spec.rb
|
132
|
+
- spec/spec_helper.rb
|