RubyApp 0.5.89 → 0.5.90

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.5.89)
4
+ RubyApp (0.5.90)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -47,7 +47,7 @@ GEM
47
47
  rake (0.9.2.2)
48
48
  rmagick (2.13.1)
49
49
  ruby-event (1.0.0)
50
- ruby-openid (2.2.0)
50
+ ruby-openid (2.2.1)
51
51
  sass (3.2.1)
52
52
  system_timer (1.2.4)
53
53
  term-ansicolor (1.0.7)
@@ -114,18 +114,18 @@ module RubyApp
114
114
  self.execute("RubyApp.updateText(#{_selector.to_json}, #{value.to_json});")
115
115
  end
116
116
 
117
- def update_value(selector, value)
117
+ def update_value(selector, value, change = true)
118
118
  _selector = ".ui-page-active #{selector}"
119
- self.execute("RubyApp.updateValue(#{_selector.to_json}, #{value.to_json});")
119
+ self.execute("RubyApp.updateValue(#{_selector.to_json}, #{value.to_json}, #{change.to_json});")
120
120
  end
121
121
 
122
- def update_input(text, value)
123
- self.update_value_for("label:contains('#{text}')", value)
122
+ def update_input(text, value, change = true)
123
+ self.update_value_for("label:contains('#{text}')", value, change)
124
124
  end
125
125
 
126
- def update_value_for(selector, value)
126
+ def update_value_for(selector, value, change = true)
127
127
  _selector = ".ui-page-active #{selector}"
128
- self.execute("RubyApp.updateValueFor(#{_selector.to_json}, #{value.to_json});")
128
+ self.execute("RubyApp.updateValueFor(#{_selector.to_json}, #{value.to_json}, #{change.to_json});")
129
129
  end
130
130
 
131
131
  def set_cookie(name, value, expires = Time.now + 365*24*60*60)
@@ -156,13 +156,14 @@
156
156
  this.updateText = function(selector, value) {
157
157
  $(selector).text(value);
158
158
  },
159
- this.updateValue = function(selector, value) {
159
+ this.updateValue = function(selector, value, change) {
160
160
  $(selector).val(value);
161
+ if (change)
162
+ $(selector).change();
161
163
  },
162
- this.updateValueFor = function(selector, value) {
164
+ this.updateValueFor = function(selector, value, change) {
163
165
  var _for = $(selector).attr('for');
164
- RubyApp.updateValue('#' + _for, value);
165
- RubyApp.change('#' + _for, value);
166
+ RubyApp.updateValue('#' + _for, value, change);
166
167
  },
167
168
  this.setCookie = function(name, value, expires) {
168
169
  document.cookie = name + '=' + value + '; expires=' + expires.toUTCString();
@@ -176,9 +177,6 @@
176
177
  this.swipeRight = function() {
177
178
  $('.ui-page-active').swiperight();
178
179
  },
179
- this.change = function(selector) {
180
- $(selector).change();
181
- },
182
180
  this.assertExists = function(selector) {
183
181
  RubyApp.assert('selector=' + selector, $(selector).length > 0);
184
182
  },
@@ -32,7 +32,7 @@ module RubyApp
32
32
  def on_changed(event)
33
33
  @duration = event.value ? ChronicDuration.parse(event.value) : nil
34
34
  @value = @duration ? ChronicDuration.output(@duration) : nil
35
- event.update_value("##{self.element_id}", @value)
35
+ event.update_value("##{self.element_id}", @value, false)
36
36
  changed(event)
37
37
  end
38
38
 
@@ -68,9 +68,9 @@ module RubyApp
68
68
 
69
69
  route(RubyApp::Mixins::RouteMixin::POST, /.*/) do |method, path|
70
70
  begin
71
- RubyApp::Request.POST.each do |name, value|
72
- RubyApp::Log.debug("POST #{name.to_sym.inspect}=#{value.inspect}")
73
- end
71
+ #RubyApp::Request.POST.each do |name, value|
72
+ # RubyApp::Log.debug("POST #{name.to_sym.inspect}=#{value.inspect}")
73
+ #end
74
74
  event = RubyApp::Element::Event.from_hash(RubyApp::Request.POST)
75
75
  RubyApp::Log.duration(RubyApp::Log::INFO, "EVENT #{event.class}") do
76
76
  RubyApp::Session.process_event!(event)
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.5.89"
2
+ VERSION = "0.5.90"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
  end
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: 185
4
+ hash: 191
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 89
10
- version: 0.5.89
9
+ - 90
10
+ version: 0.5.90
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: 2012-09-20 00:00:00 Z
18
+ date: 2012-10-02 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement