tvd-tvdinner 0.0.15 → 0.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.15
1
+ 0.0.16
@@ -0,0 +1,22 @@
1
+ #!/bin/bash
2
+
3
+ #/ NAME
4
+ #/ cook -- call chef-solo with all the weird stuff tvdinners need
5
+ #/
6
+ #/ SYNOPSIS
7
+ #/ cook
8
+
9
+ # figure out the project root under which bin, lib live
10
+ shome="$(unset CDPATH; cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
11
+
12
+ # load a jason bourne library
13
+ source "$shome/libexec/_jason"
14
+
15
+ # entry point
16
+ function main {
17
+ export RELEASE_DIR="$shome"
18
+ export PROJECT_DIR="$shome"
19
+ bundle exec chef-solo -c $shome/etc/chef/solo.rb "$@"
20
+ }
21
+
22
+ require sub "$BASH_SOURCE" "$@"
@@ -0,0 +1,7 @@
1
+ def dev(nm_gem, workarea="git")
2
+ gem nm_gem, (
3
+ File.exists?(File.expand_path("../#{workarea}/#{nm_gem}", __FILE__)) ?
4
+ (ENV["EDIT_#{nm_gem.gsub(/[-]/, "_")}"] = "true"; { :path => "#{workarea}/#{nm_gem}" }) :
5
+ Dir["vendor/cache/#{nm_gem}-*.gem"].collect {|x| [x.gsub(/\d+/) {|num| sprintf("%011d", num) }, x] }.sort[0][1].split(/-/)[-1].gsub(/\.gem$/,"")
6
+ )
7
+ end
@@ -31,7 +31,7 @@ template "#{node[:release_dir]}/.gitignore" do
31
31
  variables({
32
32
  :ignore =>
33
33
  %w(/.bundle/ /vendor/bundle/ /*.gem
34
- /crash.log /output)})
34
+ /crash.log /output /git)})
35
35
  end
36
36
 
37
37
  %w(NOTICE README.md Gemfile).each do |f|
@@ -47,6 +47,19 @@ template "#{node[:release_dir]}/VERSION" do
47
47
  not_if { File.exists? "#{node[:release_dir]}/VERSION" }
48
48
  end
49
49
 
50
+ directory "#{node[:release_dir]}/git" do
51
+ mode 00755
52
+ end
53
+
54
+ directory "#{node[:release_dir]}/lib" do
55
+ mode 00755
56
+ end
57
+
58
+ cookbook_file "#{node[:release_dir]}/lib/development.rb" do
59
+ mode 00644
60
+ source "development.rb"
61
+ end
62
+
50
63
  cookbook_file "#{node[:release_dir]}/LICENSE" do
51
64
  mode 00644
52
65
  source "LICENSE"
@@ -103,6 +116,11 @@ remote_directory "#{node[:release_dir]}/libexec" do
103
116
  files_mode 00755
104
117
  end
105
118
 
119
+ cookbook_file "#{node[:release_dir]}/bin/cook" do
120
+ mode 00755
121
+ source "cook"
122
+ end
123
+
106
124
  cookbook_file "#{node[:release_dir]}/Makefile" do
107
125
  mode 00644
108
126
  source "Makefile"
@@ -1,11 +1,9 @@
1
+ require "development"
2
+
1
3
  source "https://rubygems.org"
2
4
 
3
5
  gemspec
4
6
 
5
- def dev(nm_gem, workarea)
6
- gem nm_gem, (ENV["EDIT_#{nm_gem.gsub("-","_")}"] ? { :path => "#{workarea}/#{nm_gem}" } : {})
7
- end
8
-
9
7
  gem "tvd-tvdinner" unless File.exists?(File.expand_path("../tvd-tvdinner.gemspec", __FILE__))
10
8
  gem "chefspec"
11
9
  gem "minitest-chef-handler"
@@ -5,7 +5,7 @@ require "tvd-<%= node[:tvd][:name] %>/version"
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "tvd-<%= node[:tvd][:name] %>"
8
- s.version = TVDinner::<%= node[:tvd][:class] %>::VERSION
8
+ s.version = ENV['EDIT_tvd_vagrant'] ? "#{TVDinner::<%= node[:tvd][:class] %>::VERSION}.rc#{%x(git log --max-count=1 --pretty=format:%ct)}" : TVDinner::<%= node[:tvd][:class] %>::VERSION
9
9
  s.homepage = "<%= node[:tvd][:homepage] %>"
10
10
  s.license = "Apache 2.0"
11
11
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.require_path = "lib"
21
21
 
22
- s.add_dependency "chef"
22
+ s.add_dependency "tvd-tvdinner"
23
23
 
24
24
  s.author = "<%= node[:tvd][:author] %>"
25
25
  s.email = "<%= node[:tvd][:email] %>"
@@ -1,5 +1,5 @@
1
1
  module TVDinner
2
2
  module <%= node[:tvd][:class] %>
3
- VERSION = File.read(File.dirname(__FILE__) + '/../../VERSION')
3
+ VERSION = File.read(File.dirname(__FILE__) + '/../../VERSION').strip
4
4
  end
5
5
  end
@@ -0,0 +1,7 @@
1
+ def dev(nm_gem, workarea="git")
2
+ gem nm_gem, (
3
+ File.exists?(File.expand_path("../#{workarea}/#{nm_gem}", __FILE__)) ?
4
+ (ENV["EDIT_#{nm_gem.gsub(/[-]/, "_")}"] = "true"; { :path => "#{workarea}/#{nm_gem}" }) :
5
+ Dir["vendor/cache/#{nm_gem}-*.gem"].collect {|x| [x.gsub(/\d+/) {|num| sprintf("%011d", num) }, x] }.sort[0][1].split(/-/)[-1].gsub(/\.gem$/,"")
6
+ )
7
+ end
@@ -1,5 +1,5 @@
1
1
  module TVDinner
2
2
  module TVDinner
3
- VERSION = File.read(File.dirname(__FILE__) + '/../../VERSION')
3
+ VERSION = File.read(File.dirname(__FILE__) + '/../../VERSION').strip
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tvd-tvdinner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 15
10
- version: 0.0.15
9
+ - 16
10
+ version: 0.0.16
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tom Bombadil
@@ -19,7 +19,7 @@ date: 2013-03-06 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: chef
22
+ name: tvd-tvdinner
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: "0"
33
33
  type: :runtime
34
34
  version_requirements: *id001
35
- description: Generates scaffolding for a tvdinner gem
35
+ description: Generrates a tvdinner project
36
36
  email: amanibhavam@destructuring.org
37
37
  executables: []
38
38
 
@@ -44,6 +44,8 @@ files:
44
44
  - cookbooks/tvdinner/attributes/default.rb
45
45
  - cookbooks/tvdinner/files/default/LICENSE
46
46
  - cookbooks/tvdinner/files/default/Makefile
47
+ - cookbooks/tvdinner/files/default/cook
48
+ - cookbooks/tvdinner/files/default/development.rb
47
49
  - cookbooks/tvdinner/files/default/jason/_bump
48
50
  - cookbooks/tvdinner/files/default/jason/_jason
49
51
  - cookbooks/tvdinner/files/default/jason/_log4sh
@@ -52,7 +54,6 @@ files:
52
54
  - cookbooks/tvdinner/files/default/jasonx/build-gem
53
55
  - cookbooks/tvdinner/files/default/jasonx/build-site
54
56
  - cookbooks/tvdinner/files/default/jasonx/bump
55
- - cookbooks/tvdinner/files/default/jasonx/edit-gem
56
57
  - cookbooks/tvdinner/files/default/jasonx/publish-gem
57
58
  - cookbooks/tvdinner/files/default/jasonx/publish-site
58
59
  - cookbooks/tvdinner/recipes/default.rb
@@ -67,6 +68,7 @@ files:
67
68
  - cookbooks/tvdinner/templates/default/solo.rb.erb
68
69
  - cookbooks/tvdinner/templates/default/tvdinner.rb.erb
69
70
  - cookbooks/tvdinner/templates/default/version.rb.erb
71
+ - lib/development.rb
70
72
  - lib/tvd-tvdinner.rb
71
73
  - lib/tvd-tvdinner/version.rb
72
74
  - spec/.gitignore
@@ -108,7 +110,7 @@ rubyforge_project:
108
110
  rubygems_version: 1.3.7
109
111
  signing_key:
110
112
  specification_version: 3
111
- summary: Generates scaffolding for a tvdinner gem
113
+ summary: Generates a tvdinner project
112
114
  test_files:
113
115
  - spec/.gitignore
114
116
  - tasks/.gitignore
@@ -1,81 +0,0 @@
1
- #!/bin/bash
2
-
3
- #/ NAME
4
- #/ edit-gem -- set environment to hint to Gemfile to use a local gemspec
5
- #/
6
- #/ SYNOPSIS
7
- #/ edit gem <name> [location]
8
- #/ edit gem -r <names>
9
- #/ edit gem -R
10
-
11
- # figure out the project root under which bin, lib live
12
- shome="$(unset CDPATH; cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)"
13
-
14
- # load a jason bourne library
15
- source "$shome/libexec/_jason"
16
-
17
- # define command line options:
18
- DEFINE_boolean "update" "$FLAGS_FALSE" "finish editing a local gem and updates project" "u"
19
- DEFINE_boolean "reset" "$FLAGS_FALSE" "reset gem to remote" "r"
20
- DEFINE_boolean "resetall" "$FLAGS_FALSE" "reset all gems to remote" "R"
21
-
22
- # entry point
23
- function main {
24
- if [[ "$FLAGS_resetall" = "$FLAGS_TRUE" ]]; then
25
- set +f
26
- rm -f $shome/.local/*
27
- set -f
28
- bundle --local --quiet && bundle check > /dev/null
29
- git diff --no-ext-diff Gemfile.lock vendor/cache
30
- elif [[ "$FLAGS_reset" = "$FLAGS_TRUE" ]]; then
31
- local nm_gem
32
- for nm_gem in "$@"; do
33
- rm -f "$shome/.local/$nm_gem"
34
- done
35
-
36
- bundle --local --quiet && bundle check > /dev/null
37
-
38
- git diff --no-ext-diff Gemfile.lock vendor/cache
39
- elif [[ "$FLAGS_update" = "$FLAGS_TRUE" ]]; then
40
- local nm_gem
41
- for nm_gem in "$@"; do
42
- echo -n > "$shome/.local/$nm_gem"
43
- done
44
-
45
- bundle update "$@"
46
-
47
- for nm_gem in "$@"; do
48
- rm -f "$shome/.local/$nm_gem"
49
- done
50
- bundle --local --quiet && bundle check > /dev/null
51
-
52
- git add Gemfile.lock vendor/cache
53
- git add -u vendor/cache
54
- git diff --no-ext-diff --cached Gemfile.lock vendor/cache
55
- else
56
- local nm_gem="$1"; shift
57
-
58
- local pth_gem
59
- if [[ "$#" = 0 ]]; then
60
- pth_gem="gems/$nm_gem"
61
- else
62
- pth_gem="$1"; shift
63
- fi
64
-
65
- if [[ ! -d "$pth_gem" ]]; then
66
- logger_fatal "cannot find local gem directoy at $pth_gem"
67
- exit 1
68
- fi
69
-
70
- pth_gem="$(unset CDPATH; cd -P -- "$pth_gem" && pwd -P)"
71
-
72
- echo "enabling local gem development on ${nm_gem} at ${pth_gem}"
73
- mkdir -p "$shome/.local"
74
- echo "$pth_gem" > "$shome/.local/$nm_gem"
75
-
76
- bundle --local --quiet && bundle check > /dev/null
77
- git diff --no-ext-diff Gemfile.lock vendor/cache
78
- fi
79
- }
80
-
81
- require sub "$BASH_SOURCE" "$@"