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 CHANGED
@@ -9,7 +9,7 @@ First install the xRails gem:
9
9
 
10
10
  Then run:
11
11
 
12
- xrails create projectname
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
- * [Will Paginate](https://github.com/mislav/will_paginate) for pagination
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 and in application layout.
43
- * A few nice time formats.
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
@@ -3,7 +3,7 @@ require 'rake'
3
3
  require 'cucumber/rake/task'
4
4
  require 'date'
5
5
 
6
- XRAILS_GEM_VERSION = '0.2.1'
6
+ XRAILS_GEM_VERSION = '0.3.0'
7
7
 
8
8
  #############################################################################
9
9
  #
data/bin/xrails CHANGED
@@ -10,7 +10,7 @@ def usage
10
10
  end
11
11
 
12
12
  case ARGV[0]
13
- when 'create', '--create'
13
+ when 'new', '--create'
14
14
  begin
15
15
  XRails::Create.run!(ARGV[1])
16
16
  rescue XRails::InvalidInput => e
@@ -0,0 +1,7 @@
1
+ template = :rails3_push
2
+ application = "application_name"
3
+ hosts = ['server_name']
4
+ skip_steps = ['bundle_install']
5
+
6
+ path = '/opt/rails'
7
+ user = 'server_user'
@@ -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.
@@ -2,8 +2,7 @@
2
2
  # =============
3
3
  # by Alessio Rocco
4
4
 
5
- require 'net/http'
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
- uri = URI.parse(uri_string)
37
- http = Net::HTTP.new(uri.host, uri.port)
38
- http.use_ssl = true if uri_string =~ /^https/
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"
@@ -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.6.2'
4
+ s.rubygems_version = '1.8.4'
5
5
 
6
6
  s.name = 'xrails'
7
- s.version = '0.2.1'
8
- s.date = '2011-05-30'
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.2.1
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-05-30 00:00:00 Z
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