ftrio 0.0.3 → 0.0.4

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.
@@ -1,3 +1,9 @@
1
+ ## v0.0.4
2
+
3
+ * move tasks into seperate namespaces
4
+ * move rake file into tasks directory
5
+ * remove unused compile_assets helper function
6
+
1
7
  ## v0.0.3
2
8
 
3
9
  * update task descriptions
@@ -16,11 +16,4 @@ module Ftrio
16
16
  def self.feature_app(feature_branch)
17
17
  "#{app_name}--#{feature_branch}"
18
18
  end
19
-
20
- def self.compile_assets
21
- sh "rake assets:precompile"
22
- sh "git add public/assets/*"
23
- sh 'git commit -m "Precompile assets"'
24
- end
25
-
26
19
  end
@@ -1,7 +1,7 @@
1
1
  module Ftrio
2
2
  class Railtie < Rails::Railtie
3
3
  rake_tasks do
4
- load "ftrio/ftrio.rake"
4
+ load "ftrio/tasks/ftrio.rake"
5
5
  end
6
6
  end
7
7
  end
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Ftrio
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
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: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
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: 2011-12-20 00:00:00 Z
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.10
112
+ rubygems_version: 1.8.24
113
113
  signing_key:
114
114
  specification_version: 3
115
115
  summary: Feature managment tool
@@ -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