bonethug 0.0.86 → 0.0.87

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 099992fb926a395cbd9ea09349d3eb1e69012143
4
- data.tar.gz: 47a283b0caefd2db6736f27881b0d0fab770f2eb
3
+ metadata.gz: b2cb38759cdf4feea689176b22befeef538739c6
4
+ data.tar.gz: fe4fdd3021979ac4176fd351c05b807c30745d84
5
5
  SHA512:
6
- metadata.gz: 76ad25084325958dd0e8158a3ae933d47c1da434f00306b6537422241f1401e4112a67e5e06aedf556e266819485e809f6f55e140a74aabfcaa1060e1beec6c4
7
- data.tar.gz: 6e1af7ba7d0afbce6315e42c84fea0a61f6120f2cc07518c19ba39dd2e166615118e3eb040746e709c0228737074296f839e994b95fc76651335887705fc050b
6
+ metadata.gz: 4441897be176e4c3ed0f4266ae76a7b4e9cbb2c6e92f209c6e9817b7fbf8464233ad13074259018398f7e2ad9e505f925baa834e57e3aec1050623f125f6abe4
7
+ data.tar.gz: d4943af2eacfd249a72bf01a77b2252dc36b34ef5fb822710daa37e1d7f21b7be3c95705d8a316148541451dae1ec0035eeb8425a2532d916e436bc3dbcb54d5
data/TODO.txt CHANGED
@@ -9,4 +9,5 @@
9
9
  - rbenv library support - rbenv gays out with 2.x needs readline headers manually specified
10
10
  - nagios?
11
11
  - need more modular configuration of server components for setup scripts
12
- - thug vhost-local and thug deploy could share more code
12
+ - thug vhost-local and thug deploy could share more code
13
+ - log rotate
data/config/cnf.yml CHANGED
@@ -180,6 +180,7 @@ resources:
180
180
  - public/uploads
181
181
  vendor:
182
182
  - vendor
183
+ - public/thirdparty
183
184
  - public/vendor
184
185
  post_cmds:
185
186
  development:
data/config/deploy.rb CHANGED
@@ -283,7 +283,7 @@ task :deploy => :environment do
283
283
  vh_cnf = vh_cnf.get env
284
284
  conf_path = vh_cnf.get('conf_path') || '/etc/apache2/sites-available'
285
285
 
286
- vh = Bonethug::Configurator.vhost vh_cnf, deploy_to, true
286
+ vh = Bonethug::Configurator.vhost vh_cnf, deploy_to, deploy.get('project_type'), env, true
287
287
 
288
288
  case vh_cnf.get('type')
289
289
 
data/lib/bonethug/cli.rb CHANGED
@@ -31,7 +31,7 @@ module Bonethug
31
31
  'force-unlock',
32
32
  'cleanup',
33
33
  'clean',
34
- 'watch'
34
+ 'watch'
35
35
  ]
36
36
 
37
37
  def self.tasks
@@ -49,6 +49,12 @@ module Bonethug
49
49
 
50
50
  display_help
51
51
 
52
+ when 'tasks'
53
+
54
+ @@tasks.each do |task|
55
+ puts task
56
+ end
57
+
52
58
  when 'version'
53
59
 
54
60
  puts 'bonethug v' + VERSION + ' - build date: ' + BUILD_DATE
@@ -148,7 +154,7 @@ module Bonethug
148
154
 
149
155
  # load config
150
156
  conf = Conf.new.add exec_path + '/config/cnf.yml'
151
- conf.add(exec_path + '/config/database.yml' => { root: 'dbs.default' }) if File.exist? exec_path + '/config/database.yml'
157
+ conf.add(exec_path + '/config/database.yml' => { root: 'dbs.default' }) if File.exist? exec_path + '/config/database.yml'
152
158
  deploy = conf.node_merge 'deploy.common', 'deploy.environments.' + env
153
159
 
154
160
  # vhost name
@@ -169,7 +175,7 @@ module Bonethug
169
175
  conf_path = vh_cnf.get('conf_path') || '/etc/apache2/sites-available'
