RubyApp 0.6.61 → 0.6.62
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/ruby_app/configuration.ru +3 -3
- data/lib/ruby_app/elements/mobile/document.html.haml +2 -2
- data/lib/ruby_app/elements/mobile/document.rb +8 -8
- data/lib/ruby_app/elements/mobile/platforms/ios/document.rb +2 -2
- data/lib/ruby_app/rack/route.rb +2 -2
- data/lib/ruby_app/request.rb +1 -1
- data/lib/ruby_app/scripts/phantom.js +6 -3
- data/lib/ruby_app/session.rb +1 -1
- data/lib/ruby_app/templates/application/configuration.ru +4 -4
- data/lib/ruby_app/version.rb +5 -1
- data/ruby_app.gemspec +1 -1
- metadata +10 -8
data/Rakefile
CHANGED
@@ -56,7 +56,7 @@ namespace :ruby_app do
|
|
56
56
|
|
57
57
|
desc 'Run the test script on the local environment'
|
58
58
|
task :local do |task|
|
59
|
-
Rake::Task['ruby_app:test:url'].invoke(
|
59
|
+
Rake::Task['ruby_app:test:url'].invoke("http://localhost:8000/ruby_app")
|
60
60
|
end
|
61
61
|
|
62
62
|
end
|
@@ -22,7 +22,7 @@ use Rack::Reloader
|
|
22
22
|
use RubyApp::Rack::Application, :configuration_paths => [File.join(RubyApp::ROOT, %w[configuration.yml])]
|
23
23
|
# Placeholder for template application configuration path
|
24
24
|
|
25
|
-
map "#{RubyApp.
|
25
|
+
map "#{RubyApp.root_or_nil}/ruby_app/resources" do
|
26
26
|
run Rack::File.new(File.join(RubyApp::ROOT, %w[resources]))
|
27
27
|
end
|
28
28
|
|
@@ -30,11 +30,11 @@ end
|
|
30
30
|
|
31
31
|
|
32
32
|
|
33
|
-
map "#{RubyApp.
|
33
|
+
map "#{RubyApp.root_or_nil}/favicon.ico" do
|
34
34
|
run Rack::File.new(File.join(RubyApp::ROOT, %w[resources favicon.ico]))
|
35
35
|
end
|
36
36
|
|
37
|
-
map "#{RubyApp.
|
37
|
+
map "#{RubyApp.root_or_nil}/" do
|
38
38
|
use RubyApp::Rack::Request
|
39
39
|
use RubyApp::Rack::Response
|
40
40
|
use RubyApp::Rack::Language
|
@@ -15,10 +15,10 @@
|
|
15
15
|
%link{'rel' => 'stylesheet',
|
16
16
|
'href' => stylesheet}
|
17
17
|
%link{'rel' => 'stylesheet',
|
18
|
-
'href' => "#{RubyApp.
|
18
|
+
'href' => "#{RubyApp.root_or_nil}/#{RubyApp::Language.locale.code}/document.css"}
|
19
19
|
- self.scripts.each do |script|
|
20
20
|
%script{'src' => script}
|
21
|
-
%script{'src' => "#{RubyApp.
|
21
|
+
%script{'src' => "#{RubyApp.root_or_nil}/#{RubyApp::Language.locale.code}/document.js"}
|
22
22
|
|
23
23
|
%meta{'name' => 'root',
|
24
24
|
'content' => RubyApp.root}
|
@@ -43,14 +43,14 @@ module RubyApp
|
|
43
43
|
|
44
44
|
@metadata.merge!('viewport' => 'width=device-width, initial-scale=1')
|
45
45
|
|
46
|
-
@stylesheets.push("#{RubyApp.
|
47
|
-
|
48
|
-
@scripts.push("#{RubyApp.
|
49
|
-
@scripts.push("#{RubyApp.
|
50
|
-
@scripts.push("#{RubyApp.
|
51
|
-
@scripts.push("#{RubyApp.
|
52
|
-
@scripts.push("#{RubyApp.
|
53
|
-
@scripts.push("#{RubyApp.
|
46
|
+
@stylesheets.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.css")
|
47
|
+
|
48
|
+
@scripts.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/jquery-1.8.3.min.js")
|
49
|
+
@scripts.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/jquery-ui-1.9.2.custom/js/jquery-ui-1.9.2.custom.min.js")
|
50
|
+
@scripts.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/jquery.ui.touch-punch-0.2.2.min.js")
|
51
|
+
@scripts.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/fastclick-0.5.6.js")
|
52
|
+
@scripts.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/document.js")
|
53
|
+
@scripts.push("#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/document/jquery.mobile-1.1.0/jquery.mobile-1.1.0.min.js")
|
54
54
|
|
55
55
|
end
|
56
56
|
|
@@ -18,8 +18,8 @@ module RubyApp
|
|
18
18
|
|
19
19
|
self.metadata.merge!('apple-mobile-web-app-capable' => 'yes',
|
20
20
|
'apple-mobile-web-app-status-bar-style' => 'black')
|
21
|
-
self.links.merge!('apple-touch-icon' => "#{RubyApp.
|
22
|
-
'apple-touch-startup-image' => "#{RubyApp.
|
21
|
+
self.links.merge!('apple-touch-icon' => "#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/platforms/ios/document/apple-touch-icon.png",
|
22
|
+
'apple-touch-startup-image' => "#{RubyApp.root_or_nil}/ruby_app/resources/elements/mobile/platforms/ios/document/apple-touch-startup-image.png")
|
23
23
|
|
24
24
|
end
|
25
25
|
|
data/lib/ruby_app/rack/route.rb
CHANGED
@@ -14,8 +14,8 @@ module RubyApp
|
|
14
14
|
extend RubyApp::Mixins::RouteMixin
|
15
15
|
|
16
16
|
def call(environment)
|
17
|
-
RubyApp::Log.debug("ROUTE #{RubyApp::Request.request_method} #{RubyApp::Request.path.gsub(/^#{RubyApp.
|
18
|
-
RubyApp::Rack::Route.do_route(RubyApp::Request.request_method, RubyApp::Request.path.gsub(/^#{RubyApp.
|
17
|
+
# RubyApp::Log.debug("ROUTE #{RubyApp::Request.request_method} #{RubyApp::Request.path.gsub(/^#{RubyApp.root_or_nil}/,'')}")
|
18
|
+
RubyApp::Rack::Route.do_route(RubyApp::Request.request_method, RubyApp::Request.path.gsub(/^#{RubyApp.root_or_nil}/,''))
|
19
19
|
end
|
20
20
|
|
21
21
|
route(RubyApp::Mixins::RouteMixin::GET, /\/quit/) do |method, path|
|
data/lib/ruby_app/request.rb
CHANGED
@@ -5,14 +5,17 @@ console.log('MESSAGE Running test script on ' + arguments[1] + ' ...');
|
|
5
5
|
var page = require('webpage').create();
|
6
6
|
page.open(arguments[1] + '?script=phantom');
|
7
7
|
|
8
|
+
page.onNavigationRequested = function(url, type, willNavigate, mainFrame) {
|
9
|
+
console.log('NAVIGATE ' + url);
|
10
|
+
};
|
8
11
|
page.onConsoleMessage = function(message) {
|
9
|
-
console.log('CONSOLE
|
12
|
+
console.log('CONSOLE ' + message);
|
10
13
|
};
|
11
14
|
page.onConfirm = function(message) {
|
12
|
-
console.log('FAIL
|
15
|
+
console.log('FAIL ' + message);
|
13
16
|
phantom.exit();
|
14
17
|
};
|
15
18
|
page.onClosing = function(page) {
|
16
|
-
console.log('SUCCESS
|
19
|
+
console.log('SUCCESS ' + page.url);
|
17
20
|
phantom.exit();
|
18
21
|
};
|
data/lib/ruby_app/session.rb
CHANGED
@@ -215,7 +215,7 @@ module RubyApp
|
|
215
215
|
elsif _path =~ /\.rb/
|
216
216
|
name = _path.gsub(String.interpolate { RubyApp::Session.configuration.scripts.path }, '').gsub(/^\//, '').gsub(/\.rb/, '')
|
217
217
|
scripts.push({:name => name,
|
218
|
-
:url => "#{RubyApp.
|
218
|
+
:url => "#{RubyApp.root_or_nil}/quit?go=#{CGI.escape("#{RubyApp.root}?script=#{name}")}"})
|
219
219
|
end
|
220
220
|
end
|
221
221
|
end
|
@@ -22,19 +22,19 @@ use Rack::Reloader
|
|
22
22
|
use RubyApp::Rack::Application, :configuration_paths => [ File.join(RubyApp::ROOT, %w[configuration.yml]),
|
23
23
|
File.join(_APPLICATION_UPCODE_::ROOT, %w[configuration.yml])]
|
24
24
|
|
25
|
-
map '#{RubyApp.
|
25
|
+
map '#{RubyApp.root_or_nil}/ruby_app/resources' do
|
26
26
|
run Rack::File.new(File.join(RubyApp::ROOT, %w[resources]))
|
27
27
|
end
|
28
28
|
|
29
|
-
map '#{RubyApp.
|
29
|
+
map '#{RubyApp.root_or_nil}/_APPLICATION_DOWNCODE_/resources' do
|
30
30
|
run Rack::File.new(File.join(_APPLICATION_UPCODE_::ROOT, %w[resources]))
|
31
31
|
end
|
32
32
|
|
33
|
-
map '#{RubyApp.
|
33
|
+
map '#{RubyApp.root_or_nil}/favicon.ico' do
|
34
34
|
run Rack::File.new(File.join(RubyApp::ROOT, %w[resources favicon.ico]))
|
35
35
|
end
|
36
36
|
|
37
|
-
map '#{RubyApp.
|
37
|
+
map '#{RubyApp.root_or_nil}/' do
|
38
38
|
use RubyApp::Rack::Request
|
39
39
|
use RubyApp::Rack::Response
|
40
40
|
use RubyApp::Rack::Language
|
data/lib/ruby_app/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module RubyApp
|
2
|
-
VERSION = "0.6.
|
2
|
+
VERSION = "0.6.62"
|
3
3
|
ROOT = File.expand_path(File.dirname(__FILE__))
|
4
4
|
|
5
5
|
def self.root
|
@@ -10,4 +10,8 @@ module RubyApp
|
|
10
10
|
@@_root = value
|
11
11
|
end
|
12
12
|
|
13
|
+
def self.root_or_nil
|
14
|
+
return @@_root.nil_if('/')
|
15
|
+
end
|
16
|
+
|
13
17
|
end
|
data/ruby_app.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.add_dependency 'chronic_duration'
|
22
22
|
s.add_dependency 'facets'
|
23
23
|
s.add_dependency 'fileutils'
|
24
|
-
s.add_dependency 'haml'
|
24
|
+
s.add_dependency 'haml', '3.1.8'
|
25
25
|
s.add_dependency 'json'
|
26
26
|
s.add_dependency 'koala'
|
27
27
|
s.add_dependency 'mime-types'
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: RubyApp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 123
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 62
|
10
|
+
version: 0.6.62
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Frank G. Ficnar
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2013-02-
|
18
|
+
date: 2013-02-15 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
@@ -91,12 +91,14 @@ dependencies:
|
|
91
91
|
version_requirements: &id006 !ruby/object:Gem::Requirement
|
92
92
|
none: false
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
hash:
|
96
|
+
hash: 19
|
97
97
|
segments:
|
98
|
-
-
|
99
|
-
|
98
|
+
- 3
|
99
|
+
- 1
|
100
|
+
- 8
|
101
|
+
version: 3.1.8
|
100
102
|
prerelease: false
|
101
103
|
type: :runtime
|
102
104
|
name: haml
|