ayadn 1.0.0 → 1.0.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a1ac4ca5dcab8724e657f5dbcc336fabf6a91fdf
4
- data.tar.gz: 6fd6a5129de0234ca67f8e99e66be05c9c5d093c
3
+ metadata.gz: 7f8e1b7b05ad05985a512f87bd25bafae49b4349
4
+ data.tar.gz: 0a014cf6c284723edffca3829533561515cd0586
5
5
  SHA512:
6
- metadata.gz: d2badae07e439ce5c3b03b930f4b42e01dbc38a7371aabb6e375a096e6410bdd1aefbd4847f3d198bdff4fc78ca8336d063f2d64615a3cd6c827f03818cecdab
7
- data.tar.gz: 8979d5fc1bdc384bd2405bb7d9ea2217ea9b106968c9a91cdf31d71ccb488f18e57593b8f0b5c4f29b052ba68f1c707d6918c80f64881570b3142280a8376e92
6
+ metadata.gz: c66cc072a0717d04de64fbd4d8269ff2dccb1f2a2c7aedf9e28c888c3a5dda5302380c75c6f97d6000f0030b9ce498fbf46b98a5a2a85a76d35c9e0ea5c25ad1
7
+ data.tar.gz: 3c91d658e3d6d6108f654b1b9da544788e183d7b9c134176ec78aabe25c36dc1504a0d69e62bcecbe4e1af1acb34f5392890b0798110fb20e44cf54b8fe030fe
data/MANUAL.md CHANGED
@@ -168,6 +168,8 @@ All Ayadn files and folders are created in your 'home' folder.
168
168
 
169
169
  On Mac OS X, it looks like this:
170
170
 
171
+ /Users/ericdke/ayadn/
172
+ ├── accounts.db
171
173
  /Users/ericdke/ayadn/ericd
172
174
  ├── auth
173
175
  │   └── token
@@ -194,7 +196,9 @@ Each authorized account has its set of folders and databases.
194
196
 
195
197
  This is also the repository of the configuration file, `config.yml`.
196
198
 
197
- Although there's the `set` command in Ayadn to configure most parameters, you can also edit the file manually. If anything goes wrong, simply delete `config.yml` and Ayadn will re-create one with default values.
199
+ Although there's the `set` command in Ayadn to configure most parameters, you can of course edit the file manually.
200
+
201
+ If you're not sure if your config file is up to date or properly filled and you want to benefit from the new options in Ayadn, run `ayadn set defaults` and it will create a brand new file with optimal values.
198
202
 
199
203
 
200
204
  # HOW-TO
data/README.md CHANGED
@@ -28,7 +28,11 @@ Install:
28
28
 
29
29
  Update:
30
30
 
31
- `gem update ayadn`
31
+ `gem update ayadn`
32
+
33
+ Uninstall:
34
+
35
+ `gem uninstall ayadn`
32
36
 
33
37
  ### OS X, LINUX, BSD
34
38
 
@@ -38,10 +42,15 @@ You can also use the Ruby shipped with your system but you shouldn't, as it woul
38
42
 
39
43
  ### WINDOWS
40
44
 
41
- You have to run one more command:
45
+ You may have to run one more command:
42
46
 
43
47
  `gem install win32console -v 1.3.2`
44
48
 
49
+ ### ALPHA-BETA-PRE
50
+
51
+ Users of alpha, beta or pre-release versions should first uninstall the old versions with `gem uninstall ayadn` then run `ayadn set defaults` after installing version 1.0 (note that this will replace the config file contents).
52
+ This is only necessary if you installed a pre-1.0 testing version.
53
+
45
54
  # DOCUMENTATION
46
55
 
47
56
  Read the [manual](https://github.com/ericdke/na/blob/master/MANUAL.md).
@@ -10,7 +10,9 @@ module Ayadn
10
10
  end
11
11
 
12
12
  def self.load_config
13
- db = Daybreak::DB.new(Dir.home + "/ayadn/accounts.db")
13
+ acc_db = Dir.home + "/ayadn/accounts.db"
14
+ self.check_for_accounts(acc_db)
15
+ db = Daybreak::DB.new(acc_db)
14
16
  active = db['ACTIVE']
15
17
  home = db[active][:path]
16
18
  @config = {
@@ -37,6 +39,13 @@ module Ayadn
37
39
  @options = self.defaults
38
40
  end
39
41
 
42
+ def self.check_for_accounts(acc_db)
43
+ unless File.exist?(acc_db)
44
+ puts Status.not_authorized
45
+ exit
46
+ end
47
+ end
48
+
40
49
  def self.get_token
41
50
  if self.has_token_file?
42
51
  @user_token = self.read_token_file
data/lib/ayadn/status.rb CHANGED
@@ -197,7 +197,7 @@ module Ayadn
197
197
  "\n\nCanceled.\n\n".color(:cyan)
198
198
  end
199
199
  def self.not_authorized
200
- "\nYou need to authorize Ayadn before using it.\n\nPlease run 'ayadn authorize' :)\n\n".color(:red)
200
+ "\nYou need to authorize Ayadn before using it.\n\nPlease run 'ayadn -auth' :)\n\n".color(:red)
201
201
  end
202
202
  def self.wtf
203
203
  "\nSomething wrong happened. :(\n\n".color(:red)
data/lib/ayadn/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Ayadn
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ayadn
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Dejonckheere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-03 00:00:00.000000000 Z
11
+ date: 2014-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor