gemrage 0.3.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. data/Gemfile +1 -0
  2. data/Gemfile.lock +6 -0
  3. data/VERSION +1 -1
  4. data/gemrage.gemspec +160 -2
  5. data/lib/rubygems/commands/scan_command.rb +26 -7
  6. data/spec/spec_helper.rb +2 -1
  7. data/vendor/ruby/1.8/bin/launchy +19 -0
  8. data/vendor/ruby/1.8/bin/rake +19 -0
  9. data/vendor/ruby/1.8/cache/configuration-1.1.0.gem +0 -0
  10. data/vendor/ruby/1.8/cache/launchy-0.3.7.gem +0 -0
  11. data/vendor/ruby/1.8/cache/rake-0.8.7.gem +0 -0
  12. data/vendor/ruby/1.8/gems/configuration-1.1.0/README +197 -0
  13. data/vendor/ruby/1.8/gems/configuration-1.1.0/README.erb +69 -0
  14. data/vendor/ruby/1.8/gems/configuration-1.1.0/Rakefile +241 -0
  15. data/vendor/ruby/1.8/gems/configuration-1.1.0/config/a.rb +5 -0
  16. data/vendor/ruby/1.8/gems/configuration-1.1.0/config/b.rb +19 -0
  17. data/vendor/ruby/1.8/gems/configuration-1.1.0/config/c.rb +8 -0
  18. data/vendor/ruby/1.8/gems/configuration-1.1.0/config/d.rb +5 -0
  19. data/vendor/ruby/1.8/gems/configuration-1.1.0/config/e.rb +13 -0
  20. data/vendor/ruby/1.8/gems/configuration-1.1.0/configuration.gemspec +28 -0
  21. data/vendor/ruby/1.8/gems/configuration-1.1.0/lib/configuration.rb +199 -0
  22. data/vendor/ruby/1.8/gems/configuration-1.1.0/samples/a.rb +11 -0
  23. data/vendor/ruby/1.8/gems/configuration-1.1.0/samples/b.rb +11 -0
  24. data/vendor/ruby/1.8/gems/configuration-1.1.0/samples/c.rb +11 -0
  25. data/vendor/ruby/1.8/gems/configuration-1.1.0/samples/d.rb +14 -0
  26. data/vendor/ruby/1.8/gems/configuration-1.1.0/samples/e.rb +12 -0
  27. data/vendor/ruby/1.8/gems/launchy-0.3.7/HISTORY +71 -0
  28. data/vendor/ruby/1.8/gems/launchy-0.3.7/LICENSE +16 -0
  29. data/vendor/ruby/1.8/gems/launchy-0.3.7/README +53 -0
  30. data/vendor/ruby/1.8/gems/launchy-0.3.7/Rakefile +62 -0
  31. data/vendor/ruby/1.8/gems/launchy-0.3.7/bin/launchy +12 -0
  32. data/vendor/ruby/1.8/gems/launchy-0.3.7/gemspec.rb +41 -0
  33. data/vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/application.rb +178 -0
  34. data/vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/browser.rb +98 -0
  35. data/vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/command_line.rb +48 -0
  36. data/vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/paths.rb +53 -0
  37. data/vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/version.rb +17 -0
  38. data/vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy.rb +53 -0
  39. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/application_spec.rb +62 -0
  40. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/browser_spec.rb +58 -0
  41. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/launchy_spec.rb +18 -0
  42. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/paths_spec.rb +15 -0
  43. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/spec_helper.rb +5 -0
  44. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/tattle-host-os.yml +427 -0
  45. data/vendor/ruby/1.8/gems/launchy-0.3.7/spec/version_spec.rb +11 -0
  46. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/announce.rake +39 -0
  47. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/config.rb +107 -0
  48. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/distribution.rake +46 -0
  49. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/documentation.rake +32 -0
  50. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/rspec.rake +37 -0
  51. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/rubyforge.rake +52 -0
  52. data/vendor/ruby/1.8/gems/launchy-0.3.7/tasks/utils.rb +80 -0
  53. data/vendor/ruby/1.8/gems/rake-0.8.7/CHANGES +440 -0
  54. data/vendor/ruby/1.8/gems/rake-0.8.7/MIT-LICENSE +21 -0
  55. data/vendor/ruby/1.8/gems/rake-0.8.7/README +196 -0
  56. data/vendor/ruby/1.8/gems/rake-0.8.7/Rakefile +430 -0
  57. data/vendor/ruby/1.8/gems/rake-0.8.7/TODO +20 -0
  58. data/vendor/ruby/1.8/gems/rake-0.8.7/bin/rake +31 -0
  59. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/command_line_usage.rdoc +102 -0
  60. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/example/Rakefile1 +38 -0
  61. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/example/Rakefile2 +35 -0
  62. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/example/a.c +6 -0
  63. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/example/b.c +6 -0
  64. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/example/main.c +11 -0
  65. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/glossary.rdoc +51 -0
  66. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/jamis.rb +591 -0
  67. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/proto_rake.rdoc +127 -0
  68. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/rake.1.gz +0 -0
  69. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/rakefile.rdoc +534 -0
  70. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/rational.rdoc +151 -0
  71. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.4.14.rdoc +23 -0
  72. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.4.15.rdoc +35 -0
  73. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.5.0.rdoc +53 -0
  74. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.5.3.rdoc +78 -0
  75. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.5.4.rdoc +46 -0
  76. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.6.0.rdoc +141 -0
  77. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.0.rdoc +119 -0
  78. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.1.rdoc +59 -0
  79. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.2.rdoc +121 -0
  80. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.3.rdoc +47 -0
  81. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.0.rdoc +114 -0
  82. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.2.rdoc +165 -0
  83. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.3.rdoc +112 -0
  84. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.4.rdoc +147 -0
  85. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.5.rdoc +53 -0
  86. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.6.rdoc +55 -0
  87. data/vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.7.rdoc +55 -0
  88. data/vendor/ruby/1.8/gems/rake-0.8.7/install.rb +88 -0
  89. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/alt_system.rb +108 -0
  90. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/classic_namespace.rb +8 -0
  91. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/clean.rb +33 -0
  92. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/compositepublisher.rb +24 -0
  93. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/ftptools.rb +153 -0
  94. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/publisher.rb +75 -0
  95. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb +18 -0
  96. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/sshpublisher.rb +47 -0
  97. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/sys.rb +209 -0
  98. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/gempackagetask.rb +97 -0
  99. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/loaders/makefile.rb +42 -0
  100. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/packagetask.rb +184 -0
  101. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb +5 -0
  102. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/rdoctask.rb +209 -0
  103. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb +23 -0
  104. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/runtest.rb +23 -0
  105. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/tasklib.rb +23 -0
  106. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/testtask.rb +161 -0
  107. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/win32.rb +55 -0
  108. data/vendor/ruby/1.8/gems/rake-0.8.7/lib/rake.rb +2506 -0
  109. data/vendor/ruby/1.8/gems/rake-0.8.7/test/capture_stdout.rb +26 -0
  110. data/vendor/ruby/1.8/gems/rake-0.8.7/test/check_expansion.rb +5 -0
  111. data/vendor/ruby/1.8/gems/rake-0.8.7/test/check_no_expansion.rb +5 -0
  112. data/vendor/ruby/1.8/gems/rake-0.8.7/test/contrib/test_sys.rb +47 -0
  113. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/chains/Rakefile +15 -0
  114. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/default/Rakefile +19 -0
  115. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/dryrun/Rakefile +22 -0
  116. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/file_creation_task/Rakefile +33 -0
  117. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/imports/Rakefile +19 -0
  118. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/imports/deps.mf +1 -0
  119. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/multidesc/Rakefile +17 -0
  120. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/namespace/Rakefile +57 -0
  121. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/rakelib/test1.rb +3 -0
  122. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/rbext/rakefile.rb +3 -0
  123. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/sample.mf +14 -0
  124. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/statusreturn/Rakefile +8 -0
  125. data/vendor/ruby/1.8/gems/rake-0.8.7/test/data/unittest/Rakefile +1 -0
  126. data/vendor/ruby/1.8/gems/rake-0.8.7/test/filecreation.rb +32 -0
  127. data/vendor/ruby/1.8/gems/rake-0.8.7/test/functional.rb +15 -0
  128. data/vendor/ruby/1.8/gems/rake-0.8.7/test/in_environment.rb +30 -0
  129. data/vendor/ruby/1.8/gems/rake-0.8.7/test/rake_test_setup.rb +24 -0
  130. data/vendor/ruby/1.8/gems/rake-0.8.7/test/reqfile.rb +3 -0
  131. data/vendor/ruby/1.8/gems/rake-0.8.7/test/reqfile2.rb +3 -0
  132. data/vendor/ruby/1.8/gems/rake-0.8.7/test/session_functional.rb +339 -0
  133. data/vendor/ruby/1.8/gems/rake-0.8.7/test/shellcommand.rb +3 -0
  134. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_application.rb +675 -0
  135. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_clean.rb +14 -0
  136. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_definitions.rb +85 -0
  137. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_earlytime.rb +35 -0
  138. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_extension.rb +63 -0
  139. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_file_creation_task.rb +62 -0
  140. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_file_task.rb +143 -0
  141. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_filelist.rb +623 -0
  142. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_fileutils.rb +251 -0
  143. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_ftp.rb +59 -0
  144. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_invocation_chain.rb +81 -0
  145. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_makefile_loader.rb +26 -0
  146. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_multitask.rb +45 -0
  147. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_namespace.rb +55 -0
  148. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_package_task.rb +118 -0
  149. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_pathmap.rb +210 -0
  150. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_pseudo_status.rb +26 -0
  151. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_rake.rb +41 -0
  152. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_rdoc_task.rb +88 -0
  153. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_require.rb +35 -0
  154. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_rules.rb +349 -0
  155. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_task_arguments.rb +89 -0
  156. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_task_manager.rb +173 -0
  157. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_tasklib.rb +12 -0
  158. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_tasks.rb +374 -0
  159. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_test_task.rb +77 -0
  160. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_top_level_functions.rb +86 -0
  161. data/vendor/ruby/1.8/gems/rake-0.8.7/test/test_win32.rb +72 -0
  162. data/vendor/ruby/1.8/specifications/configuration-1.1.0.gemspec +27 -0
  163. data/vendor/ruby/1.8/specifications/launchy-0.3.7.gemspec +44 -0
  164. data/vendor/ruby/1.8/specifications/rake-0.8.7.gemspec +32 -0
  165. metadata +163 -5
