inline_forms 1.6.27 → 1.6.28

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fc5c861eb236c4e9c1bdfbe0196307d69c4c68b
4
- data.tar.gz: b80b53fd4262df4f281ccf038f5b9662ca415d03
3
+ metadata.gz: 8745f24aaf567a5fc05d3b6cdb5b4463af31ac5f
4
+ data.tar.gz: 5984950419d884fbbb34b7e350a6247b58ae182f
5
5
  SHA512:
6
- metadata.gz: 061e0cdf4db467028b0764e9ff9dcc1bcb80001ced40493ea880213847566a085479a8b2ee6f4796435e1ad4ac8cb71515f75ee365db126ce4c6dba0f208e89d
7
- data.tar.gz: c934596c931ddcdf41dc42c165158abc8e784e3ae8e8ebe27be022630dea31f40a36521542febb0b6776f540b325efc6b034dea69a15d997d473ff43febcae5a
6
+ metadata.gz: 801490ea849eb28760b3a511f5089c9cd0568bf042e30c6020f941e7d65b8b543e3c07fac8110d0bc12fa4e8dc57df2d38dffcf173e2fe2ce43755781a771080
7
+ data.tar.gz: 3e92bcd56ac1b27d6dab5a5437d896a4a94902eaa94942317d2d9c02724d2206ae430e9da5653b95bf679e19fab3d7b1051719fe98ee1052abf681cfdba2f850
data/README.rdoc CHANGED
@@ -18,6 +18,8 @@ If you want to install the example application:
18
18
 
19
19
  inline_forms create MyApp --example
20
20
 
21
+ Then point your browser to http://localhost:3000/apartments and log in with admin@example.com / admin999
22
+
21
23
  You can install the example application manually if you like:
22
24
 
23
25
  inline_forms create MyApp
@@ -28,7 +30,7 @@ You can install the example application manually if you like:
28
30
  bundle exec rake db:migrate
29
31
  rails s
30
32
 
31
- Now point your browser to http://localhost:3000/apartments and make sure JavaScript is enabled.
33
+ Then point your browser to http://localhost:3000/apartments and log in with admin@example.com / admin999
32
34
 
33
35
  == Disclaimer
34
36
 
@@ -37,5 +39,5 @@ It's work in progress. Until I learn to use git branch, new releases break as ea
37
39
 
38
40
  == Copyright
39
41
 
40
- Copyright (c) 2011-2012 Ace Suares. See LICENSE.txt for further details.
42
+ Copyright (c) 2011-2013 Ace Suares. See LICENSE.txt for further details.
41
43
 
data/bin/inline_forms CHANGED
@@ -17,6 +17,13 @@ module InlineForms
17
17
  class Creator < Thor
18
18
  include Thor::Actions
19
19
 
20
+ String.class_eval do
21
+ def strip_heredoc_with_indent(indent=0)
22
+ new_indent = ( self.empty? ? 0 : ( scan(/^[ \t]*(?=\S)/).min.size - indent ) )
23
+ gsub(/^[ \t]{#{new_indent}}/, '')
24
+ end
25
+ end
26
+
20
27
  def self.source_root
21
28
  File.dirname(__FILE__)+"/.."
22
29
  end
@@ -80,30 +87,24 @@ module InlineForms
80
87
  exit 1
81
88
  end
82
89
 
83
- say "- Generating Rails app '#{app_name}'..."
84
90
  if dry_run?
85
91
  empty_directory(app_name)
86
92
  else
87
- if ! run("rails new #{app_name}")
93
+ if ! run("rails new #{app_name} --skip-bundle --skip-gemfile")
88
94
  say "Rails could not create the app '#{app_name}', maybe because it is a reserved word...", :red
89
95
  exit 1
90
96
  end
91
97
  end
92
98
 
93
- say "- Creating .ruby-version..."
94
99
  ruby_version = (%x[rvm current]).gsub(/@.*/,'')
95
- create_file "#{app_name}/.ruby-version", "#{ruby_version.chop}"
100
+ create_file "#{app_name}/.ruby-version", "#{ruby_version.chop}@#{app_name}"
96
101
 
97
- say "- Changing to '#{app_name}'..."
98
- chdir(app_name) do
99
- run("rvm gemset create #{app_name}")
100
- run("rvm gemset use #{app_name}")
102
+ say "chdir: '#{app_name}'...", :green
103
+ Dir.chdir(app_name) do
104
+ RVM.gemset_use! app_name
101
105
  say "- Working directory is now #{`pwd`}"
102
106
  say "- RVM gemset is now #{%x[rvm current]}"
103
-
104
- say "- Recreating Gemfile..."
105
-
106
- remove_file "#{app_name}/Gemfile" # the one that 'rails new' created
107
+
107
108
  create_file "#{app_name}/Gemfile", <<-END_GEMFILE.strip_heredoc_with_indent
108
109
  # generated by inline_forms v#{VERSION}
109
110
 
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.27"
3
+ VERSION = "1.6.28"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.27
4
+ version: 1.6.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares