nowa-top4r 0.0.2 → 0.0.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.
- data/lib/top4r/client/base.rb +1 -1
- data/lib/top4r/config.rb +8 -0
- data/lib/top4r/meta.rb +4 -4
- data/lib/top4r/version.rb +1 -1
- metadata +1 -1
data/lib/top4r/client/base.rb
CHANGED
@@ -78,7 +78,7 @@ class Top4R::Client
|
|
78
78
|
end
|
79
79
|
|
80
80
|
def create_http_connection
|
81
|
-
protocol, host, port = (@@config.env == :production ? @@config.protocol : @@config.test_protocol), (@@config.env == :production ? @@config.host : @@config.test_host), (@@config.env == :production ? @@config.port : @@config.test_port)
|
81
|
+
protocol, host, port = (@@config.env == :production ? @@config.protocol : (@@config.env == :staging ? @@config.staging_protocol : @@config.test_protocol)), (@@config.env == :production ? @@config.host : (@@config.env == :staging ? @@config.staging_host : @@config.test_host)), (@@config.env == :production ? @@config.port : (@@config.env == :staging ? @@config.staging_port : @@config.test_port))
|
82
82
|
conn = Net::HTTP.new(host, port,
|
83
83
|
@@config.proxy_host, @@config.proxy_port,
|
84
84
|
@@config.proxy_user, @@config.proxy_pass)
|
data/lib/top4r/config.rb
CHANGED
@@ -12,6 +12,10 @@ module Top4R
|
|
12
12
|
:test_rest_uri,
|
13
13
|
:test_port,
|
14
14
|
:test_protocol,
|
15
|
+
:staging_host,
|
16
|
+
:staging_rest_uri,
|
17
|
+
:staging_port,
|
18
|
+
:staging_protocol,
|
15
19
|
:proxy_host,
|
16
20
|
:proxy_port,
|
17
21
|
:proxy_user,
|
@@ -49,6 +53,10 @@ module Top4R
|
|
49
53
|
:test_rest_uri => '/router/rest',
|
50
54
|
:test_port => 80,
|
51
55
|
:test_protocol => :http,
|
56
|
+
:staging_host => '192.168.208.110',
|
57
|
+
:staging_rest_uri => '/top/private/services/rest',
|
58
|
+
:staging_port => '8080',
|
59
|
+
:staging_protocol => :http,
|
52
60
|
:proxy_host => nil,
|
53
61
|
:proxy_port => nil,
|
54
62
|
:format => :json,
|
data/lib/top4r/meta.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
# meta.rb contains <tt>
|
2
|
-
# help define the metadata of the <tt>
|
1
|
+
# meta.rb contains <tt>Top4R::Meta</tt> and related classes that
|
2
|
+
# help define the metadata of the <tt>Top4R</tt> project.
|
3
3
|
|
4
4
|
require('rubygems')
|
5
5
|
require('erb')
|
@@ -8,7 +8,7 @@ class Top4R::Meta #:nodoc:
|
|
8
8
|
attr_accessor :root_dir
|
9
9
|
attr_reader :gem_spec, :project_files, :spec_files
|
10
10
|
|
11
|
-
# Initializer for
|
11
|
+
# Initializer for Top4R::Meta class. Takes <tt>root_dir</tt> as parameter.
|
12
12
|
def initialize(root_dir)
|
13
13
|
@root_dir = root_dir
|
14
14
|
end
|
@@ -38,7 +38,7 @@ class Top4R::Meta #:nodoc:
|
|
38
38
|
@spec_files
|
39
39
|
end
|
40
40
|
|
41
|
-
# Returns RubyGem specification for
|
41
|
+
# Returns RubyGem specification for Top4R project
|
42
42
|
def gem_spec
|
43
43
|
@gem_spec ||= Gem::Specification.new do |spec|
|
44
44
|
self.spec_info.each do |key, val|
|
data/lib/top4r/version.rb
CHANGED