phper 0.3.0 → 0.3.1

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.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/phper/commands.rb +11 -4
  3. data/phper.gemspec +1 -1
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -93,7 +93,10 @@ class Phper::Commands < CommandLineUtils::Commands
93
93
  project["project"]["dbname"]]
94
94
  # if here
95
95
  if in_git? and project["project"]["id"] != git_remote(Dir.pwd)
96
- %x{git remote add phper #{project["project"]["git"]}}
96
+ git = project["project"]["git"]
97
+ cmd = "git remote add phper #{git}"
98
+ %x{#{cmd}}
99
+ puts cmd
97
100
  end
98
101
  end
99
102
 
@@ -109,14 +112,18 @@ class Phper::Commands < CommandLineUtils::Commands
109
112
  return opt if @help
110
113
  }
111
114
  raise "project is not specified." unless project
115
+ start
116
+ pj = @agent.projects(project)
117
+ git = pj["project"]["git"]
118
+ raise "project is not exist." unless pj
119
+
112
120
  yes = true if yes or ask("Destroy #{project}? ",["yes","no"]) == "yes"
113
121
  if yes
114
- start
115
122
  @agent.projects_delete project
116
123
  puts "Destroyed #{project}"
117
124
  # if here
118
- if in_git? and project["project"]["id"] == git_remote(Dir.pwd)
119
- git_remotes(project["project"]["git"]){ |name|
125
+ if in_git? and project == git_remote(Dir.pwd)
126
+ git_remotes(git).each{ |name|
120
127
  cmd = "git remote rm #{name}"
121
128
  %x{#{cmd}}
122
129
  puts cmd
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{phper}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
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"]
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: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Yoshihiro TAKAHARA