xmlrpc 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7aa95821386edf84da95f6c97f01a887192d77de
4
- data.tar.gz: dad4e6704d59d87038e6cdf3f409900525c70e94
3
+ metadata.gz: e530f6549df0b95a5cbd2faa74bef693a81eafcd
4
+ data.tar.gz: 3c65eeaf3821a27fc70552db6a87a63ca7fc214a
5
5
  SHA512:
6
- metadata.gz: e8d9be9f7f92cbb4488890d8d5e9d7615f9906fe201822b522ce56f277c57e380b8ceea36a8a97281bf901a63fb8668f728ba1827c5acec5f286dc77b001fbff
7
- data.tar.gz: 080dbd5adb3aa4180a9c11844cd30eb8f27b393f48b41daafaa24f650f3344fc4d4705f8971d53503140c3f4c2e30c0ac9b48bf347f04d5c52b35c11ed2d9c91
6
+ metadata.gz: cf7f4bfdc77f4d03c2e70c82d8a49dfc7965b17f0ee7d1d81a84f017cb4c3f7f1f48a6391cee19bc0ffff14a108aacb026684240f3c577cfa2ff02746e530445
7
+ data.tar.gz: 16fc37829decede3b0e807d8c5e2f696de6dbd8bdb19e2190b3847bc26bedf383cf0a4b54b21c31170c07905a10ccf5aec02d774471962d675cbb8faf47fe76f
@@ -289,5 +289,5 @@
289
289
  #
290
290
  # You can change the XML-writer by calling method ParserWriterChooseMixin#set_writer.
291
291
  module XMLRPC
292
- VERSION = "0.1.1"
292
+ VERSION = "0.2.0"
293
293
  end
@@ -237,7 +237,7 @@ module XMLRPC # :nodoc:
237
237
  # Each parameter of +args+ must be of one of the following types,
238
238
  # where Hash, Struct and Array can contain any of these listed _types_:
239
239
  #
240
- # * Fixnum, Bignum
240
+ # * Integer
241
241
  # * TrueClass, FalseClass, +true+, +false+
242
242
  # * String, Symbol
243
243
  # * Float
@@ -255,7 +255,7 @@ module XMLRPC # :nodoc:
255
255
  #
256
256
  # The type of the return-value is one of the types shown above.
257
257
  #
258
- # A Bignum is only allowed when it fits in 32-bit. A XML-RPC
258
+ # An Integer is only allowed when it fits in 32-bit. A XML-RPC
259
259
  # +dateTime.iso8601+ type is always returned as a XMLRPC::DateTime object.
260
260
  # Struct is never returned, only a Hash, the same for a Symbol, where as a
261
261
  # String is always returned. XMLRPC::Base64 is returned as a String from
@@ -176,15 +176,15 @@ module XMLRPC # :nodoc:
176
176
  def conv2value(param) # :doc:
177
177
 
178
178
  val = case param
179
- when Fixnum, Bignum
180
- # XML-RPC's int is 32bit int, and Fixnum also may be beyond 32bit
179
+ when Integer
180
+ # XML-RPC's int is 32bit int
181
181
  if Config::ENABLE_BIGINT
182
182
  @writer.tag("i4", param.to_s)
183
183
  else
184
184
  if param >= -(2**31) and param <= (2**31-1)
185
185
  @writer.tag("i4", param.to_s)
186
186
  else
187
- raise "Bignum is too big! Must be signed 32-bit integer!"
187
+ raise "Integer is too big! Must be signed 32-bit integer!"
188
188
  end
189
189
  end
190
190
  when TrueClass, FalseClass
@@ -24,7 +24,7 @@ class DateTime
24
24
  #
25
25
  # Raises ArgumentError if the given +value+ is out of range, or in the case
26
26
  # of XMLRPC::DateTime#year= if +value+ is not of type Integer.
27
- def year= (value)
27
+ def year=(value)
28
28
  raise ArgumentError, "date/time out of range" unless value.is_a? Integer
29
29
  @year = value
30
30
  end
@@ -32,7 +32,7 @@ class DateTime
32
32
  # Set +value+ as the new date/time component.
33
33
  #
34
34
  # Raises an ArgumentError if the given +value+ isn't between 1 and 12.
35
- def month= (value)
35
+ def month=(value)
36
36
  raise ArgumentError, "date/time out of range" unless (1..12).include? value
37
37
  @month = value
38
38
  end
@@ -40,7 +40,7 @@ class DateTime
40
40
  # Set +value+ as the new date/time component.
41
41
  #
42
42
  # Raises an ArgumentError if the given +value+ isn't between 1 and 31.
43
- def day= (value)
43
+ def day=(value)
44
44
  raise ArgumentError, "date/time out of range" unless (1..31).include? value
45
45
  @day = value
46
46
  end
@@ -48,7 +48,7 @@ class DateTime
48
48
  # Set +value+ as the new date/time component.
49
49
  #
50
50
  # Raises an ArgumentError if the given +value+ isn't between 0 and 24.
51
- def hour= (value)
51
+ def hour=(value)
52
52
  raise ArgumentError, "date/time out of range" unless (0..24).include? value
53
53
  @hour = value
54
54
  end
@@ -56,7 +56,7 @@ class DateTime
56
56
  # Set +value+ as the new date/time component.
57
57
  #
58
58
  # Raises an ArgumentError if the given +value+ isn't between 0 and 59.
59
- def min= (value)
59
+ def min=(value)
60
60
  raise ArgumentError, "date/time out of range" unless (0..59).include? value
61
61
  @min = value
62
62
  end
@@ -64,7 +64,7 @@ class DateTime
64
64
  # Set +value+ as the new date/time component.
65
65
  #
66
66
  # Raises an ArgumentError if the given +value+ isn't between 0 and 59.
67
- def sec= (value)
67
+ def sec=(value)
68
68
  raise ArgumentError, "date/time out of range" unless (0..59).include? value
69
69
  @sec = value
70
70
  end
@@ -87,16 +87,10 @@ class DateTime
87
87
  end
88
88
 
89
89
  # Return a Time object of the date/time which represents +self+.
90
- # If the <code>@year</code> is below 1970, this method returns +nil+,
91
- # because Time cannot handle years below 1970.
92
90
  #
93
91
  # The timezone used is GMT.
94
92
  def to_time
95
- if @year >= 1970
96
- Time.gm(*to_a)
97
- else
98
- nil
99
- end
93
+ Time.gm(*to_a)
100
94
  end
101
95
 
102
96
  # Return a Date object of the date which represents +self+.
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.bindir = "exe"
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
- spec.required_ruby_version = ">= 2.4.0dev"
21
+ spec.required_ruby_version = ">= 2.4.0"
22
22
 
23
23
  spec.add_development_dependency "bundler"
24
24
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xmlrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - SHIBATA Hiroshi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-05-16 00:00:00.000000000 Z
11
+ date: 2016-12-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -91,7 +91,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
91
  requirements:
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: 2.4.0dev
94
+ version: 2.4.0
95
95
  required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
@@ -99,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
99
99
  version: '0'
100
100
  requirements: []
101
101
  rubyforge_project:
102
- rubygems_version: 2.6.4
102
+ rubygems_version: 2.6.8
103
103
  signing_key:
104
104
  specification_version: 4
105
105
  summary: XMLRPC is a lightweight protocol that enables remote procedure calls over