true-web 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -3
- data/README.markdown +42 -0
- data/lib/true-web/version.rb +1 -1
- data/true-web.gemspec +1 -2
- metadata +25 -36
- data/README +0 -0
data/Gemfile.lock
CHANGED
@@ -4,8 +4,7 @@ PATH
|
|
4
4
|
true-web (0.1.0)
|
5
5
|
activesupport (>= 3.0.0)
|
6
6
|
honkster-addressable (>= 2.2.3)
|
7
|
-
|
8
|
-
mustache (>= 0.99.2)
|
7
|
+
mustache
|
9
8
|
named-routes (>= 0.2.5)
|
10
9
|
sinatra (>= 1.2.0)
|
11
10
|
yajl-ruby (>= 0.8.1)
|
@@ -36,7 +35,6 @@ GEM
|
|
36
35
|
ffi (0.6.3)
|
37
36
|
rake (>= 0.8.7)
|
38
37
|
honkster-addressable (2.2.3)
|
39
|
-
i18n (0.6.0)
|
40
38
|
json_pure (1.5.1)
|
41
39
|
linecache19 (0.5.11)
|
42
40
|
ruby_core_source (>= 0.1.4)
|
data/README.markdown
ADDED
@@ -0,0 +1,42 @@
|
|
1
|
+
# TrueWeb
|
2
|
+
|
3
|
+
TrueWeb is a lightweight Sinatra web VC stack. Currently, it doesn't have strong opinions, to allow flexibility to discover good idioms.
|
4
|
+
|
5
|
+
## Basic Layout
|
6
|
+
|
7
|
+
TrueWeb has a basic app structure, similar to Rails.
|
8
|
+
Right now, no conventions are "forced" on you. This is done to allow experimentation and keep things lightweight.
|
9
|
+
|
10
|
+
You pick the model library.
|
11
|
+
|
12
|
+
Right now there are no generators.
|
13
|
+
|
14
|
+
### TrueWeb::Controller
|
15
|
+
|
16
|
+
TrueWeb::Controller is a subclass of Sinatra::Base.
|
17
|
+
It's meant to provide an encapsulated unit of functionality within your app.
|
18
|
+
How you group your actions is up to you.
|
19
|
+
|
20
|
+
### NamedRoutes
|
21
|
+
|
22
|
+
TrueWeb uses the [named-routes](https://github.com/btakita/named-routes) library.
|
23
|
+
|
24
|
+
Here is a good pattern to follow:
|
25
|
+
|
26
|
+
module MyApp
|
27
|
+
Controller.define_routes do
|
28
|
+
def root; end
|
29
|
+
get path(:root, "/") do
|
30
|
+
"Hello World!"
|
31
|
+
end
|
32
|
+
|
33
|
+
def about_us; end
|
34
|
+
get path(:about_us, "/about-us") do
|
35
|
+
view("/about-us.html.ms")
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
Defining the route methods allows certain code editors & ides to locate the definition of action.
|
41
|
+
|
42
|
+
uris.about_us # /about-us
|
data/lib/true-web/version.rb
CHANGED
data/true-web.gemspec
CHANGED
@@ -23,8 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
|
24
24
|
s.add_dependency "activesupport", ">=3.0.0"
|
25
25
|
s.add_dependency "honkster-addressable", ">=2.2.3"
|
26
|
-
s.add_dependency "
|
27
|
-
s.add_dependency "mustache", ">=0.99.2"
|
26
|
+
s.add_dependency "mustache"
|
28
27
|
s.add_dependency "named-routes", ">=0.2.5"
|
29
28
|
s.add_dependency "sinatra", ">=1.2.0"
|
30
29
|
s.add_dependency "yajl-ruby", ">=0.8.1"
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: true-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Brian Takita
|
@@ -36,137 +36,126 @@ dependencies:
|
|
36
36
|
type: :runtime
|
37
37
|
version_requirements: *id002
|
38
38
|
- !ruby/object:Gem::Dependency
|
39
|
-
name:
|
39
|
+
name: mustache
|
40
40
|
prerelease: false
|
41
41
|
requirement: &id003 !ruby/object:Gem::Requirement
|
42
42
|
none: false
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0
|
46
|
+
version: "0"
|
47
47
|
type: :runtime
|
48
48
|
version_requirements: *id003
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: mustache
|
51
|
-
prerelease: false
|
52
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
53
|
-
none: false
|
54
|
-
requirements:
|
55
|
-
- - ">="
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: 0.99.2
|
58
|
-
type: :runtime
|
59
|
-
version_requirements: *id004
|
60
49
|
- !ruby/object:Gem::Dependency
|
61
50
|
name: named-routes
|
62
51
|
prerelease: false
|
63
|
-
requirement: &
|
52
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
64
53
|
none: false
|
65
54
|
requirements:
|
66
55
|
- - ">="
|
67
56
|
- !ruby/object:Gem::Version
|
68
57
|
version: 0.2.5
|
69
58
|
type: :runtime
|
70
|
-
version_requirements: *
|
59
|
+
version_requirements: *id004
|
71
60
|
- !ruby/object:Gem::Dependency
|
72
61
|
name: sinatra
|
73
62
|
prerelease: false
|
74
|
-
requirement: &
|
63
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
75
64
|
none: false
|
76
65
|
requirements:
|
77
66
|
- - ">="
|
78
67
|
- !ruby/object:Gem::Version
|
79
68
|
version: 1.2.0
|
80
69
|
type: :runtime
|
81
|
-
version_requirements: *
|
70
|
+
version_requirements: *id005
|
82
71
|
- !ruby/object:Gem::Dependency
|
83
72
|
name: yajl-ruby
|
84
73
|
prerelease: false
|
85
|
-
requirement: &
|
74
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
86
75
|
none: false
|
87
76
|
requirements:
|
88
77
|
- - ">="
|
89
78
|
- !ruby/object:Gem::Version
|
90
79
|
version: 0.8.1
|
91
80
|
type: :runtime
|
92
|
-
version_requirements: *
|
81
|
+
version_requirements: *id006
|
93
82
|
- !ruby/object:Gem::Dependency
|
94
83
|
name: capybara
|
95
84
|
prerelease: false
|
96
|
-
requirement: &
|
85
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
97
86
|
none: false
|
98
87
|
requirements:
|
99
88
|
- - ">="
|
100
89
|
- !ruby/object:Gem::Version
|
101
90
|
version: 0.4.0
|
102
91
|
type: :development
|
103
|
-
version_requirements: *
|
92
|
+
version_requirements: *id007
|
104
93
|
- !ruby/object:Gem::Dependency
|
105
94
|
name: nokogiri
|
106
95
|
prerelease: false
|
107
|
-
requirement: &
|
96
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
108
97
|
none: false
|
109
98
|
requirements:
|
110
99
|
- - ">="
|
111
100
|
- !ruby/object:Gem::Version
|
112
101
|
version: 1.4.4
|
113
102
|
type: :development
|
114
|
-
version_requirements: *
|
103
|
+
version_requirements: *id008
|
115
104
|
- !ruby/object:Gem::Dependency
|
116
105
|
name: rack-test
|
117
106
|
prerelease: false
|
118
|
-
requirement: &
|
107
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
119
108
|
none: false
|
120
109
|
requirements:
|
121
110
|
- - ">="
|
122
111
|
- !ruby/object:Gem::Version
|
123
112
|
version: 0.5.6
|
124
113
|
type: :development
|
125
|
-
version_requirements: *
|
114
|
+
version_requirements: *id009
|
126
115
|
- !ruby/object:Gem::Dependency
|
127
116
|
name: rr
|
128
117
|
prerelease: false
|
129
|
-
requirement: &
|
118
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
130
119
|
none: false
|
131
120
|
requirements:
|
132
121
|
- - ">="
|
133
122
|
- !ruby/object:Gem::Version
|
134
123
|
version: 1.0.2
|
135
124
|
type: :development
|
136
|
-
version_requirements: *
|
125
|
+
version_requirements: *id010
|
137
126
|
- !ruby/object:Gem::Dependency
|
138
127
|
name: rspec
|
139
128
|
prerelease: false
|
140
|
-
requirement: &
|
129
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
141
130
|
none: false
|
142
131
|
requirements:
|
143
132
|
- - ">="
|
144
133
|
- !ruby/object:Gem::Version
|
145
134
|
version: 2.2.0
|
146
135
|
type: :development
|
147
|
-
version_requirements: *
|
136
|
+
version_requirements: *id011
|
148
137
|
- !ruby/object:Gem::Dependency
|
149
138
|
name: ruby-debug19
|
150
139
|
prerelease: false
|
151
|
-
requirement: &
|
140
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
152
141
|
none: false
|
153
142
|
requirements:
|
154
143
|
- - ">="
|
155
144
|
- !ruby/object:Gem::Version
|
156
145
|
version: 0.11.6
|
157
146
|
type: :development
|
158
|
-
version_requirements: *
|
147
|
+
version_requirements: *id012
|
159
148
|
- !ruby/object:Gem::Dependency
|
160
149
|
name: webmock
|
161
150
|
prerelease: false
|
162
|
-
requirement: &
|
151
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
163
152
|
none: false
|
164
153
|
requirements:
|
165
154
|
- - ">="
|
166
155
|
- !ruby/object:Gem::Version
|
167
156
|
version: 1.6.2
|
168
157
|
type: :development
|
169
|
-
version_requirements: *
|
158
|
+
version_requirements: *id013
|
170
159
|
description: A lightweight Sinatra web MVC stack
|
171
160
|
email:
|
172
161
|
- btakita@truecar.com
|
@@ -181,7 +170,7 @@ files:
|
|
181
170
|
- .rvmrc
|
182
171
|
- Gemfile
|
183
172
|
- Gemfile.lock
|
184
|
-
- README
|
173
|
+
- README.markdown
|
185
174
|
- Rakefile
|
186
175
|
- lib/true-web.rb
|
187
176
|
- lib/true-web/controller.rb
|
@@ -234,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
234
223
|
requirements: []
|
235
224
|
|
236
225
|
rubyforge_project:
|
237
|
-
rubygems_version: 1.
|
226
|
+
rubygems_version: 1.3.9.2
|
238
227
|
signing_key:
|
239
228
|
specification_version: 3
|
240
229
|
summary: A lightweight Sinatra web MVC stack
|
data/README
DELETED
File without changes
|