data/Gemfile CHANGED
@@ -5,6 +5,7 @@ gem 'bundler', '~> 1.0.3'
5
5
  gem 'macaddr', '~> 1.0.0'
6
6
  gem 'rvm', '~> 1.0.14'
7
7
  gem 'json_pure', '~> 1.4.6', :require => 'json'
8
+ gem 'launchy', '~> 0.3.7'
8
9
 
9
10
  group :development do
10
11
  gem 'rspec', '~> 2.0.0'
data/Gemfile.lock CHANGED
@@ -1,6 +1,7 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ configuration (1.1.0)
4
5
  diff-lcs (1.1.2)
5
6
  gemcutter (0.6.1)
6
7
  git (1.2.5)
@@ -9,8 +10,12 @@ GEM
9
10
  git (>= 1.2.5)
10
11
  rubyforge (>= 2.0.0)
11
12
  json_pure (1.4.6)
13
+ launchy (0.3.7)
14
+ configuration (>= 0.0.5)
15
+ rake (>= 0.8.1)
12
16
  macaddr (1.0.0)
13
17
  mime-types (1.16)
18
+ rake (0.8.7)
14
19
  rest-client (1.6.1)
15
20
  mime-types (>= 1.16)
16
21
  rspec (2.0.0)
@@ -35,6 +40,7 @@ DEPENDENCIES
35
40
  bundler (~> 1.0.3)
