tcms 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/tcms +1 -10
- data/lib/tcms.rb +14 -21
- data/lib/tcms/publisher.rb +1 -5
- data/lib/tcms/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c9024662a4b3870e14e724a1873e8067322da240
|
4
|
+
data.tar.gz: 0e7e2545339d311f6737d740e6746f876e6d840d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a39dfd700b47cb02bfbd0ff93877f54f933cd69ad6556857d9cec85bdd9a08ceb8b777966255123d392bcfc4f3f4963663958dc3da69902d0aebcf5c44563c07
|
7
|
+
data.tar.gz: 895806482edcf6587d99d4543fe94fd8b34b0a9b77320a7833900e817c26ea1d6a51480ac517781443eeeaeff8fb57afe0e9fe61ce04dc8492f34aae583dac7a
|
data/bin/tcms
CHANGED
@@ -1,14 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'optparse'
|
4
|
-
|
5
|
-
begin
|
6
|
-
command_path = Pathname.new(File.dirname(__FILE__)).realpath.parent.to_s
|
7
|
-
require command_path + '/lib/tcms'
|
8
|
-
rescue
|
9
|
-
require "tcms"
|
10
|
-
end
|
11
|
-
|
2
|
+
require_relative '../lib/tcms.rb'
|
12
3
|
|
13
4
|
options = {}
|
14
5
|
opt = OptionParser.new do |opts|
|
data/lib/tcms.rb
CHANGED
@@ -4,13 +4,7 @@ require 'rake'
|
|
4
4
|
require 'pathname'
|
5
5
|
require 'json'
|
6
6
|
require 'fileutils'
|
7
|
-
|
8
|
-
begin
|
9
|
-
tcms_lib_path = Pathname.new(File.dirname(__FILE__)).realpath.to_s
|
10
|
-
require tcms_lib_path+ '/tcms/publisher'
|
11
|
-
rescue
|
12
|
-
require "tcms/publisher"
|
13
|
-
end
|
7
|
+
require_relative "tcms/version.rb"
|
14
8
|
|
15
9
|
module Tcms
|
16
10
|
PROJECT_FILE = "project.yml"
|
@@ -65,22 +59,21 @@ module Tcms
|
|
65
59
|
tmp_file.close
|
66
60
|
end
|
67
61
|
|
68
|
-
response = RestClient.post(upload_path,:NEW_FILE=>File.new(upload_file_path))
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
62
|
+
response = RestClient.post(upload_path,:NEW_FILE=>File.new(upload_file_path))
|
63
|
+
if [200].include? response.code
|
64
|
+
puts '--上传成功!'
|
65
|
+
site = config["site"]
|
66
|
+
domain = 'qq.com'
|
73
67
|
|
74
|
-
|
75
|
-
|
76
|
-
|
68
|
+
#业务修正
|
69
|
+
if site.match 'mat1' then domain = "gtimg.com/#{config["channel"]}" end
|
70
|
+
if site.match 'pingjs' then site = 'rss' end
|
77
71
|
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
}
|
72
|
+
url = "http://#{site}.#{domain}/#{remote_path}"
|
73
|
+
puts '--远程地址:'+url
|
74
|
+
else
|
75
|
+
raise response
|
76
|
+
end
|
84
77
|
rescue Exception => e
|
85
78
|
puts ''
|
86
79
|
puts "(>_<)..."
|
data/lib/tcms/publisher.rb
CHANGED
data/lib/tcms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tcms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "'bertwang'"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -117,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.4.5
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: TCMS WebApp Tools
|