lib/security.rb in forj-0.0.24 vs lib/security.rb in forj-0.0.25

- old
+ new

@@ -13,10 +13,11 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. +require 'rubygems' require 'require_relative' require_relative 'connection.rb' include Connection require_relative 'log.rb' @@ -32,11 +33,11 @@ begin sec_groups = get_security_group(name) if sec_groups.length >= 1 sec_group = sec_groups[0] else - description = format('Security group for blueprint %{name}', name: name) + description = 'Security group for blueprint %s' % [name] Logging.info(description) sec_group = Connection.network.security_groups.create( :name => name, :description => description ) @@ -65,10 +66,10 @@ :port_range_min => port_min, :port_range_max => port_max, :remote_ip_prefix => '0.0.0.0/0' ) rescue StandardError => e - msg = format('error creating the rule for port %{port_min}', port_min: port_min) + msg = 'error creating the rule for port %s' % [port_min] puts msg Logging.error(e.message) end end