idcf-json_hyper_schema 0.2.0 → 0.2.1

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: cf6fd0e7a80ec0ef552e19bccec568431e293887
4
- data.tar.gz: 0881a485385f89b213f7491e6485f6f1a7bae38a
3
+ metadata.gz: 1e46dfb6cfc5842cfdaa1b52e26d6035c7a3ce11
4
+ data.tar.gz: 54718f288e70ffdf1c173542a8211b2193bcad1a
5
5
  SHA512:
6
- metadata.gz: a82bc9a88edb0460e2bb77b3a017dea8628db49497caf0fe6e5a96cb40b585951f440eca62b76d5e8e82bf191aef97ceb2563739c9ff58a10e75aad2437c69fd
7
- data.tar.gz: 0374d508d3728696cb5464b3ed7a49135b43f328c04dc92e4de51111518215e47a05b36b695598549b81b8e57533678adbcdc5688f1c7c4dd9fb0005f3a4bf8d
6
+ metadata.gz: c8ce892d827925310000a3ae4f674fc203b245517a270bd2e49ca01edf2dc43a9a9149b0f8b6a47f3e2efc631c0187d0ca446038088cbfe04b948c8452a04499
7
+ data.tar.gz: 0bb77f19e9489fda26d0e4d2fcb13348cd9350286d7e81cb0cf06918e0b193cbbe345f6f94a92e7881567199ebcbb04df773c7ddf2ad230bba8968d9eece4f9c
@@ -14,10 +14,6 @@ engines:
14
14
  ratings:
15
15
  paths:
16
16
  - "**.rb"
17
- checks:
18
- method-complexity:
19
- config:
20
- threshold: 10
21
17
  exclude_paths:
22
18
  - vendor/bundle
23
19
  - .idea
@@ -26,5 +26,3 @@ Style/ClassLength:
26
26
  Max: 150
27
27
  Style/MethodLength:
28
28
  Max: 15
29
- Style/FormatStringToken:
30
- Enabled: false
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- idcf-json_hyper_schema (0.1.0)
4
+ idcf-json_hyper_schema (0.2.1)
5
5
  activerecord (~> 4.2, >= 4.2.3)
6
6
  activesupport (~> 4.2, >= 4.2.3)
7
7
  json_schema (~> 0.17.0)
@@ -9,24 +9,26 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (4.2.10)
13
- activesupport (= 4.2.10)
12
+ activemodel (4.2.11.1)
13
+ activesupport (= 4.2.11.1)
14
14
  builder (~> 3.1)
15
- activerecord (4.2.10)
16
- activemodel (= 4.2.10)
17
- activesupport (= 4.2.10)
15
+ activerecord (4.2.11.1)
16
+ activemodel (= 4.2.11.1)
17
+ activesupport (= 4.2.11.1)
18
18
  arel (~> 6.0)
19
- activesupport (4.2.10)
19
+ activesupport (4.2.11.1)
20
20
  i18n (~> 0.7)
21
21
  minitest (~> 5.1)
22
22
  thread_safe (~> 0.3, >= 0.3.4)
23
23
  tzinfo (~> 1.1)
24
24
  arel (6.0.4)
25
25
  builder (3.2.3)
26
+ concurrent-ruby (1.1.5)
26
27
  diff-lcs (1.3)
27
- i18n (0.8.6)
28
- json_schema (0.17.0)
29
- minitest (5.10.3)
28
+ i18n (0.9.5)
29
+ concurrent-ruby (~> 1.0)
30
+ json_schema (0.17.2)
31
+ minitest (5.11.3)
30
32
  rake (10.5.0)
31
33
  rspec (3.6.0)
32
34
  rspec-core (~> 3.6.0)
@@ -42,7 +44,7 @@ GEM
42
44
  rspec-support (~> 3.6.0)
43
45
  rspec-support (3.6.0)
44
46
  thread_safe (0.3.6)
45
- tzinfo (1.2.3)
47
+ tzinfo (1.2.5)
46
48
  thread_safe (~> 0.1)
47
49
 
48
50
  PLATFORMS
@@ -55,4 +57,4 @@ DEPENDENCIES
55
57
  rspec
56
58
 
57
59
  BUNDLED WITH
58
- 1.15.4
60
+ 1.16.1
data/README.md CHANGED
@@ -62,8 +62,7 @@ p expand_obj.schema
62
62
  require 'idcf/json_hyper_schema'
63
63
 
64
64
  path = File.expand_path('./sample.json')
65
- analyst = Idcf::JsonHyperSchema::Analyst.new.load(path)
66
- p analyst.links
65
+ p Idcf::JsonHyperSchema::Analyst.new.load(path).links
67
66
  ```
68
67
 
69
68
  or
@@ -1,3 +1,4 @@
1
+ # coding: utf-8
1
2
  lib = File.expand_path('../lib', __FILE__)
2
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
4
  require 'idcf/json_hyper_schema/version'
@@ -46,14 +46,14 @@ module Idcf
46
46
  #
47
47
  # @return String
48
48
  def href
49
- href = @data.href
50
- return '' if href.nil?
49
+ href_str = @data.href
50
+ return '' if href_str.nil?
51
51
  l = []
52
- href.split('/').each do |v|
52
+ href_str.split('/').each do |v|
53
53
  next if v.empty?
54
54
  l << v.gsub(PARAMS_REGEXP, '%s').gsub(QUERY_PARAMS_REGEXP, '')
55
55
  end
56
- href_head = href =~ FULL_HREF_REGEXP ? '' : base_href
56
+ href_head = href_str =~ FULL_HREF_REGEXP ? "#{l.shift}/" : base_href
57
57
  "#{href_head}/#{l.join('/')}"
58
58
  end
59
59
 
@@ -1,5 +1,5 @@
1
1
  module Idcf
2
2
  module JsonHyperSchema
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.2.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: idcf-json_hyper_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - IDC Frontier Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-01-29 00:00:00.000000000 Z
11
+ date: 2019-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -114,7 +114,6 @@ extra_rdoc_files: []
114
114
  files:
115
115
  - ".codeclimate.yml"
116
116
  - ".gitignore"
117
- - ".rspec"
118
117
  - ".rubocop.yml"
119
118
  - Gemfile
120
119
  - Gemfile.lock
@@ -151,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
151
150
  version: '0'
152
151
  requirements: []
153
152
  rubyforge_project:
154
- rubygems_version: 2.6.13
153
+ rubygems_version: 2.4.5.1
155
154
  signing_key:
156
155
  specification_version: 4
157
156
  summary: IDCF Json-Hyper-Schema Expand tools
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --require spec_helper