170
176
 
171
177
  # load the appropriate config for the web server
172
- vh = Configurator.vhost vh_cnf, exec_path
178
+ vh = Configurator.vhost vh_cnf, exec_path, deploy.get('project_type'), env
173
179
 
174
180
  # check if we have a custom config for the webserver type
175
181
  case vh_cnf.get('type')
@@ -14,6 +14,10 @@ module Bonethug
14
14
  include FileUtils
15
15
  include Digest
16
16
 
17
+ @@bonthug_gem_dir = File.expand_path File.dirname(__FILE__) + '/../..'
18
+ @@skel_dir = @@bonthug_gem_dir + '/skel'
19
+ @@conf = Conf.new.add @@skel_dir + '/skel.yml'
20
+
17
21
  def self.hosts(vh_cnf)
18
22
  hosts = "127.0.0.1 #{vh_cnf.get('server_name')}\n"
19
23
  aliases = vh_cnf.get('server_aliases')
@@ -25,7 +29,9 @@ module Bonethug
25
29
  hosts
26
30
  end
27
31
 
28
- def self.vhost(vh_cnf, base_path, is_remote = false)
32
+ def self.vhost(vh_cnf, base_path, project_type, env = 'development', is_remote = false)
33
+
34
+ conf = @@conf.get 'project_types.' + project_type
29
35
 
30
36
  # server aliases
31
37
  server_aliases = ''
@@ -37,7 +43,7 @@ module Bonethug
37
43
  end
38
44
 
39
45
  # environment variables
40
- env_vars = ''
46
+ env_vars = 'SetEnv ' + conf.get('env_var') + ' ' + env + "\n"
41
47
  vars = vh_cnf.get('env_vars')
42
48
  if vars
43
49
  vars.each do |k, v|
@@ -47,7 +53,7 @@ module Bonethug
47
53
 
48
54
  # server admin
49
55
  admin = vh_cnf.get('server_admin')
50
- server_admin = admin ? 'ServerAdmin ' + admin : ''
56
+ server_admin = admin ? 'ServerAdmin ' + admin : ''
51
57
 
52
58
  # paths
53
59
  shared_path = is_remote ? '/shared' : ''
@@ -60,7 +66,7 @@ module Bonethug
60
66
  vh = ""
61
67
 
62
68
  else # apache
63
-
69
+
64
70
  access = vh_cnf.get('version').to_f >= 2.4 ? "Require all granted" : "Order allow,deny\nAllow from all"
65
71
 
66
72
  vh = "
@@ -159,7 +159,7 @@ module Bonethug
159
159
  puts "No db for env " + env + " found - check your config file"
160
160
  exit
161
161
  else
162
- puts "Mysql user " + admin_user + " is creating db: " + db.get('name') + " and granting access to " + db.get('user') + "@" + db.get('host')
162
+ puts "Mysql user " + admin_user + " is creating db: " + db.get('name') + " and granting access to " + db.get('user') + "@" + db.get('host') + ", you may be propmted for the password for the user: " + admin_user
163
163
  system Bonethug::Installer.init_mysql_db_script(db, path, admin_user)
164
164
  end
165
165
 
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Bonethug
3
- VERSION = "0.0.86"
4
- BUILD_DATE = "2014-07-21 10:44:28 +1200"
3
+ VERSION = "0.0.87"
4
+ BUILD_DATE = "2014-07-28 15:09:18 +1200"
5
5
  end
6
6
 
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ mysqlcheck -u root -p -o --all-databases
@@ -7,9 +7,15 @@
7
7
  "license": "MIT",
8
8
  "private": true,
