gtk2passwordapp 2.1.2 → 2.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/bin/gtk2passwordapp2 CHANGED
@@ -1,37 +1,20 @@
1
1
  #!/usr/bin/env ruby
2
2
  require 'rubygems'
3
3
  gem 'gtk2applib', '~> 15.3'
4
- $help = <<EOT
5
- \t--no-gui\tcommand line access to passwords
6
- \t--dump\t\tpp dump of data
7
- EOT
8
4
  require 'gtk2applib'
9
5
  require 'gtk2passwordapp'
10
6
 
11
- if (nogui = $options=~/-no-gui/) || ($options=~/-dump/) then
12
- $stderr.print Gtk2Password::Configuration::COMMAND_LINE_MSG1
7
+ if $options=~/-no-gui/ then
8
+ print Gtk2Password::Configuration::COMMAND_LINE_MSG1
13
9
  pwd = $stdin.gets.strip
14
- if nogui then
15
- $stderr.print Gtk2Password::Configuration::COMMAND_LINE_MSG2
16
- pattern = Regexp.new( $stdin.gets.strip, Regexp::IGNORECASE )
17
- end
18
- begin
19
- passwords = Gtk2Password::Passwords.new(Gtk2Password::Configuration::PASSWORDS_FILE, pwd)
20
- passwords.load
21
- if $options=~/-dump/ then
22
- require 'pp'
23
- pp passwords
24
- else
25
- passwords.accounts.each do |account|
26
- if account =~ pattern then
27
- password = passwords.password_of(account)
28
- username = passwords.username_of(account)
29
- puts [account,username,password].join("\n\t")
30
- end
31
- end
10
+ passwords = Gtk2Password::Passwords.new(Gtk2Password::Configuration::PASSWORDS_FILE, pwd)
11
+ print Gtk2Password::Configuration::COMMAND_LINE_MSG2
12
+ pattern = Regexp.new( $stdin.gets.strip, Regexp::IGNORECASE )
13
+ passwords.accounts.each do |account|
14
+ if account =~ pattern then
15
+ password = passwords.password_of(account)
16
+ puts "\t\"" + account + "\"\t\t" + password
32
17
  end
33
- rescue Exception
34
- # we're going to be silent here... muhahaha-ha!
35
18
  end
36
19
  exit
37
20
  end
@@ -19,7 +19,14 @@ class IOCrypt
19
19
 
20
20
  def load(dumpfile)
21
21
  data = nil
22
- File.open(dumpfile,'r'){|fh| data = YAML.load( @key.decrypt( fh.read ) ) }
22
+ begin
23
+ File.open(dumpfile,'r'){|fh| data = YAML.load( @key.decrypt( fh.read ) ) }
24
+ rescue Psych::SyntaxError
25
+ # assume it's syck
26
+ YAML::ENGINE.yamler = 'syck'
27
+ File.open(dumpfile,'r'){|fh| data = YAML.load( @key.decrypt( fh.read ) ) }
28
+ YAML::ENGINE.yamler = 'psych' # make it psych
29
+ end
23
30
  return data
24
31
  end
25
32
 
metadata CHANGED
@@ -1,52 +1,77 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: gtk2passwordapp
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.1.3
4
5
  prerelease:
5
- version: 2.1.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - carlosjhr64@gmail.com
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-06-16 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
12
+ date: 2012-06-18 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
16
15
  name: crypt-tea
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
19
17
  none: false
20
- requirements:
21
- - - "="
22
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - '='
20
+ - !ruby/object:Gem::Version
23
21
  version: 1.3.0
24
22
  type: :runtime
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - '='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.3.0
30
+ - !ruby/object:Gem::Dependency
27
31
  name: gtk2applib
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '15.3'
38
+ type: :runtime
28
39
  prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
30
41
  none: false
31
- requirements:
42
+ requirements:
32
43
  - - ~>
33
- - !ruby/object:Gem::Version
34
- version: "15.3"
44
+ - !ruby/object:Gem::Version
45
+ version: '15.3'
46
+ - !ruby/object:Gem::Dependency
47
+ name: gtk2
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
35
54
  type: :runtime
36
- version_requirements: *id002
37
- description: |
38
- A Ruby-Gnome password manager.
39
- Uses crypt-tea's Tiny Encryption Algorithm to encrypt the datafile.
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ description: ! 'A Ruby-Gnome password manager.
63
+
64
+ Uses crypt-tea''s Tiny Encryption Algorithm to encrypt the datafile.
65
+
40
66
  Features random password generator and clipboard use.
41
67
 
68
+ '
42
69
  email: carlosjhr64@gmail.com
43
- executables:
70
+ executables:
44
71
  - gtk2passwordapp2
45
72
  extensions: []
46
-
47
73
  extra_rdoc_files: []
48
-
49
- files:
74
+ files:
50
75
  - ./lib/gtk2passwordapp/appconfig.rb
51
76
  - ./lib/gtk2passwordapp/iocrypt.rb
52
77
  - ./lib/gtk2passwordapp/passwords.rb
@@ -59,31 +84,26 @@ files:
59
84
  - bin/gtk2passwordapp2
60
85
  homepage: https://sites.google.com/site/gtk2applib/home/gtk2applib-applications/gtk2passwordapp
61
86
  licenses: []
62
-
63
87
  post_install_message:
64
88
  rdoc_options: []
65
-
66
- require_paths:
89
+ require_paths:
67
90
  - lib
68
- required_ruby_version: !ruby/object:Gem::Requirement
91
+ required_ruby_version: !ruby/object:Gem::Requirement
69
92
  none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- version: "0"
74
- required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
98
  none: false
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: "0"
80
- requirements:
81
- - gtk2
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ requirements: []
82
104
  rubyforge_project:
83
- rubygems_version: 1.8.17
105
+ rubygems_version: 1.8.24
84
106
  signing_key:
85
107
  specification_version: 3
86
108
  summary: Ruby-Gnome Password Manager
87
109
  test_files: []
88
-
89
- has_rdoc: false