dev 2.0.47 → 2.0.48
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/dev.rb +3 -10
- data/lib/dev_environment.rb +9 -1
- data/lib/dev_svn.rb +26 -0
- metadata +2 -2
data/lib/dev.rb
CHANGED
@@ -1,20 +1,11 @@
|
|
1
|
-
#require 'dev_environment'
|
2
|
-
#require 'dev_commands'
|
3
|
-
#require 'dev_git'
|
4
|
-
#require 'dev_svn'
|
5
|
-
#require 'dev_tasks'
|
6
|
-
#require 'dev_projects'
|
7
1
|
require 'rake/clean'
|
8
2
|
|
9
3
|
Dir.glob("#{File.dirname(__FILE__)}/*.rb").each{|rb|
|
10
|
-
#puts rb
|
11
4
|
require_relative(rb)
|
12
5
|
}
|
13
6
|
|
14
7
|
CLOBBER.include('*.gem')
|
15
8
|
|
16
|
-
|
17
|
-
#Tasks.initialize(COMMANDS)
|
18
9
|
current=Projects.current
|
19
10
|
if(!current.nil?)
|
20
11
|
INFO.add "#{current[:name]} #{current[:url]}"
|
@@ -40,4 +31,6 @@ if(!defined?(NO_DEFAULT_TASK))
|
|
40
31
|
end
|
41
32
|
|
42
33
|
class Dev
|
43
|
-
end
|
34
|
+
end
|
35
|
+
|
36
|
+
TIMER=Timer.new
|
data/lib/dev_environment.rb
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
#require_relative 'environment.rb'
|
2
1
|
class Environment < Hash
|
3
2
|
|
4
3
|
def initialize
|
@@ -40,3 +39,12 @@ class Environment < Hash
|
|
40
39
|
return dir
|
41
40
|
end
|
42
41
|
end
|
42
|
+
class File
|
43
|
+
def self.amalgamate filename,source
|
44
|
+
File.open(filename,'w'){|file|
|
45
|
+
source.each{|source_file|
|
46
|
+
file.puts IO.read(source_file)
|
47
|
+
}
|
48
|
+
}
|
49
|
+
end
|
50
|
+
end
|
data/lib/dev_svn.rb
CHANGED
@@ -37,6 +37,32 @@ class Svn
|
|
37
37
|
false
|
38
38
|
end
|
39
39
|
|
40
|
+
def self.add source, directory=''
|
41
|
+
directory=Dir.pwd if directory.length < 1
|
42
|
+
Dir.chdir(directory) do
|
43
|
+
source.each{|f|
|
44
|
+
puts `svn add #{f} --parents` if `svn status #{f}`.include?('?')
|
45
|
+
puts `svn add #{f} --parents` if !system("svn status #{f}")
|
46
|
+
}
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.append_commit_message message,directory=''
|
51
|
+
directory=Dir.pwd if directory.length < 1
|
52
|
+
Dir.chdir(directory) do
|
53
|
+
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def self.commit message, directory=''
|
58
|
+
directory=Dir.pwd if directory.length < 1
|
59
|
+
Dir.chdir(directory) do
|
60
|
+
# svn commit -F commit_message_filename
|
61
|
+
puts `svn commit -m"commit all"`
|
62
|
+
`svn update`
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
40
66
|
# publish a directory to a new subversion path
|
41
67
|
# source_dir is the directory with the files to be published
|
42
68
|
# destination is the new subversion path URL
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.48
|
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: 2015-04-
|
12
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|