generic_app 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +5 -0
- data/Gemfile +2 -0
- data/README.md +7 -15
- data/lib/generic_app/version.rb +1 -1
- data/lib/generic_app.rb +14 -13
- data/spec/lib/2_legacy_app_spec.rb +3 -1
- data/spec/spec_helper.rb +3 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ca7ea6c3349e9a632cdab668af506b8708c4698
|
4
|
+
data.tar.gz: c4a3f742010b74f8a27bf40217f6b1c3357fa9fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f37dad81ea4fd0c9a0d945e8c72d61ff63ac556a3331ee2378d5b070ec90c1eec09301830fb1d488fc281899671b0057e07414acff09719119f05d39cda5116
|
7
|
+
data.tar.gz: b255a4dc2cf177b3114e5cba334fd61e98b0908fe0c2193d74df354acecb0189c3b6a38f8b0d866fc075cde334d388a0ea544373d28a86031f7d919af002424e
|
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/generic_app.svg)](http://badge.fury.io/rb/generic_app)
|
2
|
+
[![Dependency Status](https://gemnasium.com/jhsu802701/generic_gem.svg)](https://gemnasium.com/jhsu802701/generic_gem)
|
3
|
+
[![Build Status](https://travis-ci.org/jhsu802701/generic_app.svg?branch=master)](http://travis-ci.org/jhsu802701/generic_app)
|
4
|
+
[![Code Climate](https://codeclimate.com/github/jhsu802701/generic_app/badges/gpa.svg)](https://codeclimate.com/github/jhsu802701/generic_app)
|
5
|
+
<a href="https://codeclimate.com/github/jhsu802701/generic_app/coverage"><img src="https://codeclimate.com/github/jhsu802701/generic_app/badges/coverage.svg" /></a>
|
6
|
+
[![security](https://hakiri.io/github/jhsu802701/generic_app/master.svg)](https://hakiri.io/github/jhsu802701/generic_app/master)
|
7
|
+
|
1
8
|
# GenericApp
|
2
9
|
|
3
10
|
Welcome to GenericApp, the #1 Rails app generator! No other method of starting a Rails app can save you so much time and effort. Stop reinventing the wheel every time you start a new Rails project. User authentication, comprehensive tests, Guard automation, Twitter bootstrap styling, and other features that are desirable in all or most Rails apps are implemented in advance. You get post-installation scripts that consolidate routine multi-step tasks into one step, including the process of setting up your app for PostgreSQL. Outlines of the initial MVC architecture of your new app are also provided. Only GenericApp way gives you a comprehensive Rails app in just a few minutes. If you're not exactly a GenericApp user, then you're not exactly viable at Startup Weekend or 24-hour web site challenges.
|
@@ -39,21 +46,6 @@ hours. This is valuable for any project and essential for events like Startup W
|
|
39
46
|
challenges.
|
40
47
|
<br><br>
|
41
48
|
The GenericApp gem copies the GenericApp Template (https://github.com/jhsu802701/generic_app_template) for use as a template for starting a new project. Starting a Rails app completely from scratch (by using the "rails new" command) requires manually installing and configuring MiniTest, Guard, Twitter bootstrap, the user model, user sign-ups, user login/logout, user authorization, administrative users, account activations, and password resets. People are often tempted to "save time" by omitting testing. Using the GenericApp gem allows you to have all of the essential basic elements of a generic app as soon as you start it. It's a shortcut that actually complies with best practices.
|
42
|
-
<br><br>
|
43
|
-
Features provided by GenericApp include:
|
44
|
-
1. Static pages
|
45
|
-
2. A comprehensive suite of tests, including Capybara integration tests
|
46
|
-
3. Guard for automated testing
|
47
|
-
4. Twitter bootstrap
|
48
|
-
5. Databases: SQLite3 for development and PostgreSQL for production PLUS a script that automates the process of setting PostgreSQL parameters AND excluding your username and password from the Git repository
|
49
|
-
6. Ready for Heroku deployment
|
50
|
-
7. The devise gem for providing user and admin authentication
|
51
|
-
8. Bash scripts in the root directory that allow you to perform routine tasks in only one step.
|
52
|
-
9. Recommendations that the user make use of password management software to generate and store secure passwords
|
53
|
-
10. Outlines of the MVC, test suite, and database seeding process in the notes folder
|
54
|
-
11. Guard automatically runs tests upon startup.
|
55
|
-
12. Tools for checking code quality
|
56
|
-
13. Code Climate test reporting and badges for the README page
|
57
49
|
|
58
50
|
## Development
|
59
51
|
|
data/lib/generic_app/version.rb
CHANGED
data/lib/generic_app.rb
CHANGED
@@ -45,22 +45,23 @@ module GenericApp
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def self.add (subdir_name)
|
48
|
-
self.update_gitignore
|
48
|
+
self.update_gitignore(subdir_name, 'tmp*')
|
49
|
+
self.update_gitignore(subdir_name, '.DS_Store')
|
49
50
|
self.copy_scripts (subdir_name)
|
50
51
|
end
|
51
52
|
|
52
|
-
def self.update_gitignore (subdir_name)
|
53
|
-
puts
|
54
|
-
puts "Updating .gitignore"
|
55
|
-
if StringInFile.present(
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
53
|
+
def self.update_gitignore (subdir_name, str)
|
54
|
+
puts '-----------------------------------'
|
55
|
+
puts "Updating .gitignore (adding #{str})"
|
56
|
+
if StringInFile.present(str, "#{subdir_name}/.gitignore") == false
|
57
|
+
text_from_file = File.read("#{subdir_name}/.gitignore")
|
58
|
+
last_char = text_from_file[-1]
|
59
|
+
open("#{subdir_name}/.gitignore", 'a') { |f|
|
60
|
+
if last_char != "\n"
|
61
|
+
f.puts "\n"
|
62
|
+
end
|
63
|
+
f.puts "\n#{str}"
|
64
|
+
}
|
64
65
|
end
|
65
66
|
end
|
66
67
|
|
@@ -17,7 +17,9 @@ describe GenericApp do
|
|
17
17
|
puts '------------------'
|
18
18
|
puts 'Getting legacy app'
|
19
19
|
system('git clone https://github.com/mhartl/sample_app_3rd_edition.git tmp2')
|
20
|
-
system(
|
20
|
+
system('wait')
|
21
|
+
system("cd tmp2 && git checkout remotes/origin/account-activation-password-reset")
|
22
|
+
system('wait')
|
21
23
|
puts 'Finished acquiring legacy app'
|
22
24
|
puts '-----------------------------'
|
23
25
|
}
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: generic_app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Hsu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -78,6 +78,7 @@ extensions: []
|
|
78
78
|
extra_rdoc_files: []
|
79
79
|
files:
|
80
80
|
- ".gitignore"
|
81
|
+
- ".travis.yml"
|
81
82
|
- Gemfile
|
82
83
|
- LICENSE.txt
|
83
84
|
- README.md
|