ftrio 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +6 -0
- data/lib/ftrio.rb +0 -7
- data/lib/ftrio/railtie.rb +1 -1
- data/lib/ftrio/tasks/ftrio.rake +52 -0
- data/lib/ftrio/version.rb +1 -1
- metadata +6 -6
- data/lib/ftrio/ftrio.rake +0 -41
data/CHANGELOG.md
CHANGED
data/lib/ftrio.rb
CHANGED
data/lib/ftrio/railtie.rb
CHANGED
@@ -0,0 +1,52 @@
|
|
1
|
+
module Ftrio
|
2
|
+
namespace :ftrio do
|
3
|
+
namespace :branch do
|
4
|
+
desc "Creates feature branch"
|
5
|
+
task :create, :feature do |cmd, args|
|
6
|
+
sh "git checkout master"
|
7
|
+
sh "git checkout -b #{args[:feature]}"
|
8
|
+
end
|
9
|
+
|
10
|
+
desc "Destroys feature branch"
|
11
|
+
task :destroy do
|
12
|
+
sh "git checkout master"
|
13
|
+
sh "git branch -D #{current_branch}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
namespace :app do
|
18
|
+
desc "Creates feature app"
|
19
|
+
task :create do
|
20
|
+
feature_app = feature_app(current_branch)
|
21
|
+
sh "heroku create #{feature_app} --stack cedar"
|
22
|
+
sh "git remote rename heroku #{feature_app}"
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "Pushes feature branch into feature app"
|
26
|
+
task :push do
|
27
|
+
feature_branch = current_branch
|
28
|
+
feature_app = feature_app(current_branch)
|
29
|
+
sh "git push #{feature_app} #{feature_branch}:master"
|
30
|
+
end
|
31
|
+
|
32
|
+
desc "Destroys feature app"
|
33
|
+
task :destroy do
|
34
|
+
feature_app = feature_app(current_branch)
|
35
|
+
sh "heroku apps:destroy --app #{feature_app} --confirm #{feature_app}"
|
36
|
+
sh "git remote rm #{feature_app} "
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
namespace :db do
|
41
|
+
desc "Pushes development db into feature app"
|
42
|
+
task :push do
|
43
|
+
feature_app = feature_app(current_branch)
|
44
|
+
sh "heroku db:push --app #{feature_app} --confirm #{feature_app}"
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
task :create, [:feature] => ["branch:create", "app:create", "app:push", "db:push"]
|
49
|
+
task :push => ["app:push"]
|
50
|
+
task :destroy => ["app:destroy", "branch:destroy"]
|
51
|
+
end
|
52
|
+
end
|
data/lib/ftrio/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ftrio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Oguz Bilgic
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2012-06-06 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rake
|
@@ -77,8 +77,8 @@ files:
|
|
77
77
|
- Rakefile
|
78
78
|
- ftrio.gemspec
|
79
79
|
- lib/ftrio.rb
|
80
|
-
- lib/ftrio/ftrio.rake
|
81
80
|
- lib/ftrio/railtie.rb
|
81
|
+
- lib/ftrio/tasks/ftrio.rake
|
82
82
|
- lib/ftrio/version.rb
|
83
83
|
homepage: https://github.com/oguzbilgic/ftrio
|
84
84
|
licenses: []
|
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
requirements: []
|
110
110
|
|
111
111
|
rubyforge_project: ftrio
|
112
|
-
rubygems_version: 1.8.
|
112
|
+
rubygems_version: 1.8.24
|
113
113
|
signing_key:
|
114
114
|
specification_version: 3
|
115
115
|
summary: Feature managment tool
|
data/lib/ftrio/ftrio.rake
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
module Ftrio
|
2
|
-
|
3
|
-
namespace :ftrio do
|
4
|
-
desc "Creates feature_branch and feature_app"
|
5
|
-
task :create, :feature do |cmd, args|
|
6
|
-
feature_branch = args[:feature]
|
7
|
-
feature_app = feature_app(feature_branch)
|
8
|
-
sh "git checkout master"
|
9
|
-
sh "git checkout -b #{feature_branch}"
|
10
|
-
sh "heroku create #{feature_app} --stack cedar"
|
11
|
-
sh "git remote rename heroku #{feature_app}"
|
12
|
-
sh "git push #{feature_app} #{feature_branch}:master"
|
13
|
-
sh "heroku db:push --app #{feature_app} --confirm #{feature_app}"
|
14
|
-
sh "git checkout #{feature_branch}"
|
15
|
-
puts "\n\n"
|
16
|
-
puts " #"
|
17
|
-
puts " # Your feature development app is ready:"
|
18
|
-
puts " # #{feature_app}.heroku.com"
|
19
|
-
puts " #"
|
20
|
-
puts "\n\n"
|
21
|
-
end
|
22
|
-
|
23
|
-
desc "Pushes feature_branch into feature_app"
|
24
|
-
task :push do
|
25
|
-
feature_branch = current_branch
|
26
|
-
feature_app = feature_app(current_branch)
|
27
|
-
sh "git push #{feature_app} #{feature_branch}:master"
|
28
|
-
end
|
29
|
-
|
30
|
-
desc "Destroys feature_branch and feature_app"
|
31
|
-
task :destroy do
|
32
|
-
feature_branch = current_branch
|
33
|
-
feature_app = feature_app(current_branch)
|
34
|
-
sh "git checkout master"
|
35
|
-
sh "git branch -D #{feature_branch}"
|
36
|
-
sh "heroku apps:destroy --app #{feature_app} --confirm #{feature_app}"
|
37
|
-
sh "git remote rm #{feature_app} "
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|