arcabouco 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/arcabouco/application.rb +5 -2
- data/lib/arcabouco/base.rb +40 -13
- data/lib/arcabouco/server.rb +1 -1
- data/lib/arcabouco/version.rb +1 -1
- data/lib/templates/index.html.erb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a93e0f420aa15cdfaab193a0e49d8243ada1d9a
|
4
|
+
data.tar.gz: 0e1af6c521d2d9391e2794cbd785c1eaa85c42be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a2761add2a5ee124029411b45da5e5b8de4954379b70d65d89303c13e229fee688d6c54fb76cc76c92cbe8e3441d5600d3e175ab631c66be019ce35ca59fd9c
|
7
|
+
data.tar.gz: 4dded12e42f5b99bd618215bb4f9b4cc6a32ae4059d03c745a2f7b77f49f32585793f7e4362e0d025294558e84d90226cee8a6632f947ce988d985c03f6e0a46
|
@@ -2,8 +2,11 @@ module Arcabouco
|
|
2
2
|
class Application
|
3
3
|
def initialize
|
4
4
|
configure_root_directory
|
5
|
-
puts "
|
6
|
-
|
5
|
+
puts "Booting Arcabouco #{Arcabouco::VERSION}"
|
6
|
+
config_filename = File.join Arcabouco.root, 'config.rb'
|
7
|
+
if File.file?(config_filename)
|
8
|
+
require config_filename
|
9
|
+
end
|
7
10
|
end
|
8
11
|
|
9
12
|
private
|
data/lib/arcabouco/base.rb
CHANGED
@@ -1,23 +1,50 @@
|
|
1
1
|
module Arcabouco
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
class << self
|
4
|
+
def mattr_reader(*syms)
|
5
|
+
syms.each do |sym|
|
6
|
+
raise NameError.new("invalid attribute name: #{sym}") unless sym =~ /^[_A-Za-z]\w*$/
|
7
|
+
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
8
|
+
@@#{sym} = nil unless defined? @@#{sym}
|
9
|
+
def self.#{sym}
|
10
|
+
@@#{sym}
|
11
|
+
end
|
12
|
+
EOS
|
6
13
|
|
7
|
-
|
8
|
-
|
9
|
-
|
14
|
+
class_variable_set("@@#{sym}", yield) if block_given?
|
15
|
+
end
|
16
|
+
end
|
10
17
|
|
11
|
-
|
12
|
-
|
13
|
-
|
18
|
+
def mattr_writer(*syms)
|
19
|
+
syms.each do |sym|
|
20
|
+
raise NameError.new("invalid attribute name: #{sym}") unless sym =~ /^[_A-Za-z]\w*$/
|
21
|
+
class_eval(<<-EOS, __FILE__, __LINE__ + 1)
|
22
|
+
@@#{sym} = nil unless defined? @@#{sym}
|
23
|
+
def self.#{sym}=(obj)
|
24
|
+
@@#{sym} = obj
|
25
|
+
end
|
26
|
+
EOS
|
14
27
|
|
15
|
-
|
16
|
-
|
28
|
+
send("#{sym}=", yield) if block_given?
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def mattr_accessor(*syms, &blk)
|
33
|
+
mattr_reader(*syms, &blk)
|
34
|
+
mattr_writer(*syms, &blk)
|
35
|
+
end
|
17
36
|
end
|
18
37
|
|
19
|
-
|
20
|
-
|
38
|
+
mattr_accessor :root
|
39
|
+
mattr_accessor :gem_root
|
40
|
+
mattr_accessor :asset_list
|
41
|
+
mattr_accessor :application_name
|
42
|
+
|
43
|
+
self.asset_list = %w(jquery.js app.css app.js vendor.js vendor.css *.png *.jpg *.gif *.mp3 *.wav)
|
44
|
+
self.application_name = "Arcabouco Application"
|
45
|
+
|
46
|
+
def self.setup
|
47
|
+
yield self
|
21
48
|
end
|
22
49
|
|
23
50
|
end
|
data/lib/arcabouco/server.rb
CHANGED
@@ -46,7 +46,7 @@ module Arcabouco
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def content_for_index
|
49
|
-
erb :"#{relative_to}/index.html", locals: { :assets => $environment }, layout: false, cache: false
|
49
|
+
erb :"#{relative_to}/index.html", locals: { :assets => $environment, :application_name => Arcabouco.application_name}, layout: false, cache: false
|
50
50
|
end
|
51
51
|
|
52
52
|
get '/save_app.html' do
|
data/lib/arcabouco/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html class='no-js not-ready'>
|
3
3
|
<head>
|
4
|
-
<title
|
4
|
+
<title><%= application_name %></title>
|
5
5
|
<meta charset='utf-8'>
|
6
6
|
<meta content='width=device-width, initial-scale=1, maximum-scale=1' name='viewport'>
|
7
7
|
<meta content='yes' name='apple-mobile-web-app-capable'>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcabouco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Negri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|