idobata_fs 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a665b17fc339c83c210f7ef72810be77aa6192b4
4
+ data.tar.gz: 5e74e2c983e41234e1333ec145f5bff591278f9b
5
+ SHA512:
6
+ metadata.gz: b037726665ced14d7954cc6d2646a7f1c66602125cb8abef6973fc55adde643aaa14e9f6ff280b4af797099b42562cc74743835ccfc8de69e1329355791316ce
7
+ data.tar.gz: eff4efa119def2637a08a67b3f615bfbe69cd8f8767c40130ca256a9e80c25d3cb2bd64f157b4d15242941ed108a6c7b2ef2f975565955bfc1f44a31c23c38c6
checksums.yaml.gz.sig ADDED
@@ -0,0 +1 @@
1
+ }E��MX��a�<�y/�|yªi€7b?��������n�tF�e����\�(��,0�y�Rq�9p�z�g���-s�c�kR�tߔ&��R�I�MJKD�ꑕ=ʉ�L����� �H,�'
data/idobata_fs ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require_relative 'idobata_fs'
4
+
5
+ if __FILE__ == File.expand_path($0)
6
+ require "rfusefs"
7
+ FuseFS.start(IdobataFs.new, *ARGV)
8
+ end
data/idobata_fs.rb ADDED
@@ -0,0 +1,54 @@
1
+ require "idobata_graph_ql"
2
+
3
+ class IdobataFs
4
+ def contents(path)
5
+ _, org, room_name = path.split(?/, 3)
6
+
7
+ if org.empty?
8
+ organizations
9
+ elsif organizations.include?(org) && room_name.nil?
10
+ room_names
11
+ end
12
+ end
13
+
14
+ def directory?(path)
15
+ _, org, room_name = path.split(?/, 3)
16
+ organizations.include?(org) && room_name.nil?
17
+ end
18
+
19
+ def file?(path)
20
+ room_for(path)
21
+ end
22
+
23
+ def can_write?(path)
24
+ file?(path)
25
+ end
26
+
27
+ def write_to(path, body)
28
+ return if body.empty?
29
+ IdobataGraphQL.create_message(room_for(path).id, <<~BODY)
30
+ ~~~
31
+ #{body}
32
+ ~~~
33
+ BODY
34
+ end
35
+
36
+ private
37
+
38
+ def room_for(path)
39
+ _, org, room_name = path.split(?/, 3)
40
+ rooms.detect { |r| r.organization == org && r.name == room_name }
41
+ end
42
+
43
+ def organizations
44
+ @organizations ||= rooms.map(&:organization).uniq
45
+ end
46
+
47
+ def room_names
48
+ @room_names ||= rooms.map(&:name)
49
+ end
50
+
51
+ def rooms
52
+ @rooms ||= IdobataGraphQL.rooms
53
+ end
54
+ end
data.tar.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ ��//�q�� 2��"
2
+ fY�qI�>cwib��Aw|�v]�G���rba�d�T+���
3
+ S"q<��t�Z�?*>�W�5�Ԏ=Z{Y��'�� X|!]
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: idobata_fs
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Seiei Miyagi
8
+ autorequire:
9
+ bindir: "."
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhoYW5h
14
+ Y2hpbjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
15
+ MB4XDTE3MDUwNDE0NDYxOVoXDTE4MDUwNDE0NDYxOVowPzERMA8GA1UEAwwIaGFu
16
+ YWNoaW4xFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
17
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAN03A8Jvk7k0aVLmIHrj
18
+ soZLOppADifbdH+FoXUfWXFeu9x/hq8UsuMyTuSF6oNZRihzk7yakKBcv8B44wc2
19
+ Kfui97h+UOqBib5oPZOrJjW34dSfnHgdsPskZRK1yvMW0X88q7K+9iBT78Xpkf40
20
+ XkDh7mEyA0sC25n8BBTg3HpPMNXtQazR0UrtSH/Uyu2t7Sy4QQVKFYfVdfITfMoG
21
+ i7X/2cXs0ao6dLOK8H1lodxZ+2Dc5UQCrerVXKvVjAgZhJIN7qgbpAfuc+KFpGhq
22
+ pvkFaoOJ/NCg54DDiJYhZMm2X3NtjRRE3Ujt4bwO6vVlr5aPU2/vPCvsiyF1PmO+
23
+ a+UCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFMug
24
+ kMbzYl73rLFxRlmgKeNAiSZjMB0GA1UdEQQWMBSBEmhhbmFjaGluQGdtYWlsLmNv
25
+ bTAdBgNVHRIEFjAUgRJoYW5hY2hpbkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
26
+ ggEBAFBV/OUPBF6DhEe/Q1bojFYwRdLI+JbDAoH97GRuBzKokbW7a4k5EGMw4aLx
27
+ RXH75W+vmsG1z/RE7lpD+T7Uf+ZuGwCIhFsGiZBcbBbinz4MEsqjGwu2/OPOgbYK
28
+ alk+o48ier71CaSsfz83hSAzklJ7g6BocJCWROXuVzX9eCw7YB3F4xNzdw8HxHkA
29
+ WbyMQMURxOX5Em9t+EgSU9Odx0tJgnhygUSdTJknavnpaZUa2odWS4+wagh8nXxS
30
+ +zDzgwp9Z4A8i47ioz1YEGIkQhDKZeGQznwkht0zsrtswEAiOisL5uJDtWvQiwt6
31
+ a9nBgrpUm8NHrucdUDtMYjixgmU=
32
+ -----END CERTIFICATE-----
33
+ date: 2017-05-28 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: rfusefs
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '1.0'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 1.0.3
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '1.0'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.0.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: idobata_graph_ql
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.0'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.0.2
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '0.0'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.0.2
75
+ description:
76
+ email: hanachin@gmail.com
77
+ executables:
78
+ - idobata_fs
79
+ extensions: []
80
+ extra_rdoc_files: []
81
+ files:
82
+ - "./idobata_fs"
83
+ - idobata_fs
84
+ - idobata_fs.rb
85
+ homepage: https://github.com/hanachin/idobata_fs
86
+ licenses:
87
+ - MIT
88
+ metadata: {}
89
+ post_install_message:
90
+ rdoc_options: []
91
+ require_paths:
92
+ - "."
93
+ required_ruby_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '0'
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
104
+ rubyforge_project:
105
+ rubygems_version: 2.6.11
106
+ signing_key:
107
+ specification_version: 4
108
+ summary: mount your idobata rooms via FUSE
109
+ test_files: []
metadata.gz.sig ADDED
Binary file