yodel_development_environment 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -58,17 +58,28 @@ class DevelopmentSitesPage < RecordProxyPage
58
58
  return {success: false, reason: 'Git error: ' + $1} if result =~ /error: (.+)$/
59
59
  end
60
60
 
61
+ # when running as a daemon, the root user will own the cloned repos
62
+ Dir.chdir(Yodel.config.sites_root) do
63
+ return unless Yodel.config.owner_user
64
+ if Yodel.config.owner_group != 0
65
+ FileUtils.chown_R(Yodel.config.owner_user, Yodel.config.owner_group, site_folder)
66
+ else
67
+ FileUtils.chown_R(Yodel.config.owner_user, nil, site_folder)
68
+ end
69
+ end
70
+
61
71
  # create a new site from the cloned site.yml file
62
72
  site_yml = File.join(Yodel.config.sites_root, site_folder, Yodel::SITE_YML_FILE_NAME)
63
73
  return {success: false, reason: 'Site yml file was not cloned successfully'} unless File.exist?(site_yml)
64
74
  new_site = Site.load_from_site_yaml(site_yml)
65
75
 
66
76
  # find an unused default local domain
67
- domain = "#{identifier}.yodel"
77
+ domain_identifier = identifier.gsub('_', '')
78
+ domain = "#{domain_identifier}.yodel"
68
79
  counter = 0
69
80
  while Site.exists?(domains: domain)
70
81
  counter += 1
71
- domain = "#{identifier}-#{counter}.yodel"
82
+ domain = "#{domain_identifier}-#{counter}.yodel"
72
83
  end
73
84
 
74
85
  # add the remote and a new default local domain
@@ -1,3 +1,3 @@
1
1
  module YodelDevelopmentEnvironment
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yodel_development_environment
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-12-09 00:00:00.000000000Z
12
+ date: 2011-12-12 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: Yodel Development Environment
15
15
  email: