File tree 10 files changed +18
-14
lines changed
10 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 19
19
20
20
- uses : ruby/setup-ruby@v1
21
21
with :
22
- ruby-version : 3.0 .0
22
+ ruby-version : 3.2 .0
23
23
24
24
-
uses :
jwlawson/[email protected]
25
25
with :
Original file line number Diff line number Diff line change
1
+ 3.2.2
Original file line number Diff line number Diff line change 9
9
task :disable_config do
10
10
pplconfig = File . expand_path ( "~/.pplconfig" )
11
11
bkpconfig = File . expand_path ( "~/.pplconfig.bkp" )
12
- if File . exists ? pplconfig
12
+ if File . exist ? pplconfig
13
13
FileUtils . mv pplconfig , bkpconfig
14
14
end
15
15
at_exit { Rake ::Task [ "enable_config" ] . invoke }
18
18
task :enable_config do
19
19
pplconfig = File . expand_path ( "~/.pplconfig" )
20
20
bkpconfig = File . expand_path ( "~/.pplconfig.bkp" )
21
- if File . exists ? bkpconfig
21
+ if File . exist ? bkpconfig
22
22
FileUtils . mv bkpconfig , pplconfig
23
23
end
24
24
end
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class Ppl::Adapter::Storage::Disk < Ppl::Adapter::Storage
6
6
attr_accessor :vcard_adapter
7
7
8
8
def self . create_address_book ( path )
9
- if !Dir . exists ? path
9
+ if !Dir . exist ? path
10
10
FileUtils . mkdir_p ( path )
11
11
end
12
12
storage = self . new ( Dir . new ( path ) )
@@ -41,7 +41,7 @@ def load_address_book
41
41
def load_contact ( id )
42
42
filename = filename_for_contact_id ( id )
43
43
contact = nil
44
- if File . exists ?( filename )
44
+ if File . exist ?( filename )
45
45
vcard = File . read filename
46
46
contact = @vcard_adapter . decode ( vcard )
47
47
if !contact . nil? && contact . is_a? ( Ppl ::Entity ::Contact )
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ def load_adapter(directory)
12
12
13
13
adapter = disk_adapter
14
14
15
- if File . exists ?( git_dir )
15
+ if File . exist ?( git_dir )
16
16
git_adapter = Ppl ::Adapter ::Storage ::Git . new ( disk_adapter )
17
17
git_adapter . vcard_adapter = @vcard_adapter
18
18
adapter = git_adapter
Original file line number Diff line number Diff line change @@ -64,9 +64,9 @@ def user_configuration
64
64
end
65
65
filename = File . expand_path ( USER_CONFIG )
66
66
@user_config = { }
67
- if File . exists ?( filename )
67
+ if File . exist ?( filename )
68
68
@user_config = IniFile ::load ( filename ) . to_h
69
- elsif File . exists ?( xdg_path )
69
+ elsif File . exist ?( xdg_path )
70
70
@user_config = IniFile ::load ( xdg_path ) . to_h
71
71
end
72
72
return @user_config
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def require_shell_name(input)
26
26
27
27
def require_completion_existence ( shell_name )
28
28
path = File . join ( @completions_directory . path , shell_name )
29
- if !File . exists ? path
29
+ if !File . exist ? path
30
30
raise Ppl ::Error ::CompletionNotFound , shell_name
31
31
end
32
32
path
Original file line number Diff line number Diff line change @@ -17,8 +17,11 @@ Gem::Specification.new do |spec|
17
17
spec . add_dependency ( "colored" , "1.2" )
18
18
spec . add_dependency ( "inifile" , "3.0.0" )
19
19
spec . add_dependency ( "mail" , "2.7.1" )
20
+ spec . add_dependency ( "net-imap" , "0.4.14" )
21
+ spec . add_dependency ( "net-pop" , "0.1.2" )
22
+ spec . add_dependency ( "net-smtp" , "0.5.0" )
20
23
spec . add_dependency ( "morphine" , "0.1.1" )
21
- spec . add_dependency ( "rugged" , "1.1.0 " )
24
+ spec . add_dependency ( "rugged" , "1.7.2 " )
22
25
spec . add_dependency ( "vpim" , "13.11.11" )
23
26
24
27
spec . add_development_dependency ( "cucumber" )
Original file line number Diff line number Diff line change 11
11
describe "#create_address_book" do
12
12
it "should create the directory if it doesn't exist yet" do
13
13
Ppl ::Adapter ::Storage ::Disk . create_address_book ( "/contacts" )
14
- expect ( Dir . exists ?( "/contacts" ) ) . to eq true
14
+ expect ( Dir . exist ?( "/contacts" ) ) . to eq true
15
15
FileUtils . rm_rf ( "/contacts" )
16
16
end
17
17
it "should return a Ppl::Adapter::Storage::Disk" do
130
130
FileUtils . touch "/contacts/test.vcf"
131
131
@contact . id = "test"
132
132
@storage . delete_contact ( @contact )
133
- expect ( File . exists ?( "/contacts/test.vcf" ) ) . to eq false
133
+ expect ( File . exist ?( "/contacts/test.vcf" ) ) . to eq false
134
134
end
135
135
end
136
136
Original file line number Diff line number Diff line change 18
18
19
19
before ( :each ) do
20
20
allow ( @directory ) . to receive ( :path ) . and_return ( "" )
21
- allow ( File ) . to receive ( :exists ? ) . and_return ( true )
21
+ allow ( File ) . to receive ( :exist ? ) . and_return ( true )
22
22
allow ( File ) . to receive ( :read )
23
23
end
24
24
29
29
30
30
it "should raise an error if the shell is not recognised" do
31
31
@input . arguments = [ "invalidshell" ]
32
- expect ( File ) . to receive ( :exists ? ) . with ( "/invalidshell" ) . and_return ( false )
32
+ expect ( File ) . to receive ( :exist ? ) . with ( "/invalidshell" ) . and_return ( false )
33
33
expect { @command . execute ( @input , @output ) } . to raise_error ( Ppl ::Error ::CompletionNotFound )
34
34
end
35
35
You can’t perform that action at this time.
0 commit comments