ftrio 0.0.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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in ftrio.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # ftrio
2
+
3
+ Ftrio is tool for managing software development process. It has usefull rake test that manages git branches and heroku apps.
4
+
5
+ ## Installation
6
+
7
+ Just add ``` gem 'ftrio' ``` to your gem file
8
+
9
+ ## Usage
10
+
11
+ ### ftrio:create[feature]
12
+
13
+ Creates feature branch
14
+
15
+ ### ftrio:push
16
+
17
+ Merges feature branch into development branches
18
+
19
+ ### ftrio:destroy
20
+
21
+ Destroyes feature branch
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
data/ftrio.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "ftrio/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "ftrio"
7
+ s.version = Ftrio::VERSION
8
+ s.authors = ["Oguz Bilgic"]
9
+ s.email = ["fisyonet@gmail.com"]
10
+ s.homepage = "https://github.com/oguzbilgic/ftrio"
11
+ s.summary = %q{Feature managment tool}
12
+ s.description = %q{Feature managment tool}
13
+
14
+ s.rubyforge_project = "ftrio"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ s.add_development_dependency "rspec"
22
+ s.add_runtime_dependency "heroku"
23
+ s.add_runtime_dependency "taps"
24
+ end
data/lib/ftrio.rb ADDED
@@ -0,0 +1,29 @@
1
+ require "ftrio/version"
2
+ require "ftrio/railtie" if defined? Rails
3
+
4
+ module Ftrio
5
+ include Rake::DSL
6
+
7
+ def self.app_name
8
+ `echo ${PWD##*/}`.chomp
9
+ end
10
+
11
+ def self.current_branch
12
+ `git branch --no-color | grep '*' | cut -d ' ' -f 2`.chomp
13
+ end
14
+
15
+ def self.dev_branch(feature_branch)
16
+ "dev-#{feature_branch}"
17
+ end
18
+
19
+ def self.dev_app(feature_branch)
20
+ "dev-#{app_name}-#{feature_branch}"
21
+ end
22
+
23
+ def self.compile_assets
24
+ sh "rake assets:precompile"
25
+ sh "git add public/assets/*"
26
+ sh 'git commit -m "Precompile assets"'
27
+ end
28
+
29
+ end
@@ -0,0 +1,55 @@
1
+ module Ftrio
2
+
3
+ namespace :ftrio do
4
+ task :deneme do
5
+ puts app_name
6
+ end
7
+
8
+ desc "Creates feature_branch, dev_branch and dev_app"
9
+ task :create, :feature do |cmd, args|
10
+ feature_branch = args[:feature]
11
+ dev_app = dev_app(feature_branch)
12
+ dev_branch = dev_branch(feature_branch)
13
+ sh "git checkout master"
14
+ sh "git checkout -b #{feature_branch}"
15
+ sh "git branch #{dev_branch}"
16
+ sh "git checkout #{dev_branch}"
17
+ compile_assets
18
+ sh "heroku create #{dev_app}"
19
+ sh "git remote rename heroku #{dev_app}"
20
+ sh "git push #{dev_app} #{dev_branch}:master"
21
+ sh "heroku db:push --app #{dev_app} --confirm #{dev_app}"
22
+ sh "git checkout #{feature_branch}"
23
+ puts "\n\n"
24
+ puts "\t#"
25
+ puts "\t# Your feature development app is ready:"
26
+ puts "\t# #{dev_app}.heroku.com"
27
+ puts "\t#"
28
+ puts "\n\n"
29
+ end
30
+
31
+ desc "Merges feature_branch into dev_branch and pushes to dev_app"
32
+ task :push do
33
+ feature_branch = current_branch
34
+ dev_app = dev_app(current_branch)
35
+ dev_branch = dev_branch(current_branch)
36
+ sh "git checkout #{dev_branch}"
37
+ sh "git merge #{feature_branch}"
38
+ compile_assets
39
+ sh "git push #{dev_app} #{dev_branch}:master"
40
+ sh "git checkout #{feature_branch}"
41
+ end
42
+
43
+ desc "Destroys feature_branch, dev_branch and dev_app"
44
+ task :destroy do
45
+ feature_branch = current_branch
46
+ dev_app = dev_app(current_branch)
47
+ dev_branch = dev_branch(current_branch)
48
+ sh "git checkout master"
49
+ sh "git branch -D #{dev_branch}"
50
+ sh "git branch -D #{feature_branch}"
51
+ sh "heroku apps:destroy --app #{dev_app} --confirm #{dev_app}"
52
+ end
53
+ end
54
+
55
+ end
@@ -0,0 +1,7 @@
1
+ module Ftrio
2
+ class Railtie < Rails::Railtie
3
+ rake_tasks do
4
+ load "ftrio/ftrio.rake"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,3 @@
1
+ module Ftrio
2
+ VERSION = "0.0.1"
3
+ end
metadata ADDED
@@ -0,0 +1,115 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ftrio
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Oguz Bilgic
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-12-20 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rspec
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :development
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: heroku
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: taps
50
+ prerelease: false
51
+ requirement: &id003 !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ hash: 3
57
+ segments:
58
+ - 0
59
+ version: "0"
60
+ type: :runtime
61
+ version_requirements: *id003
62
+ description: Feature managment tool
63
+ email:
64
+ - fisyonet@gmail.com
65
+ executables: []
66
+
67
+ extensions: []
68
+
69
+ extra_rdoc_files: []
70
+
71
+ files:
72
+ - .gitignore
73
+ - Gemfile
74
+ - README.md
75
+ - Rakefile
76
+ - ftrio.gemspec
77
+ - lib/ftrio.rb
78
+ - lib/ftrio/ftrio.rake
79
+ - lib/ftrio/railtie.rb
80
+ - lib/ftrio/version.rb
81
+ homepage: https://github.com/oguzbilgic/ftrio
82
+ licenses: []
83
+
84
+ post_install_message:
85
+ rdoc_options: []
86
+
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ hash: 3
95
+ segments:
96
+ - 0
97
+ version: "0"
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
106
+ version: "0"
107
+ requirements: []
108
+
109
+ rubyforge_project: ftrio
110
+ rubygems_version: 1.8.10
111
+ signing_key:
112
+ specification_version: 3
113
+ summary: Feature managment tool
114
+ test_files: []
115
+