pansophy 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +4 -3
- data/README.md +5 -0
- data/lib/pansophy.rb +4 -0
- data/lib/pansophy/remote.rb +1 -0
- data/lib/pansophy/remote/read_file_head.rb +29 -0
- data/lib/pansophy/version.rb +1 -1
- data/pansophy.gemspec +14 -14
- metadata +77 -48
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f50808872b27d1fd6fca92c3e3e729c291b975e8
|
4
|
+
data.tar.gz: 354aa620a6e16020014d521a027b12ac028512cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57db6ea24b3106ae1cb5c9f0f838bd2ba160ca49948443dfb09d880019eb249474780d06855c39e2bf867c4cf380de6cab675304bdaa284a92c357610333bb2c
|
7
|
+
data.tar.gz: a8fc16826a356dc650d601f800a087595272f2d60669c86b6fca814be346125095ab049bb6ab10ce51d49473c6455b55c124960e27026f493844814cbf42b737
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/.travis.yml
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.9
|
4
|
-
- 2.0
|
5
3
|
- 2.1
|
6
4
|
- 2.2
|
5
|
+
- 2.3.0 # The version of RVM installed on Travis doesn't yet recognise 2.3 as an alias of 2.3.0
|
6
|
+
before_install: gem install bundler -v 1.11.2
|
7
7
|
notifications:
|
8
8
|
email:
|
9
9
|
- support@travellink.com.au
|
10
|
-
flowdock:
|
10
|
+
flowdock:
|
11
|
+
secure: D2Kf5l63amaHyf0WA5sVDLsB3dpSQpWrNYGgcqiKLPqBy/oG+bR93iuhe7e0FKKCImxGo3UyWor/QURbNi9tYI1uQTzWWA+UdF3m+dmBZEWoNDCWXGYGOaxDRCWNC0a5VGQXwNIAGqDNxvk8LxwFdqqX0KYPmyuVWbXvKlUf7mI=
|
data/README.md
CHANGED
@@ -56,6 +56,11 @@ To read the contents of a remote file
|
|
56
56
|
Pansophy.read('bucket_name', 'remote_file_path')
|
57
57
|
```
|
58
58
|
|
59
|
+
To read the head of a remote file
|
60
|
+
```ruby
|
61
|
+
Pansophy.head('bucket_name', 'remote_file_path')
|
62
|
+
```
|
63
|
+
|
59
64
|
## Development
|
60
65
|
|
61
66
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/pansophy.rb
CHANGED
data/lib/pansophy/remote.rb
CHANGED
@@ -0,0 +1,29 @@
|
|
1
|
+
module Pansophy
|
2
|
+
module Remote
|
3
|
+
class ReadFileHead
|
4
|
+
include Adamantium::Flat
|
5
|
+
|
6
|
+
def initialize(bucket, path)
|
7
|
+
@bucket = bucket
|
8
|
+
@pathname = Pathname.new(path)
|
9
|
+
end
|
10
|
+
|
11
|
+
def call
|
12
|
+
fail ArgumentError, "#{@pathname} does not exist" if file.nil?
|
13
|
+
file
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
def file
|
19
|
+
directory.files.head(@pathname.to_s)
|
20
|
+
end
|
21
|
+
memoize :file
|
22
|
+
|
23
|
+
def directory
|
24
|
+
ReadDirectory.new(@bucket, @pathname).call
|
25
|
+
end
|
26
|
+
memoize :directory
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
data/lib/pansophy/version.rb
CHANGED
data/pansophy.gemspec
CHANGED
@@ -21,20 +21,20 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ['lib']
|
23
23
|
|
24
|
-
spec.
|
25
|
-
spec.add_dependency 'adamantium'
|
26
|
-
spec.add_dependency 'facets'
|
24
|
+
spec.required_ruby_version = '>= 2.1'
|
27
25
|
|
28
|
-
|
29
|
-
|
30
|
-
|
26
|
+
spec.add_dependency 'fog-aws', '~> 0.8'
|
27
|
+
spec.add_dependency 'anima', '~> 0.3'
|
28
|
+
spec.add_dependency 'adamantium', '~> 0.2'
|
29
|
+
spec.add_dependency 'facets', '~> 3.0'
|
31
30
|
|
32
|
-
spec.add_development_dependency 'bundler'
|
33
|
-
spec.add_development_dependency 'rake'
|
34
|
-
spec.add_development_dependency 'dotenv'
|
35
|
-
spec.add_development_dependency 'rspec'
|
36
|
-
spec.add_development_dependency 'simplecov'
|
37
|
-
spec.add_development_dependency 'simplecov-rcov'
|
38
|
-
spec.add_development_dependency 'coveralls'
|
39
|
-
spec.add_development_dependency 'rubocop'
|
31
|
+
spec.add_development_dependency 'bundler', '~> 1.11'
|
32
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
33
|
+
spec.add_development_dependency 'dotenv', '~> 2.0'
|
34
|
+
spec.add_development_dependency 'rspec', '~> 3.4'
|
35
|
+
spec.add_development_dependency 'simplecov', '~> 0.11'
|
36
|
+
spec.add_development_dependency 'simplecov-rcov', '~> 0.2'
|
37
|
+
spec.add_development_dependency 'coveralls', '~> 0.8'
|
38
|
+
spec.add_development_dependency 'rubocop', '~> 0.36'
|
39
|
+
spec.add_development_dependency 'travis', '~> 1.8'
|
40
40
|
end
|
metadata
CHANGED
@@ -1,169 +1,197 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pansophy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Berardi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fog-aws
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
19
|
+
version: '0.8'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
26
|
+
version: '0.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: anima
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.3'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.3'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: adamantium
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - "
|
45
|
+
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
47
|
+
version: '0.2'
|
34
48
|
type: :runtime
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - "
|
52
|
+
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
54
|
+
version: '0.2'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: facets
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
|
-
- - "
|
59
|
+
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
61
|
+
version: '3.0'
|
48
62
|
type: :runtime
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
|
-
- - "
|
66
|
+
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
68
|
+
version: '3.0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
|
-
- - "
|
73
|
+
- - "~>"
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '1.11'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
|
-
- - "
|
80
|
+
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '1.11'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: rake
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
|
-
- - "
|
87
|
+
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
89
|
+
version: '10.0'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
|
-
- - "
|
94
|
+
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
96
|
+
version: '10.0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: dotenv
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
|
-
- - "
|
101
|
+
- - "~>"
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
103
|
+
version: '2.0'
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
|
-
- - "
|
108
|
+
- - "~>"
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
110
|
+
version: '2.0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rspec
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
|
-
- - "
|
115
|
+
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
117
|
+
version: '3.4'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
|
-
- - "
|
122
|
+
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
124
|
+
version: '3.4'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: simplecov
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
|
-
- - "
|
129
|
+
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
131
|
+
version: '0.11'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
|
-
- - "
|
136
|
+
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
138
|
+
version: '0.11'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: simplecov-rcov
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
|
-
- - "
|
143
|
+
- - "~>"
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
145
|
+
version: '0.2'
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
|
-
- - "
|
150
|
+
- - "~>"
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
152
|
+
version: '0.2'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: coveralls
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
|
-
- - "
|
157
|
+
- - "~>"
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
159
|
+
version: '0.8'
|
146
160
|
type: :development
|
147
161
|
prerelease: false
|
148
162
|
version_requirements: !ruby/object:Gem::Requirement
|
149
163
|
requirements:
|
150
|
-
- - "
|
164
|
+
- - "~>"
|
151
165
|
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
166
|
+
version: '0.8'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
168
|
name: rubocop
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
|
-
- - "
|
171
|
+
- - "~>"
|
158
172
|
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
173
|
+
version: '0.36'
|
160
174
|
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
164
|
-
- - "
|
178
|
+
- - "~>"
|
165
179
|
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
180
|
+
version: '0.36'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: travis
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - "~>"
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '1.8'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - "~>"
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '1.8'
|
167
195
|
description: Pansophy allows different applications to share knowledgevia a centralised
|
168
196
|
remote repository
|
169
197
|
email:
|
@@ -199,6 +227,7 @@ files:
|
|
199
227
|
- lib/pansophy/remote/file.rb
|
200
228
|
- lib/pansophy/remote/read_directory.rb
|
201
229
|
- lib/pansophy/remote/read_file.rb
|
230
|
+
- lib/pansophy/remote/read_file_head.rb
|
202
231
|
- lib/pansophy/synchronizer.rb
|
203
232
|
- lib/pansophy/tasks.rb
|
204
233
|
- lib/pansophy/version.rb
|
@@ -215,7 +244,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
215
244
|
requirements:
|
216
245
|
- - ">="
|
217
246
|
- !ruby/object:Gem::Version
|
218
|
-
version: '
|
247
|
+
version: '2.1'
|
219
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
220
249
|
requirements:
|
221
250
|
- - ">="
|
@@ -223,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
252
|
version: '0'
|
224
253
|
requirements: []
|
225
254
|
rubyforge_project:
|
226
|
-
rubygems_version: 2.
|
255
|
+
rubygems_version: 2.5.1
|
227
256
|
signing_key:
|
228
257
|
specification_version: 4
|
229
258
|
summary: Information sharing via centralised repository
|