chairs 0.7 → 0.8
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/.gitignore +0 -2
- data/lib/chairs/version.rb +1 -1
- data/lib/musician.rb +18 -6
- metadata +4 -4
data/.gitignore
CHANGED
data/lib/chairs/version.rb
CHANGED
data/lib/musician.rb
CHANGED
@@ -20,11 +20,16 @@ module Chairs
|
|
20
20
|
puts ""
|
21
21
|
puts " pull [name] get the docs file from most recent app and call it name."
|
22
22
|
puts " push [name] move the named docs to the most recent app doc folder."
|
23
|
+
puts " open open the app folder in Finder."
|
23
24
|
puts " list list all the current docs in working directory."
|
24
25
|
puts ""
|
25
26
|
puts " ./"
|
26
27
|
end
|
27
28
|
|
29
|
+
def open
|
30
|
+
`open "#{ get_app_folder }"`
|
31
|
+
end
|
32
|
+
|
28
33
|
def pull
|
29
34
|
unless @params[1]
|
30
35
|
puts "Chairs needs a name for the target."
|
@@ -36,7 +41,7 @@ module Chairs
|
|
36
41
|
if Pow("chairs/#{@target_folder}").exists?
|
37
42
|
print "This chair already exists, do you want to overwrite? [Yn] "
|
38
43
|
confirm = STDIN.gets.chomp
|
39
|
-
if confirm.downcase == "y"
|
44
|
+
if confirm.downcase == "y" || confirm == ""
|
40
45
|
Pow("chairs/#{@target_folder}").delete!
|
41
46
|
else
|
42
47
|
return
|
@@ -47,7 +52,7 @@ module Chairs
|
|
47
52
|
puts "From #{@app_folder}/Documents to chairs/#{@target_folder}"
|
48
53
|
|
49
54
|
Pow("chairs/#{@target_folder}").create do
|
50
|
-
Pow("#{@app_folder}/Documents")
|
55
|
+
copy(Pow("#{@app_folder}/Documents"), Pow())
|
51
56
|
end
|
52
57
|
|
53
58
|
puts "Done!"
|
@@ -70,9 +75,9 @@ module Chairs
|
|
70
75
|
puts "Pushing files for #{@app_name}"
|
71
76
|
puts "From chairs/#{@target_folder} to #{@app_folder}/Documents"
|
72
77
|
|
73
|
-
Pow("#{@app_folder}/Documents/").delete!
|
74
|
-
|
75
|
-
|
78
|
+
Pow("#{@app_folder}/Documents/").delete! if Pow("#{@app_folder}/Documents/").exists?
|
79
|
+
|
80
|
+
copy(Pow("chairs/#{@target_folder}/Documents/"), Pow("#{@app_folder}/"))
|
76
81
|
puts "Done!"
|
77
82
|
end
|
78
83
|
|
@@ -125,7 +130,7 @@ module Chairs
|
|
125
130
|
unless reader.include?(gitignore_line)
|
126
131
|
print "You don't have chairs/ in your .gitignore would you like chairs to add it? [Yn] "
|
127
132
|
confirm = STDIN.gets.chomp
|
128
|
-
file << gitignore_line if confirm && confirm.downcase == "y"
|
133
|
+
file << gitignore_line if confirm && ( confirm.downcase == "y" || confirm == "" )
|
129
134
|
end
|
130
135
|
end
|
131
136
|
end
|
@@ -175,6 +180,13 @@ module Chairs
|
|
175
180
|
return ""
|
176
181
|
end
|
177
182
|
|
183
|
+
def copy(source, dest)
|
184
|
+
copy = "rsync -hqr '#{source}' '#{dest}'"
|
185
|
+
puts copy
|
186
|
+
system copy
|
187
|
+
end
|
188
|
+
|
189
|
+
|
178
190
|
def commands
|
179
191
|
(public_methods - Object.public_methods).sort.map{ |c| c.to_sym}
|
180
192
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chairs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.8'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-24 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pow
|
16
|
-
requirement: &
|
16
|
+
requirement: &70336699788200 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70336699788200
|
25
25
|
description: ! 'Switch the documents directory for the iOS app you''re currently working
|
26
26
|
on using named tags. '
|
27
27
|
email:
|