do_riak 0.10.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (177) hide show
  1. data/CHANGELOG +2 -0
  2. data/Gemfile +9 -0
  3. data/LICENSE +20 -0
  4. data/README.textile +23 -0
  5. data/TODO.txt +4 -0
  6. data/deps.rip +8 -0
  7. data/do_riak.gemspec +40 -0
  8. data/do_riak.pre.gemspec +8 -0
  9. data/gems/cache/bacon-1.1.0.gem +0 -0
  10. data/gems/cache/code-cleaner-0.8.1.gem +0 -0
  11. data/gems/cache/nake-0.0.8.gem +0 -0
  12. data/gems/cache/term-ansicolor-1.0.4.gem +0 -0
  13. data/gems/environment.rb +107 -0
  14. data/gems/gems/bacon-1.1.0/COPYING +18 -0
  15. data/gems/gems/bacon-1.1.0/ChangeLog +220 -0
  16. data/gems/gems/bacon-1.1.0/RDOX +69 -0
  17. data/gems/gems/bacon-1.1.0/README +290 -0
  18. data/gems/gems/bacon-1.1.0/Rakefile +138 -0
  19. data/gems/gems/bacon-1.1.0/bin/bacon +117 -0
  20. data/gems/gems/bacon-1.1.0/lib/autotest/bacon.rb +36 -0
  21. data/gems/gems/bacon-1.1.0/lib/autotest/bacon_rspec.rb +2 -0
  22. data/gems/gems/bacon-1.1.0/lib/autotest/discover.rb +9 -0
  23. data/gems/gems/bacon-1.1.0/lib/bacon.rb +354 -0
  24. data/gems/gems/bacon-1.1.0/test/spec_bacon.rb +374 -0
  25. data/gems/gems/bacon-1.1.0/test/spec_should.rb +32 -0
  26. data/gems/gems/code-cleaner-0.8.1/LICENSE +20 -0
  27. data/gems/gems/code-cleaner-0.8.1/README.textile +87 -0
  28. data/gems/gems/code-cleaner-0.8.1/TODO.txt +1 -0
  29. data/gems/gems/code-cleaner-0.8.1/bin/code-cleaner +143 -0
  30. data/gems/gems/code-cleaner-0.8.1/code-cleaner-0.8.gem +0 -0
  31. data/gems/gems/code-cleaner-0.8.1/code-cleaner.gemspec +25 -0
  32. data/gems/gems/code-cleaner-0.8.1/support/pre-commit.erb +70 -0
  33. data/gems/gems/code-cleaner-0.8.1/tasks.rb +13 -0
  34. data/gems/gems/code-cleaner-0.8.1/tasks/code-cleaner.nake +49 -0
  35. data/gems/gems/code-cleaner-0.8.1/tasks/code-cleaner.rake +22 -0
  36. data/gems/gems/code-cleaner-0.8.1/tasks/code-cleaner.thor +35 -0
  37. data/gems/gems/nake-0.0.8/CHANGELOG +48 -0
  38. data/gems/gems/nake-0.0.8/LICENSE +20 -0
  39. data/gems/gems/nake-0.0.8/README.textile +39 -0
  40. data/gems/gems/nake-0.0.8/TODO.txt +23 -0
  41. data/gems/gems/nake-0.0.8/bin/nake +66 -0
  42. data/gems/gems/nake-0.0.8/bin/nrake +4 -0
  43. data/gems/gems/nake-0.0.8/bin/rake2nake +1 -0
  44. data/gems/gems/nake-0.0.8/bin/snake +41 -0
  45. data/gems/gems/nake-0.0.8/bm/Rakefile +28 -0
  46. data/gems/gems/nake-0.0.8/bm/bms.rb +56 -0
  47. data/gems/gems/nake-0.0.8/bm/output.txt +5 -0
  48. data/gems/gems/nake-0.0.8/bm/tasks.rb +21 -0
  49. data/gems/gems/nake-0.0.8/bm/tmp/test.c +6 -0
  50. data/gems/gems/nake-0.0.8/bm/tmp/www/index.html +1 -0
  51. data/gems/gems/nake-0.0.8/deps.rb +5 -0
  52. data/gems/gems/nake-0.0.8/deps.rip +5 -0
  53. data/gems/gems/nake-0.0.8/examples/arguments.rb +38 -0
  54. data/gems/gems/nake-0.0.8/examples/basic.rb +5 -0
  55. data/gems/gems/nake-0.0.8/examples/boot.rb +18 -0
  56. data/gems/gems/nake-0.0.8/examples/complex.rb +9 -0
  57. data/gems/gems/nake-0.0.8/examples/configuration.rb +15 -0
  58. data/gems/gems/nake-0.0.8/examples/default.rb +10 -0
  59. data/gems/gems/nake-0.0.8/examples/default_proc.rb +11 -0
  60. data/gems/gems/nake-0.0.8/examples/dependencies.rb +10 -0
  61. data/gems/gems/nake-0.0.8/examples/description.rb +33 -0
  62. data/gems/gems/nake-0.0.8/examples/file.rb +22 -0
  63. data/gems/gems/nake-0.0.8/examples/helpers.rb +3 -0
  64. data/gems/gems/nake-0.0.8/examples/invoking.rb +14 -0
  65. data/gems/gems/nake-0.0.8/examples/rules.rb +0 -0
  66. data/gems/gems/nake-0.0.8/examples/script.rb +20 -0
  67. data/gems/gems/nake-0.0.8/examples/task_arguments.rb +27 -0
  68. data/gems/gems/nake-0.0.8/features/arguments.feature +22 -0
  69. data/gems/gems/nake-0.0.8/features/basic.feature +6 -0
  70. data/gems/gems/nake-0.0.8/features/boot.feature +5 -0
  71. data/gems/gems/nake-0.0.8/features/builtin_arguments.feature +14 -0
  72. data/gems/gems/nake-0.0.8/features/complex.feature +6 -0
  73. data/gems/gems/nake-0.0.8/features/configuration.feature +10 -0
  74. data/gems/gems/nake-0.0.8/features/default.feature +10 -0
  75. data/gems/gems/nake-0.0.8/features/default_proc.feature +6 -0
  76. data/gems/gems/nake-0.0.8/features/dependencies.feature +16 -0
  77. data/gems/gems/nake-0.0.8/features/description.feature +0 -0
  78. data/gems/gems/nake-0.0.8/features/env.rb +11 -0
  79. data/gems/gems/nake-0.0.8/features/executable.feature +29 -0
  80. data/gems/gems/nake-0.0.8/features/file.feature +23 -0
  81. data/gems/gems/nake-0.0.8/features/helpers.feature +6 -0
  82. data/gems/gems/nake-0.0.8/features/invoking.feature +14 -0
  83. data/gems/gems/nake-0.0.8/features/rules.feature +0 -0
  84. data/gems/gems/nake-0.0.8/features/script.feature +10 -0
  85. data/gems/gems/nake-0.0.8/features/steps.rb +39 -0
  86. data/gems/gems/nake-0.0.8/features/task_arguments.feature +10 -0
  87. data/gems/gems/nake-0.0.8/lib/nake.rb +103 -0
  88. data/gems/gems/nake-0.0.8/lib/nake/abstract_task.rb +175 -0
  89. data/gems/gems/nake-0.0.8/lib/nake/args.rb +65 -0
  90. data/gems/gems/nake-0.0.8/lib/nake/argv.rb +47 -0
  91. data/gems/gems/nake-0.0.8/lib/nake/colors.rb +22 -0
  92. data/gems/gems/nake-0.0.8/lib/nake/dsl.rb +70 -0
  93. data/gems/gems/nake-0.0.8/lib/nake/file_task.rb +62 -0
  94. data/gems/gems/nake-0.0.8/lib/nake/helpers.rb +65 -0
  95. data/gems/gems/nake-0.0.8/lib/nake/rake.rb +38 -0
  96. data/gems/gems/nake-0.0.8/lib/nake/rule.rb +35 -0
  97. data/gems/gems/nake-0.0.8/lib/nake/struct_hash.rb +22 -0
  98. data/gems/gems/nake-0.0.8/lib/nake/task.rb +6 -0
  99. data/gems/gems/nake-0.0.8/lib/nake/tasks/bundle.rb +30 -0
  100. data/gems/gems/nake-0.0.8/lib/nake/tasks/clean.rb +12 -0
  101. data/gems/gems/nake-0.0.8/lib/nake/tasks/gem.rb +29 -0
  102. data/gems/gems/nake-0.0.8/lib/nake/tasks/release.rb +43 -0
  103. data/gems/gems/nake-0.0.8/lib/nake/tasks/rip.rb +33 -0
  104. data/gems/gems/nake-0.0.8/lib/nake/tasks/spec.rb +20 -0
  105. data/gems/gems/nake-0.0.8/lib/nake/template.rb +51 -0
  106. data/gems/gems/nake-0.0.8/nake-0.0.8.pre.gem +0 -0
  107. data/gems/gems/nake-0.0.8/nake.gemspec +42 -0
  108. data/gems/gems/nake-0.0.8/nake.pre.gemspec +8 -0
  109. data/gems/gems/nake-0.0.8/spec/nake/abstract_task_spec.rb +0 -0
  110. data/gems/gems/nake-0.0.8/spec/nake/args_spec.rb +0 -0
  111. data/gems/gems/nake-0.0.8/spec/nake/argv_spec.rb +51 -0
  112. data/gems/gems/nake-0.0.8/spec/nake/colors_spec.rb +0 -0
  113. data/gems/gems/nake-0.0.8/spec/nake/dsl_spec.rb +35 -0
  114. data/gems/gems/nake-0.0.8/spec/nake/file_task_spec.rb +0 -0
  115. data/gems/gems/nake-0.0.8/spec/nake/helpers_spec.rb +14 -0
  116. data/gems/gems/nake-0.0.8/spec/nake/rake_spec.rb +0 -0
  117. data/gems/gems/nake-0.0.8/spec/nake/rule_spec.rb +72 -0
  118. data/gems/gems/nake-0.0.8/spec/nake/struct_hash_spec.rb +0 -0
  119. data/gems/gems/nake-0.0.8/spec/nake/task_spec.rb +72 -0
  120. data/gems/gems/nake-0.0.8/spec/nake/tasks/bundle_spec.rb +28 -0
  121. data/gems/gems/nake-0.0.8/spec/nake/tasks/clean_spec.rb +0 -0
  122. data/gems/gems/nake-0.0.8/spec/nake/tasks/gem_spec.rb +0 -0
  123. data/gems/gems/nake-0.0.8/spec/nake/tasks/release_spec.rb +0 -0
  124. data/gems/gems/nake-0.0.8/spec/nake/tasks/rip_spec.rb +0 -0
  125. data/gems/gems/nake-0.0.8/spec/nake/tasks/spec_spec.rb +0 -0
  126. data/gems/gems/nake-0.0.8/spec/nake/tasks_spec.rb +48 -0
  127. data/gems/gems/nake-0.0.8/spec/nake/template_spec.rb +84 -0
  128. data/gems/gems/nake-0.0.8/spec/nake_spec.rb +9 -0
  129. data/gems/gems/nake-0.0.8/spec/spec.opts +5 -0
  130. data/gems/gems/nake-0.0.8/spec/spec_helper.rb +29 -0
  131. data/gems/gems/nake-0.0.8/spec/stubs/database.yml.erb +9 -0
  132. data/gems/gems/nake-0.0.8/spec/stubs/database.yml.tt +9 -0
  133. data/gems/gems/nake-0.0.8/tasks.rb +42 -0
  134. data/gems/gems/term-ansicolor-1.0.4/CHANGES +22 -0
  135. data/gems/gems/term-ansicolor-1.0.4/COPYING +340 -0
  136. data/gems/gems/term-ansicolor-1.0.4/README +31 -0
  137. data/gems/gems/term-ansicolor-1.0.4/Rakefile +86 -0
  138. data/gems/gems/term-ansicolor-1.0.4/VERSION +1 -0
  139. data/gems/gems/term-ansicolor-1.0.4/doc-main.txt +119 -0
  140. data/gems/gems/term-ansicolor-1.0.4/examples/cdiff.rb +19 -0
  141. data/gems/gems/term-ansicolor-1.0.4/examples/example.rb +89 -0
  142. data/gems/gems/term-ansicolor-1.0.4/install.rb +15 -0
  143. data/gems/gems/term-ansicolor-1.0.4/lib/term/ansicolor.rb +102 -0
  144. data/gems/gems/term-ansicolor-1.0.4/lib/term/ansicolor/version.rb +10 -0
  145. data/gems/gems/term-ansicolor-1.0.4/term-ansicolor.gemspec +20 -0
  146. data/gems/specifications/bacon-1.1.0.gemspec +30 -0
  147. data/gems/specifications/code-cleaner-0.8.1.gemspec +31 -0
  148. data/gems/specifications/nake-0.0.8.gemspec +35 -0
  149. data/gems/specifications/term-ansicolor-1.0.4.gemspec +30 -0
  150. data/lib/do_riak.rb +10 -0
  151. data/lib/do_riak/errors.rb +11 -0
  152. data/lib/do_riak/transaction.rb +24 -0
  153. data/lib/do_riak/version.rb +7 -0
  154. data/script/bacon +3 -0
  155. data/script/code-cleaner +3 -0
  156. data/script/nake +3 -0
  157. data/spec/command_spec.rb +8 -0
  158. data/spec/connection_spec.rb +17 -0
  159. data/spec/reader_spec.rb +8 -0
  160. data/spec/result_spec.rb +12 -0
  161. data/spec/spec_helper.rb +19 -0
  162. data/spec/typecast/array_spec.rb +8 -0
  163. data/spec/typecast/bigdecimal_spec.rb +8 -0
  164. data/spec/typecast/boolean_spec.rb +8 -0
  165. data/spec/typecast/byte_array_spec.rb +8 -0
  166. data/spec/typecast/class_spec.rb +8 -0
  167. data/spec/typecast/date_spec.rb +8 -0
  168. data/spec/typecast/datetime_spec.rb +8 -0
  169. data/spec/typecast/float_spec.rb +12 -0
  170. data/spec/typecast/integer_spec.rb +8 -0
  171. data/spec/typecast/nil_spec.rb +16 -0
  172. data/spec/typecast/other_spec.rb +8 -0
  173. data/spec/typecast/range_spec.rb +8 -0
  174. data/spec/typecast/string_spec.rb +8 -0
  175. data/spec/typecast/time_spec.rb +8 -0
  176. data/tasks.rb +37 -0
  177. metadata +238 -0
