xrails 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -7
- data/Rakefile +1 -1
- data/bin/xrails +1 -1
- data/template/files/deploy.rb +7 -0
- data/template/files/xrails_Gemfile +1 -2
- data/template/xrails.rb +8 -9
- data/xrails.gemspec +4 -3
- metadata +3 -2
data/README.md
CHANGED
@@ -9,7 +9,7 @@ First install the xRails gem:
|
|
9
9
|
|
10
10
|
Then run:
|
11
11
|
|
12
|
-
xrails
|
12
|
+
xrails new projectname
|
13
13
|
|
14
14
|
This will create a Rails 3 app in `projectname'. This script creates a
|
15
15
|
new git repository. It is not meant to be used against an existing repo.
|
@@ -24,7 +24,7 @@ which will be copied into your projectname/Gemfile.
|
|
24
24
|
It includes application gems like:
|
25
25
|
|
26
26
|
* [jQuery](https://github.com/jquery/jquery) for Javascript pleasantry
|
27
|
-
* [
|
27
|
+
* [Inploy](https://github.com/delynn/inploy) for easy deploy
|
28
28
|
|
29
29
|
And testing gems like:
|
30
30
|
|
@@ -39,11 +39,8 @@ Other goodies
|
|
39
39
|
|
40
40
|
xRails also comes with:
|
41
41
|
|
42
|
-
* Rails' flashes set up
|
43
|
-
*
|
44
|
-
|
45
|
-
See [template/files](https://github.com/AlessioRocco/xRails/template/files) to
|
46
|
-
see what is generated one-time.
|
42
|
+
* Rails' flashes set up in application layout.
|
43
|
+
* Automated language setup
|
47
44
|
|
48
45
|
Issues
|
49
46
|
------
|
data/Rakefile
CHANGED
data/bin/xrails
CHANGED
@@ -2,9 +2,8 @@ source 'http://rubygems.org'
|
|
2
2
|
|
3
3
|
gem "rails", ">= 3.0.7"
|
4
4
|
gem "sqlite3"
|
5
|
-
gem "rake", "~> 0.8.7"
|
6
|
-
gem "will_paginate"
|
7
5
|
gem "jquery-rails"
|
6
|
+
gem "inploy"
|
8
7
|
|
9
8
|
# RSpec needs to be in :development group to expose generators
|
10
9
|
# and rake tasks without having to type RAILS_ENV=test.
|
data/template/xrails.rb
CHANGED
@@ -2,8 +2,7 @@
|
|
2
2
|
# =============
|
3
3
|
# by Alessio Rocco
|
4
4
|
|
5
|
-
require '
|
6
|
-
require 'net/https'
|
5
|
+
require 'open-uri'
|
7
6
|
|
8
7
|
template_root = File.expand_path(File.join(File.dirname(__FILE__)))
|
9
8
|
source_paths << File.join(template_root, "files")
|
@@ -33,13 +32,9 @@ def action_mailer_host(rails_env, host)
|
|
33
32
|
end
|
34
33
|
|
35
34
|
def download_file(uri_string, destination)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
request = Net::HTTP::Get.new(uri.path)
|
40
|
-
contents = http.request(request).body
|
41
|
-
path = File.join(destination_root, destination)
|
42
|
-
File.open(path, "w") { |file| file.write(contents) }
|
35
|
+
write_out = open(destination, "wb")
|
36
|
+
write_out.write(open(uri_string).read)
|
37
|
+
write_out.close
|
43
38
|
end
|
44
39
|
|
45
40
|
say "Getting rid of files we don't use"
|
@@ -76,6 +71,10 @@ generate "jquery:install", "--ui"
|
|
76
71
|
generate "rspec:install"
|
77
72
|
generate "cucumber:install", "--rspec --capybara"
|
78
73
|
|
74
|
+
say "Setting up inploy"
|
75
|
+
|
76
|
+
copy_file "deploy.rb", "config/deploy.rb"
|
77
|
+
|
79
78
|
say "Ignore the right files"
|
80
79
|
|
81
80
|
concat_file "xrails_gitignore", ".gitignore"
|
data/xrails.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.specification_version = 2 if s.respond_to? :specification_version=
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
4
|
-
s.rubygems_version = '1.
|
4
|
+
s.rubygems_version = '1.8.4'
|
5
5
|
|
6
6
|
s.name = 'xrails'
|
7
|
-
s.version = '0.
|
8
|
-
s.date = '2011-
|
7
|
+
s.version = '0.3.0'
|
8
|
+
s.date = '2011-06-10'
|
9
9
|
|
10
10
|
s.summary = "Generate a Rails app using Alessio Rocco's best practices."
|
11
11
|
s.description = <<-HERE
|
@@ -39,6 +39,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
|
|
39
39
|
lib/create.rb
|
40
40
|
lib/errors.rb
|
41
41
|
template/files/_flashes.html.erb
|
42
|
+
template/files/deploy.rb
|
42
43
|
template/files/xrails_Gemfile
|
43
44
|
template/files/xrails_gitignore
|
44
45
|
template/files/xrails_layout.html.erb.erb
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: xrails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.
|
5
|
+
version: 0.3.0
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- thoughtbot
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2011-
|
14
|
+
date: 2011-06-10 00:00:00 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -59,6 +59,7 @@ files:
|
|
59
59
|
- lib/create.rb
|
60
60
|
- lib/errors.rb
|
61
61
|
- template/files/_flashes.html.erb
|
62
|
+
- template/files/deploy.rb
|
62
63
|
- template/files/xrails_Gemfile
|
63
64
|
- template/files/xrails_gitignore
|
64
65
|
- template/files/xrails_layout.html.erb.erb
|