scaffolding 0.3.7 → 0.3.8
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 +4 -4
- data/.gitignore +0 -0
- data/CODE_OF_CONDUCT.md +0 -0
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +7 -1
- data/Rakefile +0 -0
- data/lib/generators/scaffolding_generator.rb +3 -3
- data/lib/scaffolding.rb +2 -2
- data/lib/scaffolding/parser/base.rb +1 -1
- data/lib/scaffolding/railtie.rb +0 -0
- data/lib/scaffolding/version.rb +1 -1
- data/lib/tasks/generators.rake +0 -0
- data/scaffolding.gemspec +0 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b2793a8c7ed99b4c64daf9e74f3b40a5a2c4fd3
|
4
|
+
data.tar.gz: 2b33cdcd0cde11f7d93cec3206ce5a2f04cbe135
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f42b9c924234ebd9653a719c959e915737879cb8d17836fe0f382430b27ccb4efe717e260459e54f19d5b38a26bee1fdf9ba30e5dc43dedceee279d9d34606a2
|
7
|
+
data.tar.gz: 5ce16200d4562cbc0c2eb4e7a171a55cbe02782a825e0670717ced4d0a5bafea7e4ccbb07cdeddac4801329270c4f2315fccf97e76a7043d4d9cefdf85682780
|
data/.gitignore
CHANGED
File without changes
|
data/CODE_OF_CONDUCT.md
CHANGED
File without changes
|
data/Gemfile
CHANGED
File without changes
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -66,6 +66,12 @@ Example:
|
|
66
66
|
|
67
67
|
$ rails g scaffolding --auto --migrate --import
|
68
68
|
|
69
|
+
If you want to do a large number of files at once and only do specific tasks:
|
70
|
+
|
71
|
+
$ rails g scaffolding --auto --no-migrate --no-import
|
72
|
+
|
73
|
+
You can leave this running and it will generate scaffolds, but skip migration and importing data.
|
74
|
+
|
69
75
|
#### Import file uploads
|
70
76
|
|
71
77
|
To import data from a file uploaded through the web browser:
|
@@ -74,7 +80,7 @@ To import data from a file uploaded through the web browser:
|
|
74
80
|
|
75
81
|
$ rails s
|
76
82
|
|
77
|
-
Then go to http://localhost:3000/scaffolding
|
83
|
+
Then go to http://localhost:3000/scaffolding
|
78
84
|
|
79
85
|
And upload the file you wish to import.
|
80
86
|
|
data/Rakefile
CHANGED
File without changes
|
@@ -6,9 +6,9 @@ class ScaffoldingGenerator < Rails::Generators::Base
|
|
6
6
|
desc "This generator generates a scaffold based on a CSV, Dat or Txt file and imports the data"
|
7
7
|
argument :source, :type => :string, :default => ""
|
8
8
|
argument :name, :type => :string, :default => ""
|
9
|
-
class_option :auto, :type => :boolean, :
|
10
|
-
class_option :migrate, :type => :boolean, :
|
11
|
-
class_option :import, :type => :boolean, :
|
9
|
+
class_option :auto, :type => :boolean, :description => "Automatically choose data types"
|
10
|
+
class_option :migrate, :type => :boolean, :description => "Migrate the database"
|
11
|
+
class_option :import, :type => :boolean, :description => "Import data from source"
|
12
12
|
|
13
13
|
def analyize_sources
|
14
14
|
@auto = options[:auto]
|
data/lib/scaffolding.rb
CHANGED
@@ -61,7 +61,7 @@ module Scaffolding
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def migrate_database
|
64
|
-
|
64
|
+
if @migrate == nil
|
65
65
|
puts "\n\n\e[32mMigrate the database?(y/n)\e[0m\n"
|
66
66
|
answer = STDIN.gets.chomp.downcase
|
67
67
|
end
|
@@ -74,7 +74,7 @@ module Scaffolding
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def import_data
|
77
|
-
|
77
|
+
if @import == nil
|
78
78
|
puts "\n\n\e[32mImport the data from #{@source}?(y/n)\e[0m\n"
|
79
79
|
answer = STDIN.gets.chomp.downcase
|
80
80
|
end
|
data/lib/scaffolding/railtie.rb
CHANGED
File without changes
|
data/lib/scaffolding/version.rb
CHANGED
data/lib/tasks/generators.rake
CHANGED
File without changes
|
data/scaffolding.gemspec
CHANGED
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffolding
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan-deJong
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -83,9 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
85
|
rubyforge_project:
|
86
|
-
rubygems_version: 2.4.
|
86
|
+
rubygems_version: 2.4.7
|
87
87
|
signing_key:
|
88
88
|
specification_version: 4
|
89
89
|
summary: Generate a rails scaffold based on a .CSV, .dat or .txt file.
|
90
90
|
test_files: []
|
91
|
-
has_rdoc:
|