RubyApp 0.0.72 → 0.0.73

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.72)
4
+ RubyApp (0.0.73)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -1 +1,8 @@
1
+ // /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/click.js.haml
2
+ $(document).ready(function() {
3
+ $('.click').live('click', function(event) {
4
+ event.preventDefault();
5
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')}, true);
6
+ });
7
+ });
1
8
 
@@ -1,3 +1,7 @@
1
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
2
+ body > div.overlay > div.dialog {
3
+ position: absolute;
4
+ width: 40%; }
1
5
  /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.css.haml */
2
6
  body > div.overlay > div.dialog > div.footer {
3
7
  text-align: right;
@@ -1,2 +1,8 @@
1
-
1
+ // /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/click.js.haml
2
+ $(document).ready(function() {
3
+ $('.click').live('click', function(event) {
4
+ event.preventDefault();
5
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')}, true);
6
+ });
7
+ });
2
8
 
@@ -1 +1,8 @@
1
-
1
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
2
+ body > div.overlay > div.dialog {
3
+ position: absolute;
4
+ width: 40%; }
5
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/base/base_close_dialog.css.haml */
6
+ body > div.overlay > div.dialog > div.footer {
7
+ text-align: right;
8
+ width: 100%; }
@@ -1,2 +1,8 @@
1
-
1
+ // /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/click.js.haml
2
+ $(document).ready(function() {
3
+ $('.click').live('click', function(event) {
4
+ event.preventDefault();
5
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')}, true);
6
+ });
7
+ });
2
8
 
@@ -1,3 +1,7 @@
1
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
2
+ body > div.overlay > div.dialog {
3
+ position: absolute;
4
+ width: 40%; }
1
5
  /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/calendars/month_dialog.css.haml */
2
6
  body > div.overlay > div.dialog > div.footer > div.buttons {
3
7
  display: table;
@@ -13,5 +13,11 @@ $(document).ready(function() {
13
13
  RubyApp.queueEvent({_class:'RubyApp::Elements::Calendars::Month::ChangedEvent', source_id:$(this).parents('div.month').attr('id'), date:$(this).attr('date')}, true);
14
14
  });
15
15
  });
16
-
16
+ // /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/click.js.haml
17
+ $(document).ready(function() {
18
+ $('.click').live('click', function(event) {
19
+ event.preventDefault();
20
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Click::ClickedEvent', source_id:$(this).attr('id')}, true);
21
+ });
22
+ });
17
23
 
@@ -1 +1,8 @@
1
+ // /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/input.js.haml
2
+ $(document).ready(function() {
3
+ $('input[type="text"]').live('change', function(event) {
4
+ event.preventDefault();
5
+ RubyApp.queueEvent({_class:'RubyApp::Elements::Input::ChangedEvent', source_id:$(this).attr('id'), value:$(this).val()}, false);
6
+ });
7
+ });
1
8
 
@@ -46,6 +46,10 @@ body > div.overlay > div.dialog {
46
46
  body > div.overlay > div.dialog > div.footer {
47
47
  text-align: right;
48
48
  width: 100%; }
49
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
50
+ body > div.overlay > div.dialog {
51
+ position: absolute;
52
+ width: 40%; }
49
53
  /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/base/base_yes_no_dialog.css.haml */
50
54
  body > div.overlay > div.dialog > div.footer {
51
55
  text-align: right;
@@ -54,11 +58,26 @@ body > div.overlay > div.dialog > div.footer {
54
58
  padding-left: 0px; }
55
59
  body > div.overlay > div.dialog > div.footer > a {
56
60
  padding-left: 10px; }
61
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
62
+ body > div.overlay > div.dialog {
63
+ position: absolute;
64
+ width: 40%; }
57
65
  /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/base/base_close_dialog.css.haml */
58
66
  body > div.overlay > div.dialog > div.footer {
59
67
  text-align: right;
60
68
  width: 100%; }
61
-
69
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
70
+ body > div.overlay > div.dialog {
71
+ position: absolute;
72
+ width: 40%; }
73
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/base/base_close_dialog.css.haml */
74
+ body > div.overlay > div.dialog > div.footer {
75
+ text-align: right;
76
+ width: 100%; }
77
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
78
+ body > div.overlay > div.dialog {
79
+ position: absolute;
80
+ width: 40%; }
62
81
  /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/calendars/month_dialog.css.haml */
63
82
  body > div.overlay > div.dialog > div.footer > div.buttons {
64
83
  display: table;
@@ -45,3 +45,11 @@ body > div.overlay > div.dialog {
45
45
  body > div.overlay > div.dialog > div.footer {
46
46
  text-align: right;
47
47
  width: 100%; }
48
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/base/base_dialog.css.haml */
49
+ body > div.overlay > div.dialog {
50
+ position: absolute;
51
+ width: 40%; }
52
+ /* /Users/fficnar/Dropbox/Projects/gems/ruby_app/lib/ruby_app/elements/dialogs/base/base_close_dialog.css.haml */
53
+ body > div.overlay > div.dialog > div.footer {
54
+ text-align: right;
55
+ width: 100%; }
@@ -25,44 +25,46 @@ module RubyApp
25
25
  def render(format)
26
26
  cache = self.is_a?(Class) ? self.get_cache(format) : self.class.get_cache(format)
27
27
  if File.exists?(cache)
28
- RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} File.read(#{cache.inspect})")
29
- File.read(cache)
30
- end
31
- templates = self.is_a?(Class) ? self.get_templates(format) : self.class.get_templates(format)
32
- unless templates.empty?
33
- self.init_haml_helpers
34
- begin
35
- yield(self) if block_given?
36
- templates.each_with_index do |template, index|
37
- content = Haml::Engine.new(File.read(template), :filename => template).render(self) do |*arguments|
38
- if arguments.empty?
39
- index == 0 ? nil : RubyApp::Request.get_content(self, templates[index - 1])
40
- else
41
- _content = RubyApp::Request.get_content(self, arguments[0])
42
- if self.block_is_haml?(_content)
43
- self.capture_haml(arguments, &_content)
28
+ self.rendered?(cache) do
29
+ RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} File.read(#{cache.inspect})")
30
+ return File.read(cache)
31
+ end
32
+ else
33
+ templates = self.is_a?(Class) ? self.get_templates(format) : self.class.get_templates(format)
34
+ unless templates.empty?
35
+ self.init_haml_helpers
36
+ begin
37
+ yield(self) if block_given?
38
+ templates.each_with_index do |template, index|
39
+ content = Haml::Engine.new(File.read(template), :filename => template).render(self) do |*arguments|
40
+ if arguments.empty?
41
+ index == 0 ? nil : RubyApp::Request.get_content(self, templates[index - 1])
44
42
  else
45
- _content
43
+ _content = RubyApp::Request.get_content(self, arguments[0])
44
+ if self.block_is_haml?(_content)
45
+ self.capture_haml(arguments, &_content)
46
+ else
47
+ _content
48
+ end
46
49
  end
47
50
  end
51
+ RubyApp::Request.content_for(self, template, content)
48
52
  end
49
- RubyApp::Request.content_for(self, template, content)
50
- end
51
- if cache && RubyApp::Request.cache?
52
- RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} File.open(#{cache.inspect}, 'w')")
53
- cache_directory = File.dirname(cache)
54
- Dir.mkdir(cache_directory) unless File.exists?(cache_directory)
55
- File.open(cache, 'w') do |file|
56
- file.write(RubyApp::Request.get_content(self, templates.last))
57
- file.flush
53
+ if cache && RubyApp::Request.cache?
54
+ RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} File.open(#{cache.inspect}, 'w')")
55
+ cache_directory = File.dirname(cache)
56
+ Dir.mkdir(cache_directory) unless File.exists?(cache_directory)
57
+ File.open(cache, 'w') do |file|
58
+ file.write(RubyApp::Request.get_content(self, templates.last))
59
+ file.flush
60
+ end
58
61
  end
62
+ return RubyApp::Request.get_content(self, templates.last)
63
+ ensure
64
+ RubyApp::Request.clear_content(self)
59
65
  end
60
- return RubyApp::Request.get_content(self, templates.last)
61
- ensure
62
- RubyApp::Request.clear_content(self)
63
66
  end
64
67
  end
65
-
66
68
  end
67
69
 
68
70
  end
@@ -0,0 +1,36 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+
4
+ require 'rake'
5
+
6
+ $LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), %w[lib]))
7
+
8
+ require '_APPLICATION_DOWNCODE_/application'
9
+
10
+ namespace :_APPLICATION_DOWNCODE_ do
11
+
12
+ desc 'Create console'
13
+ task :console do |task|
14
+ system("clear; bundle exec ruby_app console")
15
+ end
16
+
17
+ desc 'Run'
18
+ task :run do |task|
19
+ system("clear; bundle exec ruby_app run")
20
+ end
21
+
22
+ namespace :cache do
23
+
24
+ desc 'Create element cache'
25
+ task :create do |task|
26
+ _APPLICATION_UPCODE_::Application.create_cache(File.join(File.dirname(__FILE__), %w[lib _APPLICATION_DOWNCODE_ elements]), File.join(File.dirname(__FILE__), %w[lib]))
27
+ end
28
+
29
+ desc 'Delete element cache'
30
+ task :destroy do |task|
31
+ _APPLICATION_UPCODE_::Application.destroy_cache(File.join(File.dirname(__FILE__), %w[lib _APPLICATION_DOWNCODE_ elements]))
32
+ end
33
+
34
+ end
35
+
36
+ end
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.72"
2
+ VERSION = "0.0.73"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
data/rakefile CHANGED
@@ -78,7 +78,7 @@ namespace :ruby_app do
78
78
  desc 'Create element cache'
79
79
  task :create do |task|
80
80
  RubyApp::Application.create_cache(File.join(File.dirname(__FILE__), %w[lib ruby_app elements]), File.join(File.dirname(__FILE__), %w[lib]))
81
- system "git commit --all --message='Creating element cache'"
81
+ system "find . -name '.cache' | xargs git add; git commit --all --message='Creating element cache'"
82
82
  end
83
83
 
84
84
  desc 'Delete element cache'
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: 143
4
+ hash: 141
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 72
10
- version: 0.0.72
9
+ - 73
10
+ version: 0.0.73
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -600,6 +600,7 @@ files:
600
600
  - lib/ruby_app/resources/themes/mobile/page.gif
601
601
  - lib/ruby_app/session.rb
602
602
  - lib/ruby_app/templates/application/Gemfile
603
+ - lib/ruby_app/templates/application/Rakefile
603
604
  - lib/ruby_app/templates/application/config.ru
604
605
  - lib/ruby_app/templates/application/config.yml
605
606
  - lib/ruby_app/templates/application/console.rb