big_band 0.2.5 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +1 -1
- data/README.md +82 -0
- data/Rakefile +50 -170
- data/TODO.md +50 -0
- data/lib/big_band.rb +13 -258
- data/lib/sinatra/big_band.rb +65 -1
- data/spec/sinatra/big_band_spec.rb +32 -0
- data/spec/spec_helper.rb +2 -4
- data/subproject.rb +42 -0
- data/tasks/doc.task +9 -0
- data/tasks/gem.task +10 -0
- data/tasks/git.task +41 -0
- data/tasks/setup.task +34 -0
- data/tasks/spec.task +24 -0
- metadata +200 -140
- data/README.rdoc +0 -346
- data/README.rdoc.erb +0 -39
- data/big_band.gemspec +0 -25
- data/dependencies.rb +0 -12
- data/depgen/README.rdoc +0 -7
- data/depgen/Rakefile +0 -23
- data/depgen/depgen.rb +0 -123
- data/depgen/depgen.task +0 -42
- data/depgen/depgen_spec.rb +0 -127
- data/deps.rip +0 -8
- data/example/example.rb +0 -13
- data/example/views/index.haml +0 -8
- data/example/views/layout.haml +0 -2
- data/example/views/stylesheets/_base.sass +0 -1
- data/example/views/stylesheets/screen.sass +0 -12
- data/lib/big_band/advanced_routes.rb +0 -188
- data/lib/big_band/basic_extensions.rb +0 -176
- data/lib/big_band/compass.rb +0 -94
- data/lib/big_band/compass/big_band.rb +0 -4
- data/lib/big_band/compass/stylesheets/_big_band.sass +0 -1
- data/lib/big_band/compass/stylesheets/big_band/_blueprint.sass +0 -1
- data/lib/big_band/compass/stylesheets/big_band/_utilities.sass +0 -6
- data/lib/big_band/compass/stylesheets/big_band/blueprint/_html5.sass +0 -4
- data/lib/big_band/compass/stylesheets/big_band/layouts/_inspector.sass +0 -103
- data/lib/big_band/compass/stylesheets/big_band/utilities/_border_radius.sass +0 -27
- data/lib/big_band/compass/stylesheets/big_band/utilities/_css3_prefix.sass +0 -14
- data/lib/big_band/compass/stylesheets/big_band/utilities/_fancy_buttons.sass +0 -62
- data/lib/big_band/compass/stylesheets/big_band/utilities/_html5.sass +0 -3
- data/lib/big_band/config_file.rb +0 -48
- data/lib/big_band/files/overlay-button.png +0 -0
- data/lib/big_band/integration.rb +0 -39
- data/lib/big_band/integration/bacon.rb +0 -10
- data/lib/big_band/integration/monk.rb +0 -26
- data/lib/big_band/integration/rake.rb +0 -80
- data/lib/big_band/integration/rspec.rb +0 -11
- data/lib/big_band/integration/test.rb +0 -42
- data/lib/big_band/integration/test/spec.rb +0 -2
- data/lib/big_band/integration/test/unit.rb +0 -2
- data/lib/big_band/integration/test_spec.rb +0 -8
- data/lib/big_band/integration/test_unit.rb +0 -10
- data/lib/big_band/integration/yard.rb +0 -104
- data/lib/big_band/more_helpers.rb +0 -50
- data/lib/big_band/more_server.rb +0 -14
- data/lib/big_band/more_server/rainbows.rb +0 -13
- data/lib/big_band/more_server/unicorn.rb +0 -27
- data/lib/big_band/reloader.rb +0 -113
- data/lib/big_band/sass.rb +0 -28
- data/lib/big_band/version.rb +0 -3
- data/lib/big_band/web_inspector.rb +0 -178
- data/lib/big_bang.rb +0 -6
- data/lib/sinatra/big_band/advanced_routes.rb +0 -2
- data/lib/sinatra/big_band/basic_extensions.rb +0 -2
- data/lib/sinatra/big_band/compass.rb +0 -2
- data/lib/sinatra/big_band/compass/big_band.rb +0 -2
- data/lib/sinatra/big_band/config_file.rb +0 -2
- data/lib/sinatra/big_band/integration.rb +0 -2
- data/lib/sinatra/big_band/integration/bacon.rb +0 -2
- data/lib/sinatra/big_band/integration/monk.rb +0 -2
- data/lib/sinatra/big_band/integration/rake.rb +0 -2
- data/lib/sinatra/big_band/integration/rspec.rb +0 -2
- data/lib/sinatra/big_band/integration/test.rb +0 -2
- data/lib/sinatra/big_band/integration/test/spec.rb +0 -2
- data/lib/sinatra/big_band/integration/test/unit.rb +0 -2
- data/lib/sinatra/big_band/integration/test_spec.rb +0 -2
- data/lib/sinatra/big_band/integration/test_unit.rb +0 -2
- data/lib/sinatra/big_band/integration/yard.rb +0 -2
- data/lib/sinatra/big_band/more_helpers.rb +0 -2
- data/lib/sinatra/big_band/more_server.rb +0 -2
- data/lib/sinatra/big_band/more_server/rainbows.rb +0 -2
- data/lib/sinatra/big_band/more_server/unicorn.rb +0 -2
- data/lib/sinatra/big_band/reloader.rb +0 -2
- data/lib/sinatra/big_band/sass.rb +0 -2
- data/lib/sinatra/big_band/version.rb +0 -2
- data/lib/sinatra/big_band/web_inspector.rb +0 -2
- data/lib/yard-sinatra.rb +0 -2
- data/spec/big_band/advanced_routes_spec.rb +0 -70
- data/spec/big_band/basic_extensions_spec.rb +0 -39
- data/spec/big_band/more_server_spec.rb +0 -7
- data/spec/big_band/sass_spec.rb +0 -21
- data/spec/spec.opts +0 -5
- data/yard-sinatra.gemspec +0 -24
data/lib/yard-sinatra.rb
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
require File.expand_path(__FILE__ + "/../../spec_helper.rb")
|
2
|
-
|
3
|
-
describe BigBand::AdvancedRoutes do
|
4
|
-
before { app :AdvancedRoutes }
|
5
|
-
|
6
|
-
[:get, :head, :post, :put, :delete].each do |verb|
|
7
|
-
|
8
|
-
describe "HTTP #{verb.to_s.upcase}" do
|
9
|
-
|
10
|
-
describe "activation" do
|
11
|
-
|
12
|
-
it "is able to deactivate routes from the outside" do
|
13
|
-
route = define_route(verb, "/foo") { "bar" }
|
14
|
-
route.should be_active
|
15
|
-
browse_route(verb, "/foo").should be_ok
|
16
|
-
route.deactivate
|
17
|
-
route.should_not be_active
|
18
|
-
browse_route(verb, "/foo").should_not be_ok
|
19
|
-
end
|
20
|
-
|
21
|
-
it "is able to deacitvate routes from a before filter" do
|
22
|
-
route = define_route(verb, "/foo") { "bar" }
|
23
|
-
app.before { route.deactivate }
|
24
|
-
route.should be_active
|
25
|
-
browse_route(verb, "/foo").should_not be_ok
|
26
|
-
route.should_not be_active
|
27
|
-
end
|
28
|
-
|
29
|
-
it "is able to reactivate deactivated routes" do
|
30
|
-
route = define_route(verb, "/foo") { "bar" }
|
31
|
-
route.deactivate
|
32
|
-
route.activate
|
33
|
-
route.should be_active
|
34
|
-
browse_route(verb, "/foo").should be_ok
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
|
39
|
-
describe "inspection" do
|
40
|
-
it "exposes app, path, file, verb, pattern, " do
|
41
|
-
route = define_route(verb, "/foo") { }
|
42
|
-
route.app.should == app
|
43
|
-
route.path.should == "/foo"
|
44
|
-
route.file.should == __FILE__.expand_path
|
45
|
-
route.verb.should == verb.to_s.upcase
|
46
|
-
route.pattern.should == route[0]
|
47
|
-
route.keys.should == route[1]
|
48
|
-
route.conditions.should == route[2]
|
49
|
-
route.block.should == route[3]
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
describe "promotion" do
|
54
|
-
it "preffers promoted routes over earlier defined routes" do
|
55
|
-
next if verb == :head # cannot check body for head
|
56
|
-
bar = define_route(verb, "/foo") { "bar" }
|
57
|
-
baz = define_route(verb, "/foo") { "baz" }
|
58
|
-
browse_route(verb, "/foo").body.should == "bar"
|
59
|
-
baz.promote
|
60
|
-
browse_route(verb, "/foo").body.should == "baz"
|
61
|
-
bar.promote
|
62
|
-
browse_route(verb, "/foo").body.should == "bar"
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
require File.expand_path(__FILE__ + "/../../spec_helper.rb")
|
2
|
-
|
3
|
-
describe BigBand::BasicExtensions do
|
4
|
-
|
5
|
-
before { app :BasicExtensions }
|
6
|
-
|
7
|
-
describe "set" do
|
8
|
-
|
9
|
-
it "adds hooks to Sinatra::Base#set" do
|
10
|
-
extension = Module.new
|
11
|
-
extension.should_receive(:set_foo).with(app)
|
12
|
-
extension.should_receive(:set_value).with(app, :foo)
|
13
|
-
app.register extension
|
14
|
-
app.set :foo, 42
|
15
|
-
end
|
16
|
-
|
17
|
-
it "allows passing a block" do
|
18
|
-
app.set(:foo) { 42 }
|
19
|
-
app.foo.should == 42
|
20
|
-
end
|
21
|
-
|
22
|
-
it "merges hash values" do
|
23
|
-
app.set :foo, :bar => 42
|
24
|
-
app.set :foo, :baz => 23
|
25
|
-
app.foo[:bar].should == 42
|
26
|
-
app.foo[:baz].should == 23
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
describe "register" do
|
32
|
-
it "registers an extension only once" do
|
33
|
-
extension = Module.new
|
34
|
-
extension.should_receive(:registered).once.with(app)
|
35
|
-
10.times { app.register extension }
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
@@ -1,7 +0,0 @@
|
|
1
|
-
require File.expand_path(__FILE__ + "/../../spec_helper.rb")
|
2
|
-
|
3
|
-
describe BigBand::MoreServer do
|
4
|
-
before { app :MoreServer }
|
5
|
-
it("should offer unicorn") { app.server.should include("unicorn") }
|
6
|
-
it("should offer rainbows") { app.server.should include("rainbows") }
|
7
|
-
end
|
data/spec/big_band/sass_spec.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
require File.expand_path(__FILE__ + "/../../spec_helper.rb")
|
2
|
-
|
3
|
-
describe BigBand::Sass do
|
4
|
-
|
5
|
-
def evaluate_sass(value)
|
6
|
-
Sass::Script::Parser.parse(value, 0, 0).perform(Sass::Environment.new).to_s
|
7
|
-
end
|
8
|
-
|
9
|
-
it "returns the smaller value for min" do
|
10
|
-
evaluate_sass("min(10px, 20px)").should == evaluate_sass("10px")
|
11
|
-
evaluate_sass("min(50%, 10%)").should == evaluate_sass("10%")
|
12
|
-
evaluate_sass("min(42, 42)").should == evaluate_sass("42")
|
13
|
-
end
|
14
|
-
|
15
|
-
it "returns the greater value for max" do
|
16
|
-
evaluate_sass("max(10px, 20px)").should == evaluate_sass("20px")
|
17
|
-
evaluate_sass("max(50%, 10%)").should == evaluate_sass("50%")
|
18
|
-
evaluate_sass("max(42, 42)").should == evaluate_sass("42")
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
data/spec/spec.opts
DELETED
data/yard-sinatra.gemspec
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift "lib"
|
2
|
-
require "lib/big_band/version"
|
3
|
-
|
4
|
-
YARD_SINATRA_SPEC = Gem::Specification.new do |s|
|
5
|
-
|
6
|
-
s.name = "yard-sinatra"
|
7
|
-
s.version = BigBand::VERSION
|
8
|
-
s.date = BigBand::DATE
|
9
|
-
s.author = "Konstantin Haase"
|
10
|
-
s.email = "konstantin.mailinglists@googlemail.com"
|
11
|
-
s.homepage = "http://github.com/rkh/big_band"
|
12
|
-
s.platform = Gem::Platform::RUBY
|
13
|
-
s.summary = "YARD plugin for parsing sinatra routes"
|
14
|
-
s.files = ["yard-sinatra.gemspec", "lib/yard-sinatra.rb", "lib/big_band/version.rb"]
|
15
|
-
s.require_paths = ['lib']
|
16
|
-
s.description = s.summary + " See README.rdoc for more infos."
|
17
|
-
s.has_rdoc = false
|
18
|
-
|
19
|
-
s.add_dependency "big_band", "= #{BigBand::VERSION}"
|
20
|
-
|
21
|
-
s.specification_version = 2 if s.respond_to? :specification_version=
|
22
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
23
|
-
|
24
|
-
end
|