ktec-subtrac 0.1.44 → 0.1.45

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION.yml +1 -1
  2. data/lib/subtrac/config.rb +43 -44
  3. metadata +1 -1
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 44
4
+ :patch: 45
@@ -36,8 +36,7 @@ module Subtrac
36
36
  end
37
37
  if yamlFile
38
38
  if yamlFile[SUBTRAC_ENV]
39
- @APP_CONFIG = yamlFile[SUBTRAC_ENV]
40
- @data = @APP_CONFIG # TODO: Deprecate APP_CONFIG
39
+ @data = yamlFile[SUBTRAC_ENV]
41
40
  else
42
41
  raise StandardError, "config/config.yml exists, but doesn't have a configuration for #{SUBTRAC_ENV}."
43
42
  end
@@ -51,7 +50,7 @@ module Subtrac
51
50
  def save
52
51
  # save the things that might have changed
53
52
  file_path = File.join(subtrac_path, USER_CONFIG_FILE)
54
- user_config = {SUBTRAC_ENV => @APP_CONFIG}
53
+ user_config = {SUBTRAC_ENV => @data}
55
54
  open(file_path, 'w') {|f| YAML.dump(user_config, f)}
56
55
  end
57
56
 
@@ -85,45 +84,45 @@ module Subtrac
85
84
 
86
85
  # User configured options
87
86
  def server_name
88
- @server_name ||= @APP_CONFIG[:server_name]
87
+ @server_name ||= @data[:server_name]
89
88
  end
90
89
 
91
90
  def server_name=(name)
92
- @APP_CONFIG[:server_name] = @server_name = name
91
+ @data[:server_name] = @server_name = name
93
92
  end
94
93
 
95
94
  def server_hostname
96
- @server_hostname ||= @APP_CONFIG[:server_hostname]
95
+ @server_hostname ||= @data[:server_hostname]
97
96
  end
98
97
 
99
98
  def server_hostname=(name)
100
- @APP_CONFIG[:server_hostname] = @server_hostname = name
99
+ @data[:server_hostname] = @server_hostname = name
101
100
  end
102
101
 
103
102
  def default_client
104
- @default_client ||= @APP_CONFIG[:default_client]
103
+ @default_client ||= @data[:default_client]
105
104
  end
106
105
 
107
106
  def default_client=(name)
108
- @APP_CONFIG[:default_client] = @default_client = name
107
+ @data[:default_client] = @default_client = name
109
108
  end
110
109
 
111
110
  def default_project
112
- @default_project ||= @APP_CONFIG[:default_project]
111
+ @default_project ||= @data[:default_project]
113
112
  end
114
113
 
115
114
  def default_project=(name)
116
115
  puts "Updating default_project to #{name}"
117
- @APP_CONFIG[:default_project] = @default_project = name
116
+ @data[:default_project] = @default_project = name
118
117
  end
119
118
 
120
119
  def default_project_type
121
- @default_project_type ||= @APP_CONFIG[:default_project_type]
120
+ @default_project_type ||= @data[:default_project_type]
122
121
  end
123
122
 
124
123
  def default_project_type=(name)
125
124
  puts "Updating default_project_type to #{name}"
126
- @APP_CONFIG[:default_project_type] = @default_project_type = name
125
+ @data[:default_project_type] = @default_project_type = name
127
126
  end
128
127
 
129
128
 
@@ -145,130 +144,130 @@ module Subtrac
145
144
  end
146
145
 
147
146
  def install_dir
148
- @install_dir ||= File.expand_path(@APP_CONFIG[:installation_dir])
147
+ @install_dir ||= File.expand_path(@data[:installation_dir])
149
148
  end
150
149
 
151
150
  def install_dir=(name)
152
151
  puts "Setting new install_dir variable to #{name}"
153
- @APP_CONFIG[:installation_dir] = @install_dir = name
152
+ @data[:installation_dir] = @install_dir = name
154
153
  end
155
154
 
156
155
  def apache_conf_dir
157
- @apache_conf_dir ||= @APP_CONFIG[:apache_conf_dir]
156
+ @apache_conf_dir ||= @data[:apache_conf_dir]
158
157
  end
159
158
 
160
159
  def apache_conf_dir=(name)
161
- @APP_CONFIG[:apache_conf_dir] = @apache_conf_dir = name
160
+ @data[:apache_conf_dir] = @apache_conf_dir = name
162
161
  end
163
162
 
164
163
  def docs_dir
165
- @docs_dir ||= File.join(install_dir,@APP_CONFIG[:dirs][:docs])
164
+ @docs_dir ||= File.join(install_dir,@data[:dirs][:docs])
166
165
  end
167
166
 
168
167
  def svn_dir
169
- @svn_dir ||= File.join(install_dir,@APP_CONFIG[:dirs][:svn])
168
+ @svn_dir ||= File.join(install_dir,@data[:dirs][:svn])
170
169
  end
171
170
 
172
171
  def trac_dir
173
- @trac_dir ||= File.join(install_dir,@APP_CONFIG[:dirs][:trac])
172
+ @trac_dir ||= File.join(install_dir,@data[:dirs][:trac])
174
173
  end
175
174
 
176
175
  def temp_dir
177
- @temp_dir ||= File.join(install_dir,@APP_CONFIG[:dirs][:temp])
176
+ @temp_dir ||= File.join(install_dir,@data[:dirs][:temp])
178
177
  end
179
178
 
180
179
  def log_dir
