wargaming_api_ruby 0.1.1 → 0.1.2

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: 70a0cdc14720f038e28c1cc143f678c9fdc2d05d
4
- data.tar.gz: 0aa989989d5ceed6b562c0f3dc6532ad241d39cc
3
+ metadata.gz: 9d18aca33b7a086d9b424aae69c52e34a9121fbd
4
+ data.tar.gz: 006bf4fde7f5b9175474de2ab862e238e31fe01a
5
5
  SHA512:
6
- metadata.gz: 7a9b3c4cfa23e4769147934437ccfca6d6c56e392d2a716c0b9026e898a4fcda29f83e2fc775e164ca13f3a243589f7bc2d06dd032345978d138aadab0d2cd4d
7
- data.tar.gz: ab5c7c6ac5c561f970bf2854d7ff9d29edaffa3d2809b603d274347b58c616116a7c0d5d106cfeabe98e29c736d0087083309b27744aa2b57ef54e751e17adc7
6
+ metadata.gz: c9aaa34ad6bc6e2c771af9621ec8b8803d36c2d667b9832e0d285dc223068955110518ceb31436e0e1c1437fc774fa75f77c30c1e3ad2cdda82e5f20658abd26
7
+ data.tar.gz: 7f171bb1b430e6df3e39c8d225de923201e1dd23bc9e745b2054c985b2398fa7a338b60560e30edffac32828290aae860084fb525db4008921f97797ceebd7c5
@@ -15,7 +15,7 @@ module WargamingApi::Concern::Attributable
15
15
 
16
16
  def apply_type(name, value)
17
17
  case self._attributes[name.to_sym]
18
- when :datetime then Time.at(value)
18
+ when :datetime then Time.utc.at(value)
19
19
  else
20
20
  value
21
21
  end
@@ -1,8 +1,8 @@
1
1
  module WargamingApi::Util::Params
2
2
  def prepare_params(params = {})
3
3
  {
4
- application_id: WargamingApi::Config::APPLICATION_ID,
5
- language: WargamingApi::Config::LANGUAGE
4
+ application_id: WargamingApi.application_id,
5
+ language: WargamingApi.language
6
6
  }.merge(params)
7
7
  end
8
8
  end
@@ -1,3 +1,3 @@
1
1
  module WargamingApi
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/wargaming_api.rb CHANGED
@@ -1,12 +1,21 @@
1
+ require 'active_support/all'
2
+
1
3
  module WargamingApi
4
+ mattr_accessor :application_id
5
+ @@application_id = '171745d21f7f98fd8878771da1000a31'
6
+
7
+ mattr_accessor :language
8
+ @@language = 'ru'
9
+
10
+ def self.setup
11
+ yield self
12
+ end
2
13
  end
3
14
 
4
- require 'active_support/all'
5
15
  require 'uri'
6
16
  require 'net/http'
7
17
 
8
18
  require 'wargaming_api/concern'
9
- require 'wargaming_api/config'
10
19
  require 'wargaming_api/error'
11
20
  require 'wargaming_api/util'
12
21
  require 'wargaming_api/node'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wargaming_api_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Drobotov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-27 00:00:00.000000000 Z
11
+ date: 2014-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -82,7 +82,6 @@ files:
82
82
  - lib/wargaming_api/base.rb
83
83
  - lib/wargaming_api/concern.rb
84
84
  - lib/wargaming_api/concern/attributable.rb
85
- - lib/wargaming_api/config.rb
86
85
  - lib/wargaming_api/error.rb
87
86
  - lib/wargaming_api/error/response_error.rb
88
87
  - lib/wargaming_api/node.rb
@@ -1,4 +0,0 @@
1
- class WargamingApi::Config
2
- APPLICATION_ID = '171745d21f7f98fd8878771da1000a31'
3
- LANGUAGE = 'ru'
4
- end