RuPac 0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. data/doc/classes/RuPacRemove.html +127 -0
  2. data/doc/classes/RuPacRemove/PacRemove.html +473 -0
  3. data/doc/classes/RuPacRemove/PacRemove.src/M000008.html +18 -0
  4. data/doc/classes/RuPacRemove/PacRemove.src/M000009.html +24 -0
  5. data/doc/classes/RuPacRemove/PacRemove.src/M000010.html +24 -0
  6. data/doc/classes/RuPacRemove/PacRemove.src/M000011.html +24 -0
  7. data/doc/classes/RuPacRemove/PacRemove.src/M000012.html +24 -0
  8. data/doc/classes/RuPacRemove/PacRemove.src/M000013.html +24 -0
  9. data/doc/classes/RuPacRemove/PacRemove.src/M000014.html +24 -0
  10. data/doc/classes/RuPacRemove/PacRemove.src/M000015.html +24 -0
  11. data/doc/classes/RuPacRemove/PacRemove.src/M000016.html +24 -0
  12. data/doc/classes/RuPacRemove/PacRemove.src/M000017.html +24 -0
  13. data/doc/classes/RuPacRemove/PacRemove.src/M000018.html +24 -0
  14. data/doc/classes/RuPacRemove/PacRemove.src/M000019.html +24 -0
  15. data/doc/classes/RuPacRemove/PacRemove.src/M000020.html +24 -0
  16. data/doc/classes/RuPacRemove/PacRemove.src/M000021.html +24 -0
  17. data/doc/classes/RuPacRemove/PacRemove.src/M000022.html +24 -0
  18. data/doc/classes/RuPacRemove/PacRemove.src/M000023.html +24 -0
  19. data/doc/classes/RuPacSync.html +119 -0
  20. data/doc/classes/RuPacSync/PacSync.html +280 -0
  21. data/doc/classes/RuPacSync/PacSync.src/M000024.html +19 -0
  22. data/doc/classes/RuPacSync/PacSync.src/M000025.html +24 -0
  23. data/doc/classes/RuPacSync/PacSync.src/M000026.html +24 -0
  24. data/doc/classes/RuPacSync/PacSync.src/M000027.html +24 -0
  25. data/doc/classes/RuPacSync/PacSync.src/M000028.html +24 -0
  26. data/doc/classes/RuPacSync/PacSync.src/M000029.html +24 -0
  27. data/doc/classes/RuPacSync/PacSync.src/M000030.html +24 -0
  28. data/doc/classes/Rupac.html +124 -0
  29. data/doc/classes/Rupac/Pacman.html +283 -0
  30. data/doc/classes/Rupac/Pacman.src/M000001.html +19 -0
  31. data/doc/classes/Rupac/Pacman.src/M000002.html +22 -0
  32. data/doc/classes/Rupac/Pacman.src/M000003.html +22 -0
  33. data/doc/classes/Rupac/Pacman.src/M000004.html +21 -0
  34. data/doc/classes/Rupac/Pacman.src/M000005.html +21 -0
  35. data/doc/classes/Rupac/Pacman.src/M000006.html +18 -0
  36. data/doc/classes/Rupac/Pacman.src/M000007.html +45 -0
  37. data/doc/classes/Rupac/Pacman/PacSync.html +254 -0
  38. data/doc/classes/Rupac/Pacman/PacSync.src/M000003.html +18 -0
  39. data/doc/classes/Rupac/Pacman/PacSync.src/M000004.html +25 -0
  40. data/doc/classes/Rupac/Pacman/PacSync.src/M000005.html +24 -0
  41. data/doc/classes/Rupac/Pacman/PacSync.src/M000006.html +25 -0
  42. data/doc/classes/Rupac/Pacman/PacSync.src/M000007.html +24 -0
  43. data/doc/classes/Rupac/Pacman/PacSync.src/M000008.html +24 -0
  44. data/doc/classes/Rupac/Pacman/PacSync.src/M000009.html +24 -0
  45. data/doc/created.rid +1 -0
  46. data/doc/dot/f_0.dot +48 -0
  47. data/doc/dot/f_0.png +0 -0
  48. data/doc/dot/f_1.dot +58 -0
  49. data/doc/dot/f_1.png +0 -0
  50. data/doc/dot/f_2.dot +39 -0
  51. data/doc/dot/f_2.png +0 -0
  52. data/doc/dot/m_0_0.dot +48 -0
  53. data/doc/dot/m_0_0.png +0 -0
  54. data/doc/dot/m_1_0.dot +58 -0
  55. data/doc/dot/m_1_0.png +0 -0
  56. data/doc/dot/m_2_0.dot +39 -0
  57. data/doc/dot/m_2_0.png +0 -0
  58. data/doc/files/rupac_rb.html +119 -0
  59. data/doc/files/rupacremove_rb.html +117 -0
  60. data/doc/files/rupacsync_rb.html +123 -0
  61. data/doc/fr_class_index.html +32 -0
  62. data/doc/fr_file_index.html +29 -0
  63. data/doc/fr_method_index.html +56 -0
  64. data/doc/index.html +24 -0
  65. data/lib/rupac.rb +116 -0
  66. data/lib/rupacremove.rb +206 -0
  67. data/lib/rupacsync.rb +95 -0
  68. metadata +123 -0
@@ -0,0 +1,206 @@
1
+ #!/usr/bin/env ruby
2
+ # RupacRemove
3
+ # Represents the Removal options for Pacman
4
+ # Part of the RuPac library
5
+ # Copyright 2006 Chris Peterman <kyral@azuredreams.us>
6
+ # Licensed Under the GPLv2 or later
7
+
8
+ module RuPacRemove
9
+
10
+ require 'rupac.rb'
11
+ include RuPac
12
+
13
+ # PacRemove class
14
+ # Handles all the -R commands from Pacman
15
+ # Decends from Pacman
16
+ class PacRemove < Pacman
17
+
18
+ @command = "pacman -R"
19
+
20
+ def initialize
21
+ super( "yes" )
22
+ end
23
+
24
+ # Represents -Rc
25
+ # Raises an exception if @@lock is yes
26
+ def cascade( *packs )
27
+ if @@lock == "no"
28
+ @@lock = "yes"
29
+ exec( "#{@command}c #{packs.join( ' ' )}" )
30
+ @@lock = "no"
31
+ else
32
+ raise "#{@@lockerror}"
33
+ end
34
+ end ## End cascade Method
35
+
36
+ # Represents -Rk
37
+ # Raises an exception if @@lock is already yes
38
+ def keep( *packs )
39
+ if @@lock == "no"
40
+ @@lock = "yes"
41
+ exec( "#{@command}k #{packs.join( ' ' )}" )
42
+ @@lock = "no"
43
+ else
44
+ raise "#{@@lockerror}"
45
+ end
46
+ end ## End keep method
47
+
48
+ # Represents -Rn
49
+ # Raises an exception if @@lock is already yes
50
+ def noSave( *packs )
51
+ if @@lock == "no"
52
+ @@lock = "yes"
53
+ exec( "#{@command}n #{packs.join( ' ' )}" )
54
+ @@lock = "no"
55
+ else
56
+ raise "#{@@lockerror}"
57
+ end
58
+ end ## End noSave method
59
+
60
+ # Represents -Rs
61
+ # Raises an exception if @@lock is already yes
62
+ def recursive( *packs )
63
+ if @@lock == "no"
64
+ @@lock = "yes"
65
+ exec( "#{@command}s #{packs.join( ' ' )}" )
66
+ @@lock = "no"
67
+ else
68
+ raise "#{@@lockerror}"
69
+ end
70
+ end ## End recursive method
71
+
72
+ # Represents -Rcs
73
+ # Raises an exception if @@lock is already yes
74
+ def reCas( *packs )
75
+ if @@lock == "no"
76
+ @@lock = "yes"
77
+ exec( "#{@command}cs #{packs.join( ' ' )}" )
78
+ @@lock = "no"
79
+ else
80
+ raise "#{@@lockerror}"
81
+ end
82
+ end ## End reCas Method
83
+
84
+ # Represents -Rck
85
+ # Raises an exception if @@lock is already yes
86
+ def keepCas( *packs )
87
+ if @@lock == "no"
88
+ @@lock = "yes"
89
+ exec( "#{@command}ck #{packs.join( ' ' )}" )
90
+ @@lock = "no"
91
+ else
92
+ raise "#{@@lockerror}"
93
+ end
94
+ end ## End keepCas method
95
+
96
+ # Represents -Rcn
97
+ # Raises an exception if @@lock is already yes
98
+ def noSaveCas( *packs )
99
+ if @@lock == "no"
100
+ @@lock = "yes"
101
+ exec( "#{@command}cn #{packs.join( ' ' )}" )
102
+ @@lock = "no"
103
+ else
104
+ raise "#{@@lockerror}"
105
+ end
106
+ end ## End noSaveCas method
107
+
108
+ # Represents -Rkn
109
+ # Raises an exception if @@lock is already yes
110
+ def keepNoSave( *packs )
111
+ if @@lock == "no"
112
+ @@lock = "yes"
113
+ exec( "#{@command}kn #{packs.join( ' ' )}" )
114
+ @@lock = "no"
115
+ else
116
+ raise "#{@@lockerror}"
117
+ end
118
+ end ## End keepNoSave method
119
+
120
+ # Represents -Rks
121
+ # Raises an exception if @@lock is already yes
122
+ def keepRecursive( *packs )
123
+ if @@lock == "no"
124
+ @@lock = "yes"
125
+ exec( "#{@command}ks #{packs.join( ' ' )}" )
126
+ @@lock = "no"
127
+ else
128
+ raise "#{@@lockerror}"
129
+ end
130
+ end ## End keepRecursive method
131
+
132
+ # Represents -Rns
133
+ # Raises an exception if @@lock is already yes
134
+ def noSaveRecursive( *packs )
135
+ if @@lock == "no"
136
+ @@lock = "yes"
137
+ exec( "#{@command}ns #{packs.join( ' ' )}" )
138
+ @@lock = "no"
139
+ else
140
+ raise "#{@@lockerror}"
141
+ end
142
+ end ## End noSaveRecursive method
143
+
144
+ # Represents -Rckn
145
+ # Raises an exception if @@lock is already yes
146
+ def casKeepNoSave( *packs )
147
+ if @@lock == "no"
148
+ @@lock = "yes"
149
+ exec( "#{@command}ckn #{packs.join( ' ' )}" )
150
+ @@lock = "no"
151
+ else
152
+ raise "#{@@lockerror}"
153
+ end
154
+ end ## End casKeepNoSave method
155
+
156
+ # Represents -Rkns
157
+ # Raises an exception if @@lock is already yes
158
+ def keepNoSaveRecursive( *packs )
159
+ if @@lock == "no"
160
+ @@lock = "yes"
161
+ exec( "#{@command}kns #{packs.join( ' ' )}" )
162
+ @@lock = "no"
163
+ else
164
+ raise "#{@@lockerror}"
165
+ end
166
+ end ## End keepNoSaveRecursive method
167
+
168
+ # Represents -Rcns
169
+ # Raises an exception if @@lock is already yes
170
+ def casNoSaveRecursive( *packs )
171
+ if @@lock == "no"
172
+ @@lock = "yes"
173
+ exec( "#{@command}cns #{packs.join( ' ' )}" )
174
+ @@lock = "no"
175
+ else
176
+ raise "#{@@lockerror}"
177
+ end
178
+ end ## End casNoSaveRecursive method
179
+
180
+ # Represents -Rcks
181
+ # Raises an exception if @@lock is already yes
182
+ def casKeepRecursive( *packs )
183
+ if @@lock == "no"
184
+ @@lock = "yes"
185
+ exec( "#{@command}cks #{packs.join( ' ' )}" )
186
+ @@lock = "no"
187
+ else
188
+ raise "#{@@lockerror}"
189
+ end
190
+ end ## End casKeepRecursive
191
+
192
+ # Represents -Rckns
193
+ # Raises an exception if @@lock is already yes
194
+ def allOpts( *packs )
195
+ if @@lock == "no"
196
+ @@lock = "yes"
197
+ exec( "#{@command}ckns #{packs.join( ' ' )}" )
198
+ @@lock = "no"
199
+ else
200
+ raise "#{@@lockerror}"
201
+ end
202
+ end ## End of allOpts method
203
+
204
+ end ## End PacRemove Class
205
+
206
+ end ## End RuPacRemove
@@ -0,0 +1,95 @@
1
+ #!/usr/bin/env ruby
2
+ # RupacSync
3
+ # Represents the Sync options for Pacman
4
+ # Part of the RuPac library
5
+ # Copyright 2006 Chris Peterman <kyral@azuredreams.us>
6
+ # Licensed Under the GPLv2 or later
7
+
8
+ require 'rupac.rb'
9
+ include RuPac
10
+
11
+ module RuPacSync
12
+
13
+ # PacSync Class. Handles all -S options except -Ss, -Sg, and -Si
14
+ class PacSync < Pacman
15
+
16
+ def initialize
17
+ super( "yes" )
18
+ @command = "pacman -S"
19
+ end
20
+
21
+ # Represents -Sy
22
+ # Raises an exception if @@lock is already yes
23
+ def sync
24
+ if @@lock == "no"
25
+ @@lock = "yes"
26
+ exec( "#{@command}y" )
27
+ @@lock = "no"
28
+ else
29
+ raise "#{@@lockerror}"
30
+ end
31
+ end ## End sync method
32
+
33
+ # Represents -Suy or -Syu
34
+ # Raises an exception if @@lock is already yes
35
+ def sysUpgrade
36
+ if @@lock == "no"
37
+ @@lock = "yes"
38
+ exec( "#{@command}yu" )
39
+ @@lock = "no"
40
+ else
41
+ raise "#{@@lockerror}"
42
+ end
43
+ end ## End sysUpgrade method
44
+
45
+ # Represents -S foo bar etc
46
+ # Raises an exception if @@lock is already yes
47
+ def install( *packs )
48
+ if @@lock == "no"
49
+ @@lock = "yes"
50
+ exec( "#{@command} #{packs.join(' ')}" )
51
+ @@lock = "no"
52
+ else
53
+ raise "#{@@lockerror}"
54
+ end
55
+ end ## End Install method
56
+
57
+ # Represents -Sc
58
+ # Raises an exception if @@lock is already yes
59
+ def oldClean
60
+ if @@lock == "no"
61
+ @@lock = "yes"
62
+ exec( "#{@command}c" )
63
+ @@lock = "no"
64
+ else
65
+ raise "#{@@lockerror}"
66
+ end
67
+ end ## End oldClean method
68
+
69
+ # Represents -Scc
70
+ # Raises an exception if @@lock is already yes
71
+ def allClean
72
+ if @@lock == "no"
73
+ @@lock = "yes"
74
+ exec( "#{@command}cc" )
75
+ @@lock = "no"
76
+ else
77
+ raise "#{@@lockerror}"
78
+ end
79
+ end ## End allClean method
80
+
81
+ # Represents -Sw
82
+ # Raises an exception if @@lock is already yes
83
+ def downOnly( *packs )
84
+ if @@lock == "no"
85
+ @@lock = "yes"
86
+ exec( "#{@command}w #{packs.join(' ')}" )
87
+ @@lock = "no"
88
+ else
89
+ raise "#{@@lockerror}"
90
+ end
91
+ end ## End downOnly method
92
+
93
+ end ## End PacSync Class
94
+
95
+ end ## RuPacSync Module
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.0
3
+ specification_version: 1
4
+ name: RuPac
5
+ version: !ruby/object:Gem::Version
6
+ version: "0.5"
7
+ date: 2006-11-15 00:00:00 -05:00
8
+ summary: A Library to interface with ArchLinux's Pacman
9
+ require_paths:
10
+ - lib
11
+ email: petermcv@clarkson.edu
12
+ homepage: www.azuredreams.us
13
+ rubyforge_project: rupac
14
+ description:
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: false
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: "1.8"
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Chris Peterman
31
+ files:
32
+ - doc/created.rid
33
+ - doc/files
34
+ - doc/classes
35
+ - doc/fr_file_index.html
36
+ - doc/fr_class_index.html
37
+ - doc/fr_method_index.html
38
+ - doc/index.html
39
+ - doc/dot
40
+ - doc/files/rupac_rb.html
41
+ - doc/files/rupacsync_rb.html
42
+ - doc/files/rupacremove_rb.html
43
+ - doc/classes/Rupac
44
+ - doc/classes/Rupac.html
45
+ - doc/classes/RuPacRemove
46
+ - doc/classes/RuPacSync
47
+ - doc/classes/RuPacRemove.html
48
+ - doc/classes/RuPacSync.html
49
+ - doc/classes/Rupac/Pacman.src
50
+ - doc/classes/Rupac/Pacman
51
+ - doc/classes/Rupac/Pacman.html
52
+ - doc/classes/Rupac/Pacman.src/M000001.html
53
+ - doc/classes/Rupac/Pacman.src/M000002.html
54
+ - doc/classes/Rupac/Pacman.src/M000003.html
55
+ - doc/classes/Rupac/Pacman.src/M000004.html
56
+ - doc/classes/Rupac/Pacman.src/M000005.html
57
+ - doc/classes/Rupac/Pacman.src/M000006.html
58
+ - doc/classes/Rupac/Pacman.src/M000007.html
59
+ - doc/classes/Rupac/Pacman/PacSync.src
60
+ - doc/classes/Rupac/Pacman/PacSync.html
61
+ - doc/classes/Rupac/Pacman/PacSync.src/M000003.html
62
+ - doc/classes/Rupac/Pacman/PacSync.src/M000004.html
63
+ - doc/classes/Rupac/Pacman/PacSync.src/M000005.html
64
+ - doc/classes/Rupac/Pacman/PacSync.src/M000006.html
65
+ - doc/classes/Rupac/Pacman/PacSync.src/M000007.html
66
+ - doc/classes/Rupac/Pacman/PacSync.src/M000008.html
67
+ - doc/classes/Rupac/Pacman/PacSync.src/M000009.html
68
+ - doc/classes/RuPacRemove/PacRemove.src
69
+ - doc/classes/RuPacRemove/PacRemove.html
70
+ - doc/classes/RuPacRemove/PacRemove.src/M000008.html
71
+ - doc/classes/RuPacRemove/PacRemove.src/M000009.html
72
+ - doc/classes/RuPacRemove/PacRemove.src/M000010.html
73
+ - doc/classes/RuPacRemove/PacRemove.src/M000011.html
74
+ - doc/classes/RuPacRemove/PacRemove.src/M000012.html
75
+ - doc/classes/RuPacRemove/PacRemove.src/M000013.html
76
+ - doc/classes/RuPacRemove/PacRemove.src/M000014.html
77
+ - doc/classes/RuPacRemove/PacRemove.src/M000015.html
78
+ - doc/classes/RuPacRemove/PacRemove.src/M000016.html
79
+ - doc/classes/RuPacRemove/PacRemove.src/M000017.html
80
+ - doc/classes/RuPacRemove/PacRemove.src/M000018.html
81
+ - doc/classes/RuPacRemove/PacRemove.src/M000019.html
82
+ - doc/classes/RuPacRemove/PacRemove.src/M000020.html
83
+ - doc/classes/RuPacRemove/PacRemove.src/M000021.html
84
+ - doc/classes/RuPacRemove/PacRemove.src/M000022.html
85
+ - doc/classes/RuPacRemove/PacRemove.src/M000023.html
86
+ - doc/classes/RuPacSync/PacSync.src
87
+ - doc/classes/RuPacSync/PacSync.html
88
+ - doc/classes/RuPacSync/PacSync.src/M000024.html
89
+ - doc/classes/RuPacSync/PacSync.src/M000025.html
90
+ - doc/classes/RuPacSync/PacSync.src/M000026.html
91
+ - doc/classes/RuPacSync/PacSync.src/M000027.html
92
+ - doc/classes/RuPacSync/PacSync.src/M000028.html
93
+ - doc/classes/RuPacSync/PacSync.src/M000029.html
94
+ - doc/classes/RuPacSync/PacSync.src/M000030.html
95
+ - doc/dot/f_0.dot
96
+ - doc/dot/f_0.png
97
+ - doc/dot/m_0_0.dot
98
+ - doc/dot/m_0_0.png
99
+ - doc/dot/f_1.dot
100
+ - doc/dot/f_1.png
101
+ - doc/dot/m_1_0.dot
102
+ - doc/dot/m_1_0.png
103
+ - doc/dot/f_2.dot
104
+ - doc/dot/f_2.png
105
+ - doc/dot/m_2_0.dot
106
+ - doc/dot/m_2_0.png
107
+ - lib/rupacsync.rb
108
+ - lib/rupacremove.rb
109
+ - lib/rupac.rb
110
+ test_files: []
111
+
112
+ rdoc_options: []
113
+
114
+ extra_rdoc_files: []
115
+
116
+ executables: []
117
+
118
+ extensions: []
119
+
120
+ requirements:
121
+ - pacman version 2.9.5 or lower
122
+ dependencies: []
123
+