chef-flavor-flay 0.3.1 → 0.3.2

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: 004db5b8f12c4bb2f1b092f37aeda9d72ed3d50d
4
- data.tar.gz: 5d2ccc73e0f06ab7a25190dcfe5ab587e5eea82d
3
+ metadata.gz: 312ca9891aec8e1d22c7152b2b724da2fff7fe51
4
+ data.tar.gz: 23c89bbd5d72452143c9816d9ec40f2f36f08070
5
5
  SHA512:
6
- metadata.gz: b7ee2158f6bed113a07ed496f9dc9f648a17baa65f403f43f5ae96cdb2202fc609dd35cfdf5ef3679d37b6547676dc9db9cc6ddc1181c77c5762bcbf4b4c0d51
7
- data.tar.gz: 5163458af7268d0617db8e31dc8cbac16e5034808dde2e9da208578bc9678420796edcea3b72cfb54bbce2315102dd6456676a4a6ee1671a1387043368066edd
6
+ metadata.gz: 1fc58324e14fca32555fc35d976845cb7e073e18219b2412c730a10b62c9185b298bae005867412e119f4b74f480dd6f32033b9b6397cc5582ed71def2db4195
7
+ data.tar.gz: e0437f1a756f0021b89cdf2d02d9131d4f0900077240de72baf2f06189351566ebb592c08f313ddc3efa2555b3ea2bfdc754b7893109602973a88f44c025798b
data/lib/flay/cli.rb CHANGED
@@ -10,12 +10,15 @@ class Flay::CLI < Thor
10
10
  :chef_path,
11
11
  type: :string,
12
12
  desc: "The path that contains your knife.rb file",
13
- default: "~/.chef-sweeper"
13
+ default: "~/.chef-sweeper/"
14
14
  )
15
15
  desc "link [--chef-path=PATH]", "symlinks .chef to --chef-path"
16
16
  long_desc "Creates a symlink in the current directory from .chef to --chef-path"
17
17
  def link
18
- create_link File.join(Dir.pwd, ".chef"), options.fetch("chef_path")
18
+ target_path = options.fetch("chef_path")
19
+ target_path << "/" unless target_path.end_with?("/")
20
+
21
+ create_link File.join(Dir.pwd, ".chef"), target_path
19
22
  end
20
23
 
21
24
  desc "version", "display the current version"
data/lib/flay/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Flay
2
- VERSION = "0.3.1".freeze
2
+ VERSION = "0.3.2".freeze
3
3
  end
@@ -1,4 +1,4 @@
1
+ source "https://berks.sweeper.io"
1
2
  source "https://supermarket.chef.io"
2
- cookbook "core", github: "sweeperio/chef-core"
3
3
 
4
4
  metadata
@@ -7,6 +7,7 @@ property :use_helpers, [TrueClass, FalseClass], default: true
7
7
  action :create do
8
8
  template new_resource.name do
9
9
  source new_resource.source
10
+ helper(:sanitized_cookbook_name) { cookbook_name.sub(/\Achef-/, "") }
10
11
  helpers new_resource.helpers
11
12
  end
12
13
  end
@@ -14,6 +15,7 @@ end
14
15
  action :create_if_missing do
15
16
  template new_resource.name do
16
17
  source new_resource.source
18
+ helper(:sanitized_cookbook_name) { cookbook_name.sub(/\Achef-/, "") }
17
19
  helpers new_resource.helpers
18
20
  action :create_if_missing
19
21
  end
@@ -1,3 +1,3 @@
1
- # <%= cookbook_name %>
1
+ # <%= sanitized_cookbook_name %>
2
2
 
3
3
  TODO: Enter the cookbook description here.
@@ -13,5 +13,5 @@ platforms:
13
13
  suites:
14
14
  - name: default
15
15
  run_list:
16
- - recipe[<%= cookbook_name %>]
16
+ - recipe[<%= sanitized_cookbook_name %>]
17
17
  attributes:
@@ -1,15 +1,17 @@
1
1
  # rubocop:disable Style/SingleSpaceBeforeFirstArg
2
- name "<%= cookbook_name %>"
2
+ name "<%= sanitized_cookbook_name %>"
3
3
  maintainer "<%= copyright_holder %>"
4
4
  maintainer_email "<%= email %>"
5
5
  license "<%= license %>"
6
- description "Installs/Configures <%= cookbook_name %>"
7
- long_description "Installs/Configures <%= cookbook_name %>"
6
+ description "Installs/Configures <%= sanitized_cookbook_name %>"
7
+ long_description "Installs/Configures <%= sanitized_cookbook_name %>"
8
8
  version "0.1.0"
9
9
  # rubocop:enable Style/SingleSpaceBeforeFirstArg
10
10
 
11
11
  supports "ubuntu"
12
12
 
13
+ depends "core", "~> 0.0"
14
+
13
15
  chef_version ">= 12.5" if respond_to?(:chef_version)
14
16
  source_url "YOUR SOURCE REPO URL" if respond_to?(:source_url)
15
17
  issues_url "WHERE TO LOG ISSUES" if respond_to?(:issues_url)
@@ -1,5 +1,5 @@
1
1
  #
2
- # Cookbook Name:: <%= cookbook_name %>
2
+ # Cookbook Name:: <%= sanitized_cookbook_name %>
3
3
  # Recipe:: <%= recipe_name %>
4
4
  #
5
5
  <%= license_description("#").rstrip %>
@@ -1,10 +1,10 @@
1
1
  #
2
- # Cookbook Name:: <%= cookbook_name %>
2
+ # Cookbook Name:: <%= sanitized_cookbook_name %>
3
3
  # Spec:: <%= recipe_name %>
4
4
  #
5
5
  <%= license_description("#").rstrip %>
6
6
 
7
- describe "<%= cookbook_name %>::<%= recipe_name %>" do
7
+ describe "<%= sanitized_cookbook_name %>::<%= recipe_name %>" do
8
8
  cached(:chef_run) do
9
9
  runner = ChefSpec::SoloRunner.new
10
10
  runner.converge(described_recipe)
@@ -1,4 +1,4 @@
1
1
  require "spec_helper"
2
2
 
3
- describe "<%= cookbook_name %>" do
3
+ describe "<%= sanitized_cookbook_name %>" do
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-flavor-flay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - pseudomuto
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-12-31 00:00:00.000000000 Z
11
+ date: 2016-01-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-gen-flavors