RubyApp 0.0.26 → 0.0.27

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.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.26)
4
+ RubyApp (0.0.27)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -36,10 +36,10 @@ GEM
36
36
  chronic (0.6.6)
37
37
  chronic_duration (0.9.6)
38
38
  numerizer (~> 0.1.1)
39
- cucumber (1.1.3)
39
+ cucumber (1.1.4)
40
40
  builder (>= 2.1.2)
41
41
  diff-lcs (>= 1.1.2)
42
- gherkin (~> 2.6.7)
42
+ gherkin (~> 2.7.1)
43
43
  json (>= 1.4.6)
44
44
  term-ansicolor (>= 1.0.6)
45
45
  diff-lcs (1.1.3)
@@ -47,7 +47,7 @@ GEM
47
47
  ffi (1.0.11)
48
48
  fileutils (0.7)
49
49
  rmagick (>= 2.13.1)
50
- gherkin (2.6.9)
50
+ gherkin (2.7.1)
51
51
  json (>= 1.4.6)
52
52
  haml (3.1.4)
53
53
  json (1.6.3)
@@ -57,7 +57,7 @@ GEM
57
57
  multi_json (1.0.4)
58
58
  nokogiri (1.5.0)
59
59
  numerizer (0.1.1)
60
- r18n-core (0.4.12)
60
+ r18n-core (0.4.13)
61
61
  rack (1.3.5)
62
62
  rack-test (0.6.1)
63
63
  rack (>= 1.0)
data/bin/ruby_app CHANGED
@@ -3,6 +3,7 @@ require 'rubygems'
3
3
  require 'bundler/setup'
4
4
 
5
5
  require 'fileutils'
6
+ require 'logrotate'
6
7
  require 'rack'
7
8
  require 'term/ansicolor'
8
9
 
@@ -21,3 +21,12 @@ Feature: A page
21
21
  And I click "TestPage"
22
22
  Then I should see "The cookie value is 'value'."
23
23
  Then I quit
24
+
25
+ Scenario Outline: Loading the home page
26
+ Given I am viewing "/"
27
+ And I should see "Loaded"
28
+
29
+ Scenarios: Count
30
+ | count |
31
+ | X |
32
+ | X |
@@ -16,7 +16,10 @@
16
16
  } );
17
17
  } )
18
18
  .error( function(request, message, exception) {
19
- alert(#{RubyApp::Elements::Base::BasePage.translate.error.to_json});
19
+ if (confirm(#{RubyApp::Elements::Base::BasePage.translate.error.to_json}))
20
+ {
21
+ RubyApp.refresh();
22
+ }
20
23
  } )
21
24
  },
22
25
  this.alert = function(message) {
@@ -3,3 +3,4 @@
3
3
  #{__FILE__}
4
4
  = @markdown.render(:html) do |element|
5
5
  - element.content_for(:body, self.translate.content.body)
6
+ %div#loaded
@@ -14,6 +14,10 @@ module RubyApp
14
14
  def initialize
15
15
  super
16
16
 
17
+ self.loaded do |element, event|
18
+ event.update_text('div#loaded', self.translate.loaded(event.now))
19
+ end
20
+
17
21
  @markdown = RubyApp::Elements::Markdown.new
18
22
  @markdown.clicked do |element, event|
19
23
  case event.name
@@ -75,8 +75,7 @@ module RubyApp
75
75
  end
76
76
 
77
77
  route(RubyApp::Mixins::RouteMixin::POST, /.*/) do |method, path|
78
- RubyApp::Log.debug("#{self}.post(...) method=#{method.inspect} path=#{path.inspect} POST=#{RubyApp::Request.POST.inspect}")
79
- RubyApp::Log.debug("#{self}.post(...) RubyApp::Session.session_id=#{RubyApp::Session.session_id}")
78
+ RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect} POST=#{RubyApp::Request.POST.inspect}")
80
79
  begin
81
80
  if RubyApp::Session.session_id == RubyApp::Request.POST['session_id']
82
81
  event = RubyApp::Element::Event.from_hash(RubyApp::Request.POST)
@@ -89,7 +88,6 @@ module RubyApp
89
88
  else
90
89
  raise RubyApp::Exceptions::SessionInvalidException.new(RubyApp::Request.POST['session_id'])
91
90
  end
92
-
93
91
  rescue Exception => exception
94
92
  RubyApp::Log.exception(exception)
95
93
  [
@@ -2,7 +2,7 @@ ruby_app:
2
2
  elements:
3
3
  base:
4
4
  base_page:
5
- error: An error occurred sending the event. Refresh the page and try again.,
5
+ error: An error occurred sending the event. Do you want to refresh the page and try again?
6
6
  dialogs:
7
7
  base:
8
8
  base_close_dialog:
@@ -168,7 +168,9 @@ ruby_app:
168
168
  content:
169
169
  body: |
170
170
  Click [here](go_test) to go to the test pages.
171
- authentication:
171
+ loaded:
172
+ Loaded at %1
173
+ authentication:
172
174
  open_id:
173
175
  base:
174
176
  base_authentication_page:
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.26"
2
+ VERSION = "0.0.27"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
data/rakefile CHANGED
@@ -6,19 +6,30 @@ require 'rake'
6
6
 
7
7
  namespace :ruby_app do
8
8
 
9
- desc 'Monitor RubyApp'
9
+ desc 'Monitor log'
10
10
  task :monitor do |task|
11
- system("cd ./lib/ruby_app; > ./log/application.log; clear; tail -f ./log/application.log")
11
+ system("cd ./lib/ruby_app && > ./log/application.log && clear && tail -f ./log/application.log")
12
12
  end
13
13
 
14
- desc 'Create RubyApp console'
14
+ desc 'Create console'
15
15
  task :console do |task|
16
- system("cd ./lib/ruby_app; clear; bundle exec ../../bin/ruby_app console")
16
+ system("cd ./lib/ruby_app && clear && bundle exec ../../bin/ruby_app console")
17
17
  end
18
18
 
19
- desc 'Run RubyApp'
19
+ desc 'Run'
20
20
  task :run do |task|
21
- system("cd ./lib/ruby_app; clear; bundle exec ../../bin/ruby_app run")
21
+ system("cd ./lib/ruby_app && clear && bundle exec ../../bin/ruby_app run")
22
+ end
23
+
24
+ desc 'Get version'
25
+ task :version do |task|
26
+ puts RubyApp::VERSION
27
+ end
28
+
29
+ desc 'Update version, commit, push to master, release'
30
+ task :release, :version do |task, arguments|
31
+ version_file = File.join(RubyApp::ROOT, %w[version.rb])
32
+ system "sed 's|[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*|#{arguments.version}|g' < '#{version_file}' > '#{version_file}.out' && rm '#{version_file}' && mv '#{version_file}.out' '#{version_file}' && git commit --all --message='Incrementing version' && git push origin master; rake release"
22
33
  end
23
34
 
24
35
  namespace :test do
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: 43
4
+ hash: 41
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 26
10
- version: 0.0.26
9
+ - 27
10
+ version: 0.0.27
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: 2011-12-12 00:00:00 Z
18
+ date: 2011-12-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement