apti 0.6 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 28a8c964451c0f1e08dc5ce46eb14394ae2addac
4
- data.tar.gz: 25ba235521f58248450856f952f49aa3f7976f60
3
+ metadata.gz: ffc4796c7e521ff8e9dc45066e3459ca6313c88c
4
+ data.tar.gz: ada0f5164793f9ef8dbbb6b91ea200f626cc257c
5
5
  SHA512:
6
- metadata.gz: c7d72b660404bb4d462700f09d753cf620c0566f35d2fec938c40c50312fecc5db2da406e2b4e230a2eb810ce74fc1f1564340475b22bc4a74cfad373c1f2d57
7
- data.tar.gz: 4881e0c812c7f6f45e8083af9454c564d70f3db07d180c6ce840808577b6b13093410df86680ce1d42e2e2a8518b38fdaf7a34fe43008840b148232287fe8719
6
+ metadata.gz: e55433454419fa89cb0bf21c863b68128a3c942089336d007aec84565357130d81177bba91dc3505d1d7a77afbb1c2a217fa8f246a9bb6efad8d9d2bca7fa532
7
+ data.tar.gz: 3e510549f003ef996fc9a69d6ca69d4897e8d2e50eff192a239ba6c7fe663f930cb0cdd8ae6c29a309291bf9ff1e599686eebb16ebf52317eb120ce331375da5
data/README.md CHANGED
@@ -6,17 +6,20 @@ It uses the same commands as aptitude, and allow you to use it without superuser
6
6
 
7
7
  The improved commands are: `install`, `remove`, `purge`, `safe-upgrade`, `full-upgrade` and `search`.
8
8
 
9
+ RSS feed of versions: https://gitorious.org/apti/apti/raw/stable:changelog.xml
10
+
9
11
  # Installation
10
12
 
11
- Dependencies:
13
+ ## With git
14
+
15
+ Dependencies: aptitude, ruby >= 1.9, ruby-i18n
12
16
 
13
- * aptitude (of course)
14
- * ruby >= 1.9
15
- * ruby-i18n
17
+ # git clone -b stable git://gitorious.org/apti/apti.git /usr/local/
18
+ # ln -s /usr/local/apti/bin/apti /usr/local/bin/apti
16
19
 
17
- Put apti in /usr/local/, and create a link to main.rb: `ln -s /usr/local/apti/main.rb /usr/local/bin/apti`
20
+ ## With rubygems
18
21
 
19
- Or with rubygems `gem build apti.gemspec` and then `gem install apti-0.5.1.gem`.
22
+ # gem install apti
20
23
 
21
24
  # Configuration
22
25
 
data/changelog.xml CHANGED
@@ -8,7 +8,19 @@
8
8
 
9
9
  <atom:link href="https://gitorious.org/apti/apti/source/master:changelog.xml" rel="self" type="application/rss+xml" />
10
10
 
11
- <lastBuildDate>Sun Mar 16 14:30:00 2014 +0100</lastBuildDate>
11
+ <lastBuildDate>The Apr 29 14:30:00 2014 +0100</lastBuildDate>
12
+
13
+ <item>
14
+ <title>Version 0.6.1</title>
15
+ <link>https://gitorious.org/apti/apti/source/v0.6.1:</link>
16
+ <guid isPermaLink="false">v0_6_1</guid>
17
+ <description><![CDATA[
18
+ <ul>
19
+ <li>Fix alignment problem.</li>
20
+ </ul>
21
+ ]]></description>
22
+ <pubDate>The Apr 29 14:30:00 2014 +0100</pubDate>
23
+ </item>
12
24
 
13
25
  <item>
14
26
  <title>Version 0.6</title>
data/src/apti/Apti.rb CHANGED
@@ -244,7 +244,8 @@ module Apti
244
244
  def search(package_name)
245
245
  require_relative 'Package'
246
246
 
247
- aptitude_string = `aptitude search --disable-columns #{package_name}`
247
+ # For details of the output format, see: http://aptitude.alioth.debian.org/doc/en/ch02s05s01.html#secDisplayFormat
248
+ aptitude_string = `aptitude search --disable-columns -F "%c %M|%p|%d" #{package_name}`
248
249
  terminal_width = `tput cols`.to_i
249
250
 
250
251
  # Information size (i, p, A, ...) : 6 seems to be good.
@@ -517,6 +518,9 @@ module Apti
517
518
  if max_old_static.length > (max.version_old.length + max.version_static.length)
518
519
  # If so, this is first part ("root" version part) must be increased.
519
520
  max.version_static = max_old_static.slice(0, max_old_static.length - max.version_old.length)
521
+ else
522
+ # If not, we must add spaces between `static` version and old revision or it will be collapse.
523
+ max.version_static = max.version_static.rjust(max.version_static.length + @config.spaces.columns)
520
524
  end
521
525
 
522
526
  out = {}
@@ -539,30 +543,11 @@ module Apti
539
543
  aptitude_string.each_line do |package_line|
540
544
  package = Package.new
541
545
 
542
- package_str = package_line.split '- '
543
-
544
- # Parameter and name, ex: i A aptitude-common.
545
- package_parameter_and_name = package_str.first
546
-
547
- package.description = ''
548
-
549
- # Construct the description (all after the first '-').
550
- name_passed = false
551
- package_str.each do |str|
552
- if not name_passed
553
- name_passed = true
554
- else
555
- package.description.concat "- #{str }"
556
- end
557
- end
558
-
559
- # The package name (without informations).
560
- package.name = package_parameter_and_name.split.last
546
+ package_array = package_line.split('|')
561
547
 
562
- # Informations of the package: i, p, A, ...
563
- package_info = package_parameter_and_name.split
564
- package_info.pop
565
- package.parameter = package_info.join(' ')
548
+ package.parameter = package_array[0]
549
+ package.name = package_array[1]
550
+ package.description = "- #{package_array[2]}"
566
551
 
567
552
  packages.push(package)
568
553
  end
data/src/apti/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # encoding: UTF-8
2
2
  module Apti
3
3
  class Apti
4
- VERSION = '0.6'
4
+ VERSION = '0.6.1'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apti
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.6'
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florent Lévigne
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-16 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n
@@ -36,15 +36,15 @@ files:
36
36
  - COPYING
37
37
  - AUTHORS
38
38
  - TODO.md
39
- - src/apti/version.rb
40
- - src/apti/config/ColorsUpgradeRevision.rb
39
+ - src/apti/config/Colors.rb
40
+ - src/apti/config/ColorsUpgrade.rb
41
41
  - src/apti/config/Config.rb
42
- - src/apti/config/Color.rb
43
42
  - src/apti/config/Spaces.rb
43
+ - src/apti/config/ColorsUpgradeRevision.rb
44
44
  - src/apti/config/ColorsUpgradeVersion.rb
45
- - src/apti/config/ColorsUpgrade.rb
46
- - src/apti/config/Colors.rb
45
+ - src/apti/config/Color.rb
47
46
  - src/apti/Package.rb
47
+ - src/apti/version.rb
48
48
  - src/apti/Apti.rb
49
49
  - locales/fr.yml
50
50
  - locales/en.yml
@@ -76,3 +76,4 @@ signing_key:
76
76
  specification_version: 4
77
77
  summary: Apti is a frontend for aptitude with improved presentation of packages.
78
78
  test_files: []
79
+ has_rdoc: