webs 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.rdoc +24 -16
- data/Rakefile +1 -1
- data/lib/helper/params.rb +1 -1
- data/lib/webs.rb +1 -1
- data/webs.gemspec +2 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 074a188a67f31520f66670060ce9e7d87cbe498a
|
4
|
-
data.tar.gz: 6a797e3bdbcd16f8a7f9b6343d82bb0dd59944f5
|
5
2
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 729473cb868f9cf3926569ad05ccfea65bfdb4cd4bd4c45bc990bb7bba20cd570e65338a151790fe075c6382838842b12f6ea8f671a147211272e5eda236b3bb
|
4
|
+
data.tar.gz: cce219c985d45bfa89bbb921e83442421a6fbe8aa627c550a46afb09825aad2a843466d4ffad9ca88a4e99325628115297a828744a6f5ec3b20b0f3a7cd23011
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: 409b50f57e01dbb6104542542f47f5ba8cc02754
|
7
|
+
data.tar.gz: 95400cf31c0e8154b24a10957e829086c812021f
|
data/README.rdoc
CHANGED
@@ -3,11 +3,18 @@
|
|
3
3
|
WebsGem is a holder of knowlege with unknown equal. It:
|
4
4
|
|
5
5
|
* Manages fw:params
|
6
|
+
* Provides baseline controllers and views for Webs-maintained Rails apps
|
7
|
+
to ensure a consistent UI and experience across the platform
|
8
|
+
* Totally takes over Rails
|
6
9
|
|
7
|
-
Right now it's composed of
|
10
|
+
Right now it's composed of several modules:
|
8
11
|
|
9
|
-
**
|
10
|
-
**
|
12
|
+
** Cache: Manage memcache interaction
|
13
|
+
** Config: Setup a Webs Rails instance from the webs_config.yml
|
14
|
+
** Controller: Controller helpers (abuse, permissions, etc. as well as
|
15
|
+
the primary Webs controller you should inherit from)
|
16
|
+
** helpers: Controller helpers, including stuff for to manage fw_params
|
17
|
+
** views: Some default views you can use to manage standard fw_app responses
|
11
18
|
|
12
19
|
== Installation
|
13
20
|
|
@@ -15,10 +22,11 @@ Right now it's composed of 1 modules:
|
|
15
22
|
|
16
23
|
To use WebsGem with your stuff, in gemfile:
|
17
24
|
|
18
|
-
gem "webs",
|
25
|
+
gem "webs", '<version>'
|
19
26
|
|
20
27
|
=== Rails 2.3
|
21
28
|
|
29
|
+
Don't use Rails 2.3, it's over 5 years old!
|
22
30
|
|
23
31
|
== Usage
|
24
32
|
|
@@ -30,14 +38,16 @@ In a controller:
|
|
30
38
|
...
|
31
39
|
|
32
40
|
include Webs::Controller::WebsController
|
41
|
+
include Webs::Helper::Encoding # Optional
|
33
42
|
webs_helpers
|
34
43
|
|
35
44
|
# NOTE: Uses Webs::SECRET
|
36
|
-
before_filter :
|
45
|
+
before_filter :validate_webs_session, :except=>[:tab, :contactme_login]
|
37
46
|
|
38
47
|
|
39
48
|
* Basic convenience methods for all the fw params
|
40
|
-
Instead of "params[:fw_sig_session_key]"
|
49
|
+
Instead of "params[:fw_sig_session_key]" or "request.headers['fw_sig_session_key']"
|
50
|
+
now you have fw_sig_session_key
|
41
51
|
|
42
52
|
* Cool helper methods:
|
43
53
|
fw_app_url : full url of the app
|
@@ -45,28 +55,26 @@ ex: http://mysite.webs.com/apps/videos
|
|
45
55
|
|
46
56
|
* Security
|
47
57
|
|
48
|
-
Create a
|
58
|
+
Create a webs_config.yml file in /config
|
49
59
|
|
50
|
-
|
51
|
-
|
52
|
-
end
|
60
|
+
...
|
61
|
+
secret: "your_secret_key"
|
53
62
|
|
54
63
|
* FWML Tag:
|
55
64
|
<%= fwml :tagname, ... %>
|
56
65
|
|
57
|
-
== TODO
|
58
|
-
|
59
|
-
Please refer to TODO file.
|
60
|
-
|
61
66
|
== Maintainers
|
62
67
|
|
63
|
-
*
|
68
|
+
* Idris Mokhtarzada(http://github.com/idris)
|
69
|
+
* Michael Hackner (http://github.com/HackAttack)
|
70
|
+
* Harbhajan Singh (http://github.com/hsingh6764)
|
71
|
+
* Will Moore (http://github.com/wlmoore-webs)
|
64
72
|
|
65
73
|
== Contributors
|
66
74
|
|
67
75
|
== Bugs and Feedback
|
68
76
|
|
69
|
-
If you discover any bugs, please keep them to yourself.
|
77
|
+
If you discover any bugs, please keep them to yourself. Or submit a PR, we don't care!
|
70
78
|
|
71
79
|
== License
|
72
80
|
|
data/Rakefile
CHANGED
data/lib/helper/params.rb
CHANGED
@@ -5,7 +5,7 @@ module Webs
|
|
5
5
|
:fw_sig_url, :fw_sig_user, :fw_sig_width, :fw_sig_social, :fw_sig_premium, :fb_sig_network, :fw_sig_captcha_valid]
|
6
6
|
|
7
7
|
FW_PARAMS.each do |fw_param|
|
8
|
-
module_eval( "def #{fw_param.to_s}() params[:#{fw_param.to_s}] end" )
|
8
|
+
module_eval( "def #{fw_param.to_s}() params[:#{fw_param.to_s}] || request.headers['#{fw_param.to_s}'] end" )
|
9
9
|
end
|
10
10
|
|
11
11
|
# Some basic useful methods
|
data/lib/webs.rb
CHANGED
data/webs.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{webs}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "0.3.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Chuck Olczak"]
|
9
|
-
s.date = %q{2014-
|
9
|
+
s.date = %q{2014-09-22}
|
10
10
|
s.description = %q{Reusable webs stuff.}
|
11
11
|
s.email = %q{chuck@webs.com}
|
12
12
|
gemfiles = Dir.glob( "**/*.{erb,rb,rdoc}" )
|
@@ -22,10 +22,5 @@ Gem::Specification.new do |s|
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
23
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
24
|
s.specification_version = 3
|
25
|
-
|
26
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
27
|
-
else
|
28
|
-
end
|
29
|
-
else
|
30
25
|
end
|
31
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chuck Olczak
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-09-22 00:00:00 Z
|
13
13
|
dependencies: []
|
14
14
|
|
15
15
|
description: Reusable webs stuff.
|