totem 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/totem.rb +27 -9
- data/lib/totem/shell_cmds/new.rb +1 -1
- data/lib/totem/version.rb +1 -1
- data/totem.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1e1fef0efa244f9ddb47614e6d7abe6bfe9bbc8
|
4
|
+
data.tar.gz: 36e76c0eb66c1b3cad43d3075681d9610c5e7e31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d8028e8a41664dbdad40914fd43decc587379f0938268d75ff07f371028660a0d03b3718d10259e9d517fe07ca2cd94e53faac7e6c16830830e82a05255cfa8
|
7
|
+
data.tar.gz: e4a432d15367fe08653fe82f320a7747ca7dcacac427a6cea4d7d720c6379559a27514c032c2088088c551a23f2d46477974e9cb41fa4d77abd5fc0cfe8a2f32
|
data/lib/totem.rb
CHANGED
@@ -29,6 +29,11 @@ module Totem
|
|
29
29
|
return (@env ||= (ENV['TOTEM_ENV'] || 'development'))
|
30
30
|
end
|
31
31
|
|
32
|
+
def self.env=(val)
|
33
|
+
raise 'env may only be set once and must be set before calling logger' if @logger || @env
|
34
|
+
@env = val
|
35
|
+
end
|
36
|
+
|
32
37
|
def self.load_app
|
33
38
|
require "#{Totem.root}/app/loader.rb"
|
34
39
|
end
|
@@ -37,10 +42,20 @@ module Totem
|
|
37
42
|
return @component ||= ENV['TOTEM_COMPONENT']
|
38
43
|
end
|
39
44
|
|
45
|
+
def self.component=(val)
|
46
|
+
raise 'component may only be set once and must be set before calling logger' if @logger || @component
|
47
|
+
@component = val
|
48
|
+
end
|
49
|
+
|
40
50
|
def self.instance
|
41
51
|
return @instance || ENV['TOTEM_INSTANCE']
|
42
52
|
end
|
43
53
|
|
54
|
+
def self.instance=(val)
|
55
|
+
raise 'instance may only be set once and must be set before calling logger' if @logger || @instance
|
56
|
+
@instance = val
|
57
|
+
end
|
58
|
+
|
44
59
|
def self.logger=(val)
|
45
60
|
return @logger = val
|
46
61
|
end
|
@@ -60,6 +75,18 @@ module Totem
|
|
60
75
|
return true
|
61
76
|
end
|
62
77
|
|
78
|
+
def self.process_name
|
79
|
+
name = "#{env}"
|
80
|
+
name << "_#{component}" if component && component.length > 0
|
81
|
+
name << "_#{instance}" if instance && instance.length > 0
|
82
|
+
|
83
|
+
return name
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.log_file_path
|
87
|
+
return File.join(root, 'log', "#{process_name}.log")
|
88
|
+
end
|
89
|
+
|
63
90
|
private
|
64
91
|
|
65
92
|
def self.log_to_stdout
|
@@ -68,15 +95,6 @@ module Totem
|
|
68
95
|
return nil
|
69
96
|
end
|
70
97
|
|
71
|
-
def self.log_file_path
|
72
|
-
name = "#{env}"
|
73
|
-
name << "_#{component}" if component && component.length > 0
|
74
|
-
name << "_#{instance}" if instance && instance.length > 0
|
75
|
-
name << '.log'
|
76
|
-
|
77
|
-
return File.join(root, 'log', name)
|
78
|
-
end
|
79
|
-
|
80
98
|
def self.log_to_file
|
81
99
|
init_logger(log_file_path)
|
82
100
|
|
data/lib/totem/shell_cmds/new.rb
CHANGED
data/lib/totem/version.rb
CHANGED
data/totem.gemspec
CHANGED
@@ -15,8 +15,8 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
|
-
gem.require_paths = [
|
18
|
+
gem.require_paths = ['lib']
|
19
19
|
|
20
|
-
gem.add_development_dependency(
|
21
|
-
gem.add_development_dependency(
|
20
|
+
gem.add_development_dependency('bundler', '~> 1.5')
|
21
|
+
gem.add_development_dependency('rake')
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: totem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Remesch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|