9
9
  "dependencies": {
10
- "jquery" : "~1.11",
11
- "modernizr" : "~2.6.2",
12
- "selectivizr" : "~1.0.2",
13
- "respond" : "~1.3.0"
10
+ "jquery" : "~1.11.1",
11
+ "jquery-cookie" : "git://github.com/carhartl/jquery-cookie.git",
12
+ "modernizr" : "git://github.com/Modernizr/Modernizr.git",
13
+ "respond" : "git://github.com/scottjehl/Respond.git",
14
+ "picturefill" : "git://github.com/scottjehl/picturefill.git",
15
+ "selectivizr" : "https://raw.githubusercontent.com/keithclark/selectivizr/master/selectivizr.js",
16
+ "html5-boilerplate" : "~4.3.0",
17
+ "yepnope" : "git://github.com/SlexAxton/yepnope.js.git",
18
+ "bootstrap-sass" : "git://github.com/twbs/bootstrap-sass.git",
19
+ "icomoon" : "git://github.com/layerssss/icomoon-bower.git"
14
20
  }
15
21
  }
@@ -7,9 +7,15 @@
7
7
  "license": "MIT",
8
8
  "private": true,
9
9
  "dependencies": {
10
- "jquery" : "~1.11",
11
- "modernizr" : "~2.6.2",
12
- "selectivizr" : "~1.0.2",
13
- "respond" : "~1.3.0"
10
+ "jquery" : "~1.11.1",
11
+ "jquery-cookie" : "git://github.com/carhartl/jquery-cookie.git",
12
+ "modernizr" : "git://github.com/Modernizr/Modernizr.git",
13
+ "respond" : "git://github.com/scottjehl/Respond.git",
14
+ "picturefill" : "git://github.com/scottjehl/picturefill.git",
15
+ "selectivizr" : "https://raw.githubusercontent.com/keithclark/selectivizr/master/selectivizr.js",
16
+ "html5-boilerplate" : "~4.3.0",
17
+ "yepnope" : "git://github.com/SlexAxton/yepnope.js.git",
18
+ "bootstrap-sass" : "git://github.com/twbs/bootstrap-sass.git",
19
+ "icomoon" : "git://github.com/layerssss/icomoon-bower.git"
14
20
  }
15
21
  }
@@ -7,9 +7,15 @@
7
7
  "license": "MIT",
8
8
  "private": true,
9
9
  "dependencies": {
10
- "jquery" : "~1.11",
11
- "modernizr" : "~2.6.2",
12
- "selectivizr" : "~1.0.2",
13
- "respond" : "~1.3.0"
10
+ "jquery" : "~1.11.1",
11
+ "jquery-cookie" : "git://github.com/carhartl/jquery-cookie.git",
12
+ "modernizr" : "git://github.com/Modernizr/Modernizr.git",
13
+ "respond" : "git://github.com/scottjehl/Respond.git",
14
+ "picturefill" : "git://github.com/scottjehl/picturefill.git",
15
+ "selectivizr" : "https://raw.githubusercontent.com/keithclark/selectivizr/master/selectivizr.js",
16
+ "html5-boilerplate" : "~4.3.0",
17
+ "yepnope" : "git://github.com/SlexAxton/yepnope.js.git",
18
+ "bootstrap-sass" : "git://github.com/twbs/bootstrap-sass.git",
19
+ "icomoon" : "git://github.com/layerssss/icomoon-bower.git"
14
20
  }
15
21
  }
