stickler 2.2.4 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. data/CONTRIBUTING.md +48 -0
  2. data/{HISTORY.asciidoc → HISTORY.md} +8 -2
  3. data/Manifest.txt +86 -0
  4. data/{README.asciidoc → README.rdoc} +18 -20
  5. data/Rakefile +25 -59
  6. data/bin/stickler +10 -3
  7. data/examples/gemcutter_repo.ru +1 -2
  8. data/lib/stickler.rb +6 -2
  9. data/lib/stickler/client.rb +5 -4
  10. data/lib/stickler/client/delete.rb +50 -0
  11. data/lib/stickler/client/unyank.rb +50 -0
  12. data/lib/stickler/middleware.rb +7 -0
  13. data/lib/stickler/middleware/compression.rb +0 -2
  14. data/lib/stickler/middleware/gemcutter.rb +16 -7
  15. data/lib/stickler/middleware/helpers.rb +1 -3
  16. data/lib/stickler/middleware/index.rb +0 -8
  17. data/lib/stickler/middleware/local.rb +1 -5
  18. data/lib/stickler/middleware/mirror.rb +0 -4
  19. data/lib/stickler/middleware/not_found.rb +0 -1
  20. data/lib/stickler/repository.rb +9 -5
  21. data/lib/stickler/repository/index.rb +0 -1
  22. data/lib/stickler/repository/local.rb +12 -4
  23. data/lib/stickler/repository/null.rb +0 -1
  24. data/lib/stickler/repository/remote.rb +40 -20
  25. data/lib/stickler/repository/remote_mirror.rb +1 -1
  26. data/lib/stickler/server.rb +1 -9
  27. data/lib/stickler/server/public/css/blueprint/ie.css +35 -0
  28. data/lib/stickler/server/public/css/blueprint/screen.css +266 -0
  29. data/lib/stickler/server/public/css/style.css +19 -0
  30. data/man/stickler-passenger-config.1 +83 -0
  31. data/man/stickler-passenger-config.1.ronn +70 -0
  32. data/man/stickler-server.1 +168 -0
  33. data/man/stickler-server.1.ronn +84 -0
  34. data/man/stickler.1 +321 -0
  35. data/man/stickler.1.ronn +144 -0
  36. data/spec/data/gemcutter/gems/foo-1.0.0.gem +0 -0
  37. data/spec/middleware/local_spec.rb +1 -4
  38. data/spec/middleware/not_found_spec.rb +1 -2
  39. data/spec/paths_spec.rb +1 -3
  40. data/spec/repository/api_behavior.rb +34 -4
  41. data/spec/repository/api_spec.rb +2 -3
  42. data/spec/repository/index_spec.rb +10 -11
  43. data/spec/repository/local_spec.rb +10 -12
  44. data/spec/repository/null_spec.rb +2 -5
  45. data/spec/repository/remote_spec.rb +3 -5
  46. data/spec/spec_helper.rb +7 -2
  47. data/spec/spec_lite_spec.rb +1 -3
  48. data/tasks/default.rake +274 -0
  49. data/tasks/this.rb +209 -0
  50. metadata +142 -85
  51. data/.bnsignore +0 -14
  52. data/.gitignore +0 -23
  53. data/TODO.asciidoc +0 -6
  54. data/lib/stickler/version.rb +0 -36
  55. data/man/asciidoc.conf +0 -25
  56. data/man/stickler-passenger-config.asciidoc +0 -74
  57. data/man/stickler-server.asciidoc +0 -87
  58. data/man/stickler.asciidoc +0 -150
  59. data/tasks/asciidoc.rake +0 -32
  60. data/tasks/bundler.rake +0 -13
  61. data/tasks/contribute.rake +0 -36
  62. data/tasks/man.rake +0 -19
data/.bnsignore DELETED
@@ -1,14 +0,0 @@
1
- *~
2
- pkg
3
- log
4
- doc
5
- coverage
6
- *.swp
7
- *.swo
8
- .*.swp
9
- announcement.txt
10
- spec/tmp
11
- version.txt
12
- *.pid
13
- tmp
14
- *.html
data/.gitignore DELETED
@@ -1,23 +0,0 @@
1
- *~
2
- pkg
3
- log
4
- doc
5
- coverage
6
- *.swp
7
- *.swo
8
- .*.swp
9
- announcement.txt
10
- spec/tmp
11
- version.txt
12
- *.pid
13
- tmp
14
- *.html
15
- man/*.xml
16
- man/*.1
17
- *.gemspec
18
- work/
19
- *.css
20
- Gemfile*
21
- .rvmrc
22
- spec/data/mirror
23
- spec/data/gemcutter
@@ -1,6 +0,0 @@
1
- * Add in a full transparent proxy for automatically pullilng gems from an
2
- upstream gem server if the local gem server does not have the gem in question
3
- * There appears to be something different about evaling the specification off
4
- disk, and the loading the specification from the yaml in the .gem file. They
5
- are different. It appears that @original_platform is not set when the Ruby
6
- specification is eval'd but it is when the yaml is loaded.
@@ -1,36 +0,0 @@
1
- #--
2
- # Copyright (c) 2008 Jeremy Hinegardner
3
- # All rights reserved. Licensed under the same terms as Ruby. No warranty is
4
- # provided. See LICENSE and COPYING for details.
5
- #++
6
-
7
- module Stickler
8
-
9
- # Version access in every possibly way that people might want to get it.
10
- #
11
- module Version
12
-
13
- MAJOR = 2
14
- MINOR = 2
15
- BUILD = 4
16
-
17
- def self.to_ary
18
- [ MAJOR, MINOR, BUILD ]
19
- end
20
-
21
- def self.to_s
22
- self.to_ary.join(".")
23
- end
24
-
25
- def self.to_hash
26
- { :major => MAJOR, :minor => MINOR, :build => BUILD }
27
- end
28
-
29
- # Version string constant
30
- STRING = Version.to_s
31
-
32
- end
33
-
34
- # Version string constant
35
- VERSION = Version.to_s
36
- end
@@ -1,25 +0,0 @@
1
- ## linkstick: macro
2
- #
3
- # Usage: linkstick:command[manpage-section]
4
- #
5
- # Modelled after the linkgit macro
6
- #
7
- # {0} is the manpage section, {target} is the command
8
- #
9
- ##
10
-
11
- [macros]
12
- (?su)[\\]?(?P<name>linkstick):(?P<target>\S*?)\[(?P<attrlist>.*?)\]=
13
-
14
- ifdef::backend-docbook[]
15
- [linkstick-inlinemacro]
16
- {0%{target}}
17
- {0#<citerefentry>}
18
- {0#<refentrytitle>{target}</refentrytitle><manvolnum>{0}</manvolnum>}
19
- {0#</citerefentry>}
20
- endif::backend-docbook[]
21
-
22
- ifdef::backend-xhtml11[]
23
- [linkstick-inlinemacro]
24
- <strong><a href="{target}.html">{target}{0?({0})}</a></strong>
25
- endif::backend-xhtml11[]
@@ -1,74 +0,0 @@
1
- STICKLER-PASSENGER-CONFIG(1)
2
- ============================
3
-
4
- NAME
5
- ----
6
- stickler-passenger-config - output a Phusion Passenger config for stickler
7
-
8
-
9
- SYNOPSIS
10
- --------
11
- *stickler-passenger-config* ['--help'] ['COMMAND'] ['COMMAND_OPTIONS'] /path/to/stickler/root
12
-
13
-
14
- DESCRIPTION
15
- -----------
16
- *stickler-passenger-config* will create a stickler web application directory,
17
- including the config.ru file for use with link:http://modrails.com/[Phusion
18
- Passenger]. It will then output the stanza to be incorporated into an
19
- link:http://httpd.apache.org/[Apache] or link:http://nginx.net[Nginx]
20
- configuration.
21
-
22
-
23
- COMMANDS
24
- --------
25
- [horizontal]
26
- *apache2*:: Output an Apache config.
27
-
28
- *nginx*:: Output an Nginx config.
29
-
30
-
31
- OPTIONS
32
- -------
33
- *-h, --help*::
34
- Show the help message
35
-
36
- *-v, --version*::
37
- Output the version.
38
-
39
-
40
- EXAMPLES
41
- --------
42
- Output a passenger config for use with apache.
43
-
44
- ---------------------------------------------------
45
- stickler-passenger-config apache2 /var/lib/stickler
46
- ---------------------------------------------------
47
-
48
-
49
- Output a pasenger a config to be integrated with an nginx config.
50
- -------------------------------------------------
51
- stickler-passenger-config nginx /var/lib/stickler
52
- -------------------------------------------------
53
-
54
-
55
- SEE ALSO
56
- --------
57
- linkstick:stickler[1], linkstick:stickler-server[1]
58
-
59
-
60
- AUTHOR
61
- ------
62
- Written by Jeremy Hinegardner <jeremy@hinegardner.org>
63
-
64
-
65
- RESOURCES
66
- ---------
67
- GitHub project: http://www.github.com/copiousfreetime/stickler
68
-
69
-
70
- BUGS
71
- ----
72
- Please report bugs to the github issue tracker
73
- http://github.com/copiousfreetime/stickler/issues
74
-
@@ -1,87 +0,0 @@
1
- STICKLER-SERVER(1)
2
- ==================
3
-
4
- NAME
5
- ----
6
- stickler-server - start and stop the stickler server process
7
-
8
-
9
- SYNOPSIS
10
- --------
11
- *stickler-server* ['--help'] ['COMMAND'] ['COMMAND_OPTIONS'] /path/to/stickler/root
12
-
13
-
14
- DESCRIPTION
15
- -----------
16
- stickler-server is the daemon process that houses the repositories of
17
- proprietary gems and/or mirrors of third party gems.
18
-
19
-
20
- COMMANDS
21
- --------
22
- [horizontal]
23
- *start*:: Start the stickler server process
24
-
25
- *stop*:: Stop the stickler server process
26
-
27
-
28
- OPTIONS
29
- -------
30
- *-d, --daemonize*::
31
- Daemonize the server
32
-
33
- *--help*::
34
- Show the help message
35
-
36
- *-h, --host*='HOST'::
37
- The host address to bind to (default: 0.0.0.0)
38
-
39
- *-o, --port*='PORT'::
40
- The port to bind to (default: 6789)
41
-
42
- *-p, --pid*='PID_FILE'::
43
- Path to wriate a pid file to after daemonizing
44
-
45
- *-s, --server*='SERVER'::
46
- The rack handler to use: thin, mongrel, webrick, etc.
47
-
48
- *-v, --version*::
49
- Output the version.
50
-
51
-
52
- EXAMPLES
53
- --------
54
- Start the server, daemonized, using /var/lib/stickler as the root directory of
55
- all the repositories.
56
-
57
- ---------------------------------------------------
58
- stickler-server start --daemonize /var/lib/stickler
59
- ---------------------------------------------------
60
-
61
- Stop the server that is using /var/lib/stickler as its root directory.
62
-
63
- --------------------------------------
64
- stickler-server stop /var/lib/stickler
65
- --------------------------------------
66
-
67
-
68
- SEE ALSO
69
- --------
70
- linkstick:stickler[1], linkstick:stickler-passenger-config[1]
71
-
72
-
73
- AUTHOR
74
- ------
75
- Written by Jeremy Hinegardner <jeremy@hinegardner.org>
76
-
77
-
78
- RESOURCES
79
- ---------
80
- GitHub project: http://www.github.com/copiousfreetime/stickler
81
-
82
-
83
- BUGS
84
- ----
85
- Please report bugs to the github issue tracker
86
- http://github.com/copiousfreetime/stickler/issues
87
-
@@ -1,150 +0,0 @@
1
- STICKLER(1)
2
- ===========
3
-
4
- NAME
5
- ----
6
- stickler - command line program to interact with a stickler-server
7
-
8
-
9
- SYNOPSIS
10
- --------
11
- *stickler* ['--help'] ['COMMAND'] ['COMMAND_OPTIONS'] ['gemfile(s)']
12
-
13
-
14
- DESCRIPTION
15
- -----------
16
- Stickler is a tool to organize and maintain an internal gem repository of
17
- proprietary gems and/or a mirror of third party gems.
18
-
19
- The linkstick:stickler[1] command interacts with an instance of
20
- linkstick:stickler-server[1] to control the publishing and mirroring of ruby
21
- gems.
22
-
23
-
24
- COMMANDS
25
- --------
26
- [horizontal]
27
- *push*:: Push one or more gems to a gemserver. This works the same as `gem
28
- push` although there is no authorization mechanism.
29
-
30
- *yank*:: Remove a gem from the gemserver's index. It will still be available
31
- from direct download. This works the same as `gem yank`.
32
-
33
- *mirror*:: Pull a specific version of a gem from an upstream gem server and
34
- store it in a linkstick:stickler-server[1]
35
-
36
- *config*:: Access or update the stickler client configuration.
37
-
38
- *list*:: List all the gems in the remote repository
39
-
40
-
41
- OPTIONS
42
- -------
43
- These are the options for all commands. Not all options apply to all commands.
44
-
45
- *-a, --add*::
46
- Add the `--server` or `--upstream` items to the config file when using the
47
- `config` command.
48
-
49
- *-d, --debug*::
50
- Output debug information
51
-
52
- *-g, --gem-version*='VERSION'::
53
- The version of the gem to yank from `--server` or to mirror from
54
- `--upstream`.
55
-
56
- *-h, --help*::
57
- Show the help message
58
-
59
- *-l, --list*::
60
- Display the current configuration when using the `config` command.
61
-
62
- *-p, --platform*='PLATFORM'::
63
- The platform of the gem to yank from `--server` or to mirror from
64
- `--upstream` (e.g. ruby, java, mswin32)
65
-
66
- *-s, --server*='SERVER'::
67
- The gem server or linkstick:stickler-server[1] URL. This is used by all the commands.
68
-
69
- *-u, --upstream*='SERVER'::
70
- The upstream server from which to mirror a gem when using the `mirror` command.
71
-
72
- *-v, --version*::
73
- Output the version.
74
-
75
-
76
- CONFIGURATION
77
- -------------
78
- Stickler uses the `.gem/stickler` file to hold its configuration. It is a yaml
79
- file and Currently there are two options. These are altered using the `stickler
80
- config` command.
81
-
82
- [horizontal]
83
- *upstream*:: The default upstream server from which to mirror gems.
84
- *server*:: The default linkstick:stickler-server[1] to interact with.
85
-
86
- An example config file
87
-
88
- ------------------------------------
89
- ---
90
- :server: http://stickler.example.com
91
- :upstream: https://rubygems.org
92
- ------------------------------------
93
-
94
-
95
- EXAMPLES
96
- --------
97
- Push the local `my_gem-1.0.0.gem` file to the linkstick:stickler-server[1] at
98
- *stickler.example.com*
99
-
100
- ----------------------------------------------------------------------
101
- stickler push ./my_gem-1.0.0.gem --server http://stickler.example.com/
102
- ----------------------------------------------------------------------
103
-
104
- Push all the gems in the `pkg` directory to the linkstick:stickler-server[1] at
105
- *stickler.example.com*
106
-
107
- ----------------------------------------------------------------------
108
- stickler push --server http://stickler.example.com/ ./pkg/*.gem
109
- ----------------------------------------------------------------------
110
-
111
- Yank vesion 1.0.0 of my_gem from the gem index on sticker.example.com
112
-
113
- --------------------------------------------------------------------------
114
- stickler yank my_gem --version 1.0.0 --server http://stickler.example.com/
115
- --------------------------------------------------------------------------
116
-
117
- Take the +third_party+ gem, version +1.4.2+ that is on *rubygems.org* and mirror it
118
- on *stickler.example.com*
119
-
120
- -----------------------------------------------------------------------------------------------------------------
121
- stickler mirror third_party_gem --gem-version 0.4.2 --upstream http://rubygems.org/ --server http://stickler.example.com/
122
- stickler mirror --help
123
- -----------------------------------------------------------------------------------------------------------------
124
-
125
- Set the `server` and `upstream` configration values in the `.gem/stickler` file.
126
-
127
- ------------------------------------------------------------------------------------------
128
- stickler config --add --server http://stickler.example.com --upstream http://rubygems.org/
129
- ------------------------------------------------------------------------------------------
130
-
131
-
132
- SEE ALSO
133
- --------
134
- linkstick:stickler-server[1], linkstick:stickler-passenger-config[1]
135
-
136
-
137
- AUTHOR
138
- ------
139
- Written by Jeremy Hinegardner <jeremy@hinegardner.org>
140
-
141
-
142
- RESOURCES
143
- ---------
144
- GitHub project: http://www.github.com/copiousfreetime/stickler
145
-
146
-
147
- BUGS
148
- ----
149
- Please report bugs to the github issue tracker
150
- http://github.com/copiousfreetime/stickler/issues
@@ -1,32 +0,0 @@
1
- namespace :asciidoc do
2
-
3
- rule '.html' => '.asciidoc' do |t|
4
- sh "a2x --no-xmllint --format xhtml #{t.source}"
5
- end
6
-
7
- src = FileList["*.asciidoc", "man/*.asciidoc"]
8
- html = src.collect{ |f| f.ext( "html" ) }
9
-
10
- desc "Create html pages"
11
- task :create => html
12
-
13
- task :clobber_asciidoc do
14
- rm_f FileList["man/*.{html,xml,css}", "*.{html,xml,css}"]
15
- rm_rf FileList["asciidoc-output"]
16
- end
17
-
18
- desc "Deploy the asciidoc"
19
- task :deploy => html do
20
- FileUtils.cp "README.html", "index.html"
21
- %w[ . man ].each do |d|
22
- dest_d = File.expand_path( "asciidoc-output/#{d}" )
23
- FileUtils.mkdir dest_d unless File.directory?( dest_d )
24
- FileUtils.cp FileList["#{d}/*.{css,html}"], dest_d
25
- end
26
- sh "rsync -ravz asciidoc-output/* #{ENV['DEST_DIR']}" if ENV['DEST_DIR']
27
- end
28
- end
29
-
30
- desc "Alias to asciidoc:create"
31
- task :asciidoc => "asciidoc:create"
32
- task :clobber => %w[ asciidoc:clobber_asciidoc]