phper 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.7.0
1
+ 0.8.0
data/lib/phper/agent.rb CHANGED
@@ -53,6 +53,14 @@ class Phper::Agent
53
53
  get("/projects/%s/servers/%s/logs" % [project,server["server"]["id"]])
54
54
  end
55
55
 
56
+ def versions project
57
+ get("/projects/%s/versions" % [project])
58
+ end
59
+
60
+ def version_set project, ver
61
+ put("/projects/#{project}/versions", {:version => ver})
62
+ end
63
+
56
64
  def logs_tail project,server,name
57
65
  get("/projects/%s/servers/%s/logs/%s" %
58
66
  [project,server["server"]["id"],name])
@@ -18,6 +18,7 @@ class Phper::Commands < CommandLineUtils::Commands
18
18
  @commands += ["files","files:dump","files:get"]
19
19
  @commands += ["files:modified","files:modified:get"]
20
20
  @commands += ["logs","logs:tail"]
21
+ @commands += ["versions","versions:set"]
21
22
 
22
23
  @agent = Agent.new
23
24
  # @cache_file = homedir + "/.phper.cache"
@@ -655,4 +656,33 @@ EOF
655
656
  }
656
657
  end
657
658
 
659
+
660
+ def versions
661
+ project = nil
662
+ OptionParser.new { |opt|
663
+ @summery = "list available versions"
664
+ project = extract_project(opt)
665
+ return opt if @help
666
+ }
667
+ raise "project is not specified." unless project
668
+ start
669
+ @agent.versions(project).each { |ver| puts ver }
670
+ end
671
+
672
+ def versions_set
673
+ project = nil
674
+ OptionParser.new { |opt|
675
+ @summery = "list available versions"
676
+ @banner = "[<ver>]"
677
+ project = extract_project(opt)
678
+ return opt if @help
679
+ }
680
+ raise "project is not specified." unless project
681
+ ver = @command_options.shift
682
+ raise "version is not specified." unless ver
683
+ start
684
+ @agent.version_set(project,ver)
685
+ puts "--> version:#{ver}"
686
+ end
687
+
658
688
  end
data/phper.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "phper"
8
- s.version = "0.7.0"
8
+ s.version = "0.8.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Yoshihiro TAKAHARA"]
12
- s.date = "2012-03-17"
12
+ s.date = "2012-03-29"
13
13
  s.description = "phper"
14
14
  s.email = "y.takahara@gmail.com"
15
15
  s.executables = ["phper"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 63
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 7
8
+ - 8
9
9
  - 0
10
- version: 0.7.0
10
+ version: 0.8.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Yoshihiro TAKAHARA
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-17 00:00:00 Z
18
+ date: 2012-03-29 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement
@@ -29,8 +29,8 @@ dependencies:
29
29
  version: "0"
30
30
  type: :runtime
31
31
  name: rest-client
32
- prerelease: false
33
32
  version_requirements: *id001
33
+ prerelease: false
34
34
  - !ruby/object:Gem::Dependency
35
35
  requirement: &id002 !ruby/object:Gem::Requirement
36
36
  none: false
@@ -44,8 +44,8 @@ dependencies:
44
44
  version: "0.1"
45
45
  type: :runtime
46
46
  name: keystorage
47
- prerelease: false
48
47
  version_requirements: *id002
48
+ prerelease: false
49
49
  - !ruby/object:Gem::Dependency
50
50
  requirement: &id003 !ruby/object:Gem::Requirement
51
51
  none: false
@@ -59,8 +59,8 @@ dependencies:
59
59
  version: "1.6"
60
60
  type: :runtime
61
61
  name: highline
62
- prerelease: false
63
62
  version_requirements: *id003
63
+ prerelease: false
64
64
  - !ruby/object:Gem::Dependency
65
65
  requirement: &id004 !ruby/object:Gem::Requirement
66
66
  none: false
@@ -75,8 +75,8 @@ dependencies:
75
75
  version: 0.0.1
76
76
  type: :runtime
77
77
  name: command-line-utils
78
- prerelease: false
79
78
  version_requirements: *id004
79
+ prerelease: false
80
80
  - !ruby/object:Gem::Dependency
81
81
  requirement: &id005 !ruby/object:Gem::Requirement
82
82
  none: false
@@ -89,8 +89,8 @@ dependencies:
89
89
  version: "0"
90
90
  type: :runtime
91
91
  name: launchy
92
- prerelease: false
93
92
  version_requirements: *id005
93
+ prerelease: false
94
94
  - !ruby/object:Gem::Dependency
95
95
  requirement: &id006 !ruby/object:Gem::Requirement
96
96
  none: false
@@ -103,8 +103,8 @@ dependencies:
103
103
  version: "0"
104
104
  type: :runtime
105
105
  name: json
106
- prerelease: false
107
106
  version_requirements: *id006
107
+ prerelease: false
108
108
  - !ruby/object:Gem::Dependency
109
109
  requirement: &id007 !ruby/object:Gem::Requirement
110
110
  none: false
@@ -117,8 +117,8 @@ dependencies:
117
117
  version: "0"
118
118
  type: :runtime
119
119
  name: rdoc
120
- prerelease: false
121
120
  version_requirements: *id007
121
+ prerelease: false
122
122
  - !ruby/object:Gem::Dependency
123
123
  requirement: &id008 !ruby/object:Gem::Requirement
124
124
  none: false
@@ -131,8 +131,8 @@ dependencies:
131
131
  version: "0"
132
132
  type: :development
133
133
  name: shoulda
134
- prerelease: false
135
134
  version_requirements: *id008
135
+ prerelease: false
136
136
  - !ruby/object:Gem::Dependency
137
137
  requirement: &id009 !ruby/object:Gem::Requirement
138
138
  none: false
@@ -147,8 +147,8 @@ dependencies:
147
147
  version: 1.0.0
148
148
  type: :development
149
149
  name: bundler
150
- prerelease: false
151
150
  version_requirements: *id009
151
+ prerelease: false
152
152
  - !ruby/object:Gem::Dependency
153
153
  requirement: &id010 !ruby/object:Gem::Requirement
154
154
  none: false
@@ -163,8 +163,8 @@ dependencies:
163
163
  version: 1.5.2
164
164
  type: :development
165
165
  name: jeweler
166
- prerelease: false
167
166
  version_requirements: *id010
167
+ prerelease: false
168
168
  - !ruby/object:Gem::Dependency
169
169
  requirement: &id011 !ruby/object:Gem::Requirement
170
170
  none: false
@@ -177,8 +177,8 @@ dependencies:
177
177
  version: "0"
178
178
  type: :development
179
179
  name: rcov
180
- prerelease: false
181
180
  version_requirements: *id011
181
+ prerelease: false
182
182
  - !ruby/object:Gem::Dependency
183
183
  requirement: &id012 !ruby/object:Gem::Requirement
184
184
  none: false
@@ -191,8 +191,8 @@ dependencies:
191
191
  version: "0"
192
192
  type: :development
193
193
  name: mocha
194
- prerelease: false
195
194
  version_requirements: *id012
195
+ prerelease: false
196
196
  description: phper
197
197
  email: y.takahara@gmail.com
198
198
  executables: