wire-framework 0.1.3 → 0.1.3.1
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.
- checksums.yaml +4 -4
- data/lib/app/repo/svn.rb +8 -8
- data/lib/wire.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea7b83cba728384945f10c7f35e48976c44212a5
|
4
|
+
data.tar.gz: 4fcb6129d6fffdb135b6a5503e72965458d9ff78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d83d852893bee1873dc2f33ba1abea191025b07a8742ea663a8f8d6d9fb35f22536446a9aaad1fb304893d64d167300522a872270f0443b43d813d842435b4a5
|
7
|
+
data.tar.gz: 9931a5e44f639b475c67ba29c2e1d18d25334dcbf4f622d6606a02c1dd82941118113a76d2a8b61b68b01a0f9e2e9227e65b523b29b9a6d18669344f88c7c5a8
|
data/lib/app/repo/svn.rb
CHANGED
@@ -39,7 +39,7 @@ module Repo
|
|
39
39
|
# @param [String] id the relative path to the file
|
40
40
|
# @return [String] the file
|
41
41
|
def self.do_read_file(rev, web, path, repo, id)
|
42
|
-
options = "--username
|
42
|
+
options = "--username #{$environment[:repos_user]} --password #{$environment[:repos_password]}"
|
43
43
|
if rev.nil?
|
44
44
|
rev = 'HEAD'
|
45
45
|
end
|
@@ -63,7 +63,7 @@ module Repo
|
|
63
63
|
# @param [String] id the relative path to the file
|
64
64
|
# @return [Array] the directory listing
|
65
65
|
def self.do_read_listing(web, path, repo, id = nil)
|
66
|
-
options = "--username
|
66
|
+
options = "--username #{$environment[:repos_user]} --password #{$environment[:repos_password]}"
|
67
67
|
if web.nil?
|
68
68
|
if id.nil?
|
69
69
|
list = `svn list #{options} --xml 'svn://localhost/#{repo}'`
|
@@ -92,7 +92,7 @@ module Repo
|
|
92
92
|
# @param [String] id the relative path to the file
|
93
93
|
# @return [Hash] the metadata
|
94
94
|
def self.do_read_info(rev, web, path, repo, id)
|
95
|
-
options = "--username
|
95
|
+
options = "--username #{$environment[:repos_user]} --password #{$environment[:repos_password]}"
|
96
96
|
if rev.nil?
|
97
97
|
rev = 'HEAD'
|
98
98
|
end
|
@@ -117,7 +117,7 @@ module Repo
|
|
117
117
|
# @param [String] id the relative path to the file
|
118
118
|
# @return [String] the MIME type
|
119
119
|
def self.do_read_mime(rev, web, path, repo, id)
|
120
|
-
options = "--username
|
120
|
+
options = "--username #{$environment[:repos_user]} --password #{$environment[:repos_password]}"
|
121
121
|
if rev.nil?
|
122
122
|
rev = 'HEAD'
|
123
123
|
end
|
@@ -149,7 +149,7 @@ module Repo
|
|
149
149
|
# @param [String] user the Author of this change
|
150
150
|
# @return [Integer] status code
|
151
151
|
def self.do_update_file(web, path, repo, id, content, message, mime, user)
|
152
|
-
options = "--username
|
152
|
+
options = "--username #{$environment[:repos_user]} --password #{$environment[:repos_password]}"
|
153
153
|
status = 500
|
154
154
|
`svn checkout #{options} svn://localhost/#{repo} /tmp/svn/#{repo}`
|
155
155
|
if $?.exitstatus == 0
|
@@ -170,15 +170,15 @@ module Repo
|
|
170
170
|
file = File.open(file_path, 'w+')
|
171
171
|
file.syswrite(content)
|
172
172
|
file.close
|
173
|
-
`svn add /tmp/svn/#{repo}
|
174
|
-
`svn propset svn:mime-type #{mime} #{file_path}`
|
173
|
+
`svn add /tmp/svn/#{repo}/*`
|
174
|
+
`svn propset svn:mime-type "#{mime}" #{file_path}`
|
175
175
|
`svn commit #{options} -m "#{message}" /tmp/svn/#{repo}`
|
176
176
|
if $?.exitstatus == 0
|
177
177
|
status = 200
|
178
178
|
end
|
179
179
|
info = `svn info /tmp/svn/#{repo}`
|
180
180
|
rev = info.match(/Last Changed Rev: (\d+)/)[1]
|
181
|
-
`svn propset --revprop -r #{rev} svn:author '#{user}' /tmp/svn/#{repo}`
|
181
|
+
`svn propset #{options} --revprop -r #{rev} svn:author '#{user}' /tmp/svn/#{repo}`
|
182
182
|
end
|
183
183
|
`rm -R /tmp/svn/#{repo}`
|
184
184
|
status
|
data/lib/wire.rb
CHANGED