cloud_powers 0.2.7.3 → 0.2.7.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: 835648789bfd7165185fd1682e2a7698b2ef85aa
4
- data.tar.gz: ea6df440b7d4ef9829f11ef006bc16835ee63cef
3
+ metadata.gz: 8b712a5dc3c312be905609c2a43d9ff32052b4a8
4
+ data.tar.gz: 70740c2e6ef22d80e42a4498b3e32cd63b0839ce
5
5
  SHA512:
6
- metadata.gz: 6fa74220a8dab3735f0bd232a4d6d4cfb2f77ba217bda99798848198ed2b1a69931dd80d1f519a9b8dd8d0cd614a8b804b812683e8cb31986ea1ff80c5d23dfe
7
- data.tar.gz: 29768d527166da29d65589e95c33e6bbb63e230fdbe0c50d4e7f14b3b42e3cc70d166b71240b87b243c9a509acaa1634e0fc4ad93c8893898a451aa7f8f6c53d
6
+ metadata.gz: 7fbf9e1557670cc4b141a95a40d250cb159bead6af7e05304a6e3e93c9b1f278936327b84ff4d46160edf68c58b0a5a62f04c4e15b9cce4e13afa22efbdfde33
7
+ data.tar.gz: 217462f8c359440603e8ecf925ff13006755a55d9d86db0ecd55628007938b596ebb07b6fba5dcafec20bc97d2ca0b0d608a15a6816d1f49bed0f973023e300e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cloud_powers (0.2.7.3)
4
+ cloud_powers (0.2.7.4)
5
5
  activesupport-core-ext (~> 4)
6
6
  aws-sdk (~> 2)
7
7
  dotenv (~> 2.1)
@@ -6,12 +6,37 @@ require_relative 'storage'
6
6
 
7
7
  module Smash
8
8
  module CloudPowers
9
+ # The Delegator module is a way to dynamically source and use
10
+ # Ruby source code. You pass a message or something that can
11
+ # respond to +#body()+ and give back a String. The String should
12
+ # be the name of the class you're trying to instantiate and use
9
13
  module Delegator
10
14
  extend Smash::CloudPowers::Auth
11
- include Smash::CloudPowers::AwsResources
15
+ include Smash::CloudPowaters::AwsResources
12
16
  include Smash::CloudPowers::Helper
13
17
  include Smash::CloudPowers::Storage
14
18
 
19
+ # responsible for sourcing, loading into the global namespace
20
+ # and use of Ruby source code, through the +#new()+ method on
21
+ # that class
22
+ #
23
+ # Parameters
24
+ # * id +String+ - the instance id of the calling node. This gets
25
+ # used in communication tools etc.
26
+ # * msg - Anything that responds to +#body()+ and returns a String
27
+ # that can be used in the search for the file in your local and S3
28
+ # bucket locations
29
+ #
30
+ # Returns
31
+ # +Object+ - a newly instantiated object of the class that matches
32
+ # the name retrieved from the +msg+ parameter
33
+ #
34
+ # Example
35
+ # class Job; include Smash::CloudPowers::Delegator; end
36
+ # job = Job.new
37
+ # # the message responds to +#body()+ with "ExampleTask"
38
+ # job.build('abc-1234', Aws::SQS::Message)
39
+ # # => +ExampleTask:Object+
15
40
  def build(id, msg)
16
41
  body = JSON.parse(msg.body)
17
42
  begin
@@ -30,8 +55,17 @@ module Smash
30
55
  end
31
56
  end
32
57
 
58
+ # Predicate method to return true for valid job titles and false for invalid ones
59
+ #
60
+ # Parameters
61
+ # * name +String+ (optional) - name of the task in snake_case
62
+ #
63
+ # Returns
64
+ # +Boolean+
65
+ #
66
+ # Notes
67
+ # * TODO: needs improvement
33
68
  def approved_task?(name = nil)
34
- # TODO: improve this
35
69
  ['demo', 'testinz'].include? to_snake(name)
36
70
  end
37
71
  end
@@ -1,3 +1,3 @@
1
1
  module CloudPowers
2
- VERSION = "0.2.7.3"
2
+ VERSION = "0.2.7.4"
3
3
  end
@@ -91,9 +91,11 @@ module Smash
91
91
 
92
92
  # Manually set the +@project_root+ i-var as a +Pathname+ object.
93
93
  #
94
- # Parameters New path to the project root +String+|+Pathname+
94
+ # Parameters
95
+ # * +String+|+Pathname+ - new path to the project root
95
96
  #
96
- # Returns +Pathname+ - +@project_root+
97
+ # Returns
98
+ # +Pathname+ - +@project_root+
97
99
  #
98
100
  # Example
99
101
  # project_root
@@ -108,7 +110,8 @@ module Smash
108
110
  # Search through the system environment variables for a key or if no key
109
111
  # is given, return all the system-env-vars and their values
110
112
  #
111
- # Parameters [key <String>]: The key to search for
113
+ # Parameters
114
+ # * key +String+ - the key to search for
112
115
  #
113
116
  # Returns
114
117
  # * if a +key+ is given as a parameter, +String+
@@ -145,7 +148,7 @@ module Smash
145
148
  # * key +String+|+Symbol+ - the key to search for
146
149
  #
147
150
  # Returns
148
- # +String+
151
+ # * +String+
149
152
  #
150
153
  # Notes
151
154
  # * TODO: implement a search for all 3 that can find close matches
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_powers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7.3
4
+ version: 0.2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Phillipps