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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 908a370d03f2c46db7bf585b3e9d4815037ca56a
4
- data.tar.gz: 7beb58dc00534d8614d51290b09d3b0ecaa4bafc
3
+ metadata.gz: f75f8a7b54a3176511c5589d7cfd13fb3de6afa7
4
+ data.tar.gz: 9edcdb6869e30b35f59b6406a1e71644b20da9dc
5
5
  SHA512:
6
- metadata.gz: 88c950fd222fd64b8d5aa03b02735615a887d0439145a9be5ffc1abbf7ec5386fb278e124ddc2b17150d088f2275018d509e19d70df1d597dc5934994ec2fc72
7
- data.tar.gz: b11840042e6829552dfd9f22f891abc22ee9596e4511c9aac6123a360ba2bbeb48cb6fbe6962a5a3dec9c885e4963557efeafe466ee2a68374effe05e2e4b810
6
+ metadata.gz: 938f6f3406004255d4bc7ba5ad5671585dff565b47a6c607e67989a6a39cac1e6a1393408befff8f7f1ea63f5b952e475c8f40f7adbf8f581700b20c5970f2ee
7
+ data.tar.gz: fde21a595247b54df7a72ab5edc2358a4cddb6ef4562e80f0051fdad1e9e11a81400f5c53bba3bb24971e8c57154072d03406ba4ba99a0b68eb67e9087b45c95
@@ -1,3 +1,8 @@
1
+ # 0.0.6
2
+
3
+ - Fix paths
4
+ - Delete old token file
5
+
1
6
  # 0.0.5
2
7
 
3
8
  - Authorization via OAuth and App.net
@@ -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)
@@ -115,11 +115,11 @@ module TokiCLI
115
115
  end
116
116
 
117
117
  def open_db
118
- tmp_path = "#{Dir.home}/temp/toki/"
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(tmp_path)
122
- FileUtils.copy(db_path, "#{tmp_path}/toki_data.bak")
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
 
@@ -1,3 +1,3 @@
1
1
  module TokiCLI
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TokiCLI
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dejonckheere