chupacabra 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ec68bad383e9cceb15138495e74860362e0b12d
4
- data.tar.gz: f24efc3d43cf7ff35f298592b0afc9a0de163142
3
+ metadata.gz: 142be4215ed3939995b98bce7a507f7f631f591a
4
+ data.tar.gz: 9411eb1a96f30cc968ecee3941d6149146258252
5
5
  SHA512:
6
- metadata.gz: 3e46a7c47897dc75e21840bbf7b164b578fb81e0fd847ba8c8ba93d9fd198bb0bf821f26a37c022fdded16b5116a238bb43ff3272e25e709b22f5e98667e567a
7
- data.tar.gz: e50b37e32d503cfd6b8ee1ffbe21b3998f9fd372023f0fe186ce0e29ed1352d4d8cd679a2c0c103609548cc675d034318c059e6b02cab1f2807b0430b4b919a1
6
+ metadata.gz: febeada810eca00306013a40af29ac5d608b8b325fe4658d8e9881d626038eb6093b750b259e617b20999b0fdb0060ea7d2a6dab6e9d2b5da7605a10f2a7a0c1
7
+ data.tar.gz: 623f3ad293e92665c676358047451bd49bebb0973da0df37e0503c16ddb2d11370f5c17284572ab1795e61bad61a2fc9e9aee2621fd076fe526302faa227f888
@@ -34,12 +34,12 @@ module Chupacabra
34
34
  end
35
35
 
36
36
  def get_clipboard
37
- System.execute("pbpaste", true).strip
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", true)
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
- end
78
+ end
81
79
 
82
- def log_path
83
- if Chupacabra.test?
84
- (Chupacabra.root + 'log' + 'chupacabra_test.log')
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}", true).strip
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}'", true)
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)
@@ -1,3 +1,3 @@
1
1
  module Chupacabra
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
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.0
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: