RubyApp 0.0.61 → 0.0.62

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- RubyApp (0.0.61)
4
+ RubyApp (0.0.62)
5
5
  BlueCloth
6
6
  chronic
7
7
  chronic_duration
@@ -31,7 +31,7 @@ GEM
31
31
  rack-test (>= 0.5.4)
32
32
  selenium-webdriver (~> 2.0)
33
33
  xpath (~> 0.1.4)
34
- childprocess (0.2.8)
34
+ childprocess (0.2.9)
35
35
  ffi (~> 1.0.6)
36
36
  chronic (0.6.6)
37
37
  chronic_duration (0.9.6)
@@ -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.7.2)
50
+ gherkin (2.7.3)
51
51
  json (>= 1.4.6)
52
52
  haml (3.1.4)
53
53
  json (1.6.4)
@@ -43,11 +43,9 @@ module RubyApp
43
43
  _options.translations_paths = [File.join(RubyApp::ROOT, %w[translations])] + ( _options.translations_paths.is_a?(Array) ? _options.translations_paths : [_options.translations_paths] )
44
44
  @@_application = _options.application_class.new(_options)
45
45
  @@_application.start!
46
- RubyApp::Log.debug("#{self}.#{__method__} options=#{_options.inspect}")
47
46
  end
48
47
 
49
48
  def self.destroy!
50
- RubyApp::Log.debug("#{self}.#{__method__}")
51
49
  @@_application.stop!
52
50
  @@_application = nil
53
51
  end
@@ -17,11 +17,9 @@ module RubyApp
17
17
 
18
18
  def self.load!
19
19
  @@_configuration = RubyApp::Configuration.new(RubyApp::Application.options.configuration_paths)
20
- RubyApp::Log.debug("#{self}.#{__method__} paths=#{RubyApp::Application.options.configuration_paths.inspect}")
21
20
  end
22
21
 
23
22
  def self.unload!
24
- RubyApp::Log.debug("#{self}.#{__method__}")
25
23
  @@_configuration = nil
26
24
  end
27
25
 
@@ -29,16 +29,13 @@ module RubyApp
29
29
  self.loaded do |element, event|
30
30
  if RubyApp::Request.query.empty?
31
31
  @consumer = ::OpenID::Consumer.new(RubyApp::Session.data, nil)
32
- RubyApp::Log.debug("#{self.class}#loaded identifier=#{identifier.inspect}")
33
32
  request = @consumer.begin(identifier)
34
33
  self.process_request(request)
35
34
  event.go(request.redirect_url(RubyApp::Request.url, RubyApp::Request.url))
36
35
  else
37
36
  response = @consumer.complete(RubyApp::Request.query, RubyApp::Request.url)
38
- RubyApp::Log.debug("#{self.class}#loaded response.class=#{response.class}")
39
37
  case response.status
40
38
  when ::OpenID::Consumer::SUCCESS
41
- RubyApp::Log.debug("#{self.class}#loaded response.identity_url=#{response.identity_url.inspect}")
42
39
  RubyApp::Session.identity = self.create_identity_from_response(response)
43
40
  RubyApp::Session.pages.pop
44
41
  event.refresh
data/lib/ruby_app/log.rb CHANGED
@@ -33,11 +33,9 @@ module RubyApp
33
33
  directory = File.dirname(path)
34
34
  Dir.mkdir(directory) unless File.exists?(directory)
35
35
  @@_log = RubyApp::Log.new(path)
36
- @@_log.debug("#{self}.#{__method__} path=#{path.inspect}")
37
36
  end
38
37
 
39
38
  def self.close!
40
- @@_log.debug("#{self}.#{__method__}")
41
39
  @@_log.close if @@_log
42
40
  @@_log = nil
43
41
  end
@@ -6,7 +6,7 @@ module RubyApp
6
6
 
7
7
  def method_missing(name, *arguments)
8
8
  if name.to_s.match(/(.*)=/)
9
- self[$~.captures[0].to_s] = arguments[0]
9
+ self[$~.captures[0].to_sym] = arguments[0]
10
10
  else
11
11
  self[name.to_s] || self[name.to_sym]
12
12
  end
@@ -9,7 +9,6 @@ module RubyApp
9
9
  module Mixins
10
10
 
11
11
  module RenderMixin
12
- require 'ruby_app/log'
13
12
 
14
13
  def rendered?(template)
15
14
  unless ( Thread.current[:_rendered] ||= {} ).key?(template)
@@ -44,7 +43,6 @@ module RubyApp
44
43
 
45
44
  templates = self.is_a?(Class) ? self.get_templates(format) : self.class.get_templates(format)
46
45
  templates.each_with_index do |template, index|
47
- #RubyApp::Log.debug("#{self.is_a?(Class) ? self : self.class}##{__method__} template=#{File.expand_path(template)}")
48
46
  content = Haml::Engine.new(File.read(template), :filename => template).render(self) do |*arguments|
49
47
  if arguments.empty?
50
48
  index == 0 ? nil : self.content_for(templates[index - 1])
@@ -24,7 +24,6 @@ module RubyApp
24
24
  end
25
25
 
26
26
  route(RubyApp::Mixins::RouteMixin::GET, /\/quit/) do |method, path|
27
- #RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect}")
28
27
  begin
29
28
  [
30
29
  200,
@@ -38,7 +37,6 @@ module RubyApp
38
37
  end
39
38
 
40
39
  route(RubyApp::Mixins::RouteMixin::GET, /\/elements\/([^\.]+)\.([^\.\?]+)/) do |method, path, element_id, format|
41
- #RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect} element_id=#{element_id.inspect} format=#{format.to_sym.inspect}")
42
40
  begin
43
41
  [
44
42
  200,
@@ -56,7 +54,6 @@ module RubyApp
56
54
  end
57
55
 
58
56
  route(RubyApp::Mixins::RouteMixin::GET, /\.([^\.\?]+)/) do |method, path, format|
59
- #RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect} format=#{format.to_sym.inspect}")
60
57
  begin
61
58
  [
62
59
  200,
@@ -74,12 +71,11 @@ module RubyApp
74
71
  end
75
72
 
76
73
  route(RubyApp::Mixins::RouteMixin::GET, /.*/) do |method, path|
77
- #RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect}")
78
74
  do_route(RubyApp::Mixins::RouteMixin::GET, '/.html')
79
75
  end
80
76
 
81
77
  route(RubyApp::Mixins::RouteMixin::POST, /.*/) do |method, path|
82
- RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect} POST=#{RubyApp::Request.POST.inspect}")
78
+ RubyApp::Log.debug("#{self}.route method=#{method.inspect} path=#{path.inspect} POST['_class']=#{RubyApp::Request.POST['_class']}")
83
79
  begin
84
80
  if RubyApp::Session.session_id == RubyApp::Request.POST['session_id']
85
81
  event = RubyApp::Element::Event.from_hash(RubyApp::Request.POST)
@@ -1,4 +1,4 @@
1
1
  module RubyApp
2
- VERSION = "0.0.61"
2
+ VERSION = "0.0.62"
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: 101
4
+ hash: 99
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 61
10
- version: 0.0.61
9
+ - 62
10
+ version: 0.0.62
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,9 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-12 00:00:00 Z
18
+ date: 2012-01-13 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
+ prerelease: false
22
+ name: BlueCloth
21
23
  version_requirements: &id001 !ruby/object:Gem::Requirement
22
24
  none: false
23
25
  requirements:
@@ -27,11 +29,11 @@ dependencies:
27
29
  segments:
28
30
  - 0
29
31
  version: "0"
30
- requirement: *id001
31
32
  type: :runtime
32
- prerelease: false
33
- name: BlueCloth
33
+ requirement: *id001
34
34
  - !ruby/object:Gem::Dependency
35
+ prerelease: false
36
+ name: chronic
35
37
  version_requirements: &id002 !ruby/object:Gem::Requirement
36
38
  none: false
37
39
  requirements:
@@ -41,11 +43,11 @@ dependencies:
41
43
  segments:
42
44
  - 0
43
45
  version: "0"
44
- requirement: *id002
45
46
  type: :runtime
46
- prerelease: false
47
- name: chronic
47
+ requirement: *id002
48
48
  - !ruby/object:Gem::Dependency
49
+ prerelease: false
50
+ name: chronic_duration
49
51
  version_requirements: &id003 !ruby/object:Gem::Requirement
50
52
  none: false
51
53
  requirements:
@@ -55,11 +57,11 @@ dependencies:
55
57
  segments:
56
58
  - 0
57
59
  version: "0"
58
- requirement: *id003
59
60
  type: :runtime
60
- prerelease: false
61
- name: chronic_duration
61
+ requirement: *id003
62
62
  - !ruby/object:Gem::Dependency
63
+ prerelease: false
64
+ name: facets
63
65
  version_requirements: &id004 !ruby/object:Gem::Requirement
64
66
  none: false
65
67
  requirements:
@@ -69,11 +71,11 @@ dependencies:
69
71
  segments:
70
72
  - 0
71
73
  version: "0"
72
- requirement: *id004
73
74
  type: :runtime
74
- prerelease: false
75
- name: facets
75
+ requirement: *id004
76
76
  - !ruby/object:Gem::Dependency
77
+ prerelease: false
78
+ name: fileutils
77
79
  version_requirements: &id005 !ruby/object:Gem::Requirement
78
80
  none: false
79
81
  requirements:
@@ -83,11 +85,11 @@ dependencies:
83
85
  segments:
84
86
  - 0
85
87
  version: "0"
86
- requirement: *id005
87
88
  type: :runtime
88
- prerelease: false
89
- name: fileutils
89
+ requirement: *id005
90
90
  - !ruby/object:Gem::Dependency
91
+ prerelease: false
92
+ name: haml
91
93
  version_requirements: &id006 !ruby/object:Gem::Requirement
92
94
  none: false
93
95
  requirements:
@@ -97,11 +99,11 @@ dependencies:
97
99
  segments:
98
100
  - 0
99
101
  version: "0"
100
- requirement: *id006
101
102
  type: :runtime
102
- prerelease: false
103
- name: haml
103
+ requirement: *id006
104
104
  - !ruby/object:Gem::Dependency
105
+ prerelease: false
106
+ name: json
105
107
  version_requirements: &id007 !ruby/object:Gem::Requirement
106
108
  none: false
107
109
  requirements:
@@ -111,11 +113,11 @@ dependencies:
111
113
  segments:
112
114
  - 0
113
115
  version: "0"
114
- requirement: *id007
115
116
  type: :runtime
116
- prerelease: false
117
- name: json
117
+ requirement: *id007
118
118
  - !ruby/object:Gem::Dependency
119
+ prerelease: false
120
+ name: mime-types
119
121
  version_requirements: &id008 !ruby/object:Gem::Requirement
120
122
  none: false
121
123
  requirements:
@@ -125,11 +127,11 @@ dependencies:
125
127
  segments:
126
128
  - 0
127
129
  version: "0"
128
- requirement: *id008
129
130
  type: :runtime
130
- prerelease: false
131
- name: mime-types
131
+ requirement: *id008
132
132
  - !ruby/object:Gem::Dependency
133
+ prerelease: false
134
+ name: r18n-core
133
135
  version_requirements: &id009 !ruby/object:Gem::Requirement
134
136
  none: false
135
137
  requirements:
@@ -139,11 +141,11 @@ dependencies:
139
141
  segments:
140
142
  - 0
141
143
  version: "0"
142
- requirement: *id009
143
144
  type: :runtime
144
- prerelease: false
145
- name: r18n-core
145
+ requirement: *id009
146
146
  - !ruby/object:Gem::Dependency
147
+ prerelease: false
148
+ name: rack
147
149
  version_requirements: &id010 !ruby/object:Gem::Requirement
148
150
  none: false
149
151
  requirements:
@@ -153,11 +155,11 @@ dependencies:
153
155
  segments:
154
156
  - 0
155
157
  version: "0"
156
- requirement: *id010
157
158
  type: :runtime
158
- prerelease: false
159
- name: rack
159
+ requirement: *id010
160
160
  - !ruby/object:Gem::Dependency
161
+ prerelease: false
162
+ name: ruby-event
161
163
  version_requirements: &id011 !ruby/object:Gem::Requirement
162
164
  none: false
163
165
  requirements:
@@ -167,11 +169,11 @@ dependencies:
167
169
  segments:
168
170
  - 0
169
171
  version: "0"
170
- requirement: *id011
171
172
  type: :runtime
172
- prerelease: false
173
- name: ruby-event
173
+ requirement: *id011
174
174
  - !ruby/object:Gem::Dependency
175
+ prerelease: false
176
+ name: ruby-openid
175
177
  version_requirements: &id012 !ruby/object:Gem::Requirement
176
178
  none: false
177
179
  requirements:
@@ -181,11 +183,11 @@ dependencies:
181
183
  segments:
182
184
  - 0
183
185
  version: "0"
184
- requirement: *id012
185
186
  type: :runtime
186
- prerelease: false
187
- name: ruby-openid
187
+ requirement: *id012
188
188
  - !ruby/object:Gem::Dependency
189
+ prerelease: false
190
+ name: sass
189
191
  version_requirements: &id013 !ruby/object:Gem::Requirement
190
192
  none: false
191
193
  requirements:
@@ -195,11 +197,11 @@ dependencies:
195
197
  segments:
196
198
  - 0
197
199
  version: "0"
198
- requirement: *id013
199
200
  type: :runtime
200
- prerelease: false
201
- name: sass
201
+ requirement: *id013
202
202
  - !ruby/object:Gem::Dependency
203
+ prerelease: false
204
+ name: term-ansicolor
203
205
  version_requirements: &id014 !ruby/object:Gem::Requirement
204
206
  none: false
205
207
  requirements:
@@ -209,11 +211,11 @@ dependencies:
209
211
  segments:
210
212
  - 0
211
213
  version: "0"
212
- requirement: *id014
213
214
  type: :runtime
214
- prerelease: false
215
- name: term-ansicolor
215
+ requirement: *id014
216
216
  - !ruby/object:Gem::Dependency
217
+ prerelease: false
218
+ name: yajl-ruby
217
219
  version_requirements: &id015 !ruby/object:Gem::Requirement
218
220
  none: false
219
221
  requirements:
@@ -223,11 +225,11 @@ dependencies:
223
225
  segments:
224
226
  - 0
225
227
  version: "0"
226
- requirement: *id015
227
228
  type: :runtime
228
- prerelease: false
229
- name: yajl-ruby
229
+ requirement: *id015
230
230
  - !ruby/object:Gem::Dependency
231
+ prerelease: false
232
+ name: capybara
231
233
  version_requirements: &id016 !ruby/object:Gem::Requirement
232
234
  none: false
233
235
  requirements:
@@ -237,11 +239,11 @@ dependencies:
237
239
  segments:
238
240
  - 0
239
241
  version: "0"
240
- requirement: *id016
241
242
  type: :development
242
- prerelease: false
243
- name: capybara
243
+ requirement: *id016
244
244
  - !ruby/object:Gem::Dependency
245
+ prerelease: false
246
+ name: cucumber
245
247
  version_requirements: &id017 !ruby/object:Gem::Requirement
246
248
  none: false
247
249
  requirements:
@@ -251,11 +253,11 @@ dependencies:
251
253
  segments:
252
254
  - 0
253
255
  version: "0"
254
- requirement: *id017
255
256
  type: :development
256
- prerelease: false
257
- name: cucumber
257
+ requirement: *id017
258
258
  - !ruby/object:Gem::Dependency
259
+ prerelease: false
260
+ name: launchy
259
261
  version_requirements: &id018 !ruby/object:Gem::Requirement
260
262
  none: false
261
263
  requirements:
@@ -265,11 +267,11 @@ dependencies:
265
267
  segments:
266
268
  - 0
267
269
  version: "0"
268
- requirement: *id018
269
270
  type: :development
270
- prerelease: false
271
- name: launchy
271
+ requirement: *id018
272
272
  - !ruby/object:Gem::Dependency
273
+ prerelease: false
274
+ name: rake
273
275
  version_requirements: &id019 !ruby/object:Gem::Requirement
274
276
  none: false
275
277
  requirements:
@@ -279,11 +281,11 @@ dependencies:
279
281
  segments:
280
282
  - 0
281
283
  version: "0"
282
- requirement: *id019
283
284
  type: :development
284
- prerelease: false
285
- name: rake
285
+ requirement: *id019
286
286
  - !ruby/object:Gem::Dependency
287
+ prerelease: false
288
+ name: rspec
287
289
  version_requirements: &id020 !ruby/object:Gem::Requirement
288
290
  none: false
289
291
  requirements:
@@ -293,11 +295,11 @@ dependencies:
293
295
  segments:
294
296
  - 0
295
297
  version: "0"
296
- requirement: *id020
297
298
  type: :development
298
- prerelease: false
299
- name: rspec
299
+ requirement: *id020
300
300
  - !ruby/object:Gem::Dependency
301
+ prerelease: false
302
+ name: rspec-mocks
301
303
  version_requirements: &id021 !ruby/object:Gem::Requirement
302
304
  none: false
303
305
  requirements:
@@ -307,11 +309,11 @@ dependencies:
307
309
  segments:
308
310
  - 0
309
311
  version: "0"
310
- requirement: *id021
311
312
  type: :development
312
- prerelease: false
313
- name: rspec-mocks
313
+ requirement: *id021
314
314
  - !ruby/object:Gem::Dependency
315
+ prerelease: false
316
+ name: ya2yaml
315
317
  version_requirements: &id022 !ruby/object:Gem::Requirement
316
318
  none: false
317
319
  requirements:
@@ -321,10 +323,8 @@ dependencies:
321
323
  segments:
322
324
  - 0
323
325
  version: "0"
324
- requirement: *id022
325
326
  type: :development
326
- prerelease: false
327
- name: ya2yaml
327
+ requirement: *id022
328
328
  description: A web application framework in Ruby
329
329
  email:
330
330
  - frank.ficnar@gmail.com
@@ -627,7 +627,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
627
627
  requirements: []
628
628
 
629
629
  rubyforge_project:
630
- rubygems_version: 1.8.10
630
+ rubygems_version: 1.8.13
631
631
  signing_key:
632
632
  specification_version: 3
633
633
  summary: A web application framework in Ruby