chupacabra 0.1.0 → 0.1.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 +4 -4
- data/lib/chupacabra/system.rb +8 -14
- data/lib/chupacabra/system/install.rb +3 -1
- data/lib/chupacabra/system/scripts.rb +2 -8
- data/lib/chupacabra/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 142be4215ed3939995b98bce7a507f7f631f591a
|
4
|
+
data.tar.gz: 9411eb1a96f30cc968ecee3941d6149146258252
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: febeada810eca00306013a40af29ac5d608b8b325fe4658d8e9881d626038eb6093b750b259e617b20999b0fdb0060ea7d2a6dab6e9d2b5da7605a10f2a7a0c1
|
7
|
+
data.tar.gz: 623f3ad293e92665c676358047451bd49bebb0973da0df37e0503c16ddb2d11370f5c17284572ab1795e61bad61a2fc9e9aee2621fd076fe526302faa227f888
|
data/lib/chupacabra/system.rb
CHANGED
@@ -34,12 +34,12 @@ module Chupacabra
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def get_clipboard
|
37
|
-
System.execute("pbpaste",
|
37
|
+
System.execute("pbpaste", osx?).strip
|
38
38
|
end
|
39
39
|
|
40
40
|
def set_clipboard(text)
|
41
41
|
raise 'Unsupported string' if text =~ /'/
|
42
|
-
System.execute("echo '#{text}' | pbcopy",
|
42
|
+
System.execute("echo '#{text}' | pbcopy", osx?)
|
43
43
|
end
|
44
44
|
|
45
45
|
def osx?
|
@@ -68,8 +68,6 @@ module Chupacabra
|
|
68
68
|
run_script(:script => :alert, :arguments => [front_app, message])
|
69
69
|
end
|
70
70
|
|
71
|
-
|
72
|
-
|
73
71
|
def log(message)
|
74
72
|
return unless Chupacabra.log
|
75
73
|
log_path.open('a') do |file|
|
@@ -77,15 +75,11 @@ module Chupacabra
|
|
77
75
|
file << "\n"
|
78
76
|
end
|
79
77
|
message
|
80
|
-
|
78
|
+
end
|
81
79
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
else
|
86
|
-
(Pathname.new(ENV['HOME']) + 'chupacabra.log')
|
87
|
-
end
|
88
|
-
end
|
80
|
+
def log_path
|
81
|
+
Chupacabra::Storage.path + 'chupacabra.log'
|
82
|
+
end
|
89
83
|
|
90
84
|
private
|
91
85
|
|
@@ -117,11 +111,11 @@ module Chupacabra
|
|
117
111
|
end
|
118
112
|
|
119
113
|
def get_env_password
|
120
|
-
System.execute("launchctl getenv #{password_variable}",
|
114
|
+
System.execute("launchctl getenv #{password_variable}", osx?).strip
|
121
115
|
end
|
122
116
|
|
123
117
|
def set_env_password(password)
|
124
|
-
System.execute("launchctl setenv #{password_variable} '#{password}'",
|
118
|
+
System.execute("launchctl setenv #{password_variable} '#{password}'", osx?)
|
125
119
|
end
|
126
120
|
end
|
127
121
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
require "stringio"
|
2
|
+
|
1
3
|
module Chupacabra
|
2
4
|
module System
|
3
5
|
module Install
|
@@ -12,6 +14,7 @@ module Chupacabra
|
|
12
14
|
|
13
15
|
def uninstall
|
14
16
|
FileUtils.rm_rf user_service_path
|
17
|
+
FileUtils.rm_rf Chupacabra::Storage.path
|
15
18
|
end
|
16
19
|
|
17
20
|
def user_service_path
|
@@ -56,7 +59,6 @@ module Chupacabra
|
|
56
59
|
def legacy_passwords_path_tmp
|
57
60
|
Pathname.new(legacy_passwords_path.to_s + '_tmp')
|
58
61
|
end
|
59
|
-
|
60
62
|
end
|
61
63
|
end
|
62
64
|
end
|
@@ -19,14 +19,8 @@ module Chupacabra
|
|
19
19
|
def compile(script, argument = nil)
|
20
20
|
script_body = self.send(*[script, argument].compact)
|
21
21
|
raise Error, 'Empty script to compile' if script_body.empty?
|
22
|
-
output = System.execute "osacompile -e '#{script_body}' -o #{script_file(script, argument)}"
|
23
|
-
if $?.success?
|
24
|
-
output
|
25
|
-
else
|
26
|
-
puts "Failed to compile: #{script_file(script, argument)}"
|
27
|
-
puts output
|
28
|
-
nil
|
29
|
-
end
|
22
|
+
output = System.execute "osacompile -e '#{script_body}' -o #{script_file(script, argument)} 2> /dev/null"
|
23
|
+
output if $?.success?
|
30
24
|
end
|
31
25
|
|
32
26
|
def script_or_compile(script, argument = nil)
|
data/lib/chupacabra/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chupacabra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dawid Sklodowski
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: Encrypted and easy to use personal storage for user passwords
|
56
70
|
email: dawid.sklodowski@gmail.com
|
57
71
|
executables:
|