tcms 1.1.2 → 1.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28d4ad20a54625461cfacde601ef2b4fd7b3432c
4
- data.tar.gz: da5b5ef443f50a809ba7fa06e5b72c9cf970798b
3
+ metadata.gz: c9024662a4b3870e14e724a1873e8067322da240
4
+ data.tar.gz: 0e7e2545339d311f6737d740e6746f876e6d840d
5
5
  SHA512:
6
- metadata.gz: dc2f3a92515d2444eb3913046e753b19f147c555ffd7ba22d01fc5e6c01fbf428c4d14f48b34c7e975c2a3294650efdb4deb974b299e6d5a2ebe98d97dc46009
7
- data.tar.gz: 414352c256e39b94f8bab7d94445dd604d486b3e91d15be4af2f14a311ae1a077260b50b7fb4cacaf4f8ef0d58e40f5db284362807ae5f8309eb794781b34c2d
6
+ metadata.gz: a39dfd700b47cb02bfbd0ff93877f54f933cd69ad6556857d9cec85bdd9a08ceb8b777966255123d392bcfc4f3f4963663958dc3da69902d0aebcf5c44563c07
7
+ data.tar.gz: 895806482edcf6587d99d4543fe94fd8b34b0a9b77320a7833900e817c26ea1d6a51480ac517781443eeeaeff8fb57afe0e9fe61ce04dc8492f34aae583dac7a
data/bin/tcms CHANGED
@@ -1,14 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- require 'pathname'
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)){|response,request,result|
69
- if [200].include? response.code
70
- puts '--上传成功!'+response.description
71
- site = config["site"]
72
- domain = 'qq.com'
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
- if site.match 'mat1' then domain = "gtimg.com/#{config["channel"]}" end
76
- if site.match 'pingjs' then site = 'rss' end
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
- url = "http://#{site}.#{domain}/#{remote_path}"
79
- puts '--远程地址:'+url
80
- else
81
- raise response
82
- end
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 "(>_<)..."
@@ -3,11 +3,7 @@ require 'erb'
3
3
  require 'json'
4
4
  require 'pathname'
5
5
 
6
- begin
7
- require Pathname.new(File.dirname(__FILE__)).realpath.to_s+'/helper'
8
- rescue
9
- require "tcms/helper"
10
- end
6
+ require "helper"
11
7
 
12
8
  module Tcms
13
9
  class Publisher
data/lib/tcms/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Tcms
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
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.2
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-03-15 00:00:00.000000000 Z
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.2.2
120
+ rubygems_version: 2.4.5
121
121
  signing_key:
122
122
  specification_version: 4
123
123
  summary: TCMS WebApp Tools