big_band 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -42,14 +42,16 @@ Sinatra tool integration:
42
42
  * [Haml::More](http://github.com/rkh/haml-more) – Adds more functionality to Haml and Sass
43
43
  * [monkey-lib](http://github.com/rkh/monkey-lib) – Thin layer over ruby extension libraries (like ActiveSupport) to make those pluggable
44
44
  * [Sinatra::TestHelper](http://github.com/rkh/sinatra-test-helper) – Adds helper methods and better integration for various testing frameworks
45
+ * [Sinatra::Extension](http://github.com/rkh/sinatra-extension) – Mixin to ease Sinatra extension development.
45
46
  * [Yard::Sinatra](http://github.com/rkh/yard-sinatra) – Displays Sinatra routes (including comments) in YARD output
46
47
 
47
48
  Besides those extensions, there are others in the BigBand stack, that are external:
48
49
 
49
- * [Rack Flash](http://github.com/nakajima/rack-flash) by Pat Nakajima
50
+ * [Rack Flash](http://github.com/nakajima/rack-flash) by [Pat Nakajima](http://github.com/nakajima)
51
+ * [Sinatra::DefaultCharset](http://github.com/raggi/sinatra-default_charset) by [James Tucker](http://github.com/raggi)
50
52
 
51
- Goals for 0.4.0
52
- ---------------
53
+ General Goals
54
+ -------------
53
55
 
54
56
  * No sub-project relies on BigBand
55
57
  * All sub-projects should work with MRI/REE >= 1.8.6 (including 1.9.x), JRuby >= 1.4.0 and Rubinius >= 1.0
data/TODO.md CHANGED
@@ -1,47 +1,16 @@
1
1
  TODO
2
2
  ====
3
3
 
4
- For 0.4.0 release
5
- -----------------
6
-
7
- All subprojects:
8
-
9
- * Add licenses, deps.rip, maybe dependencies file for monk
10
-
11
- BigBand:
12
-
13
- * Create some sort of website (GitHub Pages?)
14
- * Write example app
15
-
16
- After 0.4.0
17
- -----------
18
-
19
4
  General:
20
5
 
6
+ * Create some sort of website (GitHub Pages?)
21
7
  * Implement more fancy stuff
22
- * Padrino integration (maybe an example app, maybe some docs, dunno)
23
- * Monk skeleton using big\_band
24
- * See if stack\_helper can be extracted and is of any use (stack\_helper branch)
25
8
  * Improve inline documentation (YARD tags)
26
9
  * Maybe switch to [sinatra-flash](http://github.com/SFEley/sinatra-flash)
27
10
 
28
- sinatra-advanced-routes:
29
-
30
- * Make compatible with [Usher](http://github.com/joshbuddy/usher)
31
- * Make compatible with [padrino-core/routing](http://github.com/padrino/padrino-framework/issues/issue/46)
32
-
33
- Subprojects to be published or written:
34
-
35
- * queueba (yet another message queue based on redis, maybe)
36
- * sinatra-postpone
37
- * "sinatra-queueba" or redis channel for pusher + pusher integration for sinatra
38
-
39
- Before 0.5.0
40
- ------------
41
-
42
- BigBand:
11
+ haml-more:
43
12
 
44
- * remove `::BigBand`
13
+ * Rewrite Haml::More::CoffeeScript
45
14
 
46
15
  monkey-lib:
47
16
 
@@ -1,8 +1,7 @@
1
1
  require 'sinatra/base'
2
2
  require 'sinatra/sugar'
3
3
  require 'async-rack'
4
- require 'monkey'
5
- require 'rack/flash'
4
+ require 'monkey-lib'
6
5
 
7
6
  module Sinatra
8
7
  Base.ignore_caller
@@ -25,7 +24,17 @@ module Sinatra
25
24
  subclass_extension :namespace
26
25
  subclass_extension :reloader, true
27
26
  subclass_extension :sugar
28
- subclass_extension(:flash, false, false) { |klass| klass.use Rack::Flash, :flash_app_class => klass }
27
+
28
+ subclass_extension(:flash, false, false) do |klass|
29
+ require 'rack/flash'
30
+ klass.use Rack::Flash, :flash_app_class => klass
31
+ end
32
+
33
+ subclass_extension(:default_charset, false, false) do |klass|
34
+ # FIXME: Does not work with autoloader?!
35
+ require 'sinatra/default_charset'
36
+ klass.register Sinatra::DefaultCharset
37
+ end
29
38
 
30
39
  def self.apply_options(klass)
31
40
  klass.set :app_file, klass.caller_files.first.expand_path unless klass.app_file?
@@ -12,9 +12,14 @@ describe Sinatra::BigBand do
12
12
  @example_app ||= set_example_app options
13
13
  end
14
14
 
15
+ describe 'sinatra behavior' do
16
+ before { app set_example_app }
17
+ it_should_behave_like 'sinatra'
18
+ end
19
+
15
20
  describe "standard extensions" do
16
21
  def extension; Sinatra.const_get @ext_name end
17
- [:AdvancedRoutes, :Compass, :ConfigFile, :MoreServer, :Namespace, :Sugar].each do |ext_name|
22
+ [:AdvancedRoutes, :Compass, :ConfigFile, :MoreServer, :Namespace, :Sugar, :DefaultCharset].each do |ext_name|
18
23
  describe ext_name do
19
24
  before { @ext_name = ext_name }
20
25
  it("should be loaded") { Sinatra.should be_const_defined(ext_name) }
@@ -22,7 +27,7 @@ describe Sinatra::BigBand do
22
27
  end
23
28
  end
24
29
 
25
- [:Compass, :ConfigFile, :MoreServer, :Namespace].each do |ext_name|
30
+ [:Compass, :ConfigFile, :MoreServer, :Namespace, :DefaultCharset].each do |ext_name|
26
31
  describe ext_name do
27
32
  before { @ext_name = ext_name }
28
33
  it("should be excludable") { example_app(:except => ext_name).should_not be_a(extension) }
@@ -1,2 +1,3 @@
1
- require "sinatra/rspec"
1
+ require "sinatra/rspec/shared"
2
2
  require "sinatra/big_band"
3
+ require "sinatra/default_charset"
@@ -32,6 +32,7 @@ class Subproject < OpenStruct
32
32
  new "sinatra-advanced-routes"
33
33
  new "sinatra-compass"
34
34
  new "sinatra-config-file"
35
+ new "sinatra-extension"
35
36
  new "sinatra-more-server"
36
37
  new "sinatra-namespace"
37
38
  new "sinatra-reloader"
@@ -14,6 +14,10 @@ def commit
14
14
  "commit -a -m #{ENV['message'].to_s.inspect}"
15
15
  end
16
16
 
17
+ def tag
18
+ "tag -a #{ENV['tag'].to_s.inspect} -m #{ENV['tag'].to_s.inspect}"
19
+ end
20
+
17
21
  namespace :git do
18
22
  namespace :big_band do
19
23
  task(:header) { puts '', '#'*80, "# BigBand" }
@@ -23,6 +27,7 @@ namespace :git do
23
27
  task(:diff => :header) { system "git diff" }
24
28
  task(:tags => :header) { system "git push --tags" }
25
29
  task(:commit => :header) { system "git #{commit}" }
30
+ task(:tag => :header) { system "git #{tag}" }
26
31
  end
27
32
  task :status => "big_band:status"
28
33
  task :pull => "big_band:pull"
@@ -38,4 +43,5 @@ project_namespace :git do
38
43
  git_task :diff
39
44
  git_task :tags, "push --tags"
40
45
  git_task(:commit) { commit }
46
+ git_task(:tag) { tag }
41
47
  end
@@ -1,9 +1,10 @@
1
- def rspec(pattern, format = nil, more_opts = nil, ruby = RUBY)
1
+ def rspec(pattern, format = nil, more_opts = nil, ruby = RUBY, command = 'spec')
2
2
  format ||= ENV["FORMAT"] || :progress
3
3
  libs = Dir.glob("{*,.}/lib").join File::PATH_SEPARATOR
4
4
  files = Dir.glob(pattern).map { |f| f.inspect }.join " "
5
5
  opts = ["-b -c --format #{format} --loadby mtime --reverse", *more_opts].compact.join " "
6
- sh "#{ruby} -I#{libs} -S spec #{opts} #{files}"
6
+ command = "bundle exec #{command}" if ENV['BUNDLER']
7
+ sh "RUBYLIB=#{libs.strip}:#{ENV['RUBYLIB'].to_s.strip} #{ruby} -S #{command} #{opts} #{files}"
7
8
  end
8
9
 
9
10
  pattern = "spec/**/*_spec.rb"
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: big_band
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 11
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 4
8
+ - 5
8
9
  - 0
9
- version: 0.4.0
10
+ version: 0.5.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Konstantin Haase
@@ -14,205 +15,265 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-05-02 00:00:00 +02:00
18
+ date: 2010-07-09 00:00:00 +02:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: async-rack
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ~>
26
28
  - !ruby/object:Gem::Version
29
+ hash: 11
27
30
  segments:
28
31
  - 0
29
- - 4
32
+ - 5
30
33
  - 0
31
- version: 0.4.0
34
+ version: 0.5.0
32
35
  type: :runtime
33
36
  version_requirements: *id001
34
37
  - !ruby/object:Gem::Dependency
35
38
  name: haml-more
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ~>
40
44
  - !ruby/object:Gem::Version
45
+ hash: 11
41
46
  segments:
42
47
  - 0
43
- - 4
48
+ - 5
44
49
  - 0
45
- version: 0.4.0
50
+ version: 0.5.0
46
51
  type: :runtime
47
52
  version_requirements: *id002
48
53
  - !ruby/object:Gem::Dependency
49
54
  name: monkey-lib
50
55
  prerelease: false
51
56
  requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
52
58
  requirements:
53
59
  - - ~>
54
60
  - !ruby/object:Gem::Version
61
+ hash: 11
55
62
  segments:
56
63
  - 0
57
- - 4
64
+ - 5
58
65
  - 0
59
- version: 0.4.0
66
+ version: 0.5.0
60
67
  type: :runtime
61
68
  version_requirements: *id003
62
69
  - !ruby/object:Gem::Dependency
63
70
  name: sinatra-advanced-routes
64
71
  prerelease: false
65
72
  requirement: &id004 !ruby/object:Gem::Requirement
73
+ none: false
66
74
  requirements:
67
75
  - - ~>
68
76
  - !ruby/object:Gem::Version
77
+ hash: 11
69
78
  segments:
70
79
  - 0
71
- - 4
80
+ - 5
72
81
  - 0
73
- version: 0.4.0
82
+ version: 0.5.0
74
83
  type: :runtime
75
84
  version_requirements: *id004
76
85
  - !ruby/object:Gem::Dependency
77
86
  name: sinatra-compass
78
87
  prerelease: false
79
88
  requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
80
90
  requirements:
81
91
  - - ~>
82
92
  - !ruby/object:Gem::Version
93
+ hash: 11
83
94
  segments:
84
95
  - 0
85
- - 4
96
+ - 5
86
97
  - 0
87
- version: 0.4.0
98
+ version: 0.5.0
88
99
  type: :runtime
89
100
  version_requirements: *id005
90
101
  - !ruby/object:Gem::Dependency
91
102
  name: sinatra-config-file
92
103
  prerelease: false
93
104
  requirement: &id006 !ruby/object:Gem::Requirement
105
+ none: false
94
106
  requirements:
95
107
  - - ~>
96
108
  - !ruby/object:Gem::Version
109
+ hash: 11
97
110
  segments:
98
111
  - 0
99
- - 4
112
+ - 5
100
113
  - 0
101
- version: 0.4.0
114
+ version: 0.5.0
102
115
  type: :runtime
103
116
  version_requirements: *id006
104
117
  - !ruby/object:Gem::Dependency
105
- name: sinatra-more-server
118
+ name: sinatra-extension
106
119
  prerelease: false
107
120
  requirement: &id007 !ruby/object:Gem::Requirement
121
+ none: false
108
122
  requirements:
109
123
  - - ~>
110
124
  - !ruby/object:Gem::Version
125
+ hash: 11
111
126
  segments:
112
127
  - 0
113
- - 4
128
+ - 5
114
129
  - 0
115
- version: 0.4.0
130
+ version: 0.5.0
116
131
  type: :runtime
117
132
  version_requirements: *id007
118
133
  - !ruby/object:Gem::Dependency
119
- name: sinatra-namespace
134
+ name: sinatra-more-server
120
135
  prerelease: false
121
136
  requirement: &id008 !ruby/object:Gem::Requirement
137
+ none: false
122
138
  requirements:
123
139
  - - ~>
124
140
  - !ruby/object:Gem::Version
141
+ hash: 11
125
142
  segments:
126
143
  - 0
127
- - 4
144
+ - 5
128
145
  - 0
129
- version: 0.4.0
146
+ version: 0.5.0
130
147
  type: :runtime
131
148
  version_requirements: *id008
132
149
  - !ruby/object:Gem::Dependency
133
- name: sinatra-reloader
150
+ name: sinatra-namespace
134
151
  prerelease: false
135
152
  requirement: &id009 !ruby/object:Gem::Requirement
153
+ none: false
136
154
  requirements:
137
155
  - - ~>
138
156
  - !ruby/object:Gem::Version
157
+ hash: 11
139
158
  segments:
140
159
  - 0
141
- - 4
160
+ - 5
142
161
  - 0
143
- version: 0.4.0
162
+ version: 0.5.0
144
163
  type: :runtime
145
164
  version_requirements: *id009
146
165
  - !ruby/object:Gem::Dependency
147
- name: sinatra-sugar
166
+ name: sinatra-reloader
148
167
  prerelease: false
149
168
  requirement: &id010 !ruby/object:Gem::Requirement
169
+ none: false
150
170
  requirements:
151
171
  - - ~>
152
172
  - !ruby/object:Gem::Version
173
+ hash: 11
153
174
  segments:
154
175
  - 0
155
- - 4
176
+ - 5
156
177
  - 0
157
- version: 0.4.0
178
+ version: 0.5.0
158
179
  type: :runtime
159
180
  version_requirements: *id010
160
181
  - !ruby/object:Gem::Dependency
161
- name: sinatra-test-helper
182
+ name: sinatra-sugar
162
183
  prerelease: false
163
184
  requirement: &id011 !ruby/object:Gem::Requirement
185
+ none: false
164
186
  requirements:
165
187
  - - ~>
166
188
  - !ruby/object:Gem::Version
189
+ hash: 11
167
190
  segments:
168
191
  - 0
169
- - 4
192
+ - 5
170
193
  - 0
171
- version: 0.4.0
194
+ version: 0.5.0
172
195
  type: :runtime
173
196
  version_requirements: *id011
174
197
  - !ruby/object:Gem::Dependency
175
- name: yard-sinatra
198
+ name: sinatra-test-helper
176
199
  prerelease: false
177
200
  requirement: &id012 !ruby/object:Gem::Requirement
201
+ none: false
178
202
  requirements:
179
203
  - - ~>
180
204
  - !ruby/object:Gem::Version
205
+ hash: 11
181
206
  segments:
182
207
  - 0
183
- - 4
208
+ - 5
184
209
  - 0
185
- version: 0.4.0
210
+ version: 0.5.0
186
211
  type: :runtime
187
212
  version_requirements: *id012
188
213
  - !ruby/object:Gem::Dependency
189
- name: rack-flash
214
+ name: yard-sinatra
190
215
  prerelease: false
191
216
  requirement: &id013 !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ~>
220
+ - !ruby/object:Gem::Version
221
+ hash: 11
222
+ segments:
223
+ - 0
224
+ - 5
225
+ - 0
226
+ version: 0.5.0
227
+ type: :runtime
228
+ version_requirements: *id013
229
+ - !ruby/object:Gem::Dependency
230
+ name: rack-flash
231
+ prerelease: false
232
+ requirement: &id014 !ruby/object:Gem::Requirement
233
+ none: false
192
234
  requirements:
193
235
  - - ">="
194
236
  - !ruby/object:Gem::Version
237
+ hash: 25
195
238
  segments:
196
239
  - 0
197
240
  - 1
198
241
  - 1
199
242
  version: 0.1.1
200
243
  type: :runtime
201
- version_requirements: *id013
244
+ version_requirements: *id014
245
+ - !ruby/object:Gem::Dependency
246
+ name: sinatra-default_charset
247
+ prerelease: false
248
+ requirement: &id015 !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ">="
252
+ - !ruby/object:Gem::Version
253
+ hash: 23
254
+ segments:
255
+ - 0
256
+ - 2
257
+ - 0
258
+ version: 0.2.0
259
+ type: :runtime
260
+ version_requirements: *id015
202
261
  - !ruby/object:Gem::Dependency
203
262
  name: rspec
204
263
  prerelease: false
205
- requirement: &id014 !ruby/object:Gem::Requirement
264
+ requirement: &id016 !ruby/object:Gem::Requirement
265
+ none: false
206
266
  requirements:
207
267
  - - ">="
208
268
  - !ruby/object:Gem::Version
269
+ hash: 27
209
270
  segments:
210
271
  - 1
211
272
  - 3
212
273
  - 0
213
274
  version: 1.3.0
214
275
  type: :development
215
- version_requirements: *id014
276
+ version_requirements: *id016
216
277
  description: Making Sinatra swing.
217
278
  email: konstantin.mailinglists@googlemail.com
218
279
  executables: []
@@ -246,23 +307,27 @@ rdoc_options: []
246
307
  require_paths:
247
308
  - lib
248
309
  required_ruby_version: !ruby/object:Gem::Requirement
310
+ none: false
249
311
  requirements:
250
312
  - - ">="
251
313
  - !ruby/object:Gem::Version
314
+ hash: 3
252
315
  segments:
253
316
  - 0
254
317
  version: "0"
255
318
  required_rubygems_version: !ruby/object:Gem::Requirement
319
+ none: false
256
320
  requirements:
257
321
  - - ">="
258
322
  - !ruby/object:Gem::Version
323
+ hash: 3
259
324
  segments:
260
325
  - 0
261
326
  version: "0"
262
327
  requirements: []
263
328
 
264
329
  rubyforge_project:
265
- rubygems_version: 1.3.6
330
+ rubygems_version: 1.3.7
266
331
  signing_key:
267
332
  specification_version: 3
268
333
  summary: Making Sinatra swing.