dev 2.0.61 → 2.0.62
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/dev_commands.rb +1 -3
- data/lib/dev_git.rb +24 -7
- data/lib/dev_svn.rb +47 -44
- metadata +9 -14
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8ff484dde9d17451f5e8c340fe7c988caa2b10c3
|
4
|
+
data.tar.gz: 59161e94aa5b5c90c17cd5cf9a95c1fe956cf303
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d1e1a847bd9ee9e6edf6c71d883e01beac537b67a1517864cd00b9fbfc8ea436164ccb86341081dc9edde0875112ad2f49145b3214b6d5dfaaafe31952faa243
|
7
|
+
data.tar.gz: 1bdaa551ed3add8af54755664178c57e4c5f57aed495bcb3f81f4877e0c6645132ab1e60a1241502e7ddb25fd6a6d9e3b1324fb4cad33ba3c257db46fb0d6f9f
|
data/lib/dev_commands.rb
CHANGED
@@ -820,12 +820,10 @@ class Pull < Array
|
|
820
820
|
end
|
821
821
|
end
|
822
822
|
end
|
823
|
-
#require_relative('internet.rb')
|
824
823
|
class Push < Array
|
825
824
|
def update
|
826
825
|
if(File.exists?('.git') && `git config --list`.include?('user.name='))
|
827
|
-
|
828
|
-
self << 'git push' if Git.branch != 'develop' && Internet.available?
|
826
|
+
self << 'git push --tags' if Git.branch != 'develop' && Internet.available?
|
829
827
|
end
|
830
828
|
end
|
831
829
|
end
|
data/lib/dev_git.rb
CHANGED
@@ -39,13 +39,30 @@ class Git
|
|
39
39
|
FileUtils.mkpath directory if !File.exists?(directory)
|
40
40
|
if(!File.exists?("#{directory}/.git"))
|
41
41
|
Dir.chdir(directory) do
|
42
|
-
`git init`
|
43
|
-
File.open('.gitignore','w'){|f|
|
44
|
-
|
45
|
-
|
46
|
-
}
|
47
|
-
`git add .gitignore`
|
48
|
-
`git commit -m'added .gitignore'`
|
42
|
+
`git init --bare`
|
43
|
+
#File.open('.gitignore','w'){|f|
|
44
|
+
# f.puts '### Mac ###'
|
45
|
+
# f.puts '*.DS_Store'
|
46
|
+
#}
|
47
|
+
#{}`git add .gitignore`
|
48
|
+
#{}`git commit -m'added .gitignore'`
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def self.tag directory,version
|
54
|
+
directory=Dir.pwd if directory.length == 0
|
55
|
+
Dir.chdir(directory) do
|
56
|
+
`git pull`
|
57
|
+
tags=`git tag`
|
58
|
+
if(!tags.include?(version))
|
59
|
+
puts 'tagging branch'
|
60
|
+
puts `git tag version -m'#{version}'`
|
61
|
+
puts 'committing'
|
62
|
+
puts `git commit -m'#{version}'`
|
63
|
+
puts 'pushing'
|
64
|
+
puts `git push --tags`
|
65
|
+
puts `git push`
|
49
66
|
end
|
50
67
|
end
|
51
68
|
end
|
data/lib/dev_svn.rb
CHANGED
@@ -68,58 +68,61 @@ class Svn
|
|
68
68
|
# destination is the new subversion path URL
|
69
69
|
# source_glob is a string or array of glob directives to specify files in source_dir to be publish
|
70
70
|
# source_glob defaults to '**/*' to publish all files in the source_dir
|
71
|
-
def self.publish
|
71
|
+
def self.publish destination, source_dir, source_glob='**/*'
|
72
72
|
|
73
73
|
output = "\n"
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
Dir.chdir(source_dir) do
|
84
|
-
files=FileList.new(source_glob).to_a
|
85
|
-
end
|
86
|
-
output = output + "\nfiles: #{files}.to_s"
|
87
|
-
|
88
|
-
pwd=Dir.pwd
|
89
|
-
Dir.mktmpdir{|dir|
|
74
|
+
if(`svn info #{destination} 2>&1`.include?('Revision:'))
|
75
|
+
#raise "Svn.publish: destination #{destination} already exists"
|
76
|
+
puts "Svn.publish: destination #{destination} already exists"
|
77
|
+
else
|
78
|
+
# create subversion directory
|
79
|
+
output = output + "svn mkdir #{destination} --parents --message mkdir_for_publishing"
|
80
|
+
if(!`svn mkdir #{destination} --parents --message mkdir_for_publishing`.include?('Committed'))
|
81
|
+
raise "failure 'svn mkdir #{destination} --parents --message mkdir_for_publishing'"
|
82
|
+
end
|
90
83
|
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
raise "failure 'svn checkout #{destination} #{dir}/to_publish_checkout'"
|
84
|
+
files=nil
|
85
|
+
Dir.chdir(source_dir) do
|
86
|
+
files=FileList.new(source_glob).to_a
|
95
87
|
end
|
88
|
+
output = output + "\nfiles: #{files}.to_s"
|
96
89
|
|
97
|
-
|
98
|
-
|
99
|
-
Dir.chdir("#{dir}/to_publish_checkout") do
|
100
|
-
File.open('add.txt','w'){|add_file|
|
90
|
+
pwd=Dir.pwd
|
91
|
+
Dir.mktmpdir{|dir|
|
101
92
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
93
|
+
# checkout new subversion directory
|
94
|
+
output = output + "\nsvn checkout #{destination} #{dir}/to_publish_checkout"
|
95
|
+
if(!`svn checkout #{destination} #{dir}/to_publish_checkout`.include?('Checked out'))
|
96
|
+
raise "failure 'svn checkout #{destination} #{dir}/to_publish_checkout'"
|
97
|
+
end
|
98
|
+
|
99
|
+
# copy files into the checkout out subversion directory to_publish
|
100
|
+
raise "#{dir}/to_publish_checkout does not exist" if(!File.exists?("#{dir}/to_publish_checkout"))
|
101
|
+
Dir.chdir("#{dir}/to_publish_checkout") do
|
102
|
+
File.open('add.txt','w'){|add_file|
|
103
|
+
|
104
|
+
files.each{|f|
|
105
|
+
fdir=File.dirname(f)
|
106
|
+
FileUtils.mkdir_p(fdir) if(fdir.length > 0 && !File.exists?(fdir))
|
107
|
+
FileUtils.cp("#{source_dir}/#{f}","#{f}")
|
108
|
+
add_file.puts f
|
109
|
+
}
|
110
|
+
add_file.close
|
107
111
|
}
|
108
|
-
add_file.close
|
109
|
-
}
|
110
112
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
113
|
+
output = output + "\nsvn add --parents --targets add.txt 2>&1"
|
114
|
+
`svn add --parents --targets add.txt 2>&1`
|
115
|
+
commit_output = `svn commit -m"add" 2>&1`
|
116
|
+
output = output + "\n#{commit_output}"
|
117
|
+
if(!commit_output.include?("Committed"))
|
118
|
+
raise "failure 'svn commit -m'added files''" + output
|
119
|
+
end
|
117
120
|
end
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
121
|
+
|
122
|
+
#begin
|
123
|
+
FileUtils.rm_r "#{dir}/to_publish_checkout"
|
124
|
+
output
|
125
|
+
}
|
126
|
+
end
|
124
127
|
end
|
125
128
|
end
|
metadata
CHANGED
@@ -1,30 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.62
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Lou Parslow
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-29 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rspec
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '3.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '3.0'
|
30
27
|
description: development tasks
|
@@ -45,27 +42,25 @@ files:
|
|
45
42
|
homepage: http://rubygems.org/gems/dev
|
46
43
|
licenses:
|
47
44
|
- Apache 2.0
|
45
|
+
metadata: {}
|
48
46
|
post_install_message:
|
49
47
|
rdoc_options: []
|
50
48
|
require_paths:
|
51
49
|
- lib
|
52
50
|
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
51
|
requirements:
|
55
|
-
- -
|
52
|
+
- - ">="
|
56
53
|
- !ruby/object:Gem::Version
|
57
54
|
version: 1.9.3
|
58
55
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
59
|
-
none: false
|
60
56
|
requirements:
|
61
|
-
- -
|
57
|
+
- - ">="
|
62
58
|
- !ruby/object:Gem::Version
|
63
59
|
version: '0'
|
64
60
|
requirements: []
|
65
61
|
rubyforge_project:
|
66
|
-
rubygems_version:
|
62
|
+
rubygems_version: 2.4.5
|
67
63
|
signing_key:
|
68
|
-
specification_version:
|
64
|
+
specification_version: 4
|
69
65
|
summary: dev
|
70
66
|
test_files: []
|
71
|
-
has_rdoc:
|