181
- @log_dir ||= File.join(install_dir,@APP_CONFIG[:dirs][:log])
180
+ @log_dir ||= File.join(install_dir,@data[:dirs][:log])
182
181
  end
183
182
 
184
183
  def locations_dir
185
- @locations_dir ||= File.join(install_dir,@APP_CONFIG[:dirs][:locations])
184
+ @locations_dir ||= File.join(install_dir,@data[:dirs][:locations])
186
185
  end
187
186
 
188
187
  # Urls
189
188
  def svn_url
190
- @svn_url ||= @APP_CONFIG[:urls][:svn]
189
+ @svn_url ||= @data[:urls][:svn]
191
190
  end
192
191
 
193
192
  def trac_permissions
194
- @trac_permissions ||= @APP_CONFIG[:trac][:permissions]
193
+ @trac_permissions ||= @data[:trac][:permissions]
195
194
  end
196
195
 
197
196
  # LDAP
198
197
  def enable_ldap
199
- @enable_ldap ||= @APP_CONFIG[:ldap][:enable]
198
+ @enable_ldap ||= @data[:ldap][:enable]
200
199
  end
201
200
 
202
201
  def enable_ldap=(value)
203
- @APP_CONFIG[:ldap][:enable] = @enable_ldap = value
202
+ @data[:ldap][:enable] = @enable_ldap = value
204
203
  end
205
204
 
206
205
  def ldap_host
207
- @ldap_host ||= @APP_CONFIG[:ldap][:host]
206
+ @ldap_host ||= @data[:ldap][:host]
208
207
  end
209
208
 
210
209
  def ldap_host=(value)
211
- @APP_CONFIG[:ldap][:host] = @ldap_host = value
210
+ @data[:ldap][:host] = @ldap_host = value
212
211
  end
213
212
 
214
213
  def ldap_port
215
- @ldap_port ||= @APP_CONFIG[:ldap][:port]
214
+ @ldap_port ||= @data[:ldap][:port]
216
215
  end
217
216
 
218
217
  def ldap_port=(value)
219
- @APP_CONFIG[:ldap][:port] = @ldap_port = value
218
+ @data[:ldap][:port] = @ldap_port = value
220
219
  end
221
220
 
222
221
  def ldap_basedn
223
- @ldap_basedn ||= @APP_CONFIG[:ldap][:basedn]
222
+ @ldap_basedn ||= @data[:ldap][:basedn]
224
223
  end
225
224
 
226
225
  def ldap_basedn=(value)
227
- @APP_CONFIG[:ldap][:basedn] = @ldap_basedn = value
226
+ @data[:ldap][:basedn] = @ldap_basedn = value
228
227
  end
229
228
 
230
229
  def ldap_user_rdn
231
- @ldap_user_rdn ||= @APP_CONFIG[:ldap][:user_rdn]
230
+ @ldap_user_rdn ||= @data[:ldap][:user_rdn]
232
231
  end
233
232
 
234
233
  def ldap_user_rdn=(value)
235
- @APP_CONFIG[:ldap][:user_rdn] = @ldap_user_rdn = value
234
+ @data[:ldap][:user_rdn] = @ldap_user_rdn = value
236
235
  end
237
236
 
238
237
  def ldap_group_rdn
239
- @ldap_group_rdn ||= @APP_CONFIG[:ldap][:group_rdn]
238
+ @ldap_group_rdn ||= @data[:ldap][:group_rdn]
240
239
  end
241
240
 
242
241
  def ldap_group_rdn=(value)
243
- @APP_CONFIG[:ldap][:group_rdn] = @ldap_group_rdn = value
242
+ @data[:ldap][:group_rdn] = @ldap_group_rdn = value
244
243
  end
245
244
 
246
245
  def ldap_store_bind
247
- @ldap_store_bind ||= @APP_CONFIG[:ldap][:store_bind]
246
+ @ldap_store_bind ||= @data[:ldap][:store_bind]
248
247
  end
249
248
 
250
249
  def ldap_store_bind=(value)
251
- @APP_CONFIG[:ldap][:store_bind] = @ldap_store_bind = value
250
+ @data[:ldap][:store_bind] = @ldap_store_bind = value
252
251
  end
253
252
 
254
253
  def ldap_store_bind
255
- @ldap_bind_password ||= @APP_CONFIG[:ldap][:bind_password]
254
+ @ldap_bind_password ||= @data[:ldap][:bind_password]
256
255
  end
257
256
 
258
257
  def ldap_bind_user
259
- @ldap_bind_user ||= @APP_CONFIG[:ldap][:bind_user]
258
+ @ldap_bind_user ||= @data[:ldap][:bind_user]
260
259
  end
261
260
 
262
261
  def ldap_bind_user=(value)
263
- @APP_CONFIG[:ldap][:bind_user] = @ldap_bind_user = value
262
+ @data[:ldap][:bind_user] = @ldap_bind_user = value
264
263
  end
265
264
 
266
265
  def ldap_bind_passwd
267
- @ldap_bind_passwd ||= @APP_CONFIG[:ldap][:bind_passwd]
266
+ @ldap_bind_passwd ||= @data[:ldap][:bind_passwd]
268
267
  end
269
268
 
270
269
  def ldap_bind_passwd=(value)
271
- @APP_CONFIG[:ldap][:bind_passwd] = @ldap_bind_passwd = value
270
+ @data[:ldap][:bind_passwd] = @ldap_bind_passwd = value
272
271
  end
273
272
 
274
273
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ktec-subtrac
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.44
4
+ version: 0.1.45
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Salisbury