dev_tasks 1.0.37 → 1.0.38

Sign up to get free protection for your applications and to get access to all the features.
data/lib/commands.rb CHANGED
@@ -1,63 +1,63 @@
1
- require_relative './build.rb'
2
- require_relative './test.rb'
3
- require_relative './add.rb'
4
- require_relative './commit.rb'
5
- require_relative './publish.rb'
6
- require_relative './pull.rb'
7
- require_relative './push.rb'
8
- require_relative './setup.rb'
9
- require_relative './upgrade.rb'
10
- require_relative './timer.rb'
11
- require_relative './verify.rb'
12
-
13
- class Commands < Hash
14
- attr_accessor :build
15
-
16
- def initialize
17
- self[:pull] = Pull.new if(Environment.scm=='git' && Environment.scm_origin.length > 0)
18
- self[:upgrade] = Upgrade.new
19
- self[:setup] = Setup.new
20
- self[:build] = Build.new
21
- self[:test] = Test.new
22
- self[:add] = Add.new
23
- self[:commit] = Commit.new
24
- self[:push] = Push.new
25
- self[:verify] = Verify.new
26
- self[:publish] = Publish.new
27
- end
28
-
29
- def update
30
- self[:upgrade].update
31
- self[:setup].update
32
- self[:build].update
33
- self[:verify].update
34
- self[:publish].update
35
- end
36
-
37
- def execute_task task
38
- sym_task = task.to_sym
39
- if(self.has_key?(sym_task))
40
- self[sym_task].update if self[sym_task].respond_to?(:update)
41
- if(self[sym_task].length>0)
42
- Logger.start_task task
43
- self[sym_task].execute
44
- Logger.end_task task
45
- else
46
- self.delete sym_task
47
- end
48
- end
49
- end
50
-
51
-
52
- def show
53
- self.each do |key,array|
54
- if(array.length > 0)
55
- puts key
56
- array.each {|v|
57
- puts " " + Color.green + v + Color.clear + " "
58
- }
59
- end
60
- end
61
- puts " "
62
- end
1
+ require_relative './build.rb'
2
+ require_relative './test.rb'
3
+ require_relative './add.rb'
4
+ require_relative './commit.rb'
5
+ require_relative './publish.rb'
6
+ require_relative './pull.rb'
7
+ require_relative './push.rb'
8
+ require_relative './setup.rb'
9
+ require_relative './upgrade.rb'
10
+ require_relative './timer.rb'
11
+ require_relative './verify.rb'
12
+
13
+ class Commands < Hash
14
+ attr_accessor :build
15
+
16
+ def initialize
17
+ self[:pull] = Pull.new if(Environment.scm=='git' && Environment.scm_origin.length > 0)
18
+ self[:upgrade] = Upgrade.new
19
+ self[:setup] = Setup.new
20
+ self[:build] = Build.new
21
+ self[:test] = Test.new
22
+ self[:add] = Add.new
23
+ self[:commit] = Commit.new
24
+ self[:push] = Push.new
25
+ self[:verify] = Verify.new
26
+ self[:publish] = Publish.new
27
+ end
28
+
29
+ def update
30
+ self[:upgrade].update
31
+ self[:setup].update
32
+ self[:build].update
33
+ self[:verify].update
34
+ self[:publish].update
35
+ end
36
+
37
+ def execute_task task
38
+ sym_task = task.to_sym
39
+ if(self.has_key?(sym_task))
40
+ self[sym_task].update if self[sym_task].respond_to?(:update)
41
+ if(self[sym_task].length>0)
42
+ Logger.start_task task
43
+ self[sym_task].execute
44
+ Logger.end_task task
45
+ else
46
+ self.delete sym_task
47
+ end
48
+ end
49
+ end
50
+
51
+
52
+ def show
53
+ self.each do |key,array|
54
+ if(array.length > 0)
55
+ puts key
56
+ array.each {|v|
57
+ puts " " + Color.green + v + Color.clear + " "
58
+ }
59
+ end
60
+ end
61
+ puts " "
62
+ end
63
63
  end
