omnifiles 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 +4 -4
- data/README.md +14 -4
- data/bin/omnifiles +1 -1
- data/lib/omnifiles/settings.rb +1 -1
- data/lib/omnifiles/version.rb +1 -1
- data/omnifiles.gemspec +7 -7
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e77c0d22099ad90e4c8b8b911bf02f75772b8863
|
4
|
+
data.tar.gz: a8b8677804088a48c6074f85e648b221db58396a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 725524c2140e85489a1f67b12a92576e560e106af6cebc447a4a35984dbd2bdb5565f37f11dfbb6fd4c85c5c8e3dcb0bcf5f23fb93d902d29d4a0acea7a3499b
|
7
|
+
data.tar.gz: 8bfe2cd8971e47799f2bc6d4d556c34916039fd5518cf0328bb0d9542d8672ca8d8da9957040403618416458e6bc445efc61f712517aabca2dc568b407e7975c
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ urls and statistics.
|
|
11
11
|
|
12
12
|
## Installation
|
13
13
|
|
14
|
-
OmniFiles is a Rack application and can be used as a gem or as a server in local directory.
|
14
|
+
OmniFiles is a Sinatra/Rack application and can be used as a gem or as a server in local directory.
|
15
15
|
|
16
16
|
### As a gem
|
17
17
|
|
@@ -24,9 +24,13 @@ OmniFiles is a Rack application and can be used as a gem or as a server in local
|
|
24
24
|
3. Start an app as a Thin server
|
25
25
|
|
26
26
|
OMNIFILES_SETTINGS=/path/to/settings.yaml omnifiles
|
27
|
-
Of course, you can provide any additional Thin options:
|
27
|
+
Of course, you can provide any additional Thin options at command line:
|
28
28
|
|
29
29
|
OMNIFILES_SETTINGS=/path/to/settings.yaml omnifiles -p 3000
|
30
|
+
Or at config file (see Thin documentation):
|
31
|
+
|
32
|
+
OMNIFILES_SETTINGS=/path/to/settings.yaml omnifiles -C /path/to/thin.yaml
|
33
|
+
|
30
34
|
|
31
35
|
## As a rack app
|
32
36
|
|
@@ -53,10 +57,16 @@ Also specify `-E production` at `omnifiles` (actially Thin) command line.
|
|
53
57
|
|
54
58
|
If you prefer to run omnifiles as a daemon, don't forget to set log and pid location. Author prefer to follow XDG and place all the files at the `~/.local/share/omnifiles`, including the database. So one can use following command line:
|
55
59
|
|
56
|
-
OMNIFILES_SETTINGS=$HOME/.local/share/omnifiles/settings.yaml omnifiles -d -a 127.0.0.1 -p 3000 \
|
60
|
+
OMNIFILES_SETTINGS=$HOME/.local/share/omnifiles/settings.yaml omnifiles start -d -a 127.0.0.1 -p 3000 \
|
57
61
|
-l $HOME/.local/share/omnifiles/omnifiles.log \
|
58
62
|
-P $HOME/.local/share/omnifiles/omnifiles.pid
|
59
63
|
|
64
|
+
Complex Thin options can be hidden in Thin config.yaml file:
|
65
|
+
|
66
|
+
OMNIFILES_SETTINGS=$HOME/.local/share/omnifiles/settings.yaml omnifiles start -C $HOME/.local/share/omnifiles/thin.yaml
|
67
|
+
|
68
|
+
Note that OmniFiles and Thin configs are two distinct configs.
|
69
|
+
|
60
70
|
## Usage
|
61
71
|
|
62
72
|
1. Storing files.
|
@@ -88,4 +98,4 @@ using web browser or curl
|
|
88
98
|
|
89
99
|
## License information
|
90
100
|
|
91
|
-
Please consult with the LICENSE.txt for license information. It is MIT by the way.
|
101
|
+
Please consult with the LICENSE.txt for license information. It is MIT by the way.
|
data/bin/omnifiles
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
2
3
|
|
3
4
|
require 'thin'
|
4
5
|
|
5
6
|
ARGV.unshift File.expand_path(File.join(File.dirname(File.expand_path(__FILE__)),"..","config.ru"))
|
6
7
|
ARGV.unshift '-R'
|
7
|
-
ARGV.unshift 'start'
|
8
8
|
Thin::Runner.new(ARGV).run!
|
data/lib/omnifiles/settings.rb
CHANGED
@@ -4,7 +4,7 @@ module OmniFiles
|
|
4
4
|
|
5
5
|
class Settings < Settingslogic
|
6
6
|
settings_file = (ENV['OMNIFILES_SETTINGS'] or '')
|
7
|
-
raise "Please
|
7
|
+
raise "Please specify a settings file in env OMNIFILES_SETTINGS" unless File.file?(settings_file)
|
8
8
|
source settings_file
|
9
9
|
namespace ENV['RACK_ENV'] || 'development'
|
10
10
|
load!
|
data/lib/omnifiles/version.rb
CHANGED
data/omnifiles.gemspec
CHANGED
@@ -20,11 +20,11 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_development_dependency "bundler", "~> 1.7"
|
22
22
|
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.
|
24
|
-
spec.
|
25
|
-
spec.
|
26
|
-
spec.
|
27
|
-
spec.
|
28
|
-
spec.
|
29
|
-
spec.
|
23
|
+
spec.add_runtime_dependency "sinatra", "~> 1.4.5"
|
24
|
+
spec.add_runtime_dependency "sinatra-assetpack", "~> 0.3.3"
|
25
|
+
spec.add_runtime_dependency "ruby-filemagic", "~> 0.6.0"
|
26
|
+
spec.add_runtime_dependency "sqlite3", "~> 1.3.10"
|
27
|
+
spec.add_runtime_dependency "haml", "~> 4.0.0"
|
28
|
+
spec.add_runtime_dependency "settingslogic", "~> 2.0.0"
|
29
|
+
spec.add_runtime_dependency "thin", "~> 1.6.0"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnifiles
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- theirix
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -45,7 +45,7 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 1.4.5
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -59,7 +59,7 @@ dependencies:
|
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.3.3
|
62
|
-
type: :
|
62
|
+
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
@@ -73,7 +73,7 @@ dependencies:
|
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.6.0
|
76
|
-
type: :
|
76
|
+
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
@@ -87,7 +87,7 @@ dependencies:
|
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: 1.3.10
|
90
|
-
type: :
|
90
|
+
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
@@ -101,7 +101,7 @@ dependencies:
|
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 4.0.0
|
104
|
-
type: :
|
104
|
+
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
@@ -115,7 +115,7 @@ dependencies:
|
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: 2.0.0
|
118
|
-
type: :
|
118
|
+
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
@@ -129,7 +129,7 @@ dependencies:
|
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
131
|
version: 1.6.0
|
132
|
-
type: :
|
132
|
+
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|