rixius 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +8 -0
- data/README.md +3 -0
- data/lib/rixius/console.rb +19 -0
- data/lib/rixius/procs.rb +7 -0
- data/lib/rixius/s3.rb +15 -0
- data/lib/rixius/utils.rb +56 -0
- data/lib/rixius/version.rb +3 -0
- data/lib/rixius.rb +6 -0
- metadata +104 -0
data/LICENSE
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
Copyright (c) 2011 Stephen "Rixius" Middleton
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
8
|
+
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
module Rixius
|
2
|
+
module Console
|
3
|
+
def self.start
|
4
|
+
require 'irb'
|
5
|
+
|
6
|
+
begin
|
7
|
+
require 'irb/completion'
|
8
|
+
rescue Exception
|
9
|
+
#no Readline capabilities, but that's cool.
|
10
|
+
end
|
11
|
+
|
12
|
+
if File.exists? '.irbc'
|
13
|
+
ENV['IRBC'] = ".irbc"
|
14
|
+
end
|
15
|
+
|
16
|
+
IRB.start
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/rixius/procs.rb
ADDED
data/lib/rixius/s3.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
module AWS
|
2
|
+
module S3
|
3
|
+
class S3Object
|
4
|
+
class << self
|
5
|
+
alias :rixius_original_store, :store
|
6
|
+
def store key, data, bucket = nil, options = {}
|
7
|
+
if options['Cache-Control'].blank?
|
8
|
+
options['Cache-Control'] = 'max-age=315360000'
|
9
|
+
end
|
10
|
+
rixius_original_store key, data, bucket, options
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
data/lib/rixius/utils.rb
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
module Rixius
|
2
|
+
module Utils
|
3
|
+
|
4
|
+
def js *keys, &block
|
5
|
+
@js ||= []
|
6
|
+
if block_given?
|
7
|
+
@js.push capture_haml &block
|
8
|
+
else
|
9
|
+
keys.each do |key|
|
10
|
+
@js.push "<script src=\"/js/#{key}.js\"></script>"
|
11
|
+
end
|
12
|
+
end
|
13
|
+
nil
|
14
|
+
end
|
15
|
+
def js_dep *keys, &block
|
16
|
+
@js ||= []
|
17
|
+
if block_given?
|
18
|
+
@js = [ capture_haml(&block), *@js]
|
19
|
+
end
|
20
|
+
keys = keys.map {|key| "<script src=\"/js/#{key}.js\"></script>" }
|
21
|
+
@js = keys.push *@js
|
22
|
+
nil
|
23
|
+
end
|
24
|
+
def js_render *args, &block
|
25
|
+
@js ||= []
|
26
|
+
js_dep *args, &block
|
27
|
+
@js.join "\n"
|
28
|
+
end
|
29
|
+
|
30
|
+
def css *keys, &block
|
31
|
+
@css ||= []
|
32
|
+
if block_given?
|
33
|
+
@css.push capture_haml &block
|
34
|
+
else
|
35
|
+
keys.each do |key|
|
36
|
+
@css.push "<link rel=\"stylesheet\" href=\"/css/#{key}.css\">"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
nil
|
40
|
+
end
|
41
|
+
def css_dep *keys, &block
|
42
|
+
@css ||= []
|
43
|
+
if block_given?
|
44
|
+
@css = [ capture_haml(&block), *@css]
|
45
|
+
end
|
46
|
+
keys = keys.map {|key| "<link rel=\"stylesheet\" href=\"/css/#{key}.css\">" }
|
47
|
+
@css = keys.push *@css
|
48
|
+
nil
|
49
|
+
end
|
50
|
+
def css_render *args, &block
|
51
|
+
@css ||= []
|
52
|
+
css_dep *args, &block
|
53
|
+
@css.join "\n"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
data/lib/rixius.rb
ADDED
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rixius
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 19
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Stephen 'Rixius' Middleton
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-06-22 00:00:00 -05:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: sinatra
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: data_mapper
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
type: :runtime
|
48
|
+
version_requirements: *id002
|
49
|
+
description: Module of helpful modules, classes, and mixins
|
50
|
+
email:
|
51
|
+
- boss@rixi.us
|
52
|
+
executables: []
|
53
|
+
|
54
|
+
extensions: []
|
55
|
+
|
56
|
+
extra_rdoc_files: []
|
57
|
+
|
58
|
+
files:
|
59
|
+
- lib/rixius/console.rb
|
60
|
+
- lib/rixius/procs.rb
|
61
|
+
- lib/rixius/s3.rb
|
62
|
+
- lib/rixius/utils.rb
|
63
|
+
- lib/rixius/version.rb
|
64
|
+
- lib/rixius.rb
|
65
|
+
- LICENSE
|
66
|
+
- README.md
|
67
|
+
has_rdoc: true
|
68
|
+
homepage: http://rixius.github.com/rixius
|
69
|
+
licenses: []
|
70
|
+
|
71
|
+
post_install_message:
|
72
|
+
rdoc_options: []
|
73
|
+
|
74
|
+
require_paths:
|
75
|
+
- lib
|
76
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
77
|
+
none: false
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
hash: 3
|
82
|
+
segments:
|
83
|
+
- 0
|
84
|
+
version: "0"
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
none: false
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
hash: 23
|
91
|
+
segments:
|
92
|
+
- 1
|
93
|
+
- 3
|
94
|
+
- 6
|
95
|
+
version: 1.3.6
|
96
|
+
requirements: []
|
97
|
+
|
98
|
+
rubyforge_project: rixius
|
99
|
+
rubygems_version: 1.4.1
|
100
|
+
signing_key:
|
101
|
+
specification_version: 3
|
102
|
+
summary: Rixius's Helpers
|
103
|
+
test_files: []
|
104
|
+
|