data/lib/htmllog.rb CHANGED
@@ -1,53 +1,53 @@
1
- class HtmlLog
2
- def initialize
3
- FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
4
- @file=File.open("#{Environment.dev_root}/log/rake.html",'w')
5
- @file.write '<html>'
6
- @file.write '<body>'
7
- @file.write '<h1>'
8
- @file.write "rake"
9
- ARGV.each do|a|
10
- puts " #{a}"
11
- end
12
- @file.write '</h1>'
13
- @file.write '<h2>directory:' + File.dirname(__FILE__) + '</h2>'
14
- @file.write '<h2>time:' + Time.now.to_s + '</h2>'
15
- @current_task=nil
16
- @task_commands=Hash.new
17
- end
18
-
19
- def finalize
20
- @file.write('<ul>')
21
- @task_commands.each{|k,v|
22
-
23
- @file.write('<li>')
24
- @file.write(k)
25
- @file.write('</li>')
26
-
27
- }
28
- @file.write '</ul>'
29
- @file.write '</body>'
30
- @file.write '</html>'
31
- @file.close
32
- end
33
-
34
- def start_task task
35
- @current_task=task
36
- @task_commands[task]=Hash.new
37
- @task_commands[task][:command_results]=Array.new
38
- end
39
-
40
- def end_task task
41
-
42
- @current_task=nil
43
- #@file
44
- end
45
-
46
- def start_command command
47
-
48
- end
49
-
50
- def end_command command
51
- #@task_commands[@current_task][:command_results] << result
52
- end
1
+ class HtmlLog
2
+ def initialize
3
+ FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
4
+ @file=File.open("#{Environment.dev_root}/log/rake.html",'w')
5
+ @file.write '<html>'
6
+ @file.write '<body>'
7
+ @file.write '<h1>'
8
+ @file.write "rake"
9
+ ARGV.each do|a|
10
+ puts " #{a}"
11
+ end
12
+ @file.write '</h1>'
13
+ @file.write '<h2>directory:' + File.dirname(__FILE__) + '</h2>'
14
+ @file.write '<h2>time:' + Time.now.to_s + '</h2>'
15
+ @current_task=nil
16
+ @task_commands=Hash.new
17
+ end
18
+
19
+ def finalize
20
+ @file.write('<ul>')
21
+ @task_commands.each{|k,v|
22
+
23
+ @file.write('<li>')
24
+ @file.write(k)
25
+ @file.write('</li>')
26
+
27
+ }
28
+ @file.write '</ul>'
29
+ @file.write '</body>'
30
+ @file.write '</html>'
31
+ @file.close
32
+ end
33
+
34
+ def start_task task
35
+ @current_task=task
36
+ @task_commands[task]=Hash.new
37
+ @task_commands[task][:command_results]=Array.new
38
+ end
39
+
40
+ def end_task task
41
+
42
+ @current_task=nil
43
+ #@file
44
+ end
45
+
46
+ def start_command command
47
+
48
+ end
49
+
50
+ def end_command command
51
+ #@task_commands[@current_task][:command_results] << result
52
+ end
53
53
  end
data/lib/jsonlog.rb CHANGED
@@ -1,18 +1,18 @@
1
- require 'json'
2
-
3
- class JsonLog
4
- def initialize
5
- end
6
-
7
- def finalize
8
- name='DEV'
9
- ARGV.each do|a|
10
- name="#{name}.#{a}"
11
- end
12
- name="#{name}.json"
13
- FileUtils.mkdir("#{DEV[:dev_root]}/log") if !File.exists?("#{DEV[:dev_root]}/log")
14
- File.open("#{DEV[:dev_root]}/log/#{name}","w") do |f|
15
- f.write(JSON.pretty_generate(DEV))
16
- end
17
- end
1
+ require 'json'
2
+
3
+ class JsonLog
4
+ def initialize
5
+ end
6
+
7
+ def finalize
8
+ name='DEV'
9
+ ARGV.each do|a|
10
+ name="#{name}.#{a}"
11
+ end
12
+ name="#{name}.json"
13
+ FileUtils.mkdir("#{DEV[:dev_root]}/log") if !File.exists?("#{DEV[:dev_root]}/log")
14
+ File.open("#{DEV[:dev_root]}/log/#{name}","w") do |f|
15
+ f.write(JSON.pretty_generate(DEV))
16
+ end
17
+ end
18
18
  end
data/lib/logger.rb CHANGED
@@ -1,37 +1,37 @@
1
- require_relative './htmllog.rb'
2
- require_relative './jsonlog.rb'
3
- require_relative './yamllog.rb'
4
-
5
- class Logger
6
- @@timers=Hash.new
7
- @@html_log=HtmlLog.new
8
- @@json_log=JsonLog.new
9
- @@yaml_log=YamlLog.new
10
- def self.start_task task
11
- @@timers[task]=Timer.new
12
- Console.announce_task_start task
13
- @@html_log.start_task task
14
- end
15
-
16
- def self.end_task task
17
- elapsed=@@timers[task].elapsed
18
- @@html_log.end_task task
19
- end
20
-
21
- def self.finalize
22
- @@html_log.finalize
23
- @@json_log.finalize
24
- @@yaml_log.finalize
25
- end
26
-
27
- def self.start_command command
28
- Console.start_command command
29
- //
30
- @@html_log.start_command command
31
- end
32
-
33
- def self.end_command command
34
- Console.end_command command
35
- @@html_log.end_command command
36
- end
1
+ require_relative './htmllog.rb'
2
+ require_relative './jsonlog.rb'
3
+ require_relative './yamllog.rb'
4
+
5
+ class Logger
6
+ @@timers=Hash.new
7
+ @@html_log=HtmlLog.new
8
+ @@json_log=JsonLog.new
9
+ @@yaml_log=YamlLog.new
10
+ def self.start_task task
11
+ @@timers[task]=Timer.new
12
+ Console.announce_task_start task
13
+ @@html_log.start_task task
14
+ end
15
+
16
+ def self.end_task task
17
+ elapsed=@@timers[task].elapsed
18
+ @@html_log.end_task task
19
+ end
20
+
21
+ def self.finalize
22
+ @@html_log.finalize
23
+ @@json_log.finalize
24
+ @@yaml_log.finalize
25
+ end
26
+
27
+ def self.start_command command
28
+ Console.start_command command
29
+ //
30
+ @@html_log.start_command command
31
+ end
32
+
33
+ def self.end_command command
34
+ Console.end_command command
35
+ @@html_log.end_command command
36
+ end
37
37
  end
