linecook 0.6.2

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.
Files changed (47) hide show
  1. data/History +60 -0
  2. data/License.txt +22 -0
  3. data/README +98 -0
  4. data/bin/linecook +58 -0
  5. data/cookbook +0 -0
  6. data/lib/linecook/attributes.rb +22 -0
  7. data/lib/linecook/commands/command.rb +48 -0
  8. data/lib/linecook/commands/command_error.rb +6 -0
  9. data/lib/linecook/commands/env.rb +23 -0
  10. data/lib/linecook/commands/helper.rb +51 -0
  11. data/lib/linecook/commands/helpers.rb +28 -0
  12. data/lib/linecook/commands/init.rb +82 -0
  13. data/lib/linecook/commands/package.rb +39 -0
  14. data/lib/linecook/commands/vbox.rb +85 -0
  15. data/lib/linecook/commands.rb +6 -0
  16. data/lib/linecook/cookbook.rb +104 -0
  17. data/lib/linecook/helper.rb +117 -0
  18. data/lib/linecook/package.rb +197 -0
  19. data/lib/linecook/recipe.rb +103 -0
  20. data/lib/linecook/shell/posix.rb +145 -0
  21. data/lib/linecook/shell/test.rb +254 -0
  22. data/lib/linecook/shell/unix.rb +117 -0
  23. data/lib/linecook/shell/utils.rb +138 -0
  24. data/lib/linecook/shell.rb +11 -0
  25. data/lib/linecook/template.rb +111 -0
  26. data/lib/linecook/test/file_test.rb +77 -0
  27. data/lib/linecook/test/regexp_escape.rb +86 -0
  28. data/lib/linecook/test.rb +172 -0
  29. data/lib/linecook/utils.rb +53 -0
  30. data/lib/linecook/version.rb +8 -0
  31. data/lib/linecook.rb +6 -0
  32. data/templates/Gemfile +2 -0
  33. data/templates/README +90 -0
  34. data/templates/Rakefile +149 -0
  35. data/templates/_gitignore +5 -0
  36. data/templates/attributes/project_name.rb +4 -0
  37. data/templates/cookbook +9 -0
  38. data/templates/files/file.txt +1 -0
  39. data/templates/helpers/project_name/echo.erb +5 -0
  40. data/templates/project_name.gemspec +30 -0
  41. data/templates/recipes/project_name.rb +20 -0
  42. data/templates/scripts/project_name.yml +7 -0
  43. data/templates/templates/template.txt.erb +3 -0
  44. data/templates/vbox/setup/virtual_box +86 -0
  45. data/templates/vbox/ssh/id_rsa +27 -0
  46. data/templates/vbox/ssh/id_rsa.pub +1 -0
  47. metadata +166 -0
@@ -0,0 +1,86 @@
1
+ #! /bin/sh
2
+ #
3
+ # Startup script for VirtualBox shared folder.
4
+ #
5
+ ### BEGIN INIT INFO
6
+ # Provides: vbox-share
7
+ # Required-Start: $ALL
8
+ # Required-Stop:
9
+ # Default-Start: 2 3 4 5
10
+ # Default-Stop: 0 1 6
11
+ # Short-Description: Mount VirtualBox Shared Folder
12
+ ### END INIT INFO
13
+
14
+ # Author: Simon Chiang <simon.a.chiang@gmail.com>
15
+
16
+ # PATH should only include /usr/* if it runs after the mountnfs.sh script
17
+ PATH=/sbin:/usr/sbin:/bin:/usr/bin
18
+ DESC="Mount VirtualBox Shared Folder"
19
+ NAME=virtual_box
20
+ SCRIPTNAME=/etc/init.d/$NAME
21
+
22
+ # Read configuration variable file if it is present
23
+ [ -r /etc/default/$NAME ] && . /etc/default/$NAME
24
+
25
+ # Load the VERBOSE setting and other rcS variables
26
+ . /lib/init/vars.sh
27
+
28
+ # Define LSB log_* functions.
29
+ # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
30
+ . /lib/lsb/init-functions
31
+
32
+ do_start()
33
+ {
34
+ mount -t vboxsf -o uid=1000,gid=100 vbox /vbox
35
+ }
36
+
37
+ do_stop()
38
+ {
39
+ umount /vbox
40
+ }
41
+
42
+ case "$1" in
43
+ start)
44
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
45
+ do_start
46
+ case "$?" in
47
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
48
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
49
+ esac
50
+ ;;
51
+ stop)
52
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
53
+ do_stop
54
+ case "$?" in
55
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
56
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
57
+ esac
58
+ ;;
59
+ status)
60
+ $(ls /vbox | grep . > /dev/null) && exit 0 || exit $?
61
+ ;;
62
+ restart|force-reload)
63
+ log_daemon_msg "Restarting $DESC" "$NAME"
64
+ do_stop
65
+ case "$?" in
66
+ 0|1)
67
+ do_start
68
+ case "$?" in
69
+ 0) log_end_msg 0 ;;
70
+ 1) log_end_msg 1 ;; # Old process is still running
71
+ *) log_end_msg 1 ;; # Failed to start
72
+ esac
73
+ ;;
74
+ *)
75
+ # Failed to stop
76
+ log_end_msg 1
77
+ ;;
78
+ esac
79
+ ;;
80
+ *)
81
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
82
+ exit 3
83
+ ;;
84
+ esac
85
+
86
+ :
@@ -0,0 +1,27 @@
1
+ -----BEGIN RSA PRIVATE KEY-----
2
+ MIIEpgIBAAKCAQEAsYoI3xrqRj6kbbH0rUorFzL3vboIIYv6JwGWhPNKkB+PMLds
3
+ OUozxYbSRYBM+i0XN8nZ2prPkyYx8PSe110MDRZfO97k8ksR8IutpWz4FbJ2BGuN
4
+ f/rWnAWX8DBsOFzzLR3IopSh8qi1CC3KA4bYkXl+gno5ZIwkJxVUhtQhAUskkB87
5
+ TFMcRllmF03VKpILTwa7CrsRno9JMA10lmcOEd8FlArrmv48IKvDjiozeZoufHT/
6
+ nxQlPDnAgBnGNuyB55ebD+/5Fa5C2yNRWIpQb4urm5GJC4F0+3dk9GQhYUgFnuS6
7
+ FXNjGFNzsMeAaz4banOfGEdqAQnFnq8MvWpDcQIDAQABAoIBAQCpvA4/Prw77CfH
8
+ uBr0kbQgudmgyfp8GBdQs3P0J6VhpMqBCNuu6gIVFpBxYfg2NmW8MH7XQKqzRBD7
9
+ DOPPgmXDHWBvHOpFuv+rud6KCWQlWjj6gNkHQglroO1h9OmB+VuEBrWKug8ar7Bj
10
+ 4WMBf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aZ8ULS003XVjrVgHt+5HE7gzEf9W
26
+ X7t2aSwN/FOpp0LLw1XO17YO0huWTePv/VKOczb7hfmxekk4zIa2c0Ew
27
+ -----END RSA PRIVATE KEY-----
@@ -0,0 +1 @@
1
+ ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxigjfGupGPqRtsfStSisXMve9ugghi/onAZaE80qQH48wt2w5SjPFhtJFgEz6LRc3ydnams+TJjHw9J7XXQwNFl873uTySxHwi62lbPgVsnYEa41/+tacBZfwMGw4XPMtHciilKHyqLUILcoDhtiReX6CejlkjCQnFVSG1CEBSySQHztMUxxGWWYXTdUqkgtPBrsKuxGej0kwDXSWZw4R3wWUCuua/jwgq8OOKjN5mi58dP+fFCU8OcCAGcY27IHnl5sP7/kVrkLbI1FYilBvi6ubkYkLgXT7d2T0ZCFhSAWe5LoVc2MYU3Owx4BrPhtqc58YR2oBCcWerwy9akNx vbox@vbox-ubuntu
metadata ADDED
@@ -0,0 +1,166 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: linecook
3
+ version: !ruby/object:Gem::Version
4
+ hash: 3
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 6
9
+ - 2
10
+ version: 0.6.2
11
+ platform: ruby
12
+ authors:
13
+ - Simon Chiang
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-01-07 00:00:00 -07:00
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rake
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 49
30
+ segments:
31
+ - 0
32
+ - 8
33
+ - 7
34
+ version: 0.8.7
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: configurable
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ hash: 3
46
+ segments:
47
+ - 0
48
+ - 7
49
+ - 0
50
+ version: 0.7.0
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: bundler
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ hash: 25
62
+ segments:
63
+ - 1
64
+ - 0
65
+ - 7
66
+ version: 1.0.7
67
+ type: :development
68
+ version_requirements: *id003
69
+ description:
70
+ email: simon.chiang@pinnacol.com
71
+ executables:
72
+ - linecook
73
+ extensions: []
74
+
75
+ extra_rdoc_files:
76
+ - History
77
+ - README
78
+ - License.txt
79
+ files:
80
+ - cookbook
81
+ - lib/linecook.rb
82
+ - lib/linecook/attributes.rb
83
+ - lib/linecook/commands.rb
84
+ - lib/linecook/commands/command.rb
85
+ - lib/linecook/commands/command_error.rb
86
+ - lib/linecook/commands/env.rb
87
+ - lib/linecook/commands/helper.rb
88
+ - lib/linecook/commands/helpers.rb
89
+ - lib/linecook/commands/init.rb
90
+ - lib/linecook/commands/package.rb
91
+ - lib/linecook/commands/vbox.rb
92
+ - lib/linecook/cookbook.rb
93
+ - lib/linecook/helper.rb
94
+ - lib/linecook/package.rb
95
+ - lib/linecook/recipe.rb
96
+ - lib/linecook/shell.rb
97
+ - lib/linecook/shell/posix.rb
98
+ - lib/linecook/shell/test.rb
99
+ - lib/linecook/shell/unix.rb
100
+ - lib/linecook/shell/utils.rb
101
+ - lib/linecook/template.rb
102
+ - lib/linecook/test.rb
103
+ - lib/linecook/test/file_test.rb
104
+ - lib/linecook/test/regexp_escape.rb
105
+ - lib/linecook/utils.rb
106
+ - lib/linecook/version.rb
107
+ - templates/Gemfile
108
+ - templates/README
109
+ - templates/Rakefile
110
+ - templates/_gitignore
111
+ - templates/attributes/project_name.rb
112
+ - templates/cookbook
113
+ - templates/files/file.txt
114
+ - templates/helpers/project_name/echo.erb
115
+ - templates/project_name.gemspec
116
+ - templates/recipes/project_name.rb
117
+ - templates/scripts/project_name.yml
118
+ - templates/templates/template.txt.erb
119
+ - templates/vbox/setup/virtual_box
120
+ - templates/vbox/ssh/id_rsa
121
+ - templates/vbox/ssh/id_rsa.pub
122
+ - bin/linecook
123
+ - History
124
+ - README
125
+ - License.txt
126
+ has_rdoc: true
127
+ homepage: http://github.com/pinnacol/linecook
128
+ licenses: []
129
+
130
+ post_install_message:
131
+ rdoc_options:
132
+ - --main
133
+ - README
134
+ - -S
135
+ - -N
136
+ - --title
137
+ - Linecook
138
+ require_paths:
139
+ - lib
140
+ required_ruby_version: !ruby/object:Gem::Requirement
141
+ none: false
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ hash: 3
146
+ segments:
147
+ - 0
148
+ version: "0"
149
+ required_rubygems_version: !ruby/object:Gem::Requirement
150
+ none: false
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ hash: 3
155
+ segments:
156
+ - 0
157
+ version: "0"
158
+ requirements: []
159
+
160
+ rubyforge_project: ""
161
+ rubygems_version: 1.3.7
162
+ signing_key:
163
+ specification_version: 3
164
+ summary: A shell script generator.
165
+ test_files: []
166
+