fnando-pez 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/bin/pez +2 -0
- data/lib/pez/base.rb +21 -10
- data/pez.gemspec +2 -2
- data/templates/{plugins.yml → pez.yml} +0 -0
- metadata +2 -2
data/History.txt
CHANGED
@@ -27,3 +27,13 @@
|
|
27
27
|
|
28
28
|
* 1 bug fix:
|
29
29
|
* Couldn't symlink to relative paths
|
30
|
+
|
31
|
+
== 0.0.7 2008-10-03
|
32
|
+
|
33
|
+
* 1 bug fix:
|
34
|
+
* Now handling blank plugins.yml on update
|
35
|
+
* 1 minor enhancement:
|
36
|
+
* If plugins.yml already exists, it'll run update
|
37
|
+
* 2 major enhancements:
|
38
|
+
* Splitted config files in pez.yml and plugins.yml
|
39
|
+
* Prioritize ~/.pezrc, if it exists
|
data/bin/pez
CHANGED
data/lib/pez/base.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Pez
|
2
2
|
VERSION = "0.0.5"
|
3
|
-
CONFIG_FILE = File.dirname(__FILE__) + '/../../templates/
|
3
|
+
CONFIG_FILE = File.dirname(__FILE__) + '/../../templates/pez.yml'
|
4
4
|
|
5
5
|
module Base
|
6
6
|
def self.git?(url, options={})
|
@@ -52,14 +52,19 @@ module Pez
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def self.destination
|
55
|
-
File.expand_path(
|
55
|
+
if File.exists?(File.expand_path('~/.pezrc'))
|
56
|
+
c = YAML.load_file(File.expand_path('~/.pezrc'))
|
57
|
+
else
|
58
|
+
c = YAML.load_file('config/pez.yml')
|
59
|
+
end
|
60
|
+
File.expand_path(c[Rails.env] || 'tmp/plugins')
|
56
61
|
end
|
57
62
|
|
58
63
|
def self.plugins(name, options={})
|
59
64
|
if name
|
60
65
|
[name]
|
61
66
|
elsif options[:all]
|
62
|
-
(Pez::Base.config["plugins"]
|
67
|
+
Pez::Base.config ? (Pez::Base.config["plugins"]).keys : []
|
63
68
|
else
|
64
69
|
[]
|
65
70
|
end
|
@@ -68,14 +73,20 @@ module Pez
|
|
68
73
|
|
69
74
|
module Command
|
70
75
|
def self.setup
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
76
|
+
if File.exists?('config/plugins.yml')
|
77
|
+
puts 'Configuration file already generated at config/plugins.yml. Pez will try to install the plugins listed there.'
|
78
|
+
self.update(nil, {:all => 'all'})
|
79
|
+
else
|
80
|
+
|
81
|
+
File.open('config/pez.yml', 'w') do |f|
|
82
|
+
base_path = IO.popen('pwd').read.chomp
|
83
|
+
contents = File.read(CONFIG_FILE)
|
84
|
+
contents.gsub!(/%base_path%/, base_path)
|
85
|
+
|
86
|
+
f << contents
|
87
|
+
end unless File.exists?(File.expand_path('~/.pezrc'))
|
77
88
|
|
78
|
-
|
89
|
+
File.open('config/plugins.yml', 'w')
|
79
90
|
end
|
80
91
|
end
|
81
92
|
|
data/pez.gemspec
CHANGED
@@ -13,13 +13,13 @@ Gem::Specification.new do |s|
|
|
13
13
|
"License.txt",
|
14
14
|
"README.markdown",
|
15
15
|
"TODO.txt",
|
16
|
-
"templates/
|
16
|
+
"templates/pez.yml",
|
17
17
|
"bin/pez",
|
18
18
|
"lib/pez",
|
19
19
|
"lib/pez/base.rb",
|
20
20
|
"lib/pez.rb"]
|
21
21
|
s.email = ["fnando.vieira@gmail.com"]
|
22
|
-
s.version = "0.0.
|
22
|
+
s.version = "0.0.7"
|
23
23
|
s.homepage = "http://github.com/fnando/pez"
|
24
24
|
s.requirements = ["You'll need GIT and Subversion installed"]
|
25
25
|
s.name = "pez"
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fnando-pez
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
@@ -46,7 +46,7 @@ files:
|
|
46
46
|
- License.txt
|
47
47
|
- README.markdown
|
48
48
|
- TODO.txt
|
49
|
-
- templates/
|
49
|
+
- templates/pez.yml
|
50
50
|
- bin/pez
|
51
51
|
- lib/pez
|
52
52
|
- lib/pez/base.rb
|