katarina 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
  SHA256:
3
- metadata.gz: 939fc8cc32495c0feae72bb679e8f8ea4ef41e67fe5a54ce3e4f369b208c8822
4
- data.tar.gz: 917af113bc30c06b636e863fe0dcfe04823323af2c1507a80478075a955586d2
3
+ metadata.gz: 89784667d4c953dfea7e89635ab0cb5b9638498c74d74e3ac541b208c39b221d
4
+ data.tar.gz: eb9f8ac51bda0295281f25b7ec90024eed9d89d30e317081992483f3278719fc
5
5
  SHA512:
6
- metadata.gz: 19d58a0db473de561c66fb1af44195282e30e6bdeb55c19899f7f4d96c9a57fc4711f461c4fa2c4a64caafcad74e5591b2ccaf4c8d27cd3917c2d58163d771d9
7
- data.tar.gz: 810b0b4c2c6dea8991567238d2c5a0f30c9ead69df0f2c4550baa96654762f2ccf61e8938fd31efe95545e4fc991d79718ce5ee1bf5efb876c76b754b59dfb59
6
+ metadata.gz: 0fd1805088cb7ef6129f9ebd61feb8e215d1eb4fa83a7e59f7679ac43e7bdf82fb067799335c2fd67dd6beb48db6cd6f19cec1eff5ec28b93e08ab41b65b90cd
7
+ data.tar.gz: 7a5eda1d616083a1eb0ec21b202b9d1d2ca31fb06ca318042d0b7c6ac985218db7425ec445d70a4ec62d1546cb1adae5f705eff287c53612dfeed58b6fa6c87c
data/bin/build CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  bundle exec ruby-next nextify lib/
4
- rake build
4
+ bundle exec rake build
@@ -0,0 +1,4 @@
1
+ n = gets.chomp.to_i
2
+ count = n / 100 # 6
3
+ money = n % 100 # 15
4
+ p (1..5).to_a.repeated_combination(count).map(&:sum).uniq.any? { _1 == money } ? 1 : 0
@@ -19,12 +19,13 @@ module Katarina
19
19
  (__m__ = pair) && (((__m__.respond_to?(:deconstruct_keys) && (((__m_hash__ = __m__.deconstruct_keys([:path, :http_method])) || true) && ((Hash === __m_hash__) || Kernel.raise(TypeError, "#deconstruct_keys must return Hash")))) && ((__m_hash__.key?(:path) && __m_hash__.key?(:http_method)) && (((path = __m_hash__[:path]) || true) && ((http_method = __m_hash__[:http_method]) || true)))) || Kernel.raise(NoMatchingPatternError, __m__.inspect))
20
20
  (__m__ = doc[:paths][path][http_method]) && (((__m__.respond_to?(:deconstruct_keys) && (((__m_hash__ = __m__.deconstruct_keys([:responses, :summary])) || true) && ((Hash === __m_hash__) || Kernel.raise(TypeError, "#deconstruct_keys must return Hash")))) && ((__m_hash__.key?(:responses) && __m_hash__.key?(:summary)) && (((responses = __m_hash__[:responses]) || true) && ((summary = __m_hash__[:summary]) || true)))) || Kernel.raise(NoMatchingPatternError, __m__.inspect))
21
21
  responses.keys.map do |response_code|
22
+ (__m__ = responses[response_code][:content].values) && (((__m__.respond_to?(:deconstruct) && (((__m_arr__ = __m__.deconstruct) || true) && ((Array === __m_arr__) || Kernel.raise(TypeError, "#deconstruct must return Array")))) && ((1 == __m_arr__.size) && ((content = __m_arr__[0]) || true))) || Kernel.raise(NoMatchingPatternError, __m__.inspect))
22
23
  Schema.new(
23
24
  path,
24
25
  *summary.split(' ').then { |_1| [_1.first, _1.last[1..-1]] },
25
26
  http_method,
26
27
  response_code,
27
- responses[response_code][:content][:'application/json'][:schema]
28
+ content[:schema]
28
29
  )
29
30
  end
30
31
  end
@@ -19,12 +19,13 @@ module Katarina
19
19
  (__m__ = pair) && (((__m__.respond_to?(:deconstruct_keys) && (((__m_hash__ = __m__.deconstruct_keys([:path, :http_method])) || true) && ((Hash === __m_hash__) || Kernel.raise(TypeError, "#deconstruct_keys must return Hash")))) && ((__m_hash__.key?(:path) && __m_hash__.key?(:http_method)) && (((path = __m_hash__[:path]) || true) && ((http_method = __m_hash__[:http_method]) || true)))) || Kernel.raise(NoMatchingPatternError, __m__.inspect))
20
20
  (__m__ = doc[:paths][path][http_method]) && (((__m__.respond_to?(:deconstruct_keys) && (((__m_hash__ = __m__.deconstruct_keys([:responses, :summary])) || true) && ((Hash === __m_hash__) || Kernel.raise(TypeError, "#deconstruct_keys must return Hash")))) && ((__m_hash__.key?(:responses) && __m_hash__.key?(:summary)) && (((responses = __m_hash__[:responses]) || true) && ((summary = __m_hash__[:summary]) || true)))) || Kernel.raise(NoMatchingPatternError, __m__.inspect))
21
21
  responses.keys.map do |response_code|
22
+ (__m__ = responses[response_code][:content].values) && (((__m__.respond_to?(:deconstruct) && (((__m_arr__ = __m__.deconstruct) || true) && ((Array === __m_arr__) || Kernel.raise(TypeError, "#deconstruct must return Array")))) && ((1 == __m_arr__.size) && ((content = __m_arr__[0]) || true))) || Kernel.raise(NoMatchingPatternError, __m__.inspect))
22
23
  Schema.new(
23
24
  path,
24
25
  *summary.split(' ').then { |_1| [_1.first, _1.last[1..]] },
25
26
  http_method,
26
27
  response_code,
27
- responses[response_code][:content][:'application/json'][:schema]
28
+ content[:schema]
28
29
  )
29
30
  end
30
31
  end
@@ -19,12 +19,13 @@ module Katarina
19
19
  pair in { path:, http_method: }
20
20
  doc[:paths][path][http_method] in { responses:, summary: }
21
21
  responses.keys.map do |response_code|
22
+ responses[response_code][:content].values in [content]
22
23
  Schema.new(
23
24
  path,
24
25
  *summary.split(' ').then { [_1.first, _1.last[1..]] },
25
26
  http_method,
26
27
  response_code,
27
- responses[response_code][:content][:'application/json'][:schema]
28
+ content[:schema]
28
29
  )
29
30
  end
30
31
  end
@@ -1,3 +1,3 @@
1
1
  module Katarina
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: katarina
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
  - masatoshi_moritsuka
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-08-12 00:00:00.000000000 Z
11
+ date: 2020-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -78,6 +78,7 @@ files:
78
78
  - README.md
79
79
  - bin/build
80
80
  - bin/console
81
+ - bin/hoge.rb
81
82
  - bin/setup
82
83
  - lib/.rbnext/2.6/katarina/parser.rb
83
84
  - lib/.rbnext/2.7/katarina/generatable.rb