lalamove 0.11.0 → 0.12.0

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
  SHA256:
3
- metadata.gz: fb053ac4a78149ca8211b08cf9d0447e3dc490ef7ad136021be91ad858bfc129
4
- data.tar.gz: 3aaa312cfca73babfd54b8ac7db361734f45d415274e2501b0f7cb9b6fd3fa75
3
+ metadata.gz: bb789fbfcd7f341b87407b2fb87ae016d47f1ad51b875d5754f4e1e286e9bf4f
4
+ data.tar.gz: e047e93eeb6de67c02ac603910039506e6e4903c274fe979326cac65fb46c3be
5
5
  SHA512:
6
- metadata.gz: b6a8ad269106c5fda7206bf75a8e998b1e221b98b173edca1b0e0a7262348a586a0229cf95b1f0ef357669b31d5dd5c3fc4fef7556c3cad4381ac3b7feb888d1
7
- data.tar.gz: 02a74e06cacfe975e159b068100282aaa2354e5974d720b4af0fe882220991f00f25a7997bbdfc60ccd5bd69b969286d6861781cf607a306d6fb52c65e7f683b
6
+ metadata.gz: 920b25c0137cca2054c9d78763d6e11cf742f24b7eb5ef808755d4a9562a0b3869392ec21c741d8d015fa4b108d2fbd4e53a4201855e185e9413c4611360fae2
7
+ data.tar.gz: 920fba3be058991e94908b96aa9546dc8a7cb98b9978a173f0287c7745231e2f67a1f7724a08ba61bdb4c410c0701d03c2f7559ec8944d9d268298f62906e696
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lalamove (0.10.0)
4
+ lalamove (0.11.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -21,13 +21,19 @@ Or install it yourself as:
21
21
  $ gem install lalamove
22
22
 
23
23
  ## Configuration
24
+ You can generate initializer using this command
25
+ ```ruby
26
+ rails generate initializer lalamove
27
+ ```
28
+ It will generate automatically like this. Or you can create manually.
29
+
24
30
  ```ruby
25
31
  config/initializer/lalamove.rb
26
32
  Lalamove.configure do |config|
27
33
  config.mode = :sandbox
28
34
  config.key = 'your_key'
29
35
  config.secret_key = 'your_secret_key'
30
- config.country_code = [Check all available countries here](https://developers.lalamove.com/?plaintext--sandbox#available-countries)
36
+ config.country_code = [Check all available countries here](https://developers.lalamove.com/?plaintext--sandbox#available-countries){:target="_blank"}
31
37
  end
32
38
 
33
39
  Set config.mode to either :sandbox or :prod to switch between the sandbox and prod endpoints, keys to the corresponding keys provided by Lalamove.
@@ -4,24 +4,25 @@
4
4
  module Lalamove
5
5
  # Configuration
6
6
  class Configuration
7
- attr_accessor :key, :secret_key, :country_code
8
- attr_writer :base_url, :mode
7
+ attr_accessor :key, :secret_key, :country_code, :mode, :base_url
9
8
  end
10
9
 
11
10
  SANDBOX_BASE_URL = 'https://sandbox-rest.lalamove.com'
12
11
  PROD_BASE_URL = 'https://rest.lalamove.com'
13
12
 
14
- def self.base_url
15
- puts "test"
16
- return @base_url unless @base_url.nil?
17
- return SANDBOX_BASE_URL if @mode == :sandbox
13
+ # Config Module
14
+ module Config
15
+ def self.base_url
16
+ return @base_url unless @base_url.nil?
17
+ return SANDBOX_BASE_URL if @mode == :sandbox
18
18
 
19
- PROD_BASE_URL
20
- end
19
+ PROD_BASE_URL
20
+ end
21
21
 
22
- def self.mode
23
- return @mode unless @mode.nil?
22
+ def self.mode
23
+ return @mode unless @mode.nil?
24
24
 
25
- :sandbox
25
+ :sandbox
26
+ end
26
27
  end
27
28
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lalamove
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalamove
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jessie Arevalo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-28 00:00:00.000000000 Z
11
+ date: 2020-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler