rbcli 0.2.4 → 0.2.5

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
  SHA256:
3
- metadata.gz: e284561733ecb0914676fbf1e92bb9543b3ea33dd5ed89984fcea0f6ac048475
4
- data.tar.gz: 354a1c9daa25b93a151e6af1b6f48b2327a32111450c1f8d095954142cd8b7fc
3
+ metadata.gz: 21a28b9d0c9eb5ffba2ea1b5a2011df06eb09b3714b0b3a0cf9b7f938480eea9
4
+ data.tar.gz: 7d5cbe7ad6066c0b094b08363da431af7d3fd2a276ac242044ef913cb043ad18
5
5
  SHA512:
6
- metadata.gz: 5c848c533eb62d95e95c47fc50816745df15c54d3ca556d7ad9b6c2f9289a9414e745e85779c3f5398aeaff0726c0082b5838ad36dc3a772f23d6dc6a9a84f34
7
- data.tar.gz: 17c14ab57ab7257b0c192e0f9de56717cfef0ffd410f676be69fc6d53c8d96e5598b71d5cadb30677cbfffe92cb2d78fecc933c8e77f1ce04f26051eb4a7b583
6
+ metadata.gz: 488dd5a8a7130314c557897297e952e3ae1d6c65218ccafa533f543a1b81b3a6d2bbf012432db67519536e8a2f99e7177864029cccd2dde47a5a20b5cbe99d0f
7
+ data.tar.gz: 5d39c367eb6e765dac0e24308f278d2e6c3d38b17a9df4c7f20e04eb88f92e2a22b429ca5436e29a59902dc544706c8622ea49ad6a7f05cb24dfb129c9ebb095
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.5 (Oct 8, 2018)
4
+
5
+ ### Improvements
6
+
7
+ * Added a useful error message when local or remote state is used but not initialized.
8
+
9
+ ### Bugfixes
10
+
11
+ * Fixed a bug in the Github Updater where RBCli crashed when a version tag was not present in the repo.
12
+ * Fixed a bug where deleting a state key would crash Rbcli
13
+ * Fixed a bug where remote state crashed with certain configurations
14
+
3
15
  ## 0.2.4 (Sep 4, 2018)
4
16
 
5
17
  * This is a dummy release required to update the License in the Gemspec file. The license has not changed (GPLv3).
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rbcli (0.2.4)
4
+ rbcli (0.2.5)
5
5
  aws-sdk-dynamodb (~> 1.6)
6
6
  colorize (~> 0.8)
7
7
  deep_merge (~> 1.2)
data/README.md CHANGED
@@ -2,21 +2,7 @@
2
2
 
3
3
  RBCli is currently in Alpha stages of development. All releases can be considered stable, though breaking changes may be made between versions.
4
4
 
5
- Latest Release: v0.2.4 (Sep 4, 2018) -- See the [changelog][changelog] for complete details.
6
-
7
- * Interactive Commands
8
-
9
- Previous Release: v0.2.2 (Aug 22, 2018)
10
-
11
- * Lazy loading for improved startup time
12
- * Hooks are now defined under `Rbcli.Configurate.hooks`.
13
- * Logger is disabled by default, cleaning up output
14
- * Code refactor and cleanup
15
- * Many more improvements
16
-
17
- Previous Release: v0.2.1 (Aug 8, 2018)
18
-
19
- * Remote Execution Feature Added
5
+ Latest Release: v0.2.5 (Oct 8, 2018) -- See the [changelog][changelog] for complete details.
20
6
 
21
7
  [You can find the Official Documentation for RBCli Here.][documentation_home]
22
8
 
@@ -50,6 +50,8 @@ module Rbcli::Autoupdate
50
50
  @client.repo(@reponame).rels[:tags].get.data.map{ |t| t[:name] }[0].sub(/^[v]*/,"")
51
51
  rescue Faraday::ConnectionFailed => e
52
52
  # This is to capture connection errors without bothering the user.
