fullstack 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,73 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'rails'
4
+
5
+ # =========
6
+ # = Model =
7
+ # =========
8
+
9
+ gem 'active_record_schema'
10
+ gem 'squeel'
11
+ gem 'auto_strip_attributes'
12
+
13
+ # ========
14
+ # = View =
15
+ # ========
16
+
17
+ gem 'jquery-rails'
18
+ gem 'coffeebeans'
19
+ gem 'kaminari'
20
+
21
+ # ==============
22
+ # = Controller =
23
+ # ==============
24
+
25
+ gem 'rambler'
26
+
27
+ # ============
28
+ # = Settings =
29
+ # ============
30
+
31
+ gem 'rails_config'
32
+
33
+ # ==============
34
+ # = Deployment =
35
+ # ==============
36
+
37
+ gem 'remoting'
38
+ gem 'rails-slow-assets-workaround'
39
+
40
+ # ==============
41
+ # = Middleware =
42
+ # ==============
43
+
44
+ gem 'flash_cookie_session'
45
+ gem 'remotipart'
46
+
47
+ # ============
48
+ # = Security =
49
+ # ============
50
+
51
+ gem 'devise'
52
+ gem 'checkin'
53
+
54
+ # ====================
55
+ # = XML/HTML Parsing =
56
+ # ====================
57
+
58
+ gem 'nokogiri'
59
+ gem 'htmlentities'
60
+
61
+ # ========
62
+ # = I18n =
63
+ # ========
64
+
65
+ gem 'kaminari-i18n'
66
+ gem 'rails-i18n'
67
+ gem 'devise-i18n'
68
+ gem 'devise-i18n-views'
69
+
70
+ group :development do
71
+ gem 'bundler'
72
+ gem 'jeweler', '~> 1.8.4'
73
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,170 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.7)
5
+ actionpack (= 3.2.7)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.7)
8
+ activemodel (= 3.2.7)
9
+ activesupport (= 3.2.7)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.1.3)
17
+ active_record_schema (0.5.0)
18
+ rails (~> 3.0)
19
+ activemodel (3.2.7)
20
+ activesupport (= 3.2.7)
21
+ builder (~> 3.0.0)
22
+ activerecord (3.2.7)
23
+ activemodel (= 3.2.7)
24
+ activesupport (= 3.2.7)
25
+ arel (~> 3.0.2)
26
+ tzinfo (~> 0.3.29)
27
+ activeresource (3.2.7)
28
+ activemodel (= 3.2.7)
29
+ activesupport (= 3.2.7)
30
+ activesupport (3.2.7)
31
+ i18n (~> 0.6)
32
+ multi_json (~> 1.0)
33
+ arel (3.0.2)
34
+ auto_strip_attributes (2.0.2)
35
+ activerecord (>= 3.0)
36
+ bcrypt-ruby (3.0.1)
37
+ builder (3.0.0)
38
+ checkin (0.5.0)
39
+ coffee-script (2.2.0)
40
+ coffee-script-source
41
+ execjs
42
+ coffee-script-source (1.3.3)
43
+ coffeebeans (1.0.1)
44
+ actionpack (>= 3.0.0)
45
+ coffee-script
46
+ devise (2.1.2)
47
+ bcrypt-ruby (~> 3.0)
48
+ orm_adapter (~> 0.1)
49
+ railties (~> 3.1)
50
+ warden (~> 1.2.1)
51
+ devise-i18n (0.5.2)
52
+ devise-i18n-views (0.2.2)
53
+ erubis (2.7.0)
54
+ execjs (1.4.0)
55
+ multi_json (~> 1.0)
56
+ flash_cookie_session (1.1.3)
57
+ rails (~> 3.0)
58
+ git (1.2.5)
59
+ hike (1.2.1)
60
+ htmlentities (4.3.1)
61
+ i18n (0.6.0)
62
+ jeweler (1.8.4)
63
+ bundler (~> 1.0)
64
+ git (>= 1.2.5)
65
+ rake
66
+ rdoc
67
+ journey (1.0.4)
68
+ jquery-rails (2.0.2)
69
+ railties (>= 3.2.0, < 5.0)
70
+ thor (~> 0.14)
71
+ json (1.7.4)
72
+ kaminari (0.13.0)
73
+ actionpack (>= 3.0.0)
74
+ activesupport (>= 3.0.0)
75
+ railties (>= 3.0.0)
76
+ kaminari-i18n (0.1.1)
77
+ rails
78
+ mail (2.4.4)
79
+ i18n (>= 0.4.0)
80
+ mime-types (~> 1.16)
81
+ treetop (~> 1.4.8)
82
+ mime-types (1.19)
83
+ multi_json (1.3.6)
84
+ net-ssh (2.5.2)
85
+ nokogiri (1.5.5)
86
+ orm_adapter (0.4.0)
87
+ polyamorous (0.5.0)
88
+ activerecord (~> 3.0)
89
+ polyglot (0.3.3)
90
+ rack (1.4.1)
91
+ rack-cache (1.2)
92
+ rack (>= 0.4)
93
+ rack-ssl (1.3.2)
94
+ rack
95
+ rack-test (0.6.1)
96
+ rack (>= 1.0)
97
+ rails (3.2.7)
98
+ actionmailer (= 3.2.7)
99
+ actionpack (= 3.2.7)
100
+ activerecord (= 3.2.7)
101
+ activeresource (= 3.2.7)
102
+ activesupport (= 3.2.7)
103
+ bundler (~> 1.0)
104
+ railties (= 3.2.7)
105
+ rails-i18n (0.6.5)
106
+ i18n (~> 0.5)
107
+ rails-slow-assets-workaround (0.1.0)
108
+ rails
109
+ rails_config (0.3.1)
110
+ activesupport (>= 3.0)
111
+ railties (3.2.7)
112
+ actionpack (= 3.2.7)
113
+ activesupport (= 3.2.7)
114
+ rack-ssl (~> 1.3.2)
115
+ rake (>= 0.8.7)
116
+ rdoc (~> 3.4)
117
+ thor (>= 0.14.6, < 2.0)
118
+ rake (0.9.2.2)
119
+ rambler (0.1.2)
120
+ rails (~> 3.2)
121
+ rdoc (3.12)
122
+ json (~> 1.4)
123
+ remoting (0.2.14)
124
+ net-ssh
125
+ rails (~> 3.0)
126
+ remotipart (1.0.2)
127
+ sprockets (2.1.3)
128
+ hike (~> 1.2)
129
+ rack (~> 1.0)
130
+ tilt (~> 1.1, != 1.3.0)
131
+ squeel (1.0.8)
132
+ activerecord (~> 3.0)
133
+ activesupport (~> 3.0)
134
+ polyamorous (~> 0.5.0)
135
+ thor (0.15.4)
136
+ tilt (1.3.3)
137
+ treetop (1.4.10)
138
+ polyglot
139
+ polyglot (>= 0.3.1)
140
+ tzinfo (0.3.33)
141
+ warden (1.2.1)
142
+ rack (>= 1.0)
143
+
144
+ PLATFORMS
145
+ ruby
146
+
147
+ DEPENDENCIES
148
+ active_record_schema
149
+ auto_strip_attributes
150
+ bundler
151
+ checkin
152
+ coffeebeans
153
+ devise
154
+ devise-i18n
155
+ devise-i18n-views
156
+ flash_cookie_session
157
+ htmlentities
158
+ jeweler (~> 1.8.4)
159
+ jquery-rails
160
+ kaminari
161
+ kaminari-i18n
162
+ nokogiri
163
+ rails
164
+ rails-i18n
165
+ rails-slow-assets-workaround
166
+ rails_config
167
+ rambler
168
+ remoting
169
+ remotipart
170
+ squeel
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2012 mcasimir
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,9 @@
1
+ = fullstack
2
+
3
+ Sooner or later a description will be here.
4
+
5
+ == Copyright
6
+
7
+ Copyright (c) 2012 mcasimir. See LICENSE.txt for
8
+ further details.
9
+
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "fullstack"
18
+ gem.homepage = "http://github.com/mcasimir/fullstack"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Fullstack framework}
21
+ gem.description = %Q{Fullstack framework}
22
+ gem.email = "maurizio.cas@gmail.com"
23
+ gem.authors = ["mcasimir"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
data/fullstack.gemspec ADDED
@@ -0,0 +1,121 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "fullstack"
8
+ s.version = "0.1.0"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["mcasimir"]
12
+ s.date = "2012-08-05"
13
+ s.description = "Fullstack framework"
14
+ s.email = "maurizio.cas@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.md"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ "Gemfile",
22
+ "Gemfile.lock",
23
+ "LICENSE.txt",
24
+ "README.md",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "fullstack.gemspec",
28
+ "lib/fullstack.rb",
29
+ "lib/generators/fullstack/install_generator.rb",
30
+ "lib/generators/fullstack/locale_generator.rb",
31
+ "lib/generators/fullstack/templates/config/apache.conf",
32
+ "lib/generators/fullstack/templates/config/assets.yml",
33
+ "lib/generators/fullstack/templates/config/remote.yml",
34
+ "lib/generators/fullstack/templates/config/settings.yml",
35
+ "lib/generators/fullstack/templates/lib/remote.rake"
36
+ ]
37
+ s.homepage = "http://github.com/mcasimir/fullstack"
38
+ s.licenses = ["MIT"]
39
+ s.require_paths = ["lib"]
40
+ s.rubygems_version = "1.8.24"
41
+ s.summary = "Fullstack framework"
42
+
43
+ if s.respond_to? :specification_version then
44
+ s.specification_version = 3
45
+
46
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
+ s.add_runtime_dependency(%q<rails>, [">= 0"])
48
+ s.add_runtime_dependency(%q<active_record_schema>, [">= 0"])
49
+ s.add_runtime_dependency(%q<squeel>, [">= 0"])
50
+ s.add_runtime_dependency(%q<auto_strip_attributes>, [">= 0"])
51
+ s.add_runtime_dependency(%q<jquery-rails>, [">= 0"])
52
+ s.add_runtime_dependency(%q<coffeebeans>, [">= 0"])
53
+ s.add_runtime_dependency(%q<kaminari>, [">= 0"])
54
+ s.add_runtime_dependency(%q<rambler>, [">= 0"])
55
+ s.add_runtime_dependency(%q<rails_config>, [">= 0"])
56
+ s.add_runtime_dependency(%q<remoting>, [">= 0"])
57
+ s.add_runtime_dependency(%q<rails-slow-assets-workaround>, [">= 0"])
58
+ s.add_runtime_dependency(%q<flash_cookie_session>, [">= 0"])
59
+ s.add_runtime_dependency(%q<remotipart>, [">= 0"])
60
+ s.add_runtime_dependency(%q<devise>, [">= 0"])
61
+ s.add_runtime_dependency(%q<checkin>, [">= 0"])
62
+ s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
63
+ s.add_runtime_dependency(%q<htmlentities>, [">= 0"])
64
+ s.add_runtime_dependency(%q<kaminari-i18n>, [">= 0"])
65
+ s.add_runtime_dependency(%q<rails-i18n>, [">= 0"])
66
+ s.add_runtime_dependency(%q<devise-i18n>, [">= 0"])
67
+ s.add_runtime_dependency(%q<devise-i18n-views>, [">= 0"])
68
+ s.add_development_dependency(%q<bundler>, [">= 0"])
69
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
70
+ else
71
+ s.add_dependency(%q<rails>, [">= 0"])
72
+ s.add_dependency(%q<active_record_schema>, [">= 0"])
73
+ s.add_dependency(%q<squeel>, [">= 0"])
74
+ s.add_dependency(%q<auto_strip_attributes>, [">= 0"])
75
+ s.add_dependency(%q<jquery-rails>, [">= 0"])
76
+ s.add_dependency(%q<coffeebeans>, [">= 0"])
77
+ s.add_dependency(%q<kaminari>, [">= 0"])
78
+ s.add_dependency(%q<rambler>, [">= 0"])
79
+ s.add_dependency(%q<rails_config>, [">= 0"])
80
+ s.add_dependency(%q<remoting>, [">= 0"])
81
+ s.add_dependency(%q<rails-slow-assets-workaround>, [">= 0"])
82
+ s.add_dependency(%q<flash_cookie_session>, [">= 0"])
83
+ s.add_dependency(%q<remotipart>, [">= 0"])
84
+ s.add_dependency(%q<devise>, [">= 0"])
85
+ s.add_dependency(%q<checkin>, [">= 0"])
86
+ s.add_dependency(%q<nokogiri>, [">= 0"])
87
+ s.add_dependency(%q<htmlentities>, [">= 0"])
88
+ s.add_dependency(%q<kaminari-i18n>, [">= 0"])
89
+ s.add_dependency(%q<rails-i18n>, [">= 0"])
90
+ s.add_dependency(%q<devise-i18n>, [">= 0"])
91
+ s.add_dependency(%q<devise-i18n-views>, [">= 0"])
92
+ s.add_dependency(%q<bundler>, [">= 0"])
93
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
94
+ end
95
+ else
96
+ s.add_dependency(%q<rails>, [">= 0"])
97
+ s.add_dependency(%q<active_record_schema>, [">= 0"])
98
+ s.add_dependency(%q<squeel>, [">= 0"])
99
+ s.add_dependency(%q<auto_strip_attributes>, [">= 0"])
100
+ s.add_dependency(%q<jquery-rails>, [">= 0"])
101
+ s.add_dependency(%q<coffeebeans>, [">= 0"])
102
+ s.add_dependency(%q<kaminari>, [">= 0"])
103
+ s.add_dependency(%q<rambler>, [">= 0"])
104
+ s.add_dependency(%q<rails_config>, [">= 0"])
105
+ s.add_dependency(%q<remoting>, [">= 0"])
106
+ s.add_dependency(%q<rails-slow-assets-workaround>, [">= 0"])
107
+ s.add_dependency(%q<flash_cookie_session>, [">= 0"])
108
+ s.add_dependency(%q<remotipart>, [">= 0"])
109
+ s.add_dependency(%q<devise>, [">= 0"])
110
+ s.add_dependency(%q<checkin>, [">= 0"])
111
+ s.add_dependency(%q<nokogiri>, [">= 0"])
112
+ s.add_dependency(%q<htmlentities>, [">= 0"])
113
+ s.add_dependency(%q<kaminari-i18n>, [">= 0"])
114
+ s.add_dependency(%q<rails-i18n>, [">= 0"])
115
+ s.add_dependency(%q<devise-i18n>, [">= 0"])
116
+ s.add_dependency(%q<devise-i18n-views>, [">= 0"])
117
+ s.add_dependency(%q<bundler>, [">= 0"])
118
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
119
+ end
120
+ end
121
+
data/lib/fullstack.rb ADDED
@@ -0,0 +1,27 @@
1
+ require 'rails'
2
+
3
+ require 'active_record_schema'
4
+ require 'squeel'
5
+ require 'auto_strip_attributes'
6
+ require 'jquery-rails'
7
+ require 'coffeebeans'
8
+ require 'rambler'
9
+ require 'rails_config'
10
+ require 'flash_cookie_session'
11
+ require 'remotipart'
12
+ require 'devise'
13
+ require 'checkin'
14
+ require 'nokogiri'
15
+ require 'htmlentities'
16
+ require 'rails-i18n'
17
+ require 'devise-i18n'
18
+ require 'devise-i18n-views'
19
+ require 'kaminari-i18n'
20
+ require 'remoting'
21
+ require 'kaminari'
22
+ require 'rails-slow-assets-workaround'
23
+
24
+ module Fullstack
25
+ class Engine < ::Rails::Engine
26
+ end
27
+ end
@@ -0,0 +1,39 @@
1
+ module Fullstack
2
+ class InstallGenerator
3
+ source_root File.expand_path('../templates', __FILE__)
4
+
5
+ def devise
6
+ generate "devise:install"
7
+ end
8
+
9
+ def gitignore
10
+ append_to_file '.gitignore' do
11
+ <<-eos
12
+ .DS_Store
13
+ /public/uploads
14
+ /public/attachments
15
+ *.tmproj
16
+ tmtags
17
+
18
+ eos
19
+ end
20
+ end
21
+
22
+ def action_mailer
23
+ inject_into_file("config/environments/production.rb", :after => "Application.configure do\n") do
24
+ <<-eos
25
+
26
+ config.action_mailer.default_url_options = { :host => '#{domain}' }
27
+ config.action_mailer.delivery_method = :sendmail
28
+ config.action_mailer.raise_delivery_errors = false
29
+
30
+ eos
31
+ end
32
+ end
33
+
34
+ def fullstack_templates
35
+ directory "config", Rails.root.join("config")
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,25 @@
1
+ module Fullstack
2
+ class LocaleGenerator < Rails::Generators::NamedBase
3
+
4
+ def install
5
+ generate "kaminari:locale #{name}"
6
+ generate "devise:views:locale #{name}"
7
+
8
+ create_file "config/locales/kaminari.#{name}.yml" do
9
+ <<-eos
10
+ #{name}:
11
+ views:
12
+ pagination:
13
+ first: "&laquo;"
14
+ last: "&raquo;"
15
+ previous: "&lsaquo;"
16
+ next: "&rsaquo;"
17
+ truncate: "..."
18
+
19
+ eos
20
+
21
+ end
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,9 @@
1
+ <VirtualHost *:80>
2
+ ServerName www.%{domain_name}
3
+ ServerAlias %{domain_name}
4
+ DocumentRoot /var/ror/%{app_name}/public
5
+ <Directory /var/ror/%{app_name}/public>
6
+ AllowOverride all
7
+ Options -MultiViews
8
+ </Directory>
9
+ </VirtualHost>
@@ -0,0 +1,6 @@
1
+ ---
2
+ # example:
3
+ # - admin/admin.css
4
+ # - admin/admin.js
5
+ # - site/site.css
6
+ # - site/site.js
@@ -0,0 +1,7 @@
1
+ remote:
2
+ login: ror@%{domain_name}
3
+ dest: /var/ror/%{app_name}
4
+ repo: ssh://ror@%{domain_name}/var/ror/git/%{app_name}.git
5
+ ruby: 1.9.3
6
+ tmp: /tmp
7
+ app: %{app_name}
@@ -0,0 +1,5 @@
1
+ site:
2
+ title: "%{site_title}"
3
+ slogan: "%{site_slogan}"
4
+ email: "%{site_email}"
5
+ domain: "%{site_domain}"
@@ -0,0 +1,255 @@
1
+ namespace :remote do
2
+
3
+ task :info do
4
+ require 'remoting/task'
5
+ remote('info', config.login) do
6
+
7
+ source "/usr/local/rvm/scripts/rvm"
8
+ which :ruby
9
+ echo "RUBY VERSION: `ruby --version`"
10
+ echo "RUBYGEM VERSION: `gem --version`"
11
+ command "RVM_VER=`rvm --version`"
12
+ echo "RVM VERSION: $RVM_VER"
13
+ end
14
+ end
15
+
16
+ desc "Setup git origin"
17
+ task :init do
18
+ require 'remoting/task'
19
+
20
+ local('init') do
21
+ git :init
22
+ git :remote, :add, :origin, config.repo
23
+ end
24
+ end
25
+
26
+ desc "Initialize remote"
27
+ task :setup do
28
+ require 'remoting/task'
29
+ repo_location = config.repo.gsub(/^ssh:\/\/[^\/]+/, "")
30
+ remote('setup', config.login) do
31
+ mkdir "-p", repo_location
32
+ cd repo_location
33
+ git :init, "--bare"
34
+ git "--bare", "update-server-info"
35
+ mkdir "-p", config.dest
36
+ git :config, "core.bare", :false
37
+ git :config, "core.worktree", config.dest
38
+ git :config, "receive.denycurrentbranch", :ignore
39
+ touch "hooks/post-receive"
40
+ command("echo '#!/bin/sh' >> hooks/post-receive")
41
+ command("echo git checkout -f >> hooks/post-receive ")
42
+ chmod "+x", "hooks/post-receive"
43
+ end
44
+ end
45
+
46
+ desc "Commit everything to remote git repository"
47
+ task :push do
48
+ require 'remoting/task'
49
+
50
+ message = ENV["MESSAGE"] || "commit #{Time.now}"
51
+
52
+ local('push') do
53
+ git :add, "."
54
+ git :commit, "-a", "-m", "\"#{message}\""
55
+ git :push, "origin", "+master:refs/heads/master"
56
+ end
57
+ end
58
+
59
+ desc "Commit everything to remote git repository"
60
+ task :pull do
61
+ require 'remoting/task'
62
+
63
+ local('pull') do
64
+ git :pull, :origin, :master
65
+ end
66
+ end
67
+
68
+
69
+ desc "Restart the server"
70
+ task :restart do
71
+ require 'remoting/task'
72
+
73
+ remote('restart', config.login) do
74
+ mkdir '-p', config.dest.join('tmp')
75
+ touch config.dest.join('tmp', 'restart.txt')
76
+ end
77
+
78
+ end
79
+
80
+ desc "Run bundle install on the server"
81
+ task :bundle do
82
+ require 'remoting/task'
83
+
84
+ remote('bundle', config.login) do
85
+ source "/usr/local/rvm/scripts/rvm"
86
+ rvm :use, config.ruby
87
+
88
+ cd config.dest
89
+ export "LANG=en_US.UTF-8"
90
+ command "RAILS_ENV=production", "bundle install", "--without development test", "--deployment"
91
+ end
92
+ end
93
+
94
+ desc "Deploy application on server"
95
+ task :deploy => [:push, :bundle, :"assets:compile", :restart] do
96
+ end
97
+
98
+ desc "Run rake tasks on server"
99
+ task :rake, [:invocation] do |t, args|
100
+ require 'remoting/task'
101
+
102
+ invocation = args[:invocation]
103
+
104
+ remote('rake', config.login, :interactive => true) do
105
+ source "/usr/local/rvm/scripts/rvm"
106
+ rvm :use, config.ruby
107
+ cd config.dest
108
+ command("RAILS_ENV=production bundle exec rake #{invocation}")
109
+ end
110
+
111
+ end
112
+
113
+ desc "Open a remote shell session on server"
114
+ task :ssh do
115
+ require 'remoting/task'
116
+ remote('ssh', config.login, :interactive => true) do
117
+ end
118
+ end
119
+
120
+ desc "Dump a remote logfile"
121
+ task :log, [:lines, :filename] do |t, args|
122
+ require 'remoting/task'
123
+
124
+ filename, lines = args.values_at(:lines, :filename)
125
+ filename ||= "production"
126
+ filename = "#{filename}.log" unless filename =~ /\.[a-z]+$/
127
+
128
+ lines ||= 100
129
+
130
+ remote('log', config.login) do
131
+ cd config.dest
132
+ tail "-#{lines} log/#{filename}"
133
+ end
134
+ end
135
+
136
+ task :logs => [:log] do
137
+ end
138
+
139
+
140
+ desc "Run tail -f on logfile"
141
+ task :logtail, [:filename] do |t, args|
142
+ require 'remoting/task'
143
+
144
+ filename= args[:filename]
145
+ filename ||= "production"
146
+ filename = "#{filename}.log" unless filename =~ /\.[a-z]+$/
147
+
148
+ remote('logtail', config.login) do
149
+ cd config.dest
150
+ tail "-f log/#{filename}"
151
+ end
152
+ end
153
+
154
+ desc "Open a remote console"
155
+ task :console do
156
+ require 'remoting/task'
157
+
158
+ remote('console', config.login, :interactive => true) do
159
+ cd config.dest
160
+ source "/usr/local/rvm/scripts/rvm"
161
+ bundle :exec, "rails c production"
162
+ end
163
+ end
164
+
165
+ desc "Update crontab with whenever schedule"
166
+ task :whenever do
167
+ require 'remoting/task'
168
+
169
+ remote('whenever', config.login) do
170
+ cd config.dest
171
+ whenever "-w"
172
+ end
173
+ end
174
+
175
+
176
+ namespace :apache do
177
+ task :ensite do
178
+ require 'remoting/task'
179
+ remote('ensite', config.login, :interactive => true) do
180
+ cd "/etc/apache2/sites-enabled"
181
+ sudo "ln -s #{config.dest.join('config', 'apache.conf')} #{config.app}"
182
+ end
183
+ end
184
+
185
+ task :reload do
186
+ require 'remoting/task'
187
+
188
+ remote('reload', config.login, :interactive => true) do
189
+ sudo "/etc/init.d/apache2 reload"
190
+ end
191
+ end
192
+ end
193
+
194
+ namespace :assets do
195
+
196
+ desc 'Precompile assets'
197
+ task :precompile do
198
+ require 'remoting/task'
199
+
200
+ remote('rake assets:precompile', config.login) do
201
+ source "/usr/local/rvm/scripts/rvm"
202
+ rvm :use, config.ruby
203
+ cd config.dest
204
+ command("RAILS_ENV=production bundle exec rake assets:precompile")
205
+ echo 'restarting ...'
206
+ mkdir '-p', config.dest.join('tmp')
207
+ touch config.dest.join('tmp', 'restart.txt')
208
+
209
+ end
210
+ end
211
+
212
+ desc 'compile application related static assets'
213
+ task :compile do
214
+ require 'remoting/task'
215
+
216
+ remote('rake assets:compile', config.login) do
217
+ source "/usr/local/rvm/scripts/rvm"
218
+ rvm :use, config.ruby
219
+ cd config.dest
220
+ command("RAILS_ENV=production bundle exec rake assets:compile")
221
+ end
222
+ end
223
+
224
+ end
225
+
226
+ namespace :db do
227
+
228
+ desc "Migrate remote database"
229
+ task :migrate do |t, args|
230
+ require 'remoting/task'
231
+
232
+ remote('rake db:migrate', config.login) do
233
+ source "/usr/local/rvm/scripts/rvm"
234
+ rvm :use, config.ruby
235
+ cd config.dest
236
+ command("RAILS_ENV=production bundle exec rake db:migrate")
237
+ end
238
+ end
239
+
240
+ desc "Seed remote database"
241
+ task :seed do |t, args|
242
+ require 'remoting/task'
243
+
244
+ remote('rake db:seed', config.login) do
245
+ source "/usr/local/rvm/scripts/rvm"
246
+ rvm :use, config.ruby
247
+ cd config.dest
248
+ command("RAILS_ENV=production bundle exec rake db:seed")
249
+ end
250
+ end
251
+
252
+
253
+ end
254
+
255
+ end
metadata ADDED
@@ -0,0 +1,434 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fullstack
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - mcasimir
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-08-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: active_record_schema
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: squeel
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: auto_strip_attributes
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :runtime
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: jquery-rails
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :runtime
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: coffeebeans
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :runtime
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: kaminari
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rambler
128
+ requirement: !ruby/object:Gem::Requirement
129
+ none: false
130
+ requirements:
131
+ - - ! '>='
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: rails_config
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :runtime
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
158
+ - !ruby/object:Gem::Dependency
159
+ name: remoting
160
+ requirement: !ruby/object:Gem::Requirement
161
+ none: false
162
+ requirements:
163
+ - - ! '>='
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :runtime
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ - !ruby/object:Gem::Dependency
175
+ name: rails-slow-assets-workaround
176
+ requirement: !ruby/object:Gem::Requirement
177
+ none: false
178
+ requirements:
179
+ - - ! '>='
180
+ - !ruby/object:Gem::Version
181
+ version: '0'
182
+ type: :runtime
183
+ prerelease: false
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ - !ruby/object:Gem::Dependency
191
+ name: flash_cookie_session
192
+ requirement: !ruby/object:Gem::Requirement
193
+ none: false
194
+ requirements:
195
+ - - ! '>='
196
+ - !ruby/object:Gem::Version
197
+ version: '0'
198
+ type: :runtime
199
+ prerelease: false
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ - !ruby/object:Gem::Dependency
207
+ name: remotipart
208
+ requirement: !ruby/object:Gem::Requirement
209
+ none: false
210
+ requirements:
211
+ - - ! '>='
212
+ - !ruby/object:Gem::Version
213
+ version: '0'
214
+ type: :runtime
215
+ prerelease: false
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ - !ruby/object:Gem::Dependency
223
+ name: devise
224
+ requirement: !ruby/object:Gem::Requirement
225
+ none: false
226
+ requirements:
227
+ - - ! '>='
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
238
+ - !ruby/object:Gem::Dependency
239
+ name: checkin
240
+ requirement: !ruby/object:Gem::Requirement
241
+ none: false
242
+ requirements:
243
+ - - ! '>='
244
+ - !ruby/object:Gem::Version
245
+ version: '0'
246
+ type: :runtime
247
+ prerelease: false
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ! '>='
252
+ - !ruby/object:Gem::Version
253
+ version: '0'
254
+ - !ruby/object:Gem::Dependency
255
+ name: nokogiri
256
+ requirement: !ruby/object:Gem::Requirement
257
+ none: false
258
+ requirements:
259
+ - - ! '>='
260
+ - !ruby/object:Gem::Version
261
+ version: '0'
262
+ type: :runtime
263
+ prerelease: false
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
266
+ requirements:
267
+ - - ! '>='
268
+ - !ruby/object:Gem::Version
269
+ version: '0'
270
+ - !ruby/object:Gem::Dependency
271
+ name: htmlentities
272
+ requirement: !ruby/object:Gem::Requirement
273
+ none: false
274
+ requirements:
275
+ - - ! '>='
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :runtime
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ! '>='
284
+ - !ruby/object:Gem::Version
285
+ version: '0'
286
+ - !ruby/object:Gem::Dependency
287
+ name: kaminari-i18n
288
+ requirement: !ruby/object:Gem::Requirement
289
+ none: false
290
+ requirements:
291
+ - - ! '>='
292
+ - !ruby/object:Gem::Version
293
+ version: '0'
294
+ type: :runtime
295
+ prerelease: false
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ! '>='
300
+ - !ruby/object:Gem::Version
301
+ version: '0'
302
+ - !ruby/object:Gem::Dependency
303
+ name: rails-i18n
304
+ requirement: !ruby/object:Gem::Requirement
305
+ none: false
306
+ requirements:
307
+ - - ! '>='
308
+ - !ruby/object:Gem::Version
309
+ version: '0'
310
+ type: :runtime
311
+ prerelease: false
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ! '>='
316
+ - !ruby/object:Gem::Version
317
+ version: '0'
318
+ - !ruby/object:Gem::Dependency
319
+ name: devise-i18n
320
+ requirement: !ruby/object:Gem::Requirement
321
+ none: false
322
+ requirements:
323
+ - - ! '>='
324
+ - !ruby/object:Gem::Version
325
+ version: '0'
326
+ type: :runtime
327
+ prerelease: false
328
+ version_requirements: !ruby/object:Gem::Requirement
329
+ none: false
330
+ requirements:
331
+ - - ! '>='
332
+ - !ruby/object:Gem::Version
333
+ version: '0'
334
+ - !ruby/object:Gem::Dependency
335
+ name: devise-i18n-views
336
+ requirement: !ruby/object:Gem::Requirement
337
+ none: false
338
+ requirements:
339
+ - - ! '>='
340
+ - !ruby/object:Gem::Version
341
+ version: '0'
342
+ type: :runtime
343
+ prerelease: false
344
+ version_requirements: !ruby/object:Gem::Requirement
345
+ none: false
346
+ requirements:
347
+ - - ! '>='
348
+ - !ruby/object:Gem::Version
349
+ version: '0'
350
+ - !ruby/object:Gem::Dependency
351
+ name: bundler
352
+ requirement: !ruby/object:Gem::Requirement
353
+ none: false
354
+ requirements:
355
+ - - ! '>='
356
+ - !ruby/object:Gem::Version
357
+ version: '0'
358
+ type: :development
359
+ prerelease: false
360
+ version_requirements: !ruby/object:Gem::Requirement
361
+ none: false
362
+ requirements:
363
+ - - ! '>='
364
+ - !ruby/object:Gem::Version
365
+ version: '0'
366
+ - !ruby/object:Gem::Dependency
367
+ name: jeweler
368
+ requirement: !ruby/object:Gem::Requirement
369
+ none: false
370
+ requirements:
371
+ - - ~>
372
+ - !ruby/object:Gem::Version
373
+ version: 1.8.4
374
+ type: :development
375
+ prerelease: false
376
+ version_requirements: !ruby/object:Gem::Requirement
377
+ none: false
378
+ requirements:
379
+ - - ~>
380
+ - !ruby/object:Gem::Version
381
+ version: 1.8.4
382
+ description: Fullstack framework
383
+ email: maurizio.cas@gmail.com
384
+ executables: []
385
+ extensions: []
386
+ extra_rdoc_files:
387
+ - LICENSE.txt
388
+ - README.md
389
+ files:
390
+ - .document
391
+ - Gemfile
392
+ - Gemfile.lock
393
+ - LICENSE.txt
394
+ - README.md
395
+ - Rakefile
396
+ - VERSION
397
+ - fullstack.gemspec
398
+ - lib/fullstack.rb
399
+ - lib/generators/fullstack/install_generator.rb
400
+ - lib/generators/fullstack/locale_generator.rb
401
+ - lib/generators/fullstack/templates/config/apache.conf
402
+ - lib/generators/fullstack/templates/config/assets.yml
403
+ - lib/generators/fullstack/templates/config/remote.yml
404
+ - lib/generators/fullstack/templates/config/settings.yml
405
+ - lib/generators/fullstack/templates/lib/remote.rake
406
+ homepage: http://github.com/mcasimir/fullstack
407
+ licenses:
408
+ - MIT
409
+ post_install_message:
410
+ rdoc_options: []
411
+ require_paths:
412
+ - lib
413
+ required_ruby_version: !ruby/object:Gem::Requirement
414
+ none: false
415
+ requirements:
416
+ - - ! '>='
417
+ - !ruby/object:Gem::Version
418
+ version: '0'
419
+ segments:
420
+ - 0
421
+ hash: 3106569946832484112
422
+ required_rubygems_version: !ruby/object:Gem::Requirement
423
+ none: false
424
+ requirements:
425
+ - - ! '>='
426
+ - !ruby/object:Gem::Version
427
+ version: '0'
428
+ requirements: []
429
+ rubyforge_project:
430
+ rubygems_version: 1.8.24
431
+ signing_key:
432
+ specification_version: 3
433
+ summary: Fullstack framework
434
+ test_files: []