TokiCLI 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/TokiCLI/authorize.rb +6 -1
- data/lib/TokiCLI/module.rb +3 -3
- data/lib/TokiCLI/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f75f8a7b54a3176511c5589d7cfd13fb3de6afa7
|
4
|
+
data.tar.gz: 9edcdb6869e30b35f59b6406a1e71644b20da9dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 938f6f3406004255d4bc7ba5ad5671585dff565b47a6c607e67989a6a39cac1e6a1393408befff8f7f1ea63f5b952e475c8f40f7adbf8f581700b20c5970f2ee
|
7
|
+
data.tar.gz: fde21a595247b54df7a72ab5edc2358a4cddb6ef4562e80f0051fdad1e9e11a81400f5c53bba3bb24971e8c57154072d03406ba4ba99a0b68eb67e9087b45c95
|
data/CHANGELOG.md
CHANGED
data/lib/TokiCLI/authorize.rb
CHANGED
@@ -9,12 +9,17 @@ module ADNAuthorize
|
|
9
9
|
|
10
10
|
def authorize
|
11
11
|
puts "\e[H\e[2J"
|
12
|
+
old = Dir.home + '/.toki_token'
|
13
|
+
if File.exist?(old)
|
14
|
+
puts "The old authorization token isn't valid anymore: the file '#{old}' has been deleted.\n\n"
|
15
|
+
File.delete(old)
|
16
|
+
end
|
12
17
|
show_link
|
13
18
|
token = get_token
|
14
19
|
check_token(token)
|
15
20
|
puts "\n\nThanks! Contacting App.net...\n\n"
|
16
21
|
user = create_user_data(token, @home)
|
17
|
-
puts "Creating TokiCLI folder in #{user.home_path} ...\n\n"
|
22
|
+
puts "Creating TokiCLI folder in '#{user.home_path}' ...\n\n"
|
18
23
|
Dir.mkdir("#{user.home_path}") unless Dir.exist?("#{user.home_path}")
|
19
24
|
puts "Saving user token...\n\n"
|
20
25
|
create_token_file(user)
|
data/lib/TokiCLI/module.rb
CHANGED
@@ -115,11 +115,11 @@ module TokiCLI
|
|
115
115
|
end
|
116
116
|
|
117
117
|
def open_db
|
118
|
-
|
118
|
+
toki_path = "#{Dir.home}/.TokiCLI"
|
119
119
|
db_path = "#{Dir.home}/Library/Containers/us.kkob.Toki/Data/Documents/toki_data.sqlite3"
|
120
120
|
abort(Status.no_db) unless File.exist? db_path
|
121
|
-
FileUtils.mkdir_p(
|
122
|
-
FileUtils.copy(db_path, "#{
|
121
|
+
FileUtils.mkdir_p(toki_path) unless Dir.exist?(toki_path)
|
122
|
+
FileUtils.copy(db_path, "#{toki_path}/toki_data.sqlite3.bak")
|
123
123
|
Amalgalite::Database.new(db_path)
|
124
124
|
end
|
125
125
|
|
data/lib/TokiCLI/version.rb
CHANGED