stickler 0.1.1 → 2.0.0a

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/HISTORY.rdoc +5 -2
  2. data/Rakefile +31 -0
  3. data/examples/config.ru +9 -0
  4. data/examples/gemcutter_repo.ru +19 -0
  5. data/examples/index_repo.ru +15 -0
  6. data/examples/local_repo.ru +14 -0
  7. data/examples/mirror_repo.ru +16 -0
  8. data/examples/not_found.ru +8 -0
  9. data/lib/stickler/error.rb +3 -0
  10. data/lib/stickler/middleware/compression.rb +30 -0
  11. data/lib/stickler/middleware/gemcutter.rb +62 -0
  12. data/lib/stickler/middleware/helpers.rb +84 -0
  13. data/lib/stickler/middleware/index.rb +137 -0
  14. data/lib/stickler/middleware/local.rb +38 -0
  15. data/lib/stickler/middleware/mirror.rb +60 -0
  16. data/lib/stickler/middleware/not_found.rb +62 -0
  17. data/lib/stickler/middleware.rb +4 -0
  18. data/lib/stickler/repository/api.rb +167 -0
  19. data/lib/stickler/repository/index.rb +97 -0
  20. data/lib/stickler/repository/local.rb +251 -0
  21. data/lib/stickler/repository/mirror.rb +48 -0
  22. data/lib/stickler/repository/null.rb +58 -0
  23. data/lib/stickler/repository/remote.rb +235 -0
  24. data/lib/stickler/repository.rb +7 -499
  25. data/lib/stickler/spec_lite.rb +60 -14
  26. data/lib/stickler/version.rb +6 -6
  27. data/lib/stickler/web.rb +19 -0
  28. data/spec/data/gems/bar-1.0.0.gem +0 -0
  29. data/spec/data/gems/foo-1.0.0.gem +0 -0
  30. data/spec/data/specifications/bar-1.0.0.gemspec +31 -0
  31. data/spec/data/specifications/foo-1.0.0.gemspec +31 -0
  32. data/spec/middleware/common_gem_server_helpers.rb +67 -0
  33. data/spec/middleware/index_spec.rb +26 -0
  34. data/spec/middleware/legacy_gem_server_behavior.rb +33 -0
  35. data/spec/middleware/local_spec.rb +25 -0
  36. data/spec/middleware/modern_gem_server_behavior.rb +20 -0
  37. data/spec/middleware/not_found_spec.rb +25 -0
  38. data/spec/repository/api_behavior.rb +162 -0
  39. data/spec/repository/api_spec.rb +38 -0
  40. data/spec/repository/index_spec.rb +32 -0
  41. data/spec/repository/local_spec.rb +36 -0
  42. data/spec/repository/null_spec.rb +17 -0
  43. data/spec/repository/remote_spec.rb +49 -0
  44. data/spec/spec.opts +2 -0
  45. data/spec/spec_helper.rb +15 -3
  46. data/spec/spec_lite_spec.rb +62 -0
  47. data/stickler.gemspec +60 -0
  48. data/views/index.erb +19 -0
  49. data/views/layout.erb +39 -0
  50. metadata +93 -63
  51. data/COPYING +0 -339
  52. data/bin/stickler +0 -58
  53. data/data/stickler.yml +0 -14
  54. data/gemspec.rb +0 -62
  55. data/lib/stickler/cli.rb +0 -302
  56. data/lib/stickler/configuration.rb +0 -74
  57. data/lib/stickler/console.rb +0 -72
  58. data/lib/stickler/paths.rb +0 -62
  59. data/lib/stickler/source.rb +0 -75
  60. data/lib/stickler/source_group.rb +0 -365
  61. data/lib/stickler.rb +0 -19
  62. data/spec/configuration_spec.rb +0 -68
  63. data/spec/paths_spec.rb +0 -25
  64. data/spec/repository_spec.rb +0 -55
  65. data/spec/version_spec.rb +0 -17
  66. data/tasks/announce.rake +0 -39
  67. data/tasks/config.rb +0 -107
  68. data/tasks/distribution.rake +0 -45
  69. data/tasks/documentation.rake +0 -31
  70. data/tasks/rspec.rake +0 -29
  71. data/tasks/rubyforge.rake +0 -51
  72. data/tasks/utils.rb +0 -80
data/stickler.gemspec ADDED
@@ -0,0 +1,60 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{stickler}
5
+ s.version = "0.0.1"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Jeremy Hinegardner"]
9
+ s.date = %q{2010-06-29}
10
+ s.description = %q{Stickler is a tool to organize and maintain an internal gem repository.
11
+
12
+ At times it is useful to have complete control over the availability of the gems
13
+ for you testing, staging and production environments. In these cases you
14
+ probably do not want to accidentally type 'gem update' and get a new untested
15
+ version of a gem installed on your machines. This is where Stickler helps.
16
+
17
+ Configure stickler with the the names and versions of the gems you require for
18
+ your deployment and it will organize and setup everything that is necessary for
19
+ a standard web server to function as your internal gem distribution server.}
20
+ s.email = %q{jeremy@hinegardner.org}
21
+ s.extra_rdoc_files = ["HISTORY.rdoc", "README.rdoc"]
22
+ s.files = ["HISTORY.rdoc", "LICENSE", "README.rdoc", "Rakefile", "examples/config.ru", "examples/gemcutter_repo.ru", "examples/index_repo.ru", "examples/local_repo.ru", "examples/mirror_repo.ru", "examples/not_found.ru", "lib/stickler/error.rb", "lib/stickler/middleware.rb", "lib/stickler/middleware/compression.rb", "lib/stickler/middleware/gemcutter.rb", "lib/stickler/middleware/helpers.rb", "lib/stickler/middleware/index.rb", "lib/stickler/middleware/local.rb", "lib/stickler/middleware/mirror.rb", "lib/stickler/middleware/not_found.rb", "lib/stickler/repository.rb", "lib/stickler/repository/api.rb", "lib/stickler/repository/index.rb", "lib/stickler/repository/local.rb", "lib/stickler/repository/mirror.rb", "lib/stickler/repository/null.rb", "lib/stickler/repository/remote.rb", "lib/stickler/spec_lite.rb", "lib/stickler/version.rb", "lib/stickler/web.rb", "spec/data/gems/bar-1.0.0.gem", "spec/data/gems/foo-1.0.0.gem", "spec/data/specifications/bar-1.0.0.gemspec", "spec/data/specifications/foo-1.0.0.gemspec", "spec/middleware/common_gem_server_helpers.rb", "spec/middleware/index_spec.rb", "spec/middleware/legacy_gem_server_behavior.rb", "spec/middleware/local_spec.rb", "spec/middleware/modern_gem_server_behavior.rb", "spec/middleware/not_found_spec.rb", "spec/repository/api_behavior.rb", "spec/repository/api_spec.rb", "spec/repository/index_spec.rb", "spec/repository/local_spec.rb", "spec/repository/null_spec.rb", "spec/repository/remote_spec.rb", "spec/spec.opts", "spec/spec_helper.rb", "spec/spec_lite_spec.rb", "views/index.erb", "views/layout.erb"]
23
+ s.homepage = %q{http://rubygems.org/gems/stickler}
24
+ s.rdoc_options = ["--main", "README.rdoc"]
25
+ s.require_paths = ["lib"]
26
+ s.rubyforge_project = %q{copiousfreetime}
27
+ s.rubygems_version = %q{1.3.5}
28
+ s.summary = %q{Stickler is a tool to organize and maintain an internal gem repository}
29
+
30
+ if s.respond_to? :specification_version then
31
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
32
+ s.specification_version = 3
33
+
34
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
35
+ s.add_runtime_dependency(%q<sinatra>, ["~> 1.0.0"])
36
+ s.add_runtime_dependency(%q<addressable>, ["~> 2.1.2"])
37
+ s.add_runtime_dependency(%q<resourceful>, ["~> 1.0.1"])
38
+ s.add_development_dependency(%q<bones>, ["~> 3.4.6"])
39
+ s.add_development_dependency(%q<rack-test>, ["~> 0.5.4"])
40
+ s.add_development_dependency(%q<bones-extras>, ["~> 1.2.4"])
41
+ s.add_development_dependency(%q<bones>, [">= 3.4.6"])
42
+ else
43
+ s.add_dependency(%q<sinatra>, ["~> 1.0.0"])
44
+ s.add_dependency(%q<addressable>, ["~> 2.1.2"])
45
+ s.add_dependency(%q<resourceful>, ["~> 1.0.1"])
46
+ s.add_dependency(%q<bones>, ["~> 3.4.6"])
47
+ s.add_dependency(%q<rack-test>, ["~> 0.5.4"])
48
+ s.add_dependency(%q<bones-extras>, ["~> 1.2.4"])
49
+ s.add_dependency(%q<bones>, [">= 3.4.6"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<sinatra>, ["~> 1.0.0"])
53
+ s.add_dependency(%q<addressable>, ["~> 2.1.2"])
54
+ s.add_dependency(%q<resourceful>, ["~> 1.0.1"])
55
+ s.add_dependency(%q<bones>, ["~> 3.4.6"])
56
+ s.add_dependency(%q<rack-test>, ["~> 0.5.4"])
57
+ s.add_dependency(%q<bones-extras>, ["~> 1.2.4"])
58
+ s.add_dependency(%q<bones>, [">= 3.4.6"])
59
+ end
60
+ end
data/views/index.erb ADDED
@@ -0,0 +1,19 @@
1
+ <div id="header">
2
+ <h1>Available Gems</h1>
3
+ </div>
4
+ <table class="gem" summary="This table is a list of the available gems.">
5
+ <thead>
6
+ <tr>
7
+ <th>Gem name</th>
8
+ <th>Version</th>
9
+ </tr>
10
+ </thead>
11
+ <tfoot></tfoot>
12
+ <tbody>
13
+ <% @repo.specs.sort_by { |spec| spec.full_name }.each_with_index do |spec, idx| %>
14
+ <tr class="<%= %w[ red grey ][idx % 2]%>">
15
+ <td><a href="/gems/<%= spec.file_name %>"><%= spec.name %></a></td>
16
+ <td align="right"><%= spec.version %></td>
17
+ </tr>
18
+ <% end %>
19
+ </table>
data/views/layout.erb ADDED
@@ -0,0 +1,39 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
3
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
+
5
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
6
+ <head>
7
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
+ <style type="text/css" media="screen">
9
+ * { margin: 0; padding: 0; border: 0; outline: 0; }
10
+ div.clear { clear: both; }
11
+ body { background: #eeeeee; margin: 0; padding: 0; }
12
+ #wrap { width: 1000px; margin: 0 auto; padding: 30px 50px 20px 50px;
13
+ background: #fff; border-left: 1px solid #DDD;
14
+ border-right: 1px solid #DDD; }
15
+ #header { margin: 0 auto 25px auto; }
16
+ h1 { margin: 0; font-size: 36px; color: #981919; text-align: center; }
17
+ h2 { margin: 0; font-size: 22px; color: #333333; }
18
+ table.gem { width: 980px; text-align: left; font-size: 12px;
19
+ color: #666666; padding: 0; border-spacing: 0;
20
+ border: 1px solid #EEEEEE; border-bottom: 0;
21
+ border-left: 0;
22
+ clear:both;}
23
+ table.gem tr th { padding: 2px 10px; font-weight: bold;
24
+ font-size: 22px; background: #f7f7f7; text-align: center;
25
+ border-left: 1px solid #eeeeee;
26
+ border-bottom: 1px solid #eeeeee; }
27
+ table.gem tr td { padding: 2px 20px 2px 10px;
28
+ border-bottom: 1px solid #eeeeee;
29
+ border-left: 1px solid #eeeeee; }
30
+
31
+ </style>
32
+ <title>Stickler</title>
33
+ </head>
34
+ <body>
35
+ <div id="wrap">
36
+ <%= yield %>
37
+ </div>
38
+ </body>
39
+ </html>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stickler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 2.0.0a
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Hinegardner
@@ -9,126 +9,156 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-10-12 00:00:00 -06:00
12
+ date: 2010-06-29 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: highline
16
+ name: sinatra
17
17
  type: :runtime
18
18
  version_requirement:
19
19
  version_requirements: !ruby/object:Gem::Requirement
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: "1.4"
23
+ version: 1.0.0
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
- name: logging
26
+ name: addressable
27
27
  type: :runtime
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: "0.9"
33
+ version: 2.1.2
34
34
  version:
35
35
  - !ruby/object:Gem::Dependency
36
- name: main
36
+ name: resourceful
37
37
  type: :runtime
38
38
  version_requirement:
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - ~>
42
42
  - !ruby/object:Gem::Version
43
- version: "2.8"
43
+ version: 1.0.1
44
44
  version:
45
45
  - !ruby/object:Gem::Dependency
46
- name: rake
46
+ name: bones
47
47
  type: :development
48
48
  version_requirement:
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ~>
52
52
  - !ruby/object:Gem::Version
53
- version: "0.8"
53
+ version: 3.4.6
54
54
  version:
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: rack-test
57
57
  type: :development
58
58
  version_requirement:
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
61
  - - ~>
62
62
  - !ruby/object:Gem::Version
63
- version: "1.1"
63
+ version: 0.5.4
64
64
  version:
65
65
  - !ruby/object:Gem::Dependency
66
- name: configuration
66
+ name: bones-extras
67
67
  type: :development
68
68
  version_requirement:
69
69
  version_requirements: !ruby/object:Gem::Requirement
70
70
  requirements:
71
71
  - - ~>
72
72
  - !ruby/object:Gem::Version
73
- version: "0.0"
73
+ version: 1.2.4
74
74
  version:
75
- description: Stickler is a tool to organize and maintain an internal gem repository. At times it is useful to have complete control over the availability of the gems for you testing, staging and production environments. In these cases you probably do not want to accidentally type 'gem update' and get a new untested version of a gem installed on your machines. This is where Stickler helps. Configure stickler with the the names and versions of the gems you require for your deployment and it will organize and setup everything that is necessary for a standard web server to function as your internal gem distribution server.
76
- email: jeremy at copiousfreetime dot org
77
- executables:
78
- - stickler
75
+ - !ruby/object:Gem::Dependency
76
+ name: bones
77
+ type: :development
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: 3.4.6
84
+ version:
85
+ description: |-
86
+ Stickler is a tool to organize and maintain an internal gem repository.
87
+
88
+ At times it is useful to have complete control over the availability of the gems
89
+ for you testing, staging and production environments. In these cases you
90
+ probably do not want to accidentally type 'gem update' and get a new untested
91
+ version of a gem installed on your machines. This is where Stickler helps.
92
+
93
+ Configure stickler with the the names and versions of the gems you require for
94
+ your deployment and it will organize and setup everything that is necessary for
95
+ a standard web server to function as your internal gem distribution server.
96
+ email: jeremy@hinegardner.org
97
+ executables: []
98
+
79
99
  extensions: []
80
100
 
81
101
  extra_rdoc_files:
102
+ - HISTORY.rdoc
82
103
  - README.rdoc
104
+ files:
83
105
  - HISTORY.rdoc
84
106
  - LICENSE
85
- - COPYING
86
- - lib/stickler/cli.rb
87
- - lib/stickler/configuration.rb
88
- - lib/stickler/console.rb
89
- - lib/stickler/paths.rb
90
- - lib/stickler/repository.rb
91
- - lib/stickler/source.rb
92
- - lib/stickler/source_group.rb
93
- - lib/stickler/spec_lite.rb
94
- - lib/stickler/version.rb
95
- - lib/stickler.rb
96
- files:
97
- - bin/stickler
98
- - lib/stickler/cli.rb
99
- - lib/stickler/configuration.rb
100
- - lib/stickler/console.rb
101
- - lib/stickler/paths.rb
107
+ - README.rdoc
108
+ - Rakefile
109
+ - examples/config.ru
110
+ - examples/gemcutter_repo.ru
111
+ - examples/index_repo.ru
112
+ - examples/local_repo.ru
113
+ - examples/mirror_repo.ru
114
+ - examples/not_found.ru
115
+ - lib/stickler/error.rb
116
+ - lib/stickler/middleware.rb
117
+ - lib/stickler/middleware/compression.rb
118
+ - lib/stickler/middleware/gemcutter.rb
119
+ - lib/stickler/middleware/helpers.rb
120
+ - lib/stickler/middleware/index.rb
121
+ - lib/stickler/middleware/local.rb
122
+ - lib/stickler/middleware/mirror.rb
123
+ - lib/stickler/middleware/not_found.rb
102
124
  - lib/stickler/repository.rb
103
- - lib/stickler/source.rb
104
- - lib/stickler/source_group.rb
125
+ - lib/stickler/repository/api.rb
126
+ - lib/stickler/repository/index.rb
127
+ - lib/stickler/repository/local.rb
128
+ - lib/stickler/repository/mirror.rb
129
+ - lib/stickler/repository/null.rb
130
+ - lib/stickler/repository/remote.rb
105
131
  - lib/stickler/spec_lite.rb
106
132
  - lib/stickler/version.rb
107
- - lib/stickler.rb
108
- - spec/configuration_spec.rb
109
- - spec/paths_spec.rb
110
- - spec/repository_spec.rb
133
+ - lib/stickler/web.rb
134
+ - spec/data/gems/bar-1.0.0.gem
135
+ - spec/data/gems/foo-1.0.0.gem
136
+ - spec/data/specifications/bar-1.0.0.gemspec
137
+ - spec/data/specifications/foo-1.0.0.gemspec
138
+ - spec/middleware/common_gem_server_helpers.rb
139
+ - spec/middleware/index_spec.rb
140
+ - spec/middleware/legacy_gem_server_behavior.rb
141
+ - spec/middleware/local_spec.rb
142
+ - spec/middleware/modern_gem_server_behavior.rb
143
+ - spec/middleware/not_found_spec.rb
144
+ - spec/repository/api_behavior.rb
145
+ - spec/repository/api_spec.rb
146
+ - spec/repository/index_spec.rb
147
+ - spec/repository/local_spec.rb
148
+ - spec/repository/null_spec.rb
149
+ - spec/repository/remote_spec.rb
150
+ - spec/spec.opts
111
151
  - spec/spec_helper.rb
112
- - spec/version_spec.rb
113
- - data/stickler.yml
114
- - README.rdoc
115
- - HISTORY.rdoc
116
- - LICENSE
117
- - COPYING
118
- - tasks/announce.rake
119
- - tasks/distribution.rake
120
- - tasks/documentation.rake
121
- - tasks/rspec.rake
122
- - tasks/rubyforge.rake
123
- - tasks/config.rb
124
- - tasks/utils.rb
125
- - gemspec.rb
152
+ - spec/spec_lite_spec.rb
153
+ - stickler.gemspec
154
+ - views/index.erb
155
+ - views/layout.erb
126
156
  has_rdoc: true
127
- homepage: http://copiousfreetime.rubyforge.org/stickler
128
- post_install_message: " ============================================================\n \n Thank you for installing Stickler!\n\n * Create a new stickler repository:\n stickler setup /path/to/repo\n\n * Look at the help:\n stickler help\n\n ============================================================\n"
157
+ homepage: http://rubygems.org/gems/stickler
158
+ licenses: []
159
+
160
+ post_install_message:
129
161
  rdoc_options:
130
- - --line-numbers
131
- - --inline-source
132
162
  - --main
133
163
  - README.rdoc
134
164
  require_paths:
@@ -141,16 +171,16 @@ required_ruby_version: !ruby/object:Gem::Requirement
141
171
  version:
142
172
  required_rubygems_version: !ruby/object:Gem::Requirement
143
173
  requirements:
144
- - - ">="
174
+ - - ">"
145
175
  - !ruby/object:Gem::Version
146
- version: 1.2.0
176
+ version: 1.3.1
147
177
  version:
148
178
  requirements: []
149
179
 
150
180
  rubyforge_project: copiousfreetime
151
- rubygems_version: 1.2.0
181
+ rubygems_version: 1.3.5
152
182
  signing_key:
153
- specification_version: 2
183
+ specification_version: 3
154
184
  summary: Stickler is a tool to organize and maintain an internal gem repository
155
185
  test_files: []
156
186