@@ -1,18 +1,21 @@
1
1
  {
2
- "name": "bonethug/php",
3
- "version": "0.0.1",
4
- "authors": [
5
- "azt3k <breaks.nz@gmail.com>"
6
- ],
7
- "license": "MIT",
8
- "private": true,
9
- "dependencies": {
10
- "jquery" : "~1.11.0",
11
- "modernizr" : "git://github.com/Modernizr/Modernizr.git",
12
- "respond" : "git://github.com/scottjehl/Respond.git",
13
- "picturefill" : "git://github.com/scottjehl/picturefill.git",
14
- "selectivizr" : "https://raw.githubusercontent.com/keithclark/selectivizr/master/selectivizr.js",
15
- "html5-boilerplate" : "~4.3.0",
16
- "yepnope" : "git://github.com/SlexAxton/yepnope.js.git"
17
- }
2
+ "name": "bonethug/php",
3
+ "version": "0.0.1",
4
+ "authors": [
5
+ "azt3k <breaks.nz@gmail.com>"
6
+ ],
7
+ "license": "MIT",
8
+ "private": true,
9
+ "dependencies": {
10
+ "jquery" : "~1.11.1",
11
+ "jquery-cookie" : "git://github.com/carhartl/jquery-cookie.git",
12
+ "modernizr" : "git://github.com/Modernizr/Modernizr.git",
13
+ "respond" : "git://github.com/scottjehl/Respond.git",
14
+ "picturefill" : "git://github.com/scottjehl/picturefill.git",
15
+ "selectivizr" : "https://raw.githubusercontent.com/keithclark/selectivizr/master/selectivizr.js",
16
+ "html5-boilerplate" : "~4.3.0",
17
+ "yepnope" : "git://github.com/SlexAxton/yepnope.js.git",
18
+ "bootstrap-sass" : "git://github.com/twbs/bootstrap-sass.git",
19
+ "icomoon" : "git://github.com/layerssss/icomoon-bower.git"
20
+ }
18
21
  }
@@ -1,3 +1,3 @@
1
1
  {
2
- "directory" : "public/vendor"
2
+ "directory" : "public/thirdparty"
3
3
  }
@@ -7,11 +7,15 @@
7
7
  "license": "MIT",
8
8
  "private": true,
9
9
  "dependencies": {
10
- "jquery" : "~1.11",
11
- "modernizr" : "~2.6.2",
12
- "selectivizr" : "~1.0.2",
13
- "respond" : "~1.3.0",
14
- "bootstrap-sass" : "git://github.com/twbs/bootstrap-sass.git",
15
- "icomoon" : "git://github.com/layerssss/icomoon-bower.git"
10
+ "jquery" : "~1.11.1",
11
+ "jquery-cookie" : "git://github.com/carhartl/jquery-cookie.git",
12
+ "modernizr" : "git://github.com/Modernizr/Modernizr.git",
13
+ "respond" : "git://github.com/scottjehl/Respond.git",
14
+ "picturefill" : "git://github.com/scottjehl/picturefill.git",
15
+ "selectivizr" : "https://raw.githubusercontent.com/keithclark/selectivizr/master/selectivizr.js",
16
+ "html5-boilerplate" : "~4.3.0",
17
+ "yepnope" : "git://github.com/SlexAxton/yepnope.js.git",
18
+ "bootstrap-sass" : "git://github.com/twbs/bootstrap-sass.git",
19
+ "icomoon" : "git://github.com/layerssss/icomoon-bower.git"
16
20
  }
17
21
  }
@@ -6,6 +6,9 @@
6
6
  "silverstripe/cms" : "3.1.*@dev",
7
7
  "silverstripe/html5" : "dev-master",
8
8
  "phpmailer/phpmailer" : "dev-master",
9
+ "silverstripe/bootstrap-forms" : "dev-master",
10
+ "undefinedoffset/sortablegridfield" : "dev-master",
11
+ "unclecheese/betterbuttons" : "dev-master",
9
12
  "azt3k/abc-silverstripe" : "dev-master",
10
13
  "azt3k/abc-silverstripe-mailer" : "dev-master",
11
14
  "nathancox/minify" : "dev-master",
@@ -21,6 +24,9 @@
21
24
  "silverstripe/html5",
22
25
  "azt3k/abc-silverstripe",
23
26
  "azt3k/abc-silverstripe-mailer",
27
+ "unclecheese/betterbuttons",
28
+ "undefinedoffset/sortablegridfield",
29
+ "silverstripe/bootstrap-forms",
24
30
  "nathancox/minify"
25
31
  ]
26
32
  }
@@ -22,7 +22,7 @@ ErrorDocument 500 /assets/error-500.html
22
22
 
23
23
  <IfModule mod_alias.c>
24
24
  RedirectMatch 403 /silverstripe-cache(/|$)
