yodel_production_environment 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/lib/layouts/common.html +23 -0
- data/lib/layouts/common/site.html +79 -0
- data/lib/layouts/common/sites.html +13 -0
- data/lib/layouts/common/user.html +10 -0
- data/lib/layouts/common/users.html +30 -0
- data/lib/layouts/home.html +49 -0
- data/lib/layouts/production_login_page.html +131 -0
- data/lib/migrations/site/01_users_model.rb +23 -0
- data/lib/migrations/site/02_page_structure.rb +58 -0
- data/lib/migrations/site/03_security_and_home_page.rb +103 -0
- data/lib/migrations/yodel/01_record_model.rb +29 -0
- data/lib/migrations/yodel/02_page_model.rb +45 -0
- data/lib/migrations/yodel/03_layout_model.rb +38 -0
- data/lib/migrations/yodel/04_group_model.rb +61 -0
- data/lib/migrations/yodel/05_user_model.rb +23 -0
- data/lib/migrations/yodel/06_snippet_model.rb +13 -0
- data/lib/migrations/yodel/07_search_page_model.rb +32 -0
- data/lib/migrations/yodel/08_default_site_options.rb +21 -0
- data/lib/migrations/yodel/09_security_page_models.rb +36 -0
- data/lib/migrations/yodel/10_record_proxy_page_model.rb +17 -0
- data/lib/migrations/yodel/11_email_model.rb +28 -0
- data/lib/migrations/yodel/12_api_call_model.rb +23 -0
- data/lib/migrations/yodel/13_redirect_page_model.rb +13 -0
- data/lib/migrations/yodel/14_menu_model.rb +20 -0
- data/lib/models/git_http.rb +326 -0
- data/lib/models/git_page.rb +38 -0
- data/lib/models/production_login_page.rb +13 -0
- data/lib/models/production_sites_page.rb +127 -0
- data/lib/models/production_user.rb +17 -0
- data/lib/public/css/screen.css +64 -0
- data/lib/yodel_production_environment.rb +3 -0
- data/yodel_production_environment.gemspec +22 -0
- metadata +80 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
# because user passwords are hashed both on a production server, and locally, a
|
2
|
+
# random salt can't be added to the password. clients will send the hashed
|
3
|
+
# version of the password, so a simple comparison to the stored password is ok.
|
4
|
+
class ProductionUser < User
|
5
|
+
def create_salt_and_hash_password
|
6
|
+
self.password_salt = nil
|
7
|
+
end
|
8
|
+
|
9
|
+
def hash_password
|
10
|
+
return unless password_changed? && password?
|
11
|
+
self.password = Password.hashed_password(nil, password)
|
12
|
+
end
|
13
|
+
|
14
|
+
def passwords_match?(password)
|
15
|
+
self.password_was == password ? self : nil
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
h2 {
|
2
|
+
margin-top: 30px;
|
3
|
+
}
|
4
|
+
|
5
|
+
ul {
|
6
|
+
border-top: 1px solid #eee;
|
7
|
+
color: #777;
|
8
|
+
}
|
9
|
+
|
10
|
+
ul li {
|
11
|
+
border-bottom: 1px solid #eee;
|
12
|
+
line-height: 35px;
|
13
|
+
height: 35px;
|
14
|
+
}
|
15
|
+
|
16
|
+
.remotes li img {
|
17
|
+
position: relative;
|
18
|
+
top: 6px;
|
19
|
+
left: 20px;
|
20
|
+
}
|
21
|
+
|
22
|
+
a {
|
23
|
+
text-decoration: none;
|
24
|
+
}
|
25
|
+
|
26
|
+
a:hover {
|
27
|
+
text-decoration: underline;
|
28
|
+
}
|
29
|
+
|
30
|
+
a.action {
|
31
|
+
float: right;
|
32
|
+
font-size: 12px;
|
33
|
+
margin-left: 15px;
|
34
|
+
}
|
35
|
+
|
36
|
+
h1 + form, p + form {
|
37
|
+
margin-top: 20px;
|
38
|
+
}
|
39
|
+
|
40
|
+
dl {
|
41
|
+
width: 800px;
|
42
|
+
padding-top: 10px;
|
43
|
+
}
|
44
|
+
|
45
|
+
dt, dd {
|
46
|
+
display: inline-block;
|
47
|
+
font-size: 13px;
|
48
|
+
line-height: 22px;
|
49
|
+
}
|
50
|
+
|
51
|
+
dt {
|
52
|
+
width: 130px;
|
53
|
+
color: #777;
|
54
|
+
}
|
55
|
+
|
56
|
+
dd {
|
57
|
+
width: 660px;
|
58
|
+
color: #333;
|
59
|
+
}
|
60
|
+
|
61
|
+
#new_user {
|
62
|
+
padding-top: 30px;
|
63
|
+
padding-bottom: 30px;
|
64
|
+
}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'yodel_production_environment'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'yodel_production_environment'
|
7
|
+
s.version = YodelProductionEnvironment::VERSION
|
8
|
+
s.authors = ['Will Cannings']
|
9
|
+
s.email = ['me@willcannings.com']
|
10
|
+
s.homepage = 'http://yodelcms.com'
|
11
|
+
s.summary = 'Yodel Production Environment Support'
|
12
|
+
s.description = 'Yodel Production Environment Support'
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split("\n")
|
15
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
17
|
+
s.require_paths = ['lib']
|
18
|
+
|
19
|
+
# specify any dependencies here; for example:
|
20
|
+
# s.add_development_dependency "rspec"
|
21
|
+
# s.add_runtime_dependency "rest-client"
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: yodel_production_environment
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Will Cannings
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2011-12-09 00:00:00.000000000Z
|
13
|
+
dependencies: []
|
14
|
+
description: Yodel Production Environment Support
|
15
|
+
email:
|
16
|
+
- me@willcannings.com
|
17
|
+
executables: []
|
18
|
+
extensions: []
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- .gitignore
|
22
|
+
- Gemfile
|
23
|
+
- Rakefile
|
24
|
+
- lib/layouts/common.html
|
25
|
+
- lib/layouts/common/site.html
|
26
|
+
- lib/layouts/common/sites.html
|
27
|
+
- lib/layouts/common/user.html
|
28
|
+
- lib/layouts/common/users.html
|
29
|
+
- lib/layouts/home.html
|
30
|
+
- lib/layouts/production_login_page.html
|
31
|
+
- lib/migrations/site/01_users_model.rb
|
32
|
+
- lib/migrations/site/02_page_structure.rb
|
33
|
+
- lib/migrations/site/03_security_and_home_page.rb
|
34
|
+
- lib/migrations/yodel/01_record_model.rb
|
35
|
+
- lib/migrations/yodel/02_page_model.rb
|
36
|
+
- lib/migrations/yodel/03_layout_model.rb
|
37
|
+
- lib/migrations/yodel/04_group_model.rb
|
38
|
+
- lib/migrations/yodel/05_user_model.rb
|
39
|
+
- lib/migrations/yodel/06_snippet_model.rb
|
40
|
+
- lib/migrations/yodel/07_search_page_model.rb
|
41
|
+
- lib/migrations/yodel/08_default_site_options.rb
|
42
|
+
- lib/migrations/yodel/09_security_page_models.rb
|
43
|
+
- lib/migrations/yodel/10_record_proxy_page_model.rb
|
44
|
+
- lib/migrations/yodel/11_email_model.rb
|
45
|
+
- lib/migrations/yodel/12_api_call_model.rb
|
46
|
+
- lib/migrations/yodel/13_redirect_page_model.rb
|
47
|
+
- lib/migrations/yodel/14_menu_model.rb
|
48
|
+
- lib/models/git_http.rb
|
49
|
+
- lib/models/git_page.rb
|
50
|
+
- lib/models/production_login_page.rb
|
51
|
+
- lib/models/production_sites_page.rb
|
52
|
+
- lib/models/production_user.rb
|
53
|
+
- lib/public/css/screen.css
|
54
|
+
- lib/yodel_production_environment.rb
|
55
|
+
- yodel_production_environment.gemspec
|
56
|
+
homepage: http://yodelcms.com
|
57
|
+
licenses: []
|
58
|
+
post_install_message:
|
59
|
+
rdoc_options: []
|
60
|
+
require_paths:
|
61
|
+
- lib
|
62
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
69
|
+
none: false
|
70
|
+
requirements:
|
71
|
+
- - ! '>='
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
74
|
+
requirements: []
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.8.10
|
77
|
+
signing_key:
|
78
|
+
specification_version: 3
|
79
|
+
summary: Yodel Production Environment Support
|
80
|
+
test_files: []
|