chairs 0.6 → 0.7
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/README.md +32 -0
- data/lib/chairs/version.rb +1 -1
- data/lib/musician.rb +20 -8
- metadata +4 -3
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Musical Chairs
|
2
|
+
|
3
|
+
A gem for swapping in/out document folders in iOS Sims
|
4
|
+
|
5
|
+
## Setup
|
6
|
+
|
7
|
+
gem install chairs
|
8
|
+
|
9
|
+
The first time you run it, chairs will ask you to add "chairs/" to your .gitignore file if you have one, you should accept this, it gets big fast.
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
Run `chairs` from the root folder of your project.
|
14
|
+
|
15
|
+
chairs pull [name] get the docs file from most recent app and call it name.
|
16
|
+
chairs push [name] move the named docs to the most recent app doc folder.
|
17
|
+
chairs list list all the current docs in working directory.
|
18
|
+
chairs help show in app help.
|
19
|
+
|
20
|
+
|
21
|
+
## Problems?
|
22
|
+
|
23
|
+
You can [open a new issue](https://github.com/orta/muscialchairs/issues). I'm usually very responsive to changes.
|
24
|
+
|
25
|
+
## Thanks to...
|
26
|
+
- [Frank Macreery](https://github.com/macreery) for giving some good advice.
|
27
|
+
|
28
|
+
## License
|
29
|
+
See the LICENSE.txt file included in the distribution.
|
30
|
+
|
31
|
+
## Copyright
|
32
|
+
Copyright (c) 2012 Art.sy
|
data/lib/chairs/version.rb
CHANGED
data/lib/musician.rb
CHANGED
@@ -30,11 +30,21 @@ module Chairs
|
|
30
30
|
puts "Chairs needs a name for the target."
|
31
31
|
return
|
32
32
|
end
|
33
|
-
|
33
|
+
|
34
34
|
setup
|
35
|
+
|
36
|
+
if Pow("chairs/#{@target_folder}").exists?
|
37
|
+
print "This chair already exists, do you want to overwrite? [Yn] "
|
38
|
+
confirm = STDIN.gets.chomp
|
39
|
+
if confirm.downcase == "y"
|
40
|
+
Pow("chairs/#{@target_folder}").delete!
|
41
|
+
else
|
42
|
+
return
|
43
|
+
end
|
44
|
+
end
|
35
45
|
|
36
|
-
puts "
|
37
|
-
puts "
|
46
|
+
puts "Pulling files for #{@app_name}"
|
47
|
+
puts "From #{@app_folder}/Documents to chairs/#{@target_folder}"
|
38
48
|
|
39
49
|
Pow("chairs/#{@target_folder}").create do
|
40
50
|
Pow("#{@app_folder}/Documents").copy_to(Pow())
|
@@ -57,10 +67,10 @@ module Chairs
|
|
57
67
|
return
|
58
68
|
end
|
59
69
|
|
70
|
+
puts "Pushing files for #{@app_name}"
|
71
|
+
puts "From chairs/#{@target_folder} to #{@app_folder}/Documents"
|
60
72
|
|
61
|
-
|
62
|
-
puts "#{@app_folder}/Documents for #{@app_name}."
|
63
|
-
|
73
|
+
Pow("#{@app_folder}/Documents/").delete!
|
64
74
|
Pow("chairs/#{@target_folder}/Documents/").copy_to(Pow("#{@app_folder}/"))
|
65
75
|
|
66
76
|
puts "Done!"
|
@@ -72,6 +82,7 @@ module Chairs
|
|
72
82
|
return
|
73
83
|
end
|
74
84
|
|
85
|
+
# get all folders in the directory
|
75
86
|
folders = []
|
76
87
|
@target_folder = @params[1]
|
77
88
|
Pow("chairs/").each do |doc|
|
@@ -84,8 +95,9 @@ module Chairs
|
|
84
95
|
folders = "just " + folders[0]
|
85
96
|
else
|
86
97
|
last = folders.last
|
87
|
-
folders = "have " + folders[0..-2].join(", ") + " and
|
98
|
+
folders = "have " + folders[0..-2].join(", ") + " and " + last
|
88
99
|
end
|
100
|
+
|
89
101
|
puts "Currently you #{ folders }."
|
90
102
|
end
|
91
103
|
|
@@ -111,7 +123,7 @@ module Chairs
|
|
111
123
|
reader = File.read(gitignore)
|
112
124
|
|
113
125
|
unless reader.include?(gitignore_line)
|
114
|
-
|
126
|
+
print "You don't have chairs/ in your .gitignore would you like chairs to add it? [Yn] "
|
115
127
|
confirm = STDIN.gets.chomp
|
116
128
|
file << gitignore_line if confirm && confirm.downcase == "y"
|
117
129
|
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.7'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-02-23 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: pow
|
16
|
-
requirement: &
|
16
|
+
requirement: &70139337391980 !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: *70139337391980
|
25
25
|
description: ! 'Switch the documents directory for the iOS app you''re currently working
|
26
26
|
on using named tags. '
|
27
27
|
email:
|
@@ -34,6 +34,7 @@ files:
|
|
34
34
|
- .gitignore
|
35
35
|
- Gemfile
|
36
36
|
- LICENSE.txt
|
37
|
+
- README.md
|
37
38
|
- Rakefile
|
38
39
|
- bin/chairs
|
39
40
|
- chairs.gemspec
|