25
- # RedirectMatch 403 ^/vendor(/|$) # breaks bower
25
+ RedirectMatch 403 ^/vendor(/|$)
26
26
  RedirectMatch 403 /composer\.(json|lock)
27
27
  </IfModule>
28
28
 
@@ -141,9 +141,9 @@ Requirements::set_combined_files_enabled(true);
141
141
  // -----------
142
142
 
143
143
  $shimRequirements = array(
144
- 'vendor/selectivizr/selectivizr.min.js',
145
- 'vendor/respond/respond.min.js',
146
- 'vendor/modernizr/modernizr.js'
144
+ 'thirdparty/selectivizr/index.js',
145
+ 'thirdparty/respond/dest/respond.min.js',
146
+ 'thirdparty/modernizr/modernizr.js'
147
147
  );
148
148
  Requirements::combine_files('lte-ie8-shims.js',$shimRequirements);
149
149
  Requirements::process_combined_files(); // forces ss to generate the file regardless of blocking
@@ -161,7 +161,7 @@ Requirements::combine_files('application.css', $cssRequirements);
161
161
  // ----------
162
162
 
163
163
  $jsRequirements = array(
164
- 'vendor/jquery/jquery.min.js',
164
+ 'thirdparty/jquery/dist/jquery.min.js',
165
165
  'project/javascript/main.js',
166
166
  'project/javascript/forms.js'
167
167
  );
data/skel/skel.yml CHANGED
@@ -1,37 +1,45 @@
1
1
  base:
2
2
  project_types:
3
3
  drupal:
4
+ env_var: APPLICATION_ENV
4
5
  bonethug_files:
5
6
  - lib/drupal_flush_cache.php
6
7
  - lib/drupal_bootstrap.php
7
8
  - lib/boris.php
8
9
  - drupal-console
9
10
  drupal6:
11
+ env_var: APPLICATION_ENV
10
12
  bonethug_files:
11
13
  - lib/drupal_flush_cache.php
12
14
  - lib/drupal_bootstrap.php
13
15
  - lib/boris.php
14
16
  - drupal-console
15
17
  drupal7:
18
+ env_var: APPLICATION_ENV
16
19
  bonethug_files:
17
20
  - lib/drupal_flush_cache.php
18
21
  - lib/drupal_bootstrap.php
19
22
  - lib/boris.php
20
23
  - drupal-console
21
24
  drupal8:
25
+ env_var: APPLICATION_ENV
22
26
  bonethug_files:
23
27
  - lib/drupal_flush_cache.php
24
28
  - lib/drupal_bootstrap.php
25
29
  - lib/boris.php
26
30
  - drupal-console
27
31
  php:
32
+ env_var: APPLICATION_ENV
28
33
  bonethug_files:
29
34
  - lib/Thug/Conf/Load.php
30
35
  rails3:
36
+ env_var: RAILS_ENV
31
37
  bonethug_files:
32
38
  rails4:
39
+ env_var: RAILS_ENV
33
40
  bonethug_files:
34
41
  silverstripe3:
42
+ env_var: APPLICATION_ENV
35
43
  bonethug_files:
36
44
  - lib/ss_loadconf.php
37
45
  - lib/ss_bootstrap.php
@@ -39,6 +47,7 @@ project_types:
39
47
  - ss-console
40
48
  - public/_ss_environment.php
41
49
  sinatra:
50
+ env_var: RACK_ENV
42
51
  bonethug_files:
43
52
  exlcuded_paths:
44
53
  - Gemfile
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonethug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.86
4
+ version: 0.0.87
5
5
  platform: ruby
6
6
  authors:
7
7
  - azt3k
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-20 00:00:00.000000000 Z
11
+ date: 2014-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -340,6 +340,7 @@ files:
340
340
  - lib/tasks/bonethug.rake
341
341
  - scripts/mail
342
342
  - scripts/npm-bower
343
+ - scripts/optimise-mysql
343
344
  - scripts/ubuntu-12.04
344
345
  - scripts/ubuntu-14.04
345
346
  - scripts/ubuntu-14.04-dev