pave 0.2.1 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56cbfc6029f618ea0e737c96ed8f695ff6026182
4
- data.tar.gz: 5d60bdbdc93f9f019c2515fb46934879578534c4
3
+ metadata.gz: 2dc8b7e8bd29f9a86f40372a62061ecc6f30133e
4
+ data.tar.gz: a3bc9d455fa2566e22b376a389702fdf85a6c4e6
5
5
  SHA512:
6
- metadata.gz: 73069297bb4d399f98d7cad1d88ab3d98e224e2abc758aa5ca3b4d39118fa2a7a01914a3f2c5c2c904336b9246dda12e6ae22b0989dfe40abb4995881f4b8eff
7
- data.tar.gz: 2841c0c99a163690e01e2564260476f53a1e948f0daaba51dae8d2bc57356bab60ebafde1395d018a3a98d8c4f77844cea7cd7329c310d66565eb18432092d07
6
+ metadata.gz: 92b868fff8511163232b3938f481f16b06f7dfabe715cf6246ed75a153fc5ea01dcbeccab1f5494dd419d56eb2e74a40b1df22c847487609fccbc34903a79d74
7
+ data.tar.gz: f68e70453aedaf66569cea22f3f0784c3ed44b2a9e8a04eef64bbae9b45d563219818b0ac1bac8753c0b7640af65feaf776c15e3158e81fbffabaed36e68c302
data/bin/pave CHANGED
@@ -26,36 +26,49 @@ command :update do |c|
26
26
  end
27
27
 
28
28
  command :setup do |c|
29
- c.syntax = "pave setup"
29
+ c.syntax = "pave setup APP_PATH"
30
30
  c.description = "Setup app folder for project."
31
- c.action do
32
- Pave::Concrete.set_up_app_folder
31
+ c.action do |args|
32
+ name = args.first || Dir.getwd
33
+ Pave::Concrete.new(name).set_up_app_folder
33
34
  end
34
35
  end
35
36
  alias_command :"setup:app", :setup
36
37
 
38
+ command :"setup:git" do |c|
39
+ c.syntax = "pave setup:git APP_PATH"
40
+ c.description = "Setup git repo for project."
41
+ c.action do |args|
42
+ name = args.first || Dir.getwd
43
+ Pave::Concrete.new(name).initialize_git
44
+ end
45
+ end
46
+
37
47
  command :"setup:symlinks" do |c|
38
- c.syntax = "pave setup:symlinks"
48
+ c.syntax = "pave setup:symlinks APP_PATH"
39
49
  c.description = "Setup app folder symlinks for project."
40
- c.action do
41
- Pave::Concrete.symlink_folders
50
+ c.action do |args|
51
+ name = args.first || Dir.getwd
52
+ Pave::Concrete.new(name).symlink_folders
42
53
  end
43
54
  end
44
55
 
45
56
  command :"setup:permissions" do |c|
46
- c.syntax = "pave setup:permissions"
57
+ c.syntax = "pave setup:permissions APP_PATH"
47
58
  c.description = "Setup folder permissions for project."
48
- c.action do
49
- Pave::Concrete.modify_folder_permissions
59
+ c.action do |args|
60
+ name = args.first || Dir.getwd
61
+ Pave::Concrete.new(name).modify_folder_permissions
50
62
  end
51
63
  end
52
64
  alias_command :"setup:chmod", :"setup:permissions"
53
65
 
54
66
  command :"setup:clean" do |c|
55
- c.syntax = "pave setup:cleanup"
67
+ c.syntax = "pave setup:cleanup APP_PATH"
56
68
  c.description = "Remove unused folders from project."
57
- c.action do
58
- Pave::Concrete.remove_extra_folders
69
+ c.action do |args|
70
+ name = args.first || Dir.getwd
71
+ Pave::Concrete.new(name).remove_extra_folders
59
72
  end
60
73
  end
61
74
  alias_command :"setup:cleanup", :"setup:clean"
data/lib/pave/concrete.rb CHANGED
@@ -45,11 +45,25 @@ module Pave
45
45
 
46
46
  def initialize_git
47
47
  say "* Setting up git..."
48
- sh "echo 'files/cache/*' > #{name}/.gitignore"
49
- sh "echo 'files/tmp/*' >> #{name}/.gitignore"
48
+ sh "touch #{name}/.gitignore"
49
+ gitignored_folders.each{ |folder| sh "echo '#{folder}' >> #{name}/.gitignore" }
50
+ symlinked_folders.each{ |folder| sh "touch #{name}/app/#{folder}.keep" }
51
+ sh "touch #{name}/files/.keep"
52
+ sh "touch #{name}/updates/.keep"
50
53
  sh "cd #{name} && git init && git add -A && git commit -m 'Initial'"
51
54
  end
52
55
 
56
+ def gitignored_folders
57
+ [
58
+ "files/avatars/*",
59
+ "files/cache/*",
60
+ "files/incoming/*",
61
+ "files/thumbnails/*",
62
+ "files/tmp/*",
63
+ "files/trash/*"
64
+ ]
65
+ end
66
+
53
67
  def sudo?
54
68
  `whoami` == "root"
55
69
  end
data/lib/pave/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pave
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pave
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-21 00:00:00.000000000 Z
12
+ date: 2013-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler