webbynode 0.2.5.beta1 → 0.2.5.beta2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of webbynode might be problematic. Click here for more details.
- data/Manifest +15 -0
- data/Rakefile +1 -1
- data/lib/webbynode/attribute_accessors.rb +67 -0
- data/lib/webbynode/commands/init.rb +41 -70
- data/lib/webbynode/engines/all.rb +16 -0
- data/lib/webbynode/engines/django.rb +35 -0
- data/lib/webbynode/engines/engine.rb +67 -0
- data/lib/webbynode/engines/php.rb +6 -0
- data/lib/webbynode/engines/rack.rb +10 -0
- data/lib/webbynode/engines/rails.rb +12 -0
- data/lib/webbynode/engines/rails3.rb +61 -0
- data/lib/webbynode/io.rb +12 -1
- data/lib/webbynode.rb +9 -2
- data/spec/fixtures/settings.py +94 -0
- data/spec/webbynode/commands/init_spec.rb +213 -119
- data/spec/webbynode/engines/django_spec.rb +65 -0
- data/spec/webbynode/engines/engine_spec.rb +52 -0
- data/spec/webbynode/engines/php_spec.rb +12 -0
- data/spec/webbynode/engines/rack_spec.rb +34 -0
- data/spec/webbynode/engines/rails3_spec.rb +46 -0
- data/spec/webbynode/engines/rails_spec.rb +38 -0
- data/spec/webbynode/io_spec.rb +28 -0
- data/webbynode.gemspec +4 -4
- metadata +27 -4
data/Manifest
CHANGED
@@ -23,6 +23,7 @@ lib/templates/help
|
|
23
23
|
lib/webbynode.rb
|
24
24
|
lib/webbynode/api_client.rb
|
25
25
|
lib/webbynode/application.rb
|
26
|
+
lib/webbynode/attribute_accessors.rb
|
26
27
|
lib/webbynode/command.rb
|
27
28
|
lib/webbynode/commands/add_backup.rb
|
28
29
|
lib/webbynode/commands/add_key.rb
|
@@ -41,6 +42,13 @@ lib/webbynode/commands/stop.rb
|
|
41
42
|
lib/webbynode/commands/tasks.rb
|
42
43
|
lib/webbynode/commands/version.rb
|
43
44
|
lib/webbynode/commands/webbies.rb
|
45
|
+
lib/webbynode/engines/all.rb
|
46
|
+
lib/webbynode/engines/django.rb
|
47
|
+
lib/webbynode/engines/engine.rb
|
48
|
+
lib/webbynode/engines/php.rb
|
49
|
+
lib/webbynode/engines/rack.rb
|
50
|
+
lib/webbynode/engines/rails.rb
|
51
|
+
lib/webbynode/engines/rails3.rb
|
44
52
|
lib/webbynode/gemfile.rb
|
45
53
|
lib/webbynode/git.rb
|
46
54
|
lib/webbynode/io.rb
|
@@ -74,6 +82,7 @@ spec/fixtures/git/config/config_5
|
|
74
82
|
spec/fixtures/git/status/clean
|
75
83
|
spec/fixtures/git/status/dirty
|
76
84
|
spec/fixtures/pushand
|
85
|
+
spec/fixtures/settings.py
|
77
86
|
spec/spec_helper.rb
|
78
87
|
spec/webbynode/api_client_spec.rb
|
79
88
|
spec/webbynode/application_spec.rb
|
@@ -92,6 +101,12 @@ spec/webbynode/commands/remote_spec.rb
|
|
92
101
|
spec/webbynode/commands/tasks_spec.rb
|
93
102
|
spec/webbynode/commands/version_spec.rb
|
94
103
|
spec/webbynode/commands/webbies_spec.rb
|
104
|
+
spec/webbynode/engines/django_spec.rb
|
105
|
+
spec/webbynode/engines/engine_spec.rb
|
106
|
+
spec/webbynode/engines/php_spec.rb
|
107
|
+
spec/webbynode/engines/rack_spec.rb
|
108
|
+
spec/webbynode/engines/rails3_spec.rb
|
109
|
+
spec/webbynode/engines/rails_spec.rb
|
95
110
|
spec/webbynode/gemfile_spec.rb
|
96
111
|
spec/webbynode/git_spec.rb
|
97
112
|
spec/webbynode/io_spec.rb
|
data/Rakefile
CHANGED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Extends the class object with class and instance accessors for class attributes,
|
2
|
+
# just like the native attr* accessors for instance attributes.
|
3
|
+
#
|
4
|
+
# class Person
|
5
|
+
# cattr_accessor :hair_colors
|
6
|
+
# end
|
7
|
+
#
|
8
|
+
# Person.hair_colors = [:brown, :black, :blonde, :red]
|
9
|
+
class Class
|
10
|
+
def cattr_reader(*syms)
|
11
|
+
options = syms.extract_options!
|
12
|
+
syms.each do |sym|
|
13
|
+
next if sym.is_a?(Hash)
|
14
|
+
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
15
|
+
unless defined? @@#{sym}
|
16
|
+
@@#{sym} = nil
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.#{sym}
|
20
|
+
@@#{sym}
|
21
|
+
end
|
22
|
+
EOS
|
23
|
+
|
24
|
+
unless options[:instance_reader] == false
|
25
|
+
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
26
|
+
def #{sym}
|
27
|
+
@@#{sym}
|
28
|
+
end
|
29
|
+
EOS
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def cattr_writer(*syms)
|
35
|
+
options = syms.extract_options!
|
36
|
+
syms.each do |sym|
|
37
|
+
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
38
|
+
unless defined? @@#{sym}
|
39
|
+
@@#{sym} = nil
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.#{sym}=(obj)
|
43
|
+
@@#{sym} = obj
|
44
|
+
end
|
45
|
+
EOS
|
46
|
+
|
47
|
+
unless options[:instance_writer] == false
|
48
|
+
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
49
|
+
def #{sym}=(obj)
|
50
|
+
@@#{sym} = obj
|
51
|
+
end
|
52
|
+
EOS
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def cattr_accessor(*syms)
|
58
|
+
cattr_reader(*syms)
|
59
|
+
cattr_writer(*syms)
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
class Array
|
64
|
+
def extract_options!
|
65
|
+
last.is_a?(::Hash) ? pop : {}
|
66
|
+
end
|
67
|
+
end
|
@@ -13,12 +13,11 @@ module Webbynode::Commands
|
|
13
13
|
end
|
14
14
|
|
15
15
|
check_prerequisites
|
16
|
-
|
17
|
-
|
16
|
+
|
18
17
|
webby = param(:webby)
|
19
18
|
app_name = io.app_name
|
20
19
|
git_present = git.present?
|
21
|
-
|
20
|
+
|
22
21
|
if option(:dns)
|
23
22
|
dns_entry = "#{option(:dns)}"
|
24
23
|
else
|
@@ -32,19 +31,13 @@ module Webbynode::Commands
|
|
32
31
|
|
33
32
|
io.log "Initializing application #{app_name} #{dns_entry ? "with dns #{dns_entry}" : ""}", :start
|
34
33
|
|
34
|
+
detect_engine
|
35
|
+
|
35
36
|
webby_ip = get_ip(webby)
|
36
37
|
|
37
38
|
io.log ""
|
38
39
|
io.log "Initializing directory structure..."
|
39
|
-
git.remove("config/database.yml") if git.tracks?("config/database.yml")
|
40
|
-
git.remove("db/schema.rb") if git.tracks?("db/schema.rb")
|
41
40
|
|
42
|
-
if io.file_exists?(".gitignore")
|
43
|
-
git.add_to_git_ignore("config/database.yml", "db/schema.rb")
|
44
|
-
else
|
45
|
-
git.add_git_ignore
|
46
|
-
end
|
47
|
-
|
48
41
|
unless io.file_exists?(".pushand")
|
49
42
|
io.create_file(".pushand", "#! /bin/bash\nphd $0 #{app_name} #{dns_entry}\n", true)
|
50
43
|
end
|
@@ -58,8 +51,6 @@ module Webbynode::Commands
|
|
58
51
|
io.create_file(".webbynode/config", "")
|
59
52
|
end
|
60
53
|
|
61
|
-
detect_engine
|
62
|
-
|
63
54
|
unless git_present
|
64
55
|
io.log "Initializing git and applying initial commit..."
|
65
56
|
git.init
|
@@ -104,15 +95,15 @@ module Webbynode::Commands
|
|
104
95
|
if api_webbies.keys.size == 1
|
105
96
|
webby = api_webbies[api_webbies.keys.first]
|
106
97
|
else
|
107
|
-
io.log ""
|
108
|
-
io.log "Current Webbies in your account:"
|
109
|
-
io.log ""
|
98
|
+
io.log ""
|
99
|
+
io.log "Current Webbies in your account:"
|
100
|
+
io.log ""
|
110
101
|
|
111
102
|
choices = []
|
112
103
|
api_webbies.keys.sort.each_with_index do |webby_key, i|
|
113
104
|
webby = api_webbies[webby_key]
|
114
105
|
choices << webby
|
115
|
-
io.log " #{i+1}. #{webby[:name]} (#{webby[:ip]})"
|
106
|
+
io.log " #{i+1}. #{webby[:name]} (#{webby[:ip]})"
|
116
107
|
end
|
117
108
|
|
118
109
|
io.log "", :simple
|
@@ -121,12 +112,12 @@ module Webbynode::Commands
|
|
121
112
|
end
|
122
113
|
|
123
114
|
io.log "", :simple
|
124
|
-
io.log "Set deployment Webby to #{webby[:name]}."
|
115
|
+
io.log "Set deployment Webby to #{webby[:name]}."
|
125
116
|
|
126
117
|
return webby[:ip]
|
127
118
|
end
|
128
119
|
|
129
|
-
io.log "Retrieving IP for Webby #{webby}..."
|
120
|
+
io.log "Retrieving IP for Webby #{webby}..."
|
130
121
|
webby_ip = api.ip_for(webby)
|
131
122
|
|
132
123
|
unless webby_ip
|
@@ -142,18 +133,41 @@ module Webbynode::Commands
|
|
142
133
|
end
|
143
134
|
|
144
135
|
def detect_engine
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
engine = "rails3"
|
149
|
-
end
|
136
|
+
if option(:engine)
|
137
|
+
engine = Webbynode::Engines.find(option(:engine))
|
138
|
+
io.log "Engine '#{option(:engine)}' is invalid." unless engine
|
150
139
|
end
|
151
140
|
|
152
|
-
|
141
|
+
engine ||= resolve_engine
|
142
|
+
engine.new.prepare
|
143
|
+
|
144
|
+
io.add_setting "engine", engine.engine_id
|
153
145
|
end
|
154
146
|
|
155
|
-
def
|
156
|
-
|
147
|
+
def resolve_engine
|
148
|
+
engine = Webbynode::Engines.detect
|
149
|
+
engine ||= choose_engine
|
150
|
+
end
|
151
|
+
|
152
|
+
def choose_engine
|
153
|
+
io.log ""
|
154
|
+
io.log "Supported engines:"
|
155
|
+
io.log ""
|
156
|
+
|
157
|
+
engines = Webbynode::Engines::All
|
158
|
+
engines.each_with_index do |engine, i|
|
159
|
+
io.log " #{i+1}. #{engine.engine_name.split('::').last}"
|
160
|
+
end
|
161
|
+
|
162
|
+
io.log ""
|
163
|
+
|
164
|
+
choice = ask("Select the engine your app uses:", Integer) { |q| q.in = 1..(engines.size+1) }
|
165
|
+
engine = engines[choice-1]
|
166
|
+
|
167
|
+
io.log ""
|
168
|
+
io.log "Initializing with #{engine.engine_name} engine..."
|
169
|
+
|
170
|
+
engine
|
157
171
|
end
|
158
172
|
|
159
173
|
def check_prerequisites
|
@@ -163,49 +177,6 @@ Error: git not found on current path.
|
|
163
177
|
|
164
178
|
In order to use Webbynode Gem for deployment, you must have git installed.
|
165
179
|
For more information about installing git: http://book.git-scm.com/2_installing_git.html
|
166
|
-
EOS
|
167
|
-
end
|
168
|
-
end
|
169
|
-
|
170
|
-
def check_gemfile
|
171
|
-
return unless gemfile.present?
|
172
|
-
|
173
|
-
dependencies = gemfile.dependencies(:without => [:development, :test])
|
174
|
-
if dependencies.include? 'sqlite3-ruby'
|
175
|
-
raise CommandError, <<-EOS
|
176
|
-
|
177
|
-
Gemfile dependency problem.
|
178
|
-
|
179
|
-
The following gem dependency was found in your Gemfile:
|
180
|
-
|
181
|
-
gem 'sqlite3-ruby', :require => 'sqlite3'
|
182
|
-
|
183
|
-
This dependency will cause an error in production when using Passenger. We recommend you remove it.
|
184
|
-
Also, be sure to define the database driver gem for the database type you are using in production (either the mysql or the pg gem).
|
185
|
-
|
186
|
-
gem 'mysql'
|
187
|
-
|
188
|
-
-or-
|
189
|
-
|
190
|
-
gem 'pg'
|
191
|
-
|
192
|
-
If you would like to use SQLite3 in your development and test environments,
|
193
|
-
you may do so by wrapping the gem definition inside the :test and :development groups.
|
194
|
-
|
195
|
-
group :test do
|
196
|
-
gem 'sqlite3-ruby', :require => 'sqlite3'
|
197
|
-
end
|
198
|
-
|
199
|
-
-or-
|
200
|
-
|
201
|
-
group :development do
|
202
|
-
gem 'sqlite3-ruby', :require => 'sqlite3'
|
203
|
-
end
|
204
|
-
|
205
|
-
To learn more about this issue, visit:
|
206
|
-
|
207
|
-
http://guides.webbynode.com/articles/rapidapps/rails3warning.html
|
208
|
-
|
209
180
|
EOS
|
210
181
|
end
|
211
182
|
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Webbynode::Engines
|
2
|
+
All = [
|
3
|
+
Webbynode::Engines::Django,
|
4
|
+
Webbynode::Engines::Php,
|
5
|
+
Webbynode::Engines::Rack,
|
6
|
+
Webbynode::Engines::Rails,
|
7
|
+
Webbynode::Engines::Rails3,
|
8
|
+
]
|
9
|
+
|
10
|
+
Detectable = [
|
11
|
+
# order matters!
|
12
|
+
Webbynode::Engines::Rails3,
|
13
|
+
Webbynode::Engines::Rails,
|
14
|
+
Webbynode::Engines::Rack
|
15
|
+
]
|
16
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
module Webbynode::Engines
|
2
|
+
class Django
|
3
|
+
include Engine
|
4
|
+
set_name "Django"
|
5
|
+
git_excludes 'settings.py', '*.pyc', '*.pyo', 'docs/_build'
|
6
|
+
|
7
|
+
def prepare
|
8
|
+
unless io.file_exists?('settings.template.py')
|
9
|
+
io.log 'Creating settings.template.py from your settings.py...'
|
10
|
+
io.copy_file 'settings.py', 'settings.template.py'
|
11
|
+
|
12
|
+
change_templates
|
13
|
+
|
14
|
+
change_settings({
|
15
|
+
'ENGINE' => '@app_engine@',
|
16
|
+
'NAME' => '@app_name@',
|
17
|
+
'USER' => '@app_name@',
|
18
|
+
'PASSWORD' => '@app_pwd@',
|
19
|
+
'HOST' => '@db_host@',
|
20
|
+
'PORT' => '@db_port@',
|
21
|
+
})
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def change_settings(settings)
|
26
|
+
settings.each_pair do |k,v|
|
27
|
+
io.sed 'settings.template.py', /'#{k}': '[^ ,]*'/, "'#{k}': '#{v}'"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def change_templates
|
32
|
+
io.sed 'settings.template.py', /TEMPLATE_DIRS = \(/, "TEMPLATE_DIRS = (\n '@app_dir@/templates'"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,67 @@
|
|
1
|
+
module Webbynode::Engines
|
2
|
+
def self.detect
|
3
|
+
Detectable.each do |engine_class|
|
4
|
+
engine = engine_class.new
|
5
|
+
return engine_class if engine.detected?
|
6
|
+
end
|
7
|
+
return nil
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.find(engine_id)
|
11
|
+
All.find { |e| e.engine_id == engine_id }
|
12
|
+
end
|
13
|
+
|
14
|
+
module Engine
|
15
|
+
def self.included(base)
|
16
|
+
base.cattr_accessor :git_excluded
|
17
|
+
base.git_excluded = []
|
18
|
+
|
19
|
+
base.send(:attr_accessor, :engine_name)
|
20
|
+
base.send(:extend, ClassMethods)
|
21
|
+
base.send(:include, InstanceMethods)
|
22
|
+
end
|
23
|
+
|
24
|
+
module ClassMethods
|
25
|
+
def set_name(name)
|
26
|
+
@engine_name = name
|
27
|
+
end
|
28
|
+
|
29
|
+
def git_excludes(*entries)
|
30
|
+
self.git_excluded = entries
|
31
|
+
end
|
32
|
+
|
33
|
+
def engine_name
|
34
|
+
@engine_name || self.name.split('::').last
|
35
|
+
end
|
36
|
+
|
37
|
+
def engine_id
|
38
|
+
self.name.split('::').last.downcase
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
module InstanceMethods
|
43
|
+
def prepare
|
44
|
+
self.class.git_excluded.each do |exc|
|
45
|
+
git.remove(exc) if git.tracks?(exc)
|
46
|
+
git.add_to_git_ignore exc
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def gemfile
|
51
|
+
@gemfile ||= Webbynode::Gemfile.new
|
52
|
+
end
|
53
|
+
|
54
|
+
def git
|
55
|
+
@git ||= Webbynode::Git.new
|
56
|
+
end
|
57
|
+
|
58
|
+
def io
|
59
|
+
@io ||= Webbynode::Io.new
|
60
|
+
end
|
61
|
+
|
62
|
+
def valid?
|
63
|
+
true
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Webbynode::Engines
|
2
|
+
class Rails
|
3
|
+
include Engine
|
4
|
+
set_name "Rails 2"
|
5
|
+
git_excludes "config/database.yml", "db/schema.rb"
|
6
|
+
|
7
|
+
def detected?
|
8
|
+
io.directory?('app') && io.directory?('app/controllers') &&
|
9
|
+
io.file_exists?('config/environment.rb')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
module Webbynode::Engines
|
2
|
+
class Rails3
|
3
|
+
include Engine
|
4
|
+
set_name "Rails 3"
|
5
|
+
git_excludes "config/database.yml", "db/schema.rb"
|
6
|
+
|
7
|
+
def detected?
|
8
|
+
io.file_exists?('script/rails')
|
9
|
+
end
|
10
|
+
|
11
|
+
def prepare
|
12
|
+
check_gemfile
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def check_gemfile
|
18
|
+
return unless gemfile.present?
|
19
|
+
|
20
|
+
dependencies = gemfile.dependencies(:without => [:development, :test])
|
21
|
+
if dependencies.include? 'sqlite3-ruby'
|
22
|
+
raise Webbynode::Command::CommandError, <<-EOS
|
23
|
+
|
24
|
+
Gemfile dependency problem.
|
25
|
+
|
26
|
+
The following gem dependency was found in your Gemfile:
|
27
|
+
|
28
|
+
gem 'sqlite3-ruby', :require => 'sqlite3'
|
29
|
+
|
30
|
+
This dependency will cause an error in production when using Passenger. We recommend you remove it.
|
31
|
+
Also, be sure to define the database driver gem for the database type you are using in production (either the mysql or the pg gem).
|
32
|
+
|
33
|
+
gem 'mysql'
|
34
|
+
|
35
|
+
-or-
|
36
|
+
|
37
|
+
gem 'pg'
|
38
|
+
|
39
|
+
If you would like to use SQLite3 in your development and test environments,
|
40
|
+
you may do so by wrapping the gem definition inside the :test and :development groups.
|
41
|
+
|
42
|
+
group :test do
|
43
|
+
gem 'sqlite3-ruby', :require => 'sqlite3'
|
44
|
+
end
|
45
|
+
|
46
|
+
-or-
|
47
|
+
|
48
|
+
group :development do
|
49
|
+
gem 'sqlite3-ruby', :require => 'sqlite3'
|
50
|
+
end
|
51
|
+
|
52
|
+
To learn more about this issue, visit:
|
53
|
+
|
54
|
+
http://guides.webbynode.com/articles/rapidapps/rails3warning.html
|
55
|
+
|
56
|
+
EOS
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
end
|
data/lib/webbynode/io.rb
CHANGED
@@ -37,11 +37,17 @@ module Webbynode
|
|
37
37
|
entries.any? &blk
|
38
38
|
end
|
39
39
|
|
40
|
+
def sed(file, from, to)
|
41
|
+
contents = File.read(file).gsub(from, to)
|
42
|
+
File.open(file, 'w') { |f| f.write(contents) }
|
43
|
+
end
|
44
|
+
|
40
45
|
def app_name
|
41
46
|
Dir.pwd.split("/").last.gsub(/[\.| ]/, "_")
|
42
47
|
end
|
43
48
|
|
44
49
|
def mkdir(path)
|
50
|
+
# TODO: raise "Tried to create real folder: #{path}" if $testing
|
45
51
|
FileUtils.mkdir_p(path)
|
46
52
|
end
|
47
53
|
|
@@ -70,6 +76,10 @@ module Webbynode
|
|
70
76
|
File.open(f, a, &blk)
|
71
77
|
end
|
72
78
|
|
79
|
+
def copy_file(from, to)
|
80
|
+
FileUtils.cp(from, to)
|
81
|
+
end
|
82
|
+
|
73
83
|
def log(text, notify=false)
|
74
84
|
notify = :simple unless notify
|
75
85
|
|
@@ -157,7 +167,7 @@ module Webbynode
|
|
157
167
|
end
|
158
168
|
|
159
169
|
def add_line(file, line)
|
160
|
-
return if File.read(file)
|
170
|
+
return if File.read(file).include?("#{line}")
|
161
171
|
File.open(file, 'a') { |f| f.puts line }
|
162
172
|
end
|
163
173
|
|
@@ -181,6 +191,7 @@ module Webbynode
|
|
181
191
|
end
|
182
192
|
|
183
193
|
def with_setting(&blk)
|
194
|
+
mkdir('.webbynode') unless directory?('.webbynode')
|
184
195
|
with_settings_for ".webbynode/settings", &blk
|
185
196
|
end
|
186
197
|
|
data/lib/webbynode.rb
CHANGED
@@ -21,6 +21,14 @@ require File.join(File.dirname(__FILE__), 'webbynode', 'remote_executor')
|
|
21
21
|
require File.join(File.dirname(__FILE__), 'webbynode', 'notify')
|
22
22
|
require File.join(File.dirname(__FILE__), 'webbynode', 'updater')
|
23
23
|
require File.join(File.dirname(__FILE__), 'webbynode', 'properties')
|
24
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'attribute_accessors')
|
25
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'engine')
|
26
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'rails')
|
27
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'rails3')
|
28
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'rack')
|
29
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'django')
|
30
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'php')
|
31
|
+
require File.join(File.dirname(__FILE__), 'webbynode', 'engines', 'all')
|
24
32
|
require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'apps')
|
25
33
|
require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'init')
|
26
34
|
require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'push')
|
@@ -38,11 +46,10 @@ require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'alias')
|
|
38
46
|
require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'help')
|
39
47
|
require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'webbies')
|
40
48
|
require File.join(File.dirname(__FILE__), 'webbynode', 'commands', 'version')
|
41
|
-
|
42
49
|
require File.join(File.dirname(__FILE__), 'webbynode', 'application')
|
43
50
|
|
44
51
|
module Webbynode
|
45
|
-
VERSION = '0.2.5.
|
52
|
+
VERSION = '0.2.5.beta2'
|
46
53
|
end
|
47
54
|
|
48
55
|
class Array
|
@@ -0,0 +1,94 @@
|
|
1
|
+
# Django settings for dude project.
|
2
|
+
|
3
|
+
DEBUG = True
|
4
|
+
TEMPLATE_DEBUG = DEBUG
|
5
|
+
|
6
|
+
ADMINS = (
|
7
|
+
# ('Your Name', 'your_email@domain.com'),
|
8
|
+
)
|
9
|
+
|
10
|
+
MANAGERS = ADMINS
|
11
|
+
|
12
|
+
DATABASES = {
|
13
|
+
'default': {
|
14
|
+
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
|
15
|
+
'NAME': 'dude', # Or path to database file if using sqlite3.
|
16
|
+
'USER': 'root', # Not used with sqlite3.
|
17
|
+
'PASSWORD': '', # Not used with sqlite3.
|
18
|
+
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
|
19
|
+
'PORT': '', # Set to empty string for default. Not used with sqlite3.
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
# Local time zone for this installation. Choices can be found here:
|
24
|
+
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
|
25
|
+
# although not all choices may be available on all operating systems.
|
26
|
+
# On Unix systems, a value of None will cause Django to use the same
|
27
|
+
# timezone as the operating system.
|
28
|
+
# If running in a Windows environment this must be set to the same as your
|
29
|
+
# system time zone.
|
30
|
+
TIME_ZONE = 'America/Chicago'
|
31
|
+
|
32
|
+
# Language code for this installation. All choices can be found here:
|
33
|
+
# http://www.i18nguy.com/unicode/language-identifiers.html
|
34
|
+
LANGUAGE_CODE = 'en-us'
|
35
|
+
|
36
|
+
SITE_ID = 1
|
37
|
+
|
38
|
+
# If you set this to False, Django will make some optimizations so as not
|
39
|
+
# to load the internationalization machinery.
|
40
|
+
USE_I18N = True
|
41
|
+
|
42
|
+
# If you set this to False, Django will not format dates, numbers and
|
43
|
+
# calendars according to the current locale
|
44
|
+
USE_L10N = True
|
45
|
+
|
46
|
+
# Absolute path to the directory that holds media.
|
47
|
+
# Example: "/home/media/media.lawrence.com/"
|
48
|
+
MEDIA_ROOT = ''
|
49
|
+
|
50
|
+
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
|
51
|
+
# trailing slash if there is a path component (optional in other cases).
|
52
|
+
# Examples: "http://media.lawrence.com", "http://example.com/media/"
|
53
|
+
MEDIA_URL = ''
|
54
|
+
|
55
|
+
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
|
56
|
+
# trailing slash.
|
57
|
+
# Examples: "http://foo.com/media/", "/media/".
|
58
|
+
ADMIN_MEDIA_PREFIX = '/media/'
|
59
|
+
|
60
|
+
# Make this unique, and don't share it with anybody.
|
61
|
+
SECRET_KEY = '4tg&yi98l603gs--iuombqt(^+c&q&zsqe$y%%hqd3u6#uu0@o'
|
62
|
+
|
63
|
+
# List of callables that know how to import templates from various sources.
|
64
|
+
TEMPLATE_LOADERS = (
|
65
|
+
'django.template.loaders.filesystem.Loader',
|
66
|
+
'django.template.loaders.app_directories.Loader',
|
67
|
+
# 'django.template.loaders.eggs.Loader',
|
68
|
+
)
|
69
|
+
|
70
|
+
MIDDLEWARE_CLASSES = (
|
71
|
+
'django.middleware.common.CommonMiddleware',
|
72
|
+
'django.contrib.sessions.middleware.SessionMiddleware',
|
73
|
+
'django.middleware.csrf.CsrfViewMiddleware',
|
74
|
+
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
75
|
+
'django.contrib.messages.middleware.MessageMiddleware',
|
76
|
+
)
|
77
|
+
|
78
|
+
ROOT_URLCONF = 'dude.urls'
|
79
|
+
|
80
|
+
TEMPLATE_DIRS = (
|
81
|
+
'/tmp/dude/templates'
|
82
|
+
)
|
83
|
+
|
84
|
+
INSTALLED_APPS = (
|
85
|
+
'django.contrib.auth',
|
86
|
+
'django.contrib.contenttypes',
|
87
|
+
'django.contrib.sessions',
|
88
|
+
'django.contrib.sites',
|
89
|
+
'django.contrib.messages',
|
90
|
+
'django.contrib.admin',
|
91
|
+
'dude.polls',
|
92
|
+
# Uncomment the next line to enable the admin:
|
93
|
+
# 'django.contrib.admin',
|
94
|
+
)
|