data/CHANGELOG ADDED
@@ -0,0 +1,2 @@
1
+ = Version 0.0.1
2
+ * Initial import
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # gems
2
+ gem "nake"
3
+ gem "bacon"
4
+ gem "code-cleaner"
5
+ gem "rrriak"
6
+
7
+ # settings
8
+ bin_path "script"
9
+ bundle_path "gems"
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Jakub Stastny aka botanicus
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.textile ADDED
@@ -0,0 +1,23 @@
1
+ h1. About
2
+
3
+ This is a "data objects":http://dataobjects.info adapter for "Riak":http://riak.basho.com. It's builded on top of the generic "rrriak":http://github.com/botanicus/rrriak adapter. Please note that you need Ruby 1.9.1 or higher!
4
+
5
+ Riak has HTTP REST API currently with two interfaces: *jiak* and *raw*. The Raw interface is more flexible, you don't have to create a bucket (it's what we map to a model), but our goals are reliability, validations etc rather than less code, so I picked jiak interface as it fits better for this purpose.
6
+
7
+ h1. Installation
8
+
9
+ * Prerelease: @gem install do_riak --development --prerelease@
10
+ * Stable version: @gem install do_riak --development@
11
+
12
+ h1. Usage
13
+
14
+ <pre>
15
+ connection = DataObjects::Connection.new("riak://employees")
16
+ </pre>
17
+
18
+ h1. Links
19
+
20
+ * "Source Code":http://github.com/botanicus/do_riak
21
+ * "Wiki":http://wiki.github.com/botanicus/do_riak
22
+ * "API Docs":http://rdoc.info/projects/botanicus/do_riak
23
+ * "Bug reporting":http://github.com/botanicus/do_riak/issues
data/TODO.txt ADDED
@@ -0,0 +1,4 @@
1
+ - JRuby support
2
+ - Ensure encoding works
3
+ - Link to the DO wiki
4
+ - DM Google Group
data/deps.rip ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env rip install
2
+
3
+ # Syntax:
4
+ # repository [tag or commit to install]
5
+
6
+ # TODO: how to specify a subdirectory (data_objects)?
7
+ # It seems Rip doesn't support it so far(?)
8
+ #git://github.com/datamapper/do.git
data/do_riak.gemspec ADDED
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env gem build
2
+ # encoding: utf-8
3
+
4
+ # Run ./do_riak.gemspec or gem build do_riak.gemspec
5
+ # NOTE: we can't use require_relative because when we run gem build, it use eval for executing this file
6
+ require File.join(File.dirname(__FILE__), "lib/do_riak/version")
7
+
8
+ Gem::Specification.new do |s|
9
+ s.name = "do_riak"
10
+ s.version = DataObjects::Riak::VERSION
11
+ s.authors = ["Jakub Stastny aka Botanicus"]
12
+ s.homepage = "http://github.com/botanicus/do_riak"
13
+ s.summary = "This is a data objects adapter for Riak."
14
+ s.description = "#{s.summary} It's builded on top of the generic rrriak adapter."
15
+ s.cert_chain = nil
16
+ s.email = "knava.bestvinensis@gmail.com"
17
+ s.has_rdoc = true
18
+
19
+ # files
20
+ s.files = Dir.glob("**/*") - Dir.glob("*.gem")
21
+ s.require_paths = ["lib"]
22
+
23
+ # Ruby version
24
+ s.required_ruby_version = ::Gem::Requirement.new(">= 1.9")
25
+
26
+ # runtime dependencies
27
+ s.add_dependency "data_objects"
28
+
29
+ # development dependencies
30
+ begin
31
+ require "changelog"
32
+ rescue LoadError
33
+ warn "You have to have changelog gem installed for post install message"
34
+ else
35
+ s.post_install_message = CHANGELOG.new.version_changes
36
+ end
37
+
38
+ # RubyForge
39
+ s.rubyforge_project = "do_riak"
40
+ end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env gem build
2
+ # encoding: utf-8
3
+
4
+ # You might think this is a terrible mess and guess what, you're
5
+ # right mate! However say thanks to authors of RubyGems, not me.
6
+ eval(File.read("do_riak.gemspec")).tap do |specification|
7
+ specification.version = "#{specification.version}.pre"
8
+ end
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,107 @@
1
+ # DO NOT MODIFY THIS FILE
2
+ module Bundler
3
+ file = File.expand_path(__FILE__)
4
+ dir = File.dirname(file)
5
+
6
+ ENV["PATH"] = "#{dir}/../script:#{ENV["PATH"]}"
7
+ ENV["RUBYOPT"] = "-r#{file} #{ENV["RUBYOPT"]}"
8
+
9
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/code-cleaner-0.8.1/bin")
10
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/code-cleaner-0.8.1/tasks")
11
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/term-ansicolor-1.0.4/bin")
12
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/term-ansicolor-1.0.4/lib")
13
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/nake-0.0.8/bin")
14
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/nake-0.0.8/lib")
15
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/bacon-1.1.0/bin")
16
+ $LOAD_PATH.unshift File.expand_path("#{dir}/gems/bacon-1.1.0/lib")
17
+
18
+ @gemfile = "#{dir}/../Gemfile"
19
+
20
+ require "rubygems" unless respond_to?(:gem) # 1.9 already has RubyGems loaded
21
+
22
+ @bundled_specs = {}
23
+ @bundled_specs["code-cleaner"] = eval(File.read("#{dir}/specifications/code-cleaner-0.8.1.gemspec"))
24
+ @bundled_specs["code-cleaner"].loaded_from = "#{dir}/specifications/code-cleaner-0.8.1.gemspec"
25
+ @bundled_specs["term-ansicolor"] = eval(File.read("#{dir}/specifications/term-ansicolor-1.0.4.gemspec"))
26
+ @bundled_specs["term-ansicolor"].loaded_from = "#{dir}/specifications/term-ansicolor-1.0.4.gemspec"
27
+ @bundled_specs["nake"] = eval(File.read("#{dir}/specifications/nake-0.0.8.gemspec"))
28
+ @bundled_specs["nake"].loaded_from = "#{dir}/specifications/nake-0.0.8.gemspec"
29
+ @bundled_specs["bacon"] = eval(File.read("#{dir}/specifications/bacon-1.1.0.gemspec"))
30
+ @bundled_specs["bacon"].loaded_from = "#{dir}/specifications/bacon-1.1.0.gemspec"
31
+
32
+ def self.add_specs_to_loaded_specs
33
+ Gem.loaded_specs.merge! @bundled_specs
34
+ end
35
+
36
+ def self.add_specs_to_index
37
+ @bundled_specs.each do |name, spec|
38
+ Gem.source_index.add_spec spec
39
+ end
40
+ end
41
+
42
+ add_specs_to_loaded_specs
43
+ add_specs_to_index
44
+
45
+ def self.require_env(env = nil)
46
+ context = Class.new do
47
+ def initialize(env) @env = env && env.to_s ; end
48
+ def method_missing(*) ; yield if block_given? ; end
49
+ def only(*env)
50
+ old, @only = @only, _combine_only(env.flatten)
51
+ yield
52
+ @only = old
53
+ end
54
+ def except(*env)
55
+ old, @except = @except, _combine_except(env.flatten)
56
+ yield
57
+ @except = old
58
+ end
59
+ def gem(name, *args)
60
+ opt = args.last.is_a?(Hash) ? args.pop : {}
61
+ only = _combine_only(opt[:only] || opt["only"])
62
+ except = _combine_except(opt[:except] || opt["except"])
63
+ files = opt[:require_as] || opt["require_as"] || name
64
+ files = [files] unless files.respond_to?(:each)
65
+
66
+ return unless !only || only.any? {|e| e == @env }
67
+ return if except && except.any? {|e| e == @env }
68
+
69
+ if files = opt[:require_as] || opt["require_as"]
70
+ files = Array(files)
71
+ files.each { |f| require f }
72
+ else
73
+ begin
74
+ require name
75
+ rescue LoadError
76
+ # Do nothing
77
+ end
78
+ end
79
+ yield if block_given?
80
+ true
81
+ end
82
+ private
83
+ def _combine_only(only)
84
+ return @only unless only
85
+ only = [only].flatten.compact.uniq.map { |o| o.to_s }
86
+ only &= @only if @only
87
+ only
88
+ end
89
+ def _combine_except(except)
90
+ return @except unless except
91
+ except = [except].flatten.compact.uniq.map { |o| o.to_s }
92
+ except |= @except if @except
93
+ except
94
+ end
95
+ end
96
+ context.new(env && env.to_s).instance_eval(File.read(@gemfile), @gemfile, 1)
97
+ end
98
+ end
99
+
100
+ module Gem
101
+ @loaded_stacks = Hash.new { |h,k| h[k] = [] }
102
+
103
+ def source_index.refresh!
104
+ super
105
+ Bundler.add_specs_to_index
106
+ end
107
+ end
@@ -0,0 +1,18 @@
1
+ Copyright (c) 2007, 2008 Christian Neukirchen <purl.org/net/chneukirchen>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to
5
+ deal in the Software without restriction, including without limitation the
6
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7
+ sell copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
16
+ THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
18
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,220 @@
1
+ Sat Oct 25 12:30:00 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
2
+ * De-metaprogram and document nested before/after
3
+
4
+ Fri Oct 24 17:20:17 2008 -0500 Yossef Mendelssohn <ymendel@pobox.com>
5
+ * Having higher-level after blocks also be run for nested contexts.
6
+
7
+ Fri Oct 24 17:14:30 2008 -0500 Yossef Mendelssohn <ymendel@pobox.com>
8
+ * Cleaning up setting of nested before blocks
9
+
10
+ Fri Oct 24 17:09:42 2008 -0500 Yossef Mendelssohn <ymendel@pobox.com>
11
+ * Ensuring that nested before blocks are run in the correct order
12
+
13
+ Fri Oct 24 17:06:18 2008 -0500 Yossef Mendelssohn <ymendel@pobox.com>
14
+ * Ensuring that before blocks don't bleed into sibling levels
15
+
16
+ Fri Oct 24 17:01:51 2008 -0500 Yossef Mendelssohn <ymendel@pobox.com>
17
+ * Letting before blocks be run from higher levels in nested context
18
+
19
+ Split up Context#initialize to let running be a separate step.
20
+ Added attr_reader for Context name and block to let the running step have access
21
+ to them without resorting to instance variables.
22
+
23
+ Sat Oct 4 13:38:23 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
24
+ * Move to git
25
+
26
+ Sun Aug 17 13:32:40 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
27
+ * Add option to disable backtraces
28
+
29
+ Sun Aug 17 12:48:29 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
30
+ * Don't %-expand twice in TAP output
31
+
32
+ Fri Aug 1 12:01:28 2008 +0200 jftucker <jftucker@gmail.com>
33
+ * pols-for-at-exit
34
+
35
+ Added an alias for summary_on_exit to summary_at_exit to save on POLS for some people (me!).
36
+
37
+ Sun Jul 6 18:47:42 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
38
+ * Add bacon_rspec.rb to avoid errors when .bacon doesn't exist
39
+
40
+ Sun Jul 6 18:05:13 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
41
+ * Push VERSION to 1.0
42
+
43
+ Sun Jul 6 18:04:55 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
44
+ * Small reformatting
45
+
46
+ Sun Jul 6 18:04:41 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
47
+ * Update README
48
+
49
+ Sun Jul 6 18:03:51 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
50
+ * Allow 50 lines more code
51
+
52
+ Sun Jul 6 17:46:07 2008 +0200 Christian Neukirchen <chneukirchen@gmail.com>
53
+ * Suppress warnings when the suite loads Bacon again
54
+
55
+ Wed Jun 25 13:56:34 2008 +0200 jftucker <jftucker@gmail.com>
56
+ * support spec/test subdirs for -a
57
+
58
+ Wed Jun 25 13:20:29 2008 +0200 jftucker <jftucker@gmail.com>
59
+ * support mappings for subdirs in autotest
60
+
61
+ Wed Jun 25 00:27:08 2008 +0200 jftucker <jftucker@gmail.com>
62
+ * adding autotest support
63
+
64
+ The autotest auto discovery uses bacons test/unit output.
65
+ It does not currently call specific examples (TODO).
66
+ It currently attempts to fix the rspec auto discovery by removing it if it
67
+ finds a .bacon under test/ or spec/. In fact, these are the only conditions
68
+ under which the bacon autotest will load.
69
+
70
+ Thu Mar 13 04:00:42 2008 +0100 Michael Fellinger m.fellinger@gmail.com <chneukirchen@gmail.com>
71
+ * Show exception instead of missing error if a spec is empty because of it.
72
+
73
+ Sun Mar 2 11:52:38 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
74
+ * Call after-blocks even if before-blocks or spec raise exceptions
75
+
76
+ Based on a patch by Keita Yamaguchi
77
+
78
+ Sun Mar 2 11:52:09 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
79
+ * Count failed requirements too
80
+
81
+ Sun Feb 10 18:45:24 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
82
+ * Reformats
83
+
84
+ Sun Feb 10 18:42:32 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
85
+ * Empty specifications are now erroneous
86
+
87
+ Sun Feb 10 14:49:58 2008 +0100 Michael Fellinger <m.fellinger@gmail.com>
88
+ * Improve require for lib/bacon
89
+
90
+ Wed Jan 23 23:59:40 2008 +0100 rff.rff <rff.rff@gmail.com>
91
+ * allows multiple arguments to #describe to allow specialized behaviours such as
92
+
93
+ describe Queue,'empty'
94
+ describe Queue,'full'
95
+
96
+ Some tests for this and manveru's latest patch are included
97
+
98
+ Sat Jan 19 23:07:25 2008 +0100 Michael Fellinger <m.fellinger@gmail.com>
99
+ * #to_s the argument to describe
100
+
101
+ Fri Jan 18 15:25:27 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
102
+ * Flunk if there are no arguments to #it
103
+
104
+ Mon Jan 14 01:34:44 2008 +0100 rff.rff <rff.rff@gmail.com>
105
+ * add should('foo') shortcut for it('should foo')
106
+
107
+ Mon Jan 7 20:24:04 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
108
+ * Last minute
109
+
110
+ Mon Jan 7 20:21:43 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
111
+ * Update copyright
112
+
113
+ Mon Jan 7 20:08:40 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
114
+ * Tighten code
115
+
116
+ Mon Jan 7 19:33:39 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
117
+ * Update README
118
+
119
+ Mon Jan 7 19:33:25 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
120
+ * Add bacon -o FORMAT
121
+
122
+ Mon Jan 7 19:33:07 2008 +0100 Christian Neukirchen <chneukirchen@gmail.com>
123
+ * Improve TAP output
124
+
125
+ Mon Dec 31 19:01:49 2007 +0100 Michael Fellinger <m.fellinger@gmail.com>
126
+ * behaves_like should take multiple names
127
+
128
+ Sun Dec 30 19:38:18 2007 +0100 Michael Fellinger <m.fellinger@gmail.com>
129
+ * Adding Proc#change? to check for changes on repeated calling of proc.
130
+
131
+ Fri Dec 28 12:42:04 2007 +0100 Michael Fellinger <m.fellinger@gmail.com>
132
+ * Patching for ruby 1.9.0 and removing useless spaces
133
+
134
+ Wed Dec 5 14:56:51 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
135
+ * Make code nicer
136
+
137
+ Wed Dec 5 14:48:06 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
138
+ * Fix Rakefile
139
+
140
+ Wed Dec 5 14:46:32 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
141
+ * Integrate Rakefile
142
+
143
+ Wed Dec 5 14:43:26 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
144
+ * Add Rakefile
145
+
146
+ Wed Dec 5 14:41:53 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
147
+ * Add README
148
+
149
+ Wed Dec 5 14:41:26 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
150
+ * Add copyright
151
+
152
+ Wed Dec 5 14:18:54 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
153
+ * Move #close? to Numeric
154
+
155
+ Wed Dec 5 14:11:34 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
156
+ * Add flunking
157
+
158
+ Wed Dec 5 13:42:13 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
159
+ * Allow using Object#should outside of contexts providing boolean return
160
+
161
+ Wed Dec 5 13:41:00 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
162
+ * Move summary outputter to lib/bacon.rb
163
+
164
+ Wed Dec 5 13:26:27 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
165
+ * Fix output of summary
166
+
167
+ Wed Dec 5 13:26:16 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
168
+ * Add identical_to/same_as
169
+
170
+ Wed Dec 5 02:12:24 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
171
+ * Remove debugging statements
172
+
173
+ Wed Dec 5 02:00:03 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
174
+ * Refactor tests
175
+
176
+ Wed Dec 5 01:58:08 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
177
+ * Test Context#should.{throw,raise}
178
+
179
+ Wed Dec 5 01:56:29 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
180
+ * Add should.throw
181
+
182
+ Wed Dec 5 01:49:33 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
183
+ * Implement -n and -t for filtering on context/specification names
184
+
185
+ Wed Dec 5 01:41:56 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
186
+ * Add shared contexts
187
+
188
+ Wed Dec 5 01:41:39 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
189
+ * Make directives belong to Kernel and private
190
+
191
+ Wed Dec 5 01:41:17 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
192
+ * Clear up error reporting
193
+
194
+ Wed Dec 5 01:23:27 2007 +0100 Christian Neukirchen <chneukirchen@gmail.com>
195
+ * Add TAP generator
196
+
197
+ Thu May 31 14:32:48 2007 +0200 Christian Neukirchen <chneukirchen@gmail.com>
198
+ * Set correct $?
199
+
200
+ Thu May 31 14:28:35 2007 +0200 Christian Neukirchen <chneukirchen@gmail.com>
201
+ * Add Test::Unit-like output (-q)
202
+
203
+ Thu May 31 14:18:00 2007 +0200 Christian Neukirchen <chneukirchen@gmail.com>
204
+ * Add standalone runner, bin/bacon
205
+
206
+ Thu May 31 14:17:40 2007 +0200 Christian Neukirchen <chneukirchen@gmail.com>
207
+ * Import test-suite
208
+
209
+ Thu May 31 14:17:05 2007 +0200 Christian Neukirchen <chneukirchen@gmail.com>
210
+ * Fix for testsuite
211
+
212
+ Thu May 31 14:16:25 2007 +0200 Christian Neukirchen <chneukirchen@gmail.com>
213
+ * Fix output
214
+
215
+ Wed May 30 17:50:23 2007 +0200 Christian Neukirchen <chneukirchen��@gmail.com>
216
+ * Externalize spec/req handling
217
+
218
+ Wed May 30 17:32:15 2007 +0200 Christian Neukirchen <chneukirchen��@gmail.com>
219
+ * Import Bacon, a small spec framework
220
+