brick_ftp 0.6.0 → 0.6.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: f4ceed2165ffe939ec9fa8d08932469060f5ac76
4
- data.tar.gz: baca3f3769711375adede57195a0d62421b3bc8c
3
+ metadata.gz: d1c8f9d8a8b8938d7081b50d6f5f319799c1a7b8
4
+ data.tar.gz: 304b3b10bf2f7c50aafe09cbd158784a45d94940
5
5
  SHA512:
6
- metadata.gz: 52eb974b0c1a30f5248e7fdb394dc0fd85da3b1499202694825d5ec845eeb27851a502808073ac759a4ff092f9caa1a8ab2fa9d22a2759ba8415c874db35ef6f
7
- data.tar.gz: 4e2bb88fe63df32dd2dd781ff3e7537caaf01d7df694189128e5838e1aeb995b19c2af439ac1f2cb4a0ad0706b2262ee58af0758ebdd05604dd55252752fa5c6
6
+ metadata.gz: a0a11120dc634a2b93166bb753291a2b2094fee6701140d6a9be4511dacb318e1b6e0f0d6b6d7a973cb558801047be0ec541db700ca8972f4f709d842ae8bebc
7
+ data.tar.gz: baeb7298119d8458664ce3c2006ca6481a379fd4992df2baebb8da63d2cb5cf80401433f1289c4b45a6e9f4c606973d7f43a004749880c8f635a14f93db7ed74
data/CHANGELOG.md CHANGED
@@ -2,10 +2,10 @@ Changelog
2
2
  ====
3
3
 
4
4
 
5
- [unreleased](https://github.com/koshigoe/brick_ftp/compare/v0.6.0...master)
5
+ [unreleased](https://github.com/koshigoe/brick_ftp/compare/v0.6.1...master)
6
6
  ----
7
7
 
8
- [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.6.0...master)
8
+ [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.6.1...master)
9
9
 
10
10
  ### Enhancements:
11
11
 
@@ -14,6 +14,20 @@ Changelog
14
14
  ### Breaking Changes:
15
15
 
16
16
 
17
+ [v0.6.1](https://github.com/koshigoe/brick_ftp/compare/v0.6.0...v0.6.1)
18
+ ----
19
+
20
+ [Full Changelog](https://github.com/koshigoe/brick_ftp/compare/v0.6.0...v0.6.1)
21
+
22
+ ### Enhancements:
23
+
24
+ ### Fixed Bugs:
25
+
26
+ - [#76](https://github.com/koshigoe/brick_ftp/pull/76) Don't raise unexpected exception even if it can't expand path `~`.
27
+
28
+ ### Breaking Changes:
29
+
30
+
17
31
  [v0.6.0](https://github.com/koshigoe/brick_ftp/compare/v0.5.1...v0.6.0)
18
32
  ----
19
33
 
@@ -38,7 +38,6 @@ module BrickFTP
38
38
  DEFAULT_READ_TIMEOUT = 30
39
39
 
40
40
  DEFAULT_PROFILE = 'global'.freeze
41
- CONFIG_FILE_PATH = File.expand_path('~/.brick_ftp/config').freeze
42
41
  # Name of storable configurations. (TODO: log_path, log_level, log_formatter)
43
42
  STORABLE_CONFIGURATION_KEYS = %w(subdomain api_key open_timeout read_timeout).freeze
44
43
 
@@ -49,6 +48,14 @@ module BrickFTP
49
48
  end
50
49
  end
51
50
 
51
+ def self.default_config_file_path
52
+ File.expand_path('~/.brick_ftp/config')
53
+ rescue ArgumentError
54
+ # couldn't find login name -- expanding `~'
55
+ nil
56
+ end
57
+ CONFIG_FILE_PATH = default_config_file_path
58
+
52
59
  def initialize(profile: DEFAULT_PROFILE, config_file_path: CONFIG_FILE_PATH)
53
60
  @profile = profile
54
61
  @config_file_path = config_file_path
@@ -100,7 +107,7 @@ module BrickFTP
100
107
  attr_reader :inifile, :dirty_attributes
101
108
 
102
109
  def load_config_file(config_file_path)
103
- @inifile = if File.exist?(config_file_path)
110
+ @inifile = if config_file_path && File.exist?(config_file_path)
104
111
  IniFile.load(config_file_path, encoding: 'UTF-8')
105
112
  else
106
113
  IniFile.new(filename: config_file_path, encoding: 'UTF-8')
@@ -1,3 +1,3 @@
1
1
  module BrickFTP
2
- VERSION = '0.6.0'.freeze
2
+ VERSION = '0.6.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brick_ftp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - koshigoe
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-17 00:00:00.000000000 Z
11
+ date: 2018-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -217,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
217
217
  version: '0'
218
218
  requirements: []
219
219
  rubyforge_project:
220
- rubygems_version: 2.6.10
220
+ rubygems_version: 2.6.14
221
221
  signing_key:
222
222
  specification_version: 4
223
223
  summary: BrickFTP's REST API client.