data/lib/teardown.rb CHANGED
@@ -1,4 +1,4 @@
1
- require_relative('./commandarray.rb')
2
- class TearDown < CommandArray
3
-
1
+ require_relative('./commandarray.rb')
2
+ class TearDown < CommandArray
3
+
4
4
  end
data/lib/yamllog.rb CHANGED
@@ -1,18 +1,18 @@
1
- require 'yaml'
2
-
3
- class YamlLog
4
- def initialize
5
- end
6
-
7
- def finalize
8
- name='DEV'
9
- ARGV.each do|a|
10
- name="#{name}.#{a}"
11
- end
12
- name="#{name}.yml"
13
- FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
14
- File.open("#{Environment.dev_root}/log/#{name}","w") do |f|
15
- f.write(DEV.to_yaml)
16
- end
17
- end
1
+ require 'yaml'
2
+
3
+ class YamlLog
4
+ def initialize
5
+ end
6
+
7
+ def finalize
8
+ name='DEV'
9
+ ARGV.each do|a|
10
+ name="#{name}.#{a}"
11
+ end
12
+ name="#{name}.yml"
13
+ FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
14
+ File.open("#{Environment.dev_root}/log/#{name}","w") do |f|
15
+ f.write(DEV.to_yaml)
16
+ end
17
+ end
18
18
  end
@@ -1,3 +1,3 @@
1
- require_relative '../../../../lib/dev_tasks.rb'
2
- require 'json'
1
+ require_relative '../../../../lib/dev_tasks.rb'
2
+ require 'json'
3
3
  require 'yaml'
metadata CHANGED
@@ -1,7 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.37
4
+ version: 1.0.38
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Lou Parslow
@@ -11,31 +12,35 @@ cert_chain: []
11
12
  date: 2015-01-12 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: dev_environment
15
+ name: rspec
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
- - - '>='
19
+ - - ! '>='
18
20
  - !ruby/object:Gem::Version
19
21
  version: 0.0.13
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
- - - '>='
27
+ - - ! '>='
25
28
  - !ruby/object:Gem::Version
26
29
  version: 0.0.13
27
30
  - !ruby/object:Gem::Dependency
28
- name: dev_environment
31
+ name: rspec
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
- - - '>='
35
+ - - ! '>='
32
36
  - !ruby/object:Gem::Version
33
37
  version: 0.0.13
34
38
  type: :development
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
- - - '>='
43
+ - - ! '>='
39
44
  - !ruby/object:Gem::Version
40
45
  version: 0.0.13
41
46
  description: defines rake tasks for ruby and C# projects
@@ -89,26 +94,27 @@ files:
89
94
  homepage: http://rubygems.org/gems/dev_tasks
90
95
  licenses:
91
96
  - Apache 2.0
92
- metadata: {}
93
97
  post_install_message:
94
98
  rdoc_options: []
95
99
  require_paths:
96
100
  - lib
97
101
  required_ruby_version: !ruby/object:Gem::Requirement
102
+ none: false
98
103
  requirements:
99
- - - '>='
104
+ - - ! '>='
100
105
  - !ruby/object:Gem::Version
101
106
  version: 1.9.3
102
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
+ none: false
103
109
  requirements:
104
- - - '>='
110
+ - - ! '>='
105
111
  - !ruby/object:Gem::Version
106
112
  version: '0'
107
113
  requirements: []
108
114
  rubyforge_project:
109
- rubygems_version: 2.0.14
115
+ rubygems_version: 1.8.28
110
116
  signing_key:
111
- specification_version: 4
117
+ specification_version: 3
112
118
  summary: development rake tasks
113
119
  test_files: []
114
120
  has_rdoc:
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: b4dd5c121f771bbe4a5712e383e1319718276f6b
4
- data.tar.gz: 5ceef85a5361f84cff9274f0084e0fef16a0c98c
5
- SHA512:
6
- metadata.gz: 795159f0daabd97d240b5b1f00df04cb7967f615f2db41c236ddf781065f2bb5f9180e04854a133e3b20d051ff4ab4dec059fe0653a721978672f648c63e360f
7
- data.tar.gz: 4996749b3c647a9ab9994faffc87626de4c2241f8418126190be2a280ee70440e122422bf73d0008d5d0528506fc67db483b1356cde3fe26d0d3dc7bcc5768bc