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.
Files changed (96) hide show
  1. data/LICENSE +1 -1
  2. data/README.md +82 -0
  3. data/Rakefile +50 -170
  4. data/TODO.md +50 -0
  5. data/lib/big_band.rb +13 -258
  6. data/lib/sinatra/big_band.rb +65 -1
  7. data/spec/sinatra/big_band_spec.rb +32 -0
  8. data/spec/spec_helper.rb +2 -4
  9. data/subproject.rb +42 -0
  10. data/tasks/doc.task +9 -0
  11. data/tasks/gem.task +10 -0
  12. data/tasks/git.task +41 -0
  13. data/tasks/setup.task +34 -0
  14. data/tasks/spec.task +24 -0
  15. metadata +200 -140
  16. data/README.rdoc +0 -346
  17. data/README.rdoc.erb +0 -39
  18. data/big_band.gemspec +0 -25
  19. data/dependencies.rb +0 -12
  20. data/depgen/README.rdoc +0 -7
  21. data/depgen/Rakefile +0 -23
  22. data/depgen/depgen.rb +0 -123
  23. data/depgen/depgen.task +0 -42
  24. data/depgen/depgen_spec.rb +0 -127
  25. data/deps.rip +0 -8
  26. data/example/example.rb +0 -13
  27. data/example/views/index.haml +0 -8
  28. data/example/views/layout.haml +0 -2
  29. data/example/views/stylesheets/_base.sass +0 -1
  30. data/example/views/stylesheets/screen.sass +0 -12
  31. data/lib/big_band/advanced_routes.rb +0 -188
  32. data/lib/big_band/basic_extensions.rb +0 -176
  33. data/lib/big_band/compass.rb +0 -94
  34. data/lib/big_band/compass/big_band.rb +0 -4
  35. data/lib/big_band/compass/stylesheets/_big_band.sass +0 -1
  36. data/lib/big_band/compass/stylesheets/big_band/_blueprint.sass +0 -1
  37. data/lib/big_band/compass/stylesheets/big_band/_utilities.sass +0 -6
  38. data/lib/big_band/compass/stylesheets/big_band/blueprint/_html5.sass +0 -4
  39. data/lib/big_band/compass/stylesheets/big_band/layouts/_inspector.sass +0 -103
  40. data/lib/big_band/compass/stylesheets/big_band/utilities/_border_radius.sass +0 -27
  41. data/lib/big_band/compass/stylesheets/big_band/utilities/_css3_prefix.sass +0 -14
  42. data/lib/big_band/compass/stylesheets/big_band/utilities/_fancy_buttons.sass +0 -62
  43. data/lib/big_band/compass/stylesheets/big_band/utilities/_html5.sass +0 -3
  44. data/lib/big_band/config_file.rb +0 -48
  45. data/lib/big_band/files/overlay-button.png +0 -0
  46. data/lib/big_band/integration.rb +0 -39
  47. data/lib/big_band/integration/bacon.rb +0 -10
  48. data/lib/big_band/integration/monk.rb +0 -26
  49. data/lib/big_band/integration/rake.rb +0 -80
  50. data/lib/big_band/integration/rspec.rb +0 -11
  51. data/lib/big_band/integration/test.rb +0 -42
  52. data/lib/big_band/integration/test/spec.rb +0 -2
  53. data/lib/big_band/integration/test/unit.rb +0 -2
  54. data/lib/big_band/integration/test_spec.rb +0 -8
  55. data/lib/big_band/integration/test_unit.rb +0 -10
  56. data/lib/big_band/integration/yard.rb +0 -104
  57. data/lib/big_band/more_helpers.rb +0 -50
  58. data/lib/big_band/more_server.rb +0 -14
  59. data/lib/big_band/more_server/rainbows.rb +0 -13
  60. data/lib/big_band/more_server/unicorn.rb +0 -27
  61. data/lib/big_band/reloader.rb +0 -113
  62. data/lib/big_band/sass.rb +0 -28
  63. data/lib/big_band/version.rb +0 -3
  64. data/lib/big_band/web_inspector.rb +0 -178
  65. data/lib/big_bang.rb +0 -6
  66. data/lib/sinatra/big_band/advanced_routes.rb +0 -2
  67. data/lib/sinatra/big_band/basic_extensions.rb +0 -2
  68. data/lib/sinatra/big_band/compass.rb +0 -2
  69. data/lib/sinatra/big_band/compass/big_band.rb +0 -2
  70. data/lib/sinatra/big_band/config_file.rb +0 -2
  71. data/lib/sinatra/big_band/integration.rb +0 -2
  72. data/lib/sinatra/big_band/integration/bacon.rb +0 -2
  73. data/lib/sinatra/big_band/integration/monk.rb +0 -2
  74. data/lib/sinatra/big_band/integration/rake.rb +0 -2
  75. data/lib/sinatra/big_band/integration/rspec.rb +0 -2
  76. data/lib/sinatra/big_band/integration/test.rb +0 -2
  77. data/lib/sinatra/big_band/integration/test/spec.rb +0 -2
  78. data/lib/sinatra/big_band/integration/test/unit.rb +0 -2
  79. data/lib/sinatra/big_band/integration/test_spec.rb +0 -2
  80. data/lib/sinatra/big_band/integration/test_unit.rb +0 -2
  81. data/lib/sinatra/big_band/integration/yard.rb +0 -2
  82. data/lib/sinatra/big_band/more_helpers.rb +0 -2
  83. data/lib/sinatra/big_band/more_server.rb +0 -2
  84. data/lib/sinatra/big_band/more_server/rainbows.rb +0 -2
  85. data/lib/sinatra/big_band/more_server/unicorn.rb +0 -2
  86. data/lib/sinatra/big_band/reloader.rb +0 -2
  87. data/lib/sinatra/big_band/sass.rb +0 -2
  88. data/lib/sinatra/big_band/version.rb +0 -2
  89. data/lib/sinatra/big_band/web_inspector.rb +0 -2
  90. data/lib/yard-sinatra.rb +0 -2
  91. data/spec/big_band/advanced_routes_spec.rb +0 -70
  92. data/spec/big_band/basic_extensions_spec.rb +0 -39
  93. data/spec/big_band/more_server_spec.rb +0 -7
  94. data/spec/big_band/sass_spec.rb +0 -21
  95. data/spec/spec.opts +0 -5
  96. data/yard-sinatra.gemspec +0 -24
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/basic_extensions"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/compass"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/compass/big_band"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/config_file"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/bacon"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/monk"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/rake"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/rspec"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/test"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/test/spec"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/test/unit"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/test_spec"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/test_unit"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/integration/yard"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/more_helpers"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/more_server"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/more_server/rainbows"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/more_server/unicorn"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/reloader"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/sass"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/version"
@@ -1,2 +0,0 @@
1
- # Generated file, run 'rake dummy_files' to regenerate
2
- require "big_band/web_inspector"
data/lib/yard-sinatra.rb DELETED
@@ -1,2 +0,0 @@
1
- # This is a dummy file to hook into YARD.load_plugins
2
- require "big_band/integration/yard"
@@ -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
@@ -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
@@ -1,5 +0,0 @@
1
- --colour
2
- --format progress
3
- --loadby mtime
4
- --reverse
5
- -b
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