dev_tasks 1.0.40 → 1.0.41

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.
data/lib/tasks.rb CHANGED
@@ -2,24 +2,9 @@ require 'rake'
2
2
  require 'rake/clean'
3
3
 
4
4
  class Tasks
5
- @@commands=nil
5
+ #@@commands=nil
6
6
  @@quiet=false
7
7
 
8
- def self.commands
9
- if(@@commands.nil?)
10
- @@commands=Hash.new
11
- [:pull,:update,:build,:test,:analyze,:doc,:clean,:publish,:clobber,:add,:commit,:push].each{|k| @@commands[k]=[]}
12
- end
13
- @@commands
14
- end
15
-
16
- def self.initialize commands
17
- @@commands=commands
18
- [:pull,:update,:build,:test,:analyze,:doc,:clean,:publish,:clobber,:add,:commit,:push].each{|k|
19
- @@commands[k]=[] if(!@@commands.has_key?(k))
20
- }
21
- end
22
-
23
8
  def self.quiet
24
9
  @@quiet
25
10
  end
@@ -40,10 +25,12 @@ class Tasks
40
25
  end
41
26
 
42
27
  def self.execute_task task
43
- if(Tasks.commands.has_key?(task))
44
- puts "[:#{task}]" if(!Tasks.quiet)
45
- Tasks.execute(Tasks.commands[task])
46
- end
28
+ if(defined?(COMMANDS))
29
+ if(COMMANDS.has_key?(task))
30
+ puts "[:#{task}]" if(!Tasks.quiet)
31
+ Tasks.execute(COMMANDS[task])
32
+ end
33
+ end
47
34
  end
48
35
  end
49
36
 
@@ -1,16 +1,10 @@
1
1
  require_relative('../../lib/dev_tasks.rb')
2
2
 
3
3
  CLOBBER.include('*.gem')
4
- Tasks.initialize(
4
+ COMMANDS=
5
5
  {
6
6
  :build => ['gem build gem-example.gemspec'],
7
7
  :test => ['rspec'],
8
- })
9
-
10
- commands=
11
- {
12
- :build => ['gem build gem-example.gemspec'],
13
- :test => ['rspec']
14
8
  }
15
9
 
16
10
  task :default => [:build,:test,:clobber]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_tasks
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.40
4
+ version: 1.0.41
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: