flight-router 0.1.8 → 0.1.9

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: e7416ebf31096041e3ceb8fecffaacfd79abebaa
4
- data.tar.gz: c06ac645d8cee46ae1622d7dd463a775b02eba06
3
+ metadata.gz: 4ab231451112b1ef15a3402c5731a63906ee214e
4
+ data.tar.gz: b11f5ca697968abf09f6dff0ab599fc086b25baa
5
5
  SHA512:
6
- metadata.gz: defff77065a258c4980e2a71bb81895fa20b9b457c4c203ecd73b7d6953f0645ef64c462f3088ad7fa1efdb78111f287a00ec01113c9869c1ab3f10b94adb653
7
- data.tar.gz: 6224aa623ff3fe6c43f7a6bef369e281487aca6d090fcc4688db31232436c812fe697e657b2d09130fef1117beecaba0b7afc4e9ab73c5fa889b7c90b45fac61
6
+ metadata.gz: 8335c94bd638e41591ffee43680336ba07dddc90a561a56d1d73603388b4ff4f27aab85761b3948c19eeec138fc01054a4dbcaec30526ddeed08022df891e37b
7
+ data.tar.gz: 8888bc1089c2c13e2693b8ace4a64d927f1a3d39722639372bc2efc2b455ac45ea8d003b6bf06e40ee6f98bb71051be954f7a64df02349f5015af7cdaff400e6
@@ -0,0 +1,5 @@
1
+ # Changelog : 0.1.9
2
+
3
+ ## commits
4
+
5
+ * add datastore/format-for-upload
@@ -41,6 +41,9 @@ module Flight::Router
41
41
  scope = Base64.strict_encode64(JSON.generate(scope))
42
42
  [scope]
43
43
  end
44
+ command "format-for-upload" do |kind:|
45
+ [kind]
46
+ end
44
47
  end
45
48
 
46
49
  image :reset_password do
@@ -68,13 +71,13 @@ module Flight::Router
68
71
  @config ||= {}
69
72
  end
70
73
 
71
- def namespace(path,auth: nil,&block)
74
+ def namespace(path,auth: nil,**opts,&block)
72
75
  @path << path
73
76
 
74
77
  _app = @app
75
78
  app = {}
76
- merge_auth(app,auth)
77
- @app = @app.dup.deep_merge(app)
79
+ merge_auth!(app,auth)
80
+ @app = @app.dup.deep_merge(app).deep_merge(opts)
78
81
 
79
82
  _config = config
80
83
  @config = {}
@@ -85,19 +88,20 @@ module Flight::Router
85
88
  @config = _config.merge(@config)
86
89
  @path.pop
87
90
  end
88
- def api(path,auth: nil,&block)
91
+ def api(path,auth: nil,**opts,&block)
89
92
  path = @path + [path]
90
93
  config = {}
91
- merge_auth(config,auth)
94
+ merge_auth!(config,auth)
92
95
  commands = parse_command path, instance_exec(&block)
93
96
  @config[path.join("/")] = @app
94
97
  .deep_merge(config)
98
+ .deep_merge(opts)
95
99
  .deep_merge(commands: commands)
96
100
  end
97
101
 
98
102
  private
99
103
 
100
- def merge_auth(hash,auth)
104
+ def merge_auth!(hash,auth)
101
105
  if auth
102
106
  hash[:auth] = map[:auth][auth]
103
107
  end
@@ -1,5 +1,5 @@
1
1
  module Flight
2
2
  module Router
3
- VERSION = "0.1.8"
3
+ VERSION = "0.1.9"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flight-router
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - shun@getto.systems
@@ -84,6 +84,7 @@ files:
84
84
  - CHANGELOG/0.1.6.md
85
85
  - CHANGELOG/0.1.7.md
86
86
  - CHANGELOG/0.1.8.md
87
+ - CHANGELOG/0.1.9.md
87
88
  - Gemfile
88
89
  - LICENSE
89
90
  - README.md