juhe_ruby 0.0.4 → 0.0.5

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: 4766f1efea1f0d704f6127b5ef27edc304dd70c4
4
- data.tar.gz: 4df1c2a0657538575c8f5bb6a88c0e005043f8ec
3
+ metadata.gz: 98c61acea6ce5ea9b12fae5d83ec66f87f2a76c8
4
+ data.tar.gz: 3526e4c4fdfd4b9e7a68b41132611ab4791c4612
5
5
  SHA512:
6
- metadata.gz: a5133cf400b069475481dd69ee4c57619c42f80337ca2d17f3ecb8d22db1669a79849e3f7bdada954e86f1717d3ddd655ac314bec0a49dcb7ddf83637d8b18db
7
- data.tar.gz: 5cd48fc50bd968876b5253c0c4bbea956f6acee4625d8edbde14ef67955d5906a055a5de37189858f0ab9a45ba1417d36c1c4bd1050ff073683f1d7afa4540bc
6
+ metadata.gz: 11065c91697c8a50eeb1572e34f4a6fa4538343cfb4138a6c9c7da3283deac42e1ed7f3b7ce65a1173ece01278b09c450fb20c32ce791ae9c451c1c9d4579ac8
7
+ data.tar.gz: 3eb8deac8164aa95462d4d4fb9197c109155ec8e298df4af6f920c39ea763cdddae313b2cfb4fdcf9f278214362761871b5d887d45f77f7954bd865dc8cb6d80
@@ -3,8 +3,6 @@ require "json"
3
3
 
4
4
  module Juhe
5
5
  module Express
6
- BASE_URL = "http://v.juhe.cn/exp"
7
-
8
6
  class << self
9
7
  attr_accessor :companies
10
8
  end
@@ -1,3 +1,3 @@
1
1
  module JuheRuby
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/lib/juhe_ruby.rb CHANGED
@@ -2,11 +2,16 @@ require "juhe_ruby/version"
2
2
  require "juhe_ruby/express"
3
3
 
4
4
  module Juhe
5
+ URLS = {
6
+ Express: "http://v.juhe.cn/exp"
7
+ }
8
+
5
9
  class << self
6
10
  # Array of module names
7
11
  modules = Juhe.constants.map{ |el| Juhe.const_get(el) }.select{ |m| m.instance_of?(Module) }
8
12
  modules.each do |mod|
9
13
  if mod.to_s =~ /\AJuhe::(.*)/
14
+ mod.const_set("BASE_URL", URLS[$1.to_sym])
10
15
  mod.module_eval do
11
16
  class << self
12
17
  attr_accessor :app_key
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: juhe_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - linuxnerd