blomming_api 0.4.3 → 0.4.4

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: 9c07beb77f338aba29431d8118ddd2c0ce5af7ad
4
- data.tar.gz: 46c94be3f7d4c553293f309be85a0f637ec537a8
3
+ metadata.gz: da6e25604e62123bc4adc57549161d0d3b913804
4
+ data.tar.gz: 6c3f75109da7efa3cfba2d58f727065e236d255f
5
5
  SHA512:
6
- metadata.gz: 8326c6580d05a960713a57c609396b69ab3e82578ac9c9d9b22fb88d40e059c83551b2d6e988381565cb505c0f7ff634229296128e177adc1dbfabf79a081916
7
- data.tar.gz: edeeabbc466db4d3edacb3fce714811f3c6f3dfc4562ff312a6e54828ea1e38fbef4b99158010610c1becb57c6490047583bcbf7f02f60d98aaf208f2e03512f
6
+ metadata.gz: 0d16cc06bc53b7d79e8895e9cf5ef22f86aa007b162b4e93b1a1c591c110a9e30422290255a8f9382873ad2d01057f7bd88cb0aa56103f7128050eac131855fc
7
+ data.tar.gz: a95f9c9e73991d3a0c8f6b9089d0525dc3baa7c228829155201c13ef3846b40bb8c54434f0fe351a0696b98c6ce01c395b7cda99ef0f9c5bd1819cf0a67a9bf3
@@ -9,9 +9,11 @@ module BlommingApi
9
9
  # initialize instance variables, from config file
10
10
  config = YAML.load_file config_filename
11
11
 
12
- #
12
+ # store filename as class instance variable
13
+ @config_filename = config_filename
14
+
13
15
  # initialize instance variables, from config files
14
- # validating mandatory fields
16
+ # validating mandatory properties
15
17
 
16
18
  @description = config['description']
17
19
 
@@ -62,16 +64,18 @@ module BlommingApi
62
64
  @survive_on_fatal_error = config['survive_on_fatal_error']
63
65
  @survive_on_fatal_error = false if @survive_on_fatal_error.nil?
64
66
 
65
- # other behaviours
67
+ # verbosity/debug
66
68
  @verbose = config['verbose']
69
+ @verbose = false if @verbose.nil?
67
70
  @verbose_access_token = @verbose
68
71
 
69
- puts to_s(config_filename) if @verbose
72
+ puts config_properties if @verbose
70
73
  end
71
74
  private :read_config_file
72
75
 
73
- def show_config_file_attributes
74
- "\n description: #@description\n" +
76
+ def config_properties
77
+ "\n config file: #@config_file\n" +
78
+ " description: #@description\n" +
75
79
  " services: #@services\n" +
76
80
  " username: #@username\n" +
77
81
  " password: #@password\n" +
@@ -83,7 +87,7 @@ module BlommingApi
83
87
  "survive_on_fatal_error: #@survive_on_fatal_error\n" +
84
88
  " retry_seconds: #@retry_seconds\n\n"
85
89
  end
86
- public :show_config_file_attributes
90
+ public :config_properties
87
91
 
88
92
  end
89
93
  end
@@ -64,20 +64,23 @@ module BlommingApi
64
64
  private :authenticate
65
65
 
66
66
 
67
- def show_authentication (config_file)
68
- "\tservices: #{@services}\n" +
69
- "\tgrant_type: #{@grant_type}\n" +
70
- "\tusername: #{@username}\n" +
71
- "\tpassword: #{@password}\n" +
72
- "\tclient_id: #{@client_id}\n" +
73
- "\tclient_secret: #{@client_secret}\n\n" +
74
-
75
- "\ttoken_type: #{@token_type}\n" +
76
- "\texpires_in: #{@expires_in}\n" +
77
- "\trefresh_token: #{@refresh_token}\n" +
78
- "\taccess_token: #{@access_token}\n\n"
67
+ def authentication_details
68
+ "\n" +
69
+ " config file: #@config_file\n" +
70
+ " services: #{@services}\n" +
71
+ " grant_type: #{@grant_type}\n" +
72
+ " username: #{@username}\n" +
73
+ " password: #{@password}\n" +
74
+ " client_id: #{@client_id}\n" +
75
+ "client_secret: #{@client_secret}\n" +
76
+ "\n" +
77
+ " token_type: #{@token_type}\n" +
78
+ " access_token: #{@access_token}\n" +
79
+ " expires_in: #{@expires_in}\n" +
80
+ "refresh_token: #{@refresh_token}\n" +
81
+ "\n"
79
82
  end
80
- public :show_authentication
83
+ public :authentication_details
81
84
 
82
85
  end
83
86
  end
@@ -1,3 +1,3 @@
1
1
  module BlommingApi
2
- VERSION = "0.4.3"
2
+ VERSION = "0.4.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blomming_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giorgio Robino
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-06 00:00:00.000000000 Z
11
+ date: 2014-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: method_source