multiforecast-client 0.62.0.3 → 0.62.0.5

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: fd49406437bfd41b01f10ede5949c037b07d4ada
4
- data.tar.gz: 985af45511b980ad3c8b1a83a1e5dfbdda396973
3
+ metadata.gz: 1da64cc1b3b63ef49933d1f4ebf864a3cb4af295
4
+ data.tar.gz: 7aaf9779934ec727c02a61696b37b2004d332554
5
5
  SHA512:
6
- metadata.gz: 4d0b3e3912b0107dd72e7411246926a518ada6a50398cf9fee152707f8f20d690c07598daaf57f253bb78202a4cffc6684c344a4a850bcc41fd1fc150befb728
7
- data.tar.gz: bea0308427fe97696bc89c041b76a2614b203a5c658a35bb41260d197659efe6b8e002a90eacc867580948752a5f62b22d08e8cee04597eaef2c6d9d6acadeec
6
+ metadata.gz: d7faed48ecf007ddc67ea66dbf3919a35382ac3663d9fdf2e1f5a3443e068f1b1c8ffe4a16f05ef3abc7e4552c29703cfd18ba0c0d0a5ef71307182b8a6a36ed
7
+ data.tar.gz: f3d947e1a93f8901e2edcc01dd650aa386b9f8704916a443afa39e5160bff0783d8d685a510732a5ffa2cfa9fe2d87a992359e18453831db6738e37f4fd9fd17
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 0.62.0.4 (2013/07/25)
2
+
3
+ CHANGES
4
+
5
+ * Strip / at the beggining of path
6
+
1
7
  # 0.62.0.3 (2013/07/11)
2
8
 
3
9
  Fix
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.62.0.3
1
+ 0.62.0.5
@@ -13,17 +13,24 @@ module MultiForecast
13
13
  CGI.unescape(string) if string
14
14
  end
15
15
 
16
+ def lstrip(string, substring)
17
+ string.index(substring) == 0 ? string[substring.size..-1] : string
18
+ end
19
+
16
20
  def service_name(path)
21
+ path = lstrip(path, '/')
17
22
  return path.split('/')[0] if path.count('/') == 2
18
23
  'multiforecast'
19
24
  end
20
25
 
21
26
  def section_name(path)
27
+ path = lstrip(path, '/')
22
28
  return path.split('/')[1] if path.count('/') == 2
23
29
  uri_escape(File.dirname(path))
24
30
  end
25
31
 
26
32
  def graph_name(path)
33
+ path = lstrip(path, '/')
27
34
  File.basename(path)
28
35
  end
29
36
 
@@ -35,6 +42,7 @@ module MultiForecast
35
42
  end
36
43
 
37
44
  def id(path)
45
+ path = lstrip(path, '/')
38
46
  @mapping.each do |base_path, base_uri|
39
47
  return base_path if path.index(base_path) == 0
40
48
  end
@@ -42,6 +50,7 @@ module MultiForecast
42
50
  end
43
51
 
44
52
  def ids(path)
53
+ path = lstrip(path, '/')
45
54
  @mapping.map do |base_path, base_uri|
46
55
  base_path if path.index(base_path) == 0
47
56
  end.compact
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiforecast-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.62.0.3
4
+ version: 0.62.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-11 00:00:00.000000000 Z
11
+ date: 2013-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: growthforecast-client
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.0.2
163
+ rubygems_version: 2.0.3
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: Multiple GrowthForecast Client
@@ -168,3 +168,4 @@ test_files:
168
168
  - spec/multiforecast/client_spec.rb
169
169
  - spec/multiforecast/conversion_rule_spec.rb
170
170
  - spec/spec_helper.rb
171
+ has_rdoc: