plezi 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f2722d8cddc3a4c46884aac17375757aef6aff91
4
- data.tar.gz: 51edecfe6675e790ac32607e4f357efd38caaf30
3
+ metadata.gz: 030d9117d441e83606c9ad6c5e27fbc19a6db318
4
+ data.tar.gz: ad87f43274ae4c0186f5357dcde773968fb17f0e
5
5
  SHA512:
6
- metadata.gz: c47157168522d25c5de8d34df2938e78a32309fae6040bb0587c60ab2684dfcf376b899a5b1439628e00091db5059485ca7bc983f59282c24c06d783f0d6f60e
7
- data.tar.gz: ec219c08a2a377b9f0c8500ac3de790733356f0904ab4d0647aff65a5beb3a9a5b6a49c3b7990c8f4f1ff8e736f0354e71ddabd557e334fc3750abe292bab43a
6
+ metadata.gz: 8267042b38ee5f2db6a21d32c2f0d533a32aae06c66627bd74b100f06850126ede7ceaf758cb79d8d963050d645cd4292730e57f1025d3fa273f2848cb8f3f2b
7
+ data.tar.gz: fa8952d9489c4282c517889c73f32644a3bc16247e9c31ab6aef57e9131ebc645e81387bd2fa16c12d3cbf227d2c971cd6b70fcfe2139f596a0bb663370ada0a
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  ***
4
4
 
5
+ Change log v.0.7.1 - OLDER CODE MIGHT BREAK!
6
+
7
+ **feature**: ruby objects (Integers, Floats, true & false) are now automatically converted from strings to Ruby objects (notice that 'true' and 'false' ARE case sensative, to preserve the value in case of a #to_s method call)
8
+
9
+ **change**: Request parameter names are now converted to numbers, if they are recognized as numbers (i.e. use `params[:list][0][:name]` rather than `params[:list]['0'.to_sym][:name]`)
10
+
11
+ **Logo**: we're still working on a nice logo... but we have a lot on our todo list. so we put a temporary one in.
12
+
13
+ ***
14
+
5
15
  Change log v.0.7.0
6
16
 
7
17
  Welcome our new name, Plezi.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Plezi, The Ruby Websocket and HTTP Framework
1
+ # Plezi, The Rack Free Ruby HTTP & Websocket Framework
2
2
  [![Gem Version](https://badge.fury.io/rb/plezi.svg)](http://badge.fury.io/rb/plezi)
3
3
  [![Inline docs](http://inch-ci.org/github/boazsegev/plezi.svg?branch=master)](http://inch-ci.org/github/boazsegev/plezi)
4
4
 
@@ -27,7 +27,7 @@ Or install it yourself as:
27
27
 
28
28
  $ gem install plezi
29
29
 
30
- ## Creating an Plezi Application
30
+ ## Creating a Plezi Application
31
31
 
32
32
  to create a new barebones app using the Plezi framework, run from terminal:
33
33
 
@@ -79,7 +79,7 @@ Controllers can even be nested (order matters) or have advanced uses that are de
79
79
 
80
80
  **please read the demo code for Plezi::StubRESTCtrl and Plezi::StubWSCtrl to learn more.**
81
81
 
82
- ## Native Websocket and Radis support
82
+ ## Native Websocket and Redis support
83
83
 
84
84
  Plezi Controllers have access to native websocket support through the `pre_connect`, `on_connect`, `on_message(data)`, `on_disconnect`, `broadcast` and `collect` methods.
85
85
 
data/Rakefile CHANGED
@@ -1,2 +1 @@
1
1
  require "bundler/gem_tasks"
2
-
data/TODO.md CHANGED
@@ -6,10 +6,6 @@ Folder Listing:: add folder listing option?
6
6
 
7
7
  update gem file (remove erb).
8
8
 
9
- # Name?
10
-
11
- rename the project?
12
-
13
9
  # HTTPProtocol
14
10
 
15
11
  XML::
@@ -29,6 +29,8 @@ module Plezi
29
29
  hs[k.to_s]
30
30
  elsif k.is_a?(String) && hs.has_key?( k.to_sym)
31
31
  hs[k.to_sym]
32
+ elsif k.is_a?(Numeric) && hs.has_key?(k.to_s.to_sym)
33
+ hs[k.to_s.to_sym]
32
34
  end
33
35
  end
34
36
  hash.default_proc = @magic_hash_proc
@@ -75,12 +75,12 @@ module Plezi
75
75
  begin
76
76
  a = target_hash
77
77
  p = param_name.gsub(']',' ').split(/\[/)
78
- p.each_index { |i| n = p[i].strip.to_sym; p[i+1] ? [ ( a[n] ||= ( p[i+1] == ' ' ? [] : {} ) ), ( a = a[n]) ] : (a.is_a?(Hash) ? [(a[n]? (a[n].is_a?(String)? (a[n] = [a[n]]) : true) : a[n]=''), (a=a[n])] : [(a << ''), (a = a.last)]) }
79
- a << param_value
78
+ val = rubyfy! param_value
79
+ p.each_index { |i| p[i].strip! ; n = p[i].match(/^[0-9]+$/) ? p[i].to_i : p[i].to_sym ; p[i+1] ? [ ( a[n] ||= ( p[i+1] == ' ' ? [] : {} ) ), ( a = a[n]) ] : ( a.is_a?(Hash) ? (a[n] ? (a[n].is_a?(Array) ? (a << val) : a[n] = [a[n], val] ) : (a[n] = val) ) : (a << val) ) }
80
80
  rescue Exception => e
81
81
  Plezi.error e
82
82
  Plezi.error "(Silent): paramaters parse error for #{param_name} ... maybe conflicts with a different set?"
83
- target_hash[param_name] = make_utf8! param_value
83
+ target_hash[param_name] = rubyfy! param_value
84
84
  end
85
85
  end
86
86
 
@@ -164,6 +164,21 @@ module Plezi
164
164
  string
165
165
  end
166
166
 
167
+ # Changes String to a Ruby Object, if it's a special string
168
+ def rubyfy!(string)
169
+ return false unless string
170
+ make_utf8! string
171
+ if string == 'true'
172
+ string = true
173
+ elsif string == 'false'
174
+ string = false
175
+ elsif string.match(/[0-9]/) && !string.match(/[^0-9]/)
176
+ string = string.to_i
177
+ elsif string.match(/[0-9]/) && !string.match(/[^0-9\.]/)
178
+ string = string.to_f
179
+ end
180
+ string
181
+ end
167
182
 
168
183
  end
169
184
  end
data/lib/plezi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Plezi
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
data/plezi.gemspec CHANGED
@@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
8
8
  spec.version = Plezi::VERSION
9
9
  spec.authors = ["Boaz Segev"]
10
10
  spec.email = ['boaz@2be.co.il']
11
- spec.summary = %q{The Ruby Websocket Framework with RESTful and HTTP streaming support.}
12
- spec.description = %q{Plezi is The Ruby Websocket and HTTP streaming Framework. Advance to next step in Ruby evolution - a framework with an integrated server, ready for seamless WebSockets and RESTful applications.}
11
+ spec.summary = %q{The Ruby Web-App Framework with Websockets, REST and HTTP streaming support.}
12
+ spec.description = %q{Plezi is a Rack free Ruby Web-App Framework with native Websocket, HTTP streaming, and REST routing support. Advance to next step in Ruby evolution - a framework with an integrated server, ready for seamless WebSockets and RESTful applications.}
13
13
  spec.homepage = "http://boazsegev.github.io/plezi/"
14
14
  spec.license = "MIT"
15
15
 
@@ -21,6 +21,6 @@ Gem::Specification.new do |spec|
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
22
  spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
- spec.post_install_message = "Plezi is hungry - feed it your code!"
24
+ spec.post_install_message = "This update might break existing code - please review ChangeLog.md before upgrading any apps.\n\r\n\rFor example\n\r-Please make sure to change any `params[:list]['0'.to_sym][:key]` to `params[:list][0][:key]` (Fixnum rather then String).\n\r- Pleasemake sure to update `params[:check] == 'true'` to `params[:check] == true` (not aString)."
25
25
 
26
26
  end
@@ -20,6 +20,9 @@ ENV["RACK_ENV"] ||= "development"
20
20
  require 'bundler'
21
21
  Bundler.require
22
22
 
23
+ # require tilt/sass in a thread safe way (before multi-threading cycle begins)
24
+ require 'tilt/sass' if defined?(::Slim) && defined?(::Sass)
25
+
23
26
  # set up Plezi logs - Heroku logs to STDOUT, this machine logs to log file
24
27
  Plezi.create_logger File.expand_path(File.join 'logs','server.log'), ENV["RACK_ENV"]=="development" unless ENV['DYNO']
25
28
 
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plezi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boaz Segev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-21 00:00:00.000000000 Z
11
+ date: 2015-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -38,9 +38,9 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
- description: Plezi is The Ruby Websocket and HTTP streaming Framework. Advance to
42
- next step in Ruby evolution - a framework with an integrated server, ready for seamless
43
- WebSockets and RESTful applications.
41
+ description: Plezi is a Rack free Ruby Web-App Framework with native Websocket, HTTP
42
+ streaming, and REST routing support. Advance to next step in Ruby evolution - a
43
+ framework with an integrated server, ready for seamless WebSockets and RESTful applications.
44
44
  email:
45
45
  - boaz@2be.co.il
46
46
  executables:
@@ -51,7 +51,6 @@ files:
51
51
  - ".gitignore"
52
52
  - CHANGELOG.md
53
53
  - Gemfile
54
- - KNOWN_ISSUES.md
55
54
  - LICENSE.txt
56
55
  - README.md
57
56
  - Rakefile
@@ -97,8 +96,6 @@ files:
97
96
  - resources/500.html
98
97
  - resources/500.slim
99
98
  - resources/Gemfile
100
- - resources/anorexic_gray.png
101
- - resources/anorexic_websockets.html
102
99
  - resources/code.rb
103
100
  - resources/config.ru
104
101
  - resources/controller.rb
@@ -109,6 +106,8 @@ files:
109
106
  - resources/environment.rb
110
107
  - resources/haml_config.rb
111
108
  - resources/i18n_config.rb
109
+ - resources/plezi_gray.png
110
+ - resources/plezi_websockets.html
112
111
  - resources/rakefile.rb
113
112
  - resources/redis_config.rb
114
113
  - resources/routes.rb
@@ -118,7 +117,11 @@ homepage: http://boazsegev.github.io/plezi/
118
117
  licenses:
119
118
  - MIT
120
119
  metadata: {}
121
- post_install_message: Plezi is hungry - feed it your code!
120
+ post_install_message: "This update might break existing code - please review ChangeLog.md
121
+ before upgrading any apps.\n\r\n\rFor example\n\r-Please make sure to change any
122
+ `params[:list]['0'.to_sym][:key]` to `params[:list][0][:key]` (Fixnum rather then
123
+ String).\n\r- Pleasemake sure to update `params[:check] == 'true'` to `params[:check]
124
+ == true` (not aString)."
122
125
  rdoc_options: []
123
126
  require_paths:
124
127
  - lib
@@ -137,5 +140,5 @@ rubyforge_project:
137
140
  rubygems_version: 2.4.5
138
141
  signing_key:
139
142
  specification_version: 4
140
- summary: The Ruby Websocket Framework with RESTful and HTTP streaming support.
143
+ summary: The Ruby Web-App Framework with Websockets, REST and HTTP streaming support.
141
144
  test_files: []
data/KNOWN_ISSUES.md DELETED
@@ -1,13 +0,0 @@
1
- # Known Issues
2
-
3
- Here we will list known issues and weather or not a solution is being persued.
4
-
5
- ## Caching?
6
-
7
- seems caching sometimes fails ( data isn't cached / cache keeps reloading)...?
8
-
9
- ## Chuncked data issues? or Apache benchmarks bug?
10
-
11
- the Apache benchmark hangs some requests, when chuncked data and missing mimetypes are introduced...
12
-
13
- is this a server or benchmark error?
Binary file