36
41
  jeweler
37
42
  json_pure (~> 1.4.6)
43
+ launchy (~> 0.3.7)
38
44
  macaddr (~> 1.0.0)
39
45
  rest-client (~> 1.6.1)
40
46
  rspec (~> 2.0.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.2
1
+ 0.4.0
data/gemrage.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{gemrage}
8
- s.version = "0.3.2"
8
+ s.version = "0.4.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Daniel Huckstep"]
12
- s.date = %q{2010-10-16}
12
+ s.date = %q{2010-10-17}
13
13
  s.description = %q{Companion gem for gemrage.com}
14
14
  s.email = %q{darkhelmet@darkhelmetlive.com}
15
15
  s.files = [
@@ -33,20 +33,25 @@ Gem::Specification.new do |s|
33
33
  "vendor/ruby/1.8/bin/edit_json.rb",
34
34
  "vendor/ruby/1.8/bin/htmldiff",
35
35
  "vendor/ruby/1.8/bin/jeweler",
36
+ "vendor/ruby/1.8/bin/launchy",
36
37
  "vendor/ruby/1.8/bin/ldiff",
37
38
  "vendor/ruby/1.8/bin/prettify_json.rb",
39
+ "vendor/ruby/1.8/bin/rake",
38
40
  "vendor/ruby/1.8/bin/restclient",
39
41
  "vendor/ruby/1.8/bin/rspec",
40
42
  "vendor/ruby/1.8/bin/rubyforge",
41
43
  "vendor/ruby/1.8/bin/rvm-install",
42
44
  "vendor/ruby/1.8/cache/bundler-1.0.3.gem",
45
+ "vendor/ruby/1.8/cache/configuration-1.1.0.gem",
43
46
  "vendor/ruby/1.8/cache/diff-lcs-1.1.2.gem",
44
47
  "vendor/ruby/1.8/cache/gemcutter-0.6.1.gem",
45
48
  "vendor/ruby/1.8/cache/git-1.2.5.gem",
46
49
  "vendor/ruby/1.8/cache/jeweler-1.4.0.gem",
47
50
  "vendor/ruby/1.8/cache/json_pure-1.4.6.gem",
51
+ "vendor/ruby/1.8/cache/launchy-0.3.7.gem",
48
52
  "vendor/ruby/1.8/cache/macaddr-1.0.0.gem",
49
53
  "vendor/ruby/1.8/cache/mime-types-1.16.gem",
54
+ "vendor/ruby/1.8/cache/rake-0.8.7.gem",
50
55
  "vendor/ruby/1.8/cache/rest-client-1.6.1.gem",
51
56
  "vendor/ruby/1.8/cache/rspec-2.0.0.gem",
52
57
  "vendor/ruby/1.8/cache/rspec-core-2.0.0.gem",
@@ -190,6 +195,21 @@ Gem::Specification.new do |s|
190
195
  "vendor/ruby/1.8/gems/bundler-1.0.3/spec/update/gems_spec.rb",
191
196
  "vendor/ruby/1.8/gems/bundler-1.0.3/spec/update/git_spec.rb",
192
197
  "vendor/ruby/1.8/gems/bundler-1.0.3/spec/update/source_spec.rb",
198
+ "vendor/ruby/1.8/gems/configuration-1.1.0/README",
199
+ "vendor/ruby/1.8/gems/configuration-1.1.0/README.erb",
200
+ "vendor/ruby/1.8/gems/configuration-1.1.0/Rakefile",
201
+ "vendor/ruby/1.8/gems/configuration-1.1.0/config/a.rb",
202
+ "vendor/ruby/1.8/gems/configuration-1.1.0/config/b.rb",
203
+ "vendor/ruby/1.8/gems/configuration-1.1.0/config/c.rb",
204
+ "vendor/ruby/1.8/gems/configuration-1.1.0/config/d.rb",
205
+ "vendor/ruby/1.8/gems/configuration-1.1.0/config/e.rb",
206
+ "vendor/ruby/1.8/gems/configuration-1.1.0/configuration.gemspec",
207
+ "vendor/ruby/1.8/gems/configuration-1.1.0/lib/configuration.rb",
208
+ "vendor/ruby/1.8/gems/configuration-1.1.0/samples/a.rb",
209
+ "vendor/ruby/1.8/gems/configuration-1.1.0/samples/b.rb",
210
+ "vendor/ruby/1.8/gems/configuration-1.1.0/samples/c.rb",
211
+ "vendor/ruby/1.8/gems/configuration-1.1.0/samples/d.rb",
212
+ "vendor/ruby/1.8/gems/configuration-1.1.0/samples/e.rb",
193
213
  "vendor/ruby/1.8/gems/diff-lcs-1.1.2/ChangeLog",
194
214
  "vendor/ruby/1.8/gems/diff-lcs-1.1.2/Install",
195
215
  "vendor/ruby/1.8/gems/diff-lcs-1.1.2/README",
@@ -501,6 +521,32 @@ Gem::Specification.new do |s|
501
521
  "vendor/ruby/1.8/gems/json_pure-1.4.6/tests/test_json_unicode.rb",
502
522
  "vendor/ruby/1.8/gems/json_pure-1.4.6/tools/fuzz.rb",
503
523
  "vendor/ruby/1.8/gems/json_pure-1.4.6/tools/server.rb",
524
+ "vendor/ruby/1.8/gems/launchy-0.3.7/HISTORY",
525
+ "vendor/ruby/1.8/gems/launchy-0.3.7/LICENSE",
526
+ "vendor/ruby/1.8/gems/launchy-0.3.7/README",
527
+ "vendor/ruby/1.8/gems/launchy-0.3.7/Rakefile",
528
+ "vendor/ruby/1.8/gems/launchy-0.3.7/bin/launchy",
529
+ "vendor/ruby/1.8/gems/launchy-0.3.7/gemspec.rb",
530
+ "vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy.rb",
531
+ "vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/application.rb",
532
+ "vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/browser.rb",
533
+ "vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/command_line.rb",
534
+ "vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/paths.rb",
535
+ "vendor/ruby/1.8/gems/launchy-0.3.7/lib/launchy/version.rb",
536
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/application_spec.rb",
537
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/browser_spec.rb",
538
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/launchy_spec.rb",
539
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/paths_spec.rb",
540
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/spec_helper.rb",
541
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/tattle-host-os.yml",
542
+ "vendor/ruby/1.8/gems/launchy-0.3.7/spec/version_spec.rb",
543
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/announce.rake",
544
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/config.rb",
545
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/distribution.rake",
546
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/documentation.rake",
547
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/rspec.rake",
548
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/rubyforge.rake",
549
+ "vendor/ruby/1.8/gems/launchy-0.3.7/tasks/utils.rb",
504
550
  "vendor/ruby/1.8/gems/macaddr-1.0.0/README",
505
551
  "vendor/ruby/1.8/gems/macaddr-1.0.0/gemspec.rb",
506
552
  "vendor/ruby/1.8/gems/macaddr-1.0.0/install.rb",
@@ -517,6 +563,115 @@ Gem::Specification.new do |s|
517
563
  "vendor/ruby/1.8/gems/mime-types-1.16/setup.rb",
518
564
  "vendor/ruby/1.8/gems/mime-types-1.16/test/test_mime_type.rb",
519
565
  "vendor/ruby/1.8/gems/mime-types-1.16/test/test_mime_types.rb",
566
+ "vendor/ruby/1.8/gems/rake-0.8.7/CHANGES",
567
+ "vendor/ruby/1.8/gems/rake-0.8.7/MIT-LICENSE",
568
+ "vendor/ruby/1.8/gems/rake-0.8.7/README",
569
+ "vendor/ruby/1.8/gems/rake-0.8.7/Rakefile",
570
+ "vendor/ruby/1.8/gems/rake-0.8.7/TODO",
571
+ "vendor/ruby/1.8/gems/rake-0.8.7/bin/rake",
572
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/command_line_usage.rdoc",
573
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/example/Rakefile1",
574
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/example/Rakefile2",
575
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/example/a.c",
576
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/example/b.c",
577
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/example/main.c",
578
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/glossary.rdoc",
579
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/jamis.rb",
580
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/proto_rake.rdoc",
581
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/rake.1.gz",
582
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/rakefile.rdoc",
583
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/rational.rdoc",
584
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.4.14.rdoc",
585
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.4.15.rdoc",
586
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.5.0.rdoc",
587
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.5.3.rdoc",
588
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.5.4.rdoc",
589
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.6.0.rdoc",
590
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.0.rdoc",
591
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.1.rdoc",
592
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.2.rdoc",
593
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.7.3.rdoc",
594
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.0.rdoc",
595
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.2.rdoc",
596
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.3.rdoc",
597
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.4.rdoc",
598
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.5.rdoc",
599
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.6.rdoc",
600
+ "vendor/ruby/1.8/gems/rake-0.8.7/doc/release_notes/rake-0.8.7.rdoc",
601
+ "vendor/ruby/1.8/gems/rake-0.8.7/install.rb",
602
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake.rb",
603
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/alt_system.rb",
604
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/classic_namespace.rb",
605
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/clean.rb",
606
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/compositepublisher.rb",
607
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/ftptools.rb",
608
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/publisher.rb",
609
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/rubyforgepublisher.rb",
610
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/sshpublisher.rb",
611
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/contrib/sys.rb",
612
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/gempackagetask.rb",
613
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/loaders/makefile.rb",
614
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/packagetask.rb",
615
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb",
616
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/rdoctask.rb",
617
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/ruby182_test_unit_fix.rb",
618
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/runtest.rb",
619
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/tasklib.rb",
620
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/testtask.rb",
621
+ "vendor/ruby/1.8/gems/rake-0.8.7/lib/rake/win32.rb",
622
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/capture_stdout.rb",
623
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/check_expansion.rb",
624
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/check_no_expansion.rb",
625
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/contrib/test_sys.rb",
626
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/chains/Rakefile",
627
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/default/Rakefile",
628
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/dryrun/Rakefile",
629
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/file_creation_task/Rakefile",
630
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/imports/Rakefile",
631
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/imports/deps.mf",
632
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/multidesc/Rakefile",
633
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/namespace/Rakefile",
634
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/rakelib/test1.rb",
635
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/rbext/rakefile.rb",
636
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/sample.mf",
637
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/statusreturn/Rakefile",
638
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/data/unittest/Rakefile",
639
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/filecreation.rb",
640
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/functional.rb",
641
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/in_environment.rb",
642
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/rake_test_setup.rb",
643
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/reqfile.rb",
644
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/reqfile2.rb",
645
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/session_functional.rb",
646
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/shellcommand.rb",
647
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_application.rb",
648
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_clean.rb",
649
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_definitions.rb",
650
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_earlytime.rb",
651
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_extension.rb",
652
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_file_creation_task.rb",
653
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_file_task.rb",
654
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_filelist.rb",
655
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_fileutils.rb",
656
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_ftp.rb",
657
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_invocation_chain.rb",
658
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_makefile_loader.rb",
659
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_multitask.rb",
660
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_namespace.rb",
661
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_package_task.rb",
662
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_pathmap.rb",
663
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_pseudo_status.rb",
664
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_rake.rb",
665
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_rdoc_task.rb",
666
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_require.rb",
667
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_rules.rb",
668
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_task_arguments.rb",
669
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_task_manager.rb",
670
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_tasklib.rb",
671
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_tasks.rb",
672
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_test_task.rb",
673
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_top_level_functions.rb",
674
+ "vendor/ruby/1.8/gems/rake-0.8.7/test/test_win32.rb",
520
675
  "vendor/ruby/1.8/gems/rest-client-1.6.1/README.rdoc",
521
676
  "vendor/ruby/1.8/gems/rest-client-1.6.1/Rakefile",
522
677
  "vendor/ruby/1.8/gems/rest-client-1.6.1/VERSION",
@@ -1035,13 +1190,16 @@ Gem::Specification.new do |s|
1035
1190
  "vendor/ruby/1.8/gems/rvm-1.0.14/scripts/version",
1036
1191
  "vendor/ruby/1.8/gems/rvm-1.0.14/scripts/wrapper",
1037
1192
  "vendor/ruby/1.8/specifications/bundler-1.0.3.gemspec",
1193
+ "vendor/ruby/1.8/specifications/configuration-1.1.0.gemspec",
1038
1194
  "vendor/ruby/1.8/specifications/diff-lcs-1.1.2.gemspec",
1039
1195
  "vendor/ruby/1.8/specifications/gemcutter-0.6.1.gemspec",
1040
1196
  "vendor/ruby/1.8/specifications/git-1.2.5.gemspec",
1041
1197
  "vendor/ruby/1.8/specifications/jeweler-1.4.0.gemspec",
1042
1198
  "vendor/ruby/1.8/specifications/json_pure-1.4.6.gemspec",
1199
+ "vendor/ruby/1.8/specifications/launchy-0.3.7.gemspec",
1043
1200
  "vendor/ruby/1.8/specifications/macaddr-1.0.0.gemspec",
1044
1201
  "vendor/ruby/1.8/specifications/mime-types-1.16.gemspec",
1202
+ "vendor/ruby/1.8/specifications/rake-0.8.7.gemspec",
1045
1203
  "vendor/ruby/1.8/specifications/rest-client-1.6.1.gemspec",
1046
1204
  "vendor/ruby/1.8/specifications/rspec-2.0.0.gemspec",
1047
1205
  "vendor/ruby/1.8/specifications/rspec-core-2.0.0.gemspec",
@@ -15,15 +15,23 @@ require 'rvm'
15
15
  require 'rest-client'
16
16
  require 'json'
17
17
  require 'macaddr'
18
+ require 'launchy'
18
19
 
19
20
  class Gem::Commands::ScanCommand < Gem::Command
20
21
  include Gem::GemcutterUtilities
21
22
 
22
23
  GemrageHost = 'http://gemrage.com/'
23
- # GemrageHost = 'http://localhost:3000/'
24
24
 
25
25
  def initialize
26
26
  super('scan', description)
27
+ defaults.merge!(:host => GemrageHost, :force_basic => false)
28
+ add_option('-H', '--host HOST', 'Host to push to. Really only so we can debug') do |v, o|
29
+ o[:host] = v
30
+ end
31
+
32
+ add_option('-b', '--basic', 'Force a basic scan') do |v,o|
33
+ o[:force_basic] = true
34
+ end
27
35
  end
28
36
 
29
37
  def description
@@ -49,11 +57,15 @@ class Gem::Commands::ScanCommand < Gem::Command
49
57
  private
50
58
 
51
59
  def send_system_to_gemrage(gems)
52
- RestClient.post(URI.join(GemrageHost, '/api/v1/payload/system.json').to_s, :payload => { :header => { :machine_id => mac_hash }, :installed_gems => gems })
60
+ json = JSON.parse(RestClient.post(URI.join(options[:host], '/api/v1/payload/system.json').to_s, :payload => { :header => { :machine_id => mac_hash }, :installed_gems => gems }))
61
+ notify(json['error']) if json['error']
62
+ Launchy.open(json['location'])
53
63
  end
54
64
 
55
65
  def send_project_to_gemrage(payload)
56
- payload.to_json
66
+ json = JSON.parse(RestClient.post(URI.join(options[:host], '/api/v1/payload/system.json').to_s, :payload => { :header => { :machine_id => mac_hash }, :projects => payload }))
67
+ notify(json['error']) if json['error']
68
+ Launchy.open(json['location'])
57
69
  end
58
70
 
59
71
  def project_scan(dir)
@@ -99,9 +111,16 @@ private
99
111
  if windows? && pik?
100
112
  notify("Scanning with pik")
101
113
  pik_scan
102
- elsif !windows? && rvm?
103
- notify("Scanning with RVM...this might take a while")
104
- rvm_scan
114
+ elsif !windows? && rvm? && !options[:force_basic]
115
+ if :jruby == platform
116
+ notify("You are using jRuby and have RVM. Oh boy...",
117
+ "We'd like to make use of RVM, but using RVM from jRuby is...interesting.",
118
+ "We'll just do a basic scan, and you can rescan using a non-jRuby VM if you want RVM support.")
119
+ basic_scan
120
+ else
121
+ notify("Scanning with RVM...this might take a while")
122
+ rvm_scan
123
+ end
105
124
  else
106
125
  notify("Scanning with basic gem support")
107
126
  basic_scan
@@ -252,4 +271,4 @@ private
252
271
  print(*messages)
253
272
  print("\n")
254
273
  end
255
- end
274
+ end
data/spec/spec_helper.rb CHANGED
@@ -9,7 +9,8 @@ Spec::Runner.configure do |config|
9
9
  @valid_user_attr = {
10
10
  :email => 'support@gemrage.com',
11
11
  :password => 'password',
12
- :password_confirmation => 'password'
12
+ :password_confirmation => 'password',
13
+ :handle => 'support'
13
14
  }
14
15
 
15
16
 
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by RubyGems.
4
+ #
5
+ # The application 'launchy' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'rubygems'
10
+
11
+ version = ">= 0"
12
+
13
+ if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
14
+ version = $1
15
+ ARGV.shift
16
+ end
17
+
18
+ gem 'launchy', version
19
+ load Gem.bin_path('launchy', 'launchy', version)
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by RubyGems.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'rubygems'
10
+
11
+ version = ">= 0"
12
+
13
+ if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
14
+ version = $1
15
+ ARGV.shift
16
+ end
17
+
18
+ gem 'rake', version
19
+ load Gem.bin_path('rake', 'rake', version)
@@ -0,0 +1,197 @@
1
+ NAME
2
+ configuration.rb
3
+
4
+ SYNOPSIS
5
+ pure ruby scoped configuration files
6
+
7
+ DESCRIPTION
8
+ configuration.rb provides a mechanism for configuring ruby programs with
9
+ ruby configuration files. a configuration.rb file, for example
10
+ 'config/app.rb', can be written simply as
11
+
12
+ Configuration.for('app'){
13
+ key 'value'
14
+ foo 'bar'
15
+ port 42
16
+ }
17
+
18
+ and loaded via the normal ruby require/load mechanism
19
+
20
+ Kernel.load 'config/app.rb'
21
+
22
+ or with a slightly augmented loading mechnanism which simply searches an
23
+ extra set of paths in *addition* to the standard ones
24
+
25
+ Configuration.path = %w( config configuration )
26
+
27
+ Configuration.load 'app'
28
+
29
+ configurations are completely open
30
+
31
+ Configuration.for('app'){
32
+ object_id 'very open'
33
+ }
34
+
35
+ support arbitrarily nested values
36
+
37
+ Configuration.for('app'){
38
+ a { b { c { d 42 } } }
39
+ }
40
+
41
+ c = Configuration.for 'app'
42
+
43
+ p c.a.b.c.d #=> 42
44
+
45
+ allow POLS scoped lookup of vars
46
+
47
+ Configuration.for('config'){
48
+ outer 'bar'
49
+
50
+ inner {
51
+ value 42
52
+ }
53
+ }
54
+
55
+ c = Configuration.for 'config'
56
+
57
+ p c.outer #=> 'bar'
58
+ p c.inner.value #=> 42
59
+ p c.inner.outer #=> 'bar'
60
+
61
+
62
+ and not a whole lot else - configuration.rb is s very small library
63
+ consisting of one file and < 150 loc
64
+
65
+ SAMPLES
66
+
67
+ <========< samples/a.rb >========>
68
+
69
+ ~ > cat samples/a.rb
70
+
71
+ #
72
+ # basic usage is quite, simple, load the config and use it's values. the
73
+ # config syntax is fairly obvious, i think, but note that it *is* ruby and any
74
+ # ruby can be included. also note that each config is named, allowing
75
+ # multiple configs to be places in one file
76
+ #
77
+ require 'configuration'
78
+
79
+ c = Configuration.load 'a'
80
+
81
+ p c.a + c.b - c.c
82
+
83
+ ~ > ruby samples/a.rb
84
+
85
+ 42
86
+
87
+
88
+ <========< samples/b.rb >========>
89
+
90
+ ~ > cat samples/b.rb
91
+
92
+ #
93
+ # configuration.rb supports a very natural nesting syntax. note how values
94
+ # are scoped in a POLS fashion
95
+ #
96
+ require 'configuration'
97
+
98
+ c = Configuration.for 'b'
99
+
100
+ p c.www.url
101
+ p c.db.url
102
+ p c.mail.url
103
+
104
+ ~ > ruby samples/b.rb
105
+
106
+ "http://codeforpeople.com:80"
107
+ "db://codeforpeople.com:5342"
108
+ "mail://gmail.com:25"
109
+
110
+
111
+ <========< samples/c.rb >========>
112
+
113
+ ~ > cat samples/c.rb
114
+
115
+ #
116
+ # configuration.rb let's you keep code very dry.
117
+ #
118
+
119
+ require 'configuration'
120
+
121
+ Configuration.load 'c'
122
+
123
+ p Configuration.for('development').db
124
+ p Configuration.for('production').db
125
+ p Configuration.for('testing').db
126
+
127
+ ~ > ruby samples/c.rb
128
+
129
+ "db/development"
130
+ "db/production"
131
+ "db/testing"
132
+
133
+
134
+ <========< samples/d.rb >========>
135
+
136
+ ~ > cat samples/d.rb
137
+
138
+ #
139
+ # configuration.rb makes use of an external blank slate dsl, this means that
140
+ # you Configuration objects do, in fact, have all built-in ruby methods such
141
+ # as #inspect, etc, *unless* you configure over the top of them. the effect
142
+ # is a configuration object that behaves like a nice ruby object, but which
143
+ # allows *any* key to be configured
144
+ #
145
+ require 'configuration'
146
+
147
+ c = Configuration.for 'd'
148
+
149
+ p c.object_id
150
+ p c.inspect
151
+ p c.p
152
+
153
+ ~ > ruby samples/d.rb
154
+
155
+ config/d.rb:2:in `object_id': wrong number of arguments (1 for 0) (ArgumentError)
156
+ from config/d.rb:2
157
+ from ./lib/configuration.rb:159:in `instance_eval'
158
+ from ./lib/configuration.rb:159:in `call'
159
+ from ./lib/configuration.rb:159:in `method_missing'
160
+ from ./lib/configuration.rb:105:in `evaluate'
161
+ from ./lib/configuration.rb:68:in `initialize'
162
+ from ./lib/configuration.rb:29:in `new'
163
+ from ./lib/configuration.rb:29:in `for'
164
+ from config/d.rb:1
165
+ from ./lib/configuration.rb:53:in `load'
166
+ from ./lib/configuration.rb:53:in `load'
167
+ from ./lib/configuration.rb:31:in `for'
168
+ from samples/d.rb:10
169
+
170
+
171
+ <========< samples/e.rb >========>
172
+
173
+ ~ > cat samples/e.rb
174
+
175
+ #
176
+ # configuration.rb uses a totally clean slate dsl for the block. if you need
177
+ # to access base Object methods you can do this
178
+ #
179
+
180
+ require 'configuration'
181
+
182
+ c = Configuration.for 'e'
183
+
184
+ p c.foo
185
+ p c.bar
186
+ p c.foobar
187
+
188
+ ~ > ruby samples/e.rb
189
+
190
+ 42
191
+ "forty-two"
192
+ 42.0
193
+
194
+
195
+
196
+ AUTHOR
197
+ ara.t.howard@gmail.com
@@ -0,0 +1,69 @@
1
+ NAME
2
+ configuration.rb
3
+
4
+ SYNOPSIS
5
+ pure ruby scoped configuration files
6
+
7
+ DESCRIPTION
8
+ configuration.rb provides a mechanism for configuring ruby programs with
9
+ ruby configuration files. a configuration.rb file, for example
10
+ 'config/app.rb', can be written simply as
11
+
12
+ Configuration.for('app'){
13
+ key 'value'
14
+ foo 'bar'
15
+ port 42
16
+ }
17
+
18
+ and loaded via the normal ruby require/load mechanism
19
+
20
+ Kernel.load 'config/app.rb'
21
+
22
+ or with a slightly augmented loading mechnanism which simply searches an
23
+ extra set of paths in *addition* to the standard ones
24
+
25
+ Configuration.path = %w( config configuration )
26
+
27
+ Configuration.load 'app'
28
+
29
+ configurations are completely open
30
+
31
+ Configuration.for('app'){
32
+ object_id 'very open'
33
+ }
34
+
35
+ support arbitrarily nested values
36
+
37
+ Configuration.for('app'){
38
+ a { b { c { d 42 } } }
39
+ }
40
+
41
+ c = Configuration.for 'app'
42
+
43
+ p c.a.b.c.d #=> 42
44
+
45
+ allow POLS scoped lookup of vars
46
+
47
+ Configuration.for('config'){
48
+ outer 'bar'
49
+
50
+ inner {
51
+ value 42
52
+ }
53
+ }
54
+
55
+ c = Configuration.for 'config'
56
+
57
+ p c.outer #=> 'bar'
58
+ p c.inner.value #=> 42
59
+ p c.inner.outer #=> 'bar'
60
+
61
+
62
+ and not a whole lot else - configuration.rb is s very small library
63
+ consisting of one file and < 150 loc
64
+
65
+ SAMPLES
66
+ <%= samples %>
67
+
68
+ AUTHOR
69
+ ara.t.howard@gmail.com