53
+ rescue NoMethodError => e
54
+ # This ignores repos with no tags
53
55
  end
54
56
 
55
57
  end
@@ -53,7 +53,7 @@ module Rbcli::State
53
53
 
54
54
  def delete key, &block
55
55
  state_create unless @loaded
56
- result = @data[:data].delete key.to_sym, block
56
+ result = @data[:data].delete key.to_sym, &block
57
57
  save_state
58
58
  result
59
59
  end
@@ -0,0 +1,29 @@
1
+ ##################################################################################
2
+ # RBCli -- A framework for developing command line applications in Ruby #
3
+ # Copyright (C) 2018 Andrew Khoury #
4
+ # #
5
+ # This program is free software: you can redistribute it and/or modify #
6
+ # it under the terms of the GNU General Public License as published by #
7
+ # the Free Software Foundation, either version 3 of the License, or #
8
+ # (at your option) any later version. #
9
+ # #
10
+ # This program is distributed in the hope that it will be useful, #
11
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of #
12
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
13
+ # GNU General Public License for more details. #
14
+ # #
15
+ # You should have received a copy of the GNU General Public License #
16
+ # along with this program. If not, see <https://www.gnu.org/licenses/>. #
17
+ # #
18
+ # For questions regarding licensing, please contact andrew@blacknex.us #
19
+ ##################################################################################
20
+
21
+ module Rbcli
22
+ def self.local_state
23
+ raise Exception.new "Warning: Usage of Local State requires Local State Storage to be enabled in your application's configuration."
24
+ end
25
+
26
+ def self.remote_state
27
+ raise Exception.new "Warning: Usage of Remote State requires Remote State Storage to be enabled in your application's configuration."
28
+ end
29
+ end
@@ -42,7 +42,7 @@ module Rbcli::State::RemoteConnectors
42
42
  def initialize dynamodb_table, region, aws_access_key_id, aws_secret_access_key, locking: false, lock_timeout: 60
43
43
  @region = region
44
44
  @dynamo_table_name = dynamodb_table
45
- @item_name = Rbcli::configuration[:scriptname]
45
+ @item_name = Rbcli::configuration(:me, :scriptname)
46
46
  @locking = locking
47
47
  @scheduler = nil
48
48
  @lock_timeout = lock_timeout
@@ -23,7 +23,7 @@ require 'rbcli/state_storage/common/state_storage'
23
23
  ## User Interface
24
24
  module Rbcli
25
25
  def self.remote_state
26
- Rbcli::ConfigurateStorage.data[:remotestate]
26
+ Rbcli.configuration(:storage, :remotestate)
27
27
  end
28
28
  end
29
29
 
data/lib/rbcli/version.rb CHANGED
@@ -19,5 +19,5 @@
19
19
  ##################################################################################
20
20
 
21
21
  module Rbcli
22
- VERSION = "0.2.4"
22
+ VERSION = "0.2.5"
23
23
  end
data/lib/rbcli.rb CHANGED
@@ -46,6 +46,7 @@ require 'rbcli/features/logging'
46
46
  # END BASE PREREQS
47
47
 
48
48
  # CORE
49
+ require 'rbcli/state_storage/placeholders'
49
50
  require 'rbcli/configuration/configurate'
50
51
  require 'rbcli/engine/load_project'
51
52
  require 'rbcli/engine/command'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Khoury
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-04 00:00:00.000000000 Z
11
+ date: 2018-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -304,6 +304,7 @@ files:
304
304
  - lib/rbcli/features/userconfig.rb
305
305
  - lib/rbcli/state_storage/common/state_storage.rb
306
306
  - lib/rbcli/state_storage/localstate.rb
307
+ - lib/rbcli/state_storage/placeholders.rb
307
308
  - lib/rbcli/state_storage/remote_state_connectors/dynamodb.rb
308
309
  - lib/rbcli/state_storage/remotestate_dynamodb.rb
309
310
  - lib/rbcli/util/deprecation_warning.rb