rtrain 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e3b42d6e440b459bde8f7e3e244aa4d6b73f96df
4
- data.tar.gz: 90083365ca63b2d48a339052df1525611f2c47c1
3
+ metadata.gz: 571972df24889ba3ba511831b6aca9a8f74e449e
4
+ data.tar.gz: f68d9af2653a47b8c85d17c521020f3eeb11571c
5
5
  SHA512:
6
- metadata.gz: eb128348ff99c34d0db998bc7b737835b16077ccd6841e82eb5d1c128134341f6e0ed5d57ee568b81aa37eaea4aa1c923e8e69030e734f8b0b9376f0e8e4a443
7
- data.tar.gz: 33ae444cb22f72c8bb965e1db2b7ac66a462f92d5493d511cfc0d60f403454213403740936fe8486566a84ad07b08db3f3b687ffee82b1c4a9627a4718356c6f
6
+ metadata.gz: 82c8a9893a985474b8924b800127427d22116a74e2e0a7fde27c35a0e97a4ef701fef42a6205f99e45d06ca6997da59ada37c3924600d0b0d62e3d8fbe29a6dd
7
+ data.tar.gz: 37f3302164419104cb20bbbf506c76cd54c2763b498cf5e0c49df1b8d1553eb126f44f5506a9d8b7d4512f0b07d97fdae4a22800ae8ce4a904ceb338467b4859
data/rtrain.gemspec CHANGED
@@ -1,14 +1,17 @@
1
1
  $LOAD_PATH.push File.expand_path("../lib", __FILE__)
2
2
 
3
+
4
+
3
5
  Gem::Specification.new do |s|
4
6
  s.name = 'rtrain'
5
- s.version = '0.2.0'
7
+ s.version = '0.2.1'
6
8
  s.date = '2016-05-19'
7
9
  s.summary = "Nicer Scaffolds,nav bar, static homepage for Rails"
8
10
  s.description = "Rails UI Booster - More info @ https://github.com/lynnd335/rtrain"
9
11
  s.authors = ["Dan Lynn"]
10
12
  s.email = 'lynnd335@gmail.com'
11
- s.files = Dir['**/*']
13
+ s.files = Dir['**/*'].delete('rtrain.gemspec')
12
14
  s.homepage = 'http://rubygems.org/gems/rtrain'
13
15
  s.license = 'MIT'
16
+ s.add_runtime_dependency 'authlogic', '~> 3.4', '>= 3.4.6'
14
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rtrain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Lynn
@@ -9,42 +9,33 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2016-05-19 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: authlogic
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '3.4'
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.4.6
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: '3.4'
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.4.6
13
33
  description: Rails UI Booster - More info @ https://github.com/lynnd335/rtrain
14
34
  email: lynnd335@gmail.com
15
35
  executables: []
16
36
  extensions: []
17
37
  extra_rdoc_files: []
18
38
  files:
19
- - README.md
20
- - docs-img/quick_demo_inputs.md
21
- - docs-img/rtrain-placeholder.png
22
- - lib/generators/controllers/main_controller.rb
23
- - lib/generators/rtrain/install_generator.rb
24
- - lib/generators/templates/home.html.erb
25
- - lib/generators/templates/nav-bar.scss
26
- - lib/generators/templates/rtrain-application.html.erb
27
- - lib/generators/templates/rtrain_scaffold.scss
28
- - lib/rtrain.rb
29
- - rtrain-0.0.1.gem
30
- - rtrain-0.0.2.gem
31
- - rtrain-0.0.3.gem
32
- - rtrain-0.0.4.gem
33
- - rtrain-0.0.5.gem
34
- - rtrain-0.0.6.gem
35
- - rtrain-0.0.7.gem
36
- - rtrain-0.0.8.gem
37
- - rtrain-0.0.9.gem
38
- - rtrain-0.1.0.gem
39
- - rtrain-0.1.1.gem
40
- - rtrain-0.1.2.gem
41
- - rtrain-0.1.3.gem
42
- - rtrain-0.1.4.gem
43
- - rtrain-0.1.5.gem
44
- - rtrain-0.1.6.gem
45
- - rtrain-0.1.7.gem
46
- - rtrain-0.1.8.gem
47
- - rtrain-0.1.9.gem
48
39
  - rtrain.gemspec
49
40
  homepage: http://rubygems.org/gems/rtrain
50
41
  licenses:
data/README.md DELETED
@@ -1,41 +0,0 @@
1
- # RTrain
2
- ![Ugh](http://www.heyridge.com/wp-content/uploads/2015/03/File-2012-12-29-R-train.jpg)
3
- _Ugh._
4
-
5
- #Rails Downloadable Content (DLC) Expansion Pack
6
- Adds better CSS to scaffold, HTML navigation, more features are in the pipe, so stay tuned ... _DLC Season Pass Coming Soon Too!_
7
-
8
- How to use RTrain
9
-
10
- _It is HIGHLY recommended that developers using RTrain execute these generator commands in sequence, and to always scaffold generate all models!!!_
11
-
12
- **Put this in your Gemfile**
13
- ```
14
- gem 'rtrain', '~> 0.1.6'
15
- ```
16
- Then `bundle install`
17
-
18
- **After generating a scaffold, enter any of these into the command line:**
19
-
20
- ```
21
- rails generate rtrain:install --copy_css
22
- ```
23
- ![Ugh](http://i.imgur.com/xzbeMWC.png)
24
- _Oooooooooooooo!_
25
-
26
- Turns your basic scaffold into something that's at least tolerable to look at!
27
-
28
- **Add a sweet nav bar!**
29
- ```
30
- rails generate rtrain:install --copy_css
31
- ```
32
- ![Ugh](http://i.imgur.com/hywhd0t.png)
33
-
34
- **Add a home page controller and view, and set it as the root**
35
- ```
36
- rails generate rtrain:install --add_homepage
37
- ```
38
- ![Ugh](http://i.imgur.com/LuNqg3O.png)
39
-
40
-
41
- More to come! Stay tuned!
@@ -1,36 +0,0 @@
1
- #Quick Demo Inputs
2
-
3
- Use these commands to spin up some dummy data using the FFaker Gem (with Hipster Ipsum)
4
-
5
- In the command line:
6
- ```
7
- gem install ffaker
8
-
9
- ```
10
-
11
- In your Rails app's Gemfile add
12
-
13
- ```
14
- require 'ffaker'
15
- ```
16
-
17
- Go back to the command line
18
-
19
- ```
20
- rails g scaffold Person name:string address:string phone:string email_address:string about:string
21
-
22
- rake db:create db:migrate
23
-
24
- rails g scaffold posts subject:string content:text
25
-
26
- rake db:migrate
27
- ```
28
-
29
- In Rails Console ($rails c)
30
- ```
31
- 40.times do Person.create(name: FFaker::Name.name, address: FFaker::AddressUS.street_address + ", " + FFaker::AddressUS.city + ", " + FFaker::AddressUS.state + " " + FFaker::AddressUS.zip_code, phone: FFaker::PhoneNumber.short_phone_number,email_address: FFaker::Internet.email, about: FFaker::HipsterIpsum.phrase)end
32
-
33
- 40.times do Post.create(subject: FFaker::HipsterIpsum.phrase, content: FFaker::HipsterIpsum.paragraph)end
34
- ```
35
-
36
- Now you've got some bangin' filler data!
Binary file
@@ -1,5 +0,0 @@
1
- class MainController < ApplicationController
2
- def show
3
- render template: "main/#{params[:page]}"
4
- end
5
- end
@@ -1,123 +0,0 @@
1
- module Rtrain
2
- module Generators
3
- class InstallGenerator < Rails::Generators::Base
4
- desc "Creates a generator for Rtrain to style scaffold tables."
5
- class_option :copy_css, type: :boolean, desc: 'Write some nice CSS for scaffold'
6
- class_option :add_nav, type: :boolean, desc: 'Makes a wicked sweet nav bar for your rails app'
7
- class_option :add_homepage, type: :boolean, desc: 'Adds a home page controller and view and updates it to be the root URL'
8
-
9
-
10
- def gem_info
11
- return if options.copy_css? || options.add_nav? || options.add_homepage?
12
- puts "
13
- ----------------------------------------------------
14
- Rtrain needs an argument to continue.
15
- Please re-run the install generator with one of the
16
- following options:
17
- \n
18
- --copy_css
19
- --add_nav
20
- --add_homepage
21
- \n
22
- Refer to the README at https://github.com/lynnd335/rtrain
23
- for details and illustrations of each option's executions
24
- ----------------------------------------------------
25
- "
26
- end
27
-
28
- def run_rtrain
29
- dir = File.dirname(__FILE__)
30
- ##Begin Copy CSS
31
-
32
- if options[:copy_css]
33
-
34
- scaffold_css = "../templates/rtrain_scaffold.scss"
35
- new_css_path = File.join(dir, scaffold_css)
36
- new_css = open(new_css_path).read
37
-
38
- old_css = open("app/assets/stylesheets/scaffolds.scss", "w")
39
- old_css.write(new_css)
40
- old_css.close
41
- puts "
42
- ----------------------------------------------------
43
- Rtrain Scaffold CSS now active in app/assets/stylesheets/
44
- ----------------------------------------------------
45
- "
46
- end
47
-
48
- ##end copy css
49
-
50
- ##begin add nvigation bar
51
-
52
- if options[:add_nav]
53
-
54
- puts 'nav'
55
-
56
- old_applayout = open("app/views/layouts/application.html.erb").read
57
- app_name = old_applayout.split("<title>")[1].split("</title>")[0]
58
- app_name = "\n<h1>"+app_name+"</h1>\n"
59
- tables = ActiveRecord::Base.connection.tables[1..-1]
60
- list_items = []
61
-
62
- tables.each do |t|
63
- link = "<li><%=link_to '" + t.titleize + "'," + t + "_path%></li>"
64
- list_items.push(link)
65
- end
66
-
67
- nav = "\n<div id=\"main-navbar\">\n\t<ul id=\"menu\">\n\t\t" + list_items.join("\n\t\t") + "\n\t</ul>\n</div>\t\n\n\n"
68
- new_layout = old_applayout.split("<body>")
69
- old_applayout = open("app/views/layouts/application.html.erb", "w")
70
- old_applayout.write(new_layout[0] + "<body>" + app_name + nav + new_layout[1])
71
- old_applayout.close
72
- ###
73
- nav_css = "../templates/nav-bar.scss"
74
- nav_css_path = File.join(dir, nav_css)
75
- stylesheets = "app/assets/stylesheets/"
76
- FileUtils.cp(nav_css_path, stylesheets)
77
- puts "
78
- ----------------------------------------------------
79
- Rtrain Nav Bar and App Title now active in app/views/layouts/application.html.erb\n
80
-
81
- IMPORTANT! If re-running this command, be sure to remove the HTML for the previous nav bar
82
- as it will be duplicated within the text of app/views/layouts/application.html.erb.
83
- ----------------------------------------------------
84
- "
85
- end
86
-
87
- ##end add navigation bar
88
-
89
- ##begin add main page
90
-
91
- if options[:add_homepage]
92
- FileUtils.mkdir("app/views/main/")
93
-
94
- home_page = "../templates/home.html.erb"
95
- home_page_path = File.join(dir, home_page)
96
- main_view_dir = "app/views/main/"
97
- FileUtils.cp(home_page_path, main_view_dir)
98
- # home = open("app/views/main/home.html.erb","w")
99
- # home.write(home_page_content)
100
- # home.close
101
-
102
- main = "../controllers/main_controller.rb"
103
- main_path = File.join(dir, main)
104
- controllers = "app/controllers"
105
- FileUtils.cp(main_path, controllers)
106
-
107
- root = open("config/routes.rb").read
108
- root ["# root 'welcome#index'"] = "root 'main#show', page: 'home'
109
- get '/main/:page' => 'pages#show'"
110
- routes = open("config/routes.rb","w")
111
- routes.write(root)
112
- routes.close
113
- puts "
114
- ----------------------------------------------------
115
- Rtrain Homepage Now Active and set as root URL
116
- ----------------------------------------------------
117
- "
118
- end
119
-
120
- end
121
- end
122
- end
123
- end
@@ -1,21 +0,0 @@
1
- <div style="width:80%;left:10%;position:absolute">
2
-
3
- <h1>Main Page</h1>
4
- <h3>Hey there! Welcome to my new Rails app! I'm coding up something pretty cool, so check back soon!</h3>
5
-
6
- <img width="100%" src="http://i.imgur.com/3qtQMoS.png">
7
- <hr>
8
- <h3>FILLER TEXT - PLEASE REPLACE UNLESS YOU LIKE HIPSTER IPSUM</h3>
9
- <p>
10
- Neutra farm-to-table schlitz slow-carb, pinterest pabst helvetica man bun PBR&B deep v salvia small batch brooklyn. Locavore swag artisan single-origin coffee. Neutra selvage waistcoat, pitchfork chia PBR&B thundercats skateboard meditation flannel chillwave organic pinterest. Keffiyeh freegan cray PBR&B mlkshk. Pop-up cronut freegan, cornhole venmo whatever brunch four dollar toast iPhone pitchfork chillwave. Banjo direct trade yr banh mi tacos. Bushwick photo booth next level typewriter squid ugh.
11
- </p>
12
- <p>
13
- Pitchfork letterpress direct trade migas, gochujang chia austin crucifix green juice. Sustainable beard swag, kogi next level wolf hoodie mlkshk ethical thundercats DIY bicycle rights 8-bit gluten-free brooklyn. Narwhal humblebrag +1 keytar cardigan pickled. Synth fixie slow-carb letterpress echo park drinking vinegar. Lo-fi blog pitchfork sartorial, before they sold out bushwick vegan sustainable polaroid lomo kitsch craft beer. Pitchfork vinyl scenester trust fund, ethical food truck slow-carb. Church-key pop-up portland keffiyeh, flannel aesthetic ramps gentrify cronut.
14
- </p>
15
- <p>
16
- Brooklyn pork belly farm-to-table, semiotics YOLO locavore tacos swag franzen hammock stumptown bushwick blue bottle next level. Shoreditch everyday carry pickled, etsy synth typewriter craft beer. Butcher pabst wayfarers, pitchfork kogi vegan chambray. Butcher master cleanse vinyl dreamcatcher, salvia irony 3 wolf moon whatever keffiyeh messenger bag typewriter. Kinfolk dreamcatcher chambray, ethical meggings kickstarter man braid swag seitan flannel fashion axe tilde readymade venmo. Yr pour-over cardigan organic, gastropub quinoa actually jean shorts typewriter bespoke. Selfies XOXO tacos plaid, brooklyn cred schlitz.
17
- </p>
18
- <p>
19
- Truffaut farm-to-table raw denim lumbersexual. Kitsch biodiesel venmo kickstarter. Pour-over kombucha street art tumblr. Jean shorts banh mi flexitarian lo-fi letterpress shabby chic. Fingerstache meditation quinoa farm-to-table, kogi vice whatever etsy. Tousled organic brunch, deep v pour-over literally schlitz bitters mumblecore pug cray next level. Meggings vegan tattooed farm-to-table affogato.
20
- </p>
21
- </div>
@@ -1,25 +0,0 @@
1
- #main-navbar{
2
- height: 25px;
3
- width: 95%;
4
- background-color: black
5
- }
6
- ul#menu {
7
- bottom: -10%;
8
- position: relative;
9
- }
10
-
11
- ul#menu li {
12
- display: inline;
13
- }
14
-
15
- ul#menu li a {
16
- background-color: black;
17
- color: white;
18
- text-decoration: none;
19
- padding: 0px 35px;
20
- font-size: 18px;
21
- }
22
-
23
- ul#menu li a:hover {
24
- background-color: orange;
25
- }
@@ -1,18 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
5
- <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css">
6
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
7
- <title>app-name</title>
8
- <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
9
- <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
10
- <%= csrf_meta_tags %>
11
- </head>
12
- <body>
13
-
14
- <%= yield %>
15
-
16
- </body>
17
- </html>
18
-
@@ -1,109 +0,0 @@
1
- body {
2
- background-color: #fff;
3
- color: #333;
4
- }
5
-
6
- body, p, ol, ul, td {
7
- font-family: helvetica, verdana, arial, sans-serif;
8
- font-size: 13px;
9
- line-height: 18px;
10
- margin: 33px;
11
- }
12
-
13
- pre {
14
- background-color: #eee;
15
- padding: 10px;
16
- font-size: 11px;
17
- }
18
-
19
- a {
20
- color: #000;
21
- }
22
-
23
- a:visited {
24
- color: #666;
25
- }
26
- table{
27
- border: 1px solid #cccccc;
28
- border-spacing: 0px;
29
- width: 95%;
30
- left: 10%;
31
- }
32
- a:hover {
33
- color: #fff;
34
- background-color: #000;
35
- }
36
-
37
- th {
38
- border-bottom: 1px solid #cccccc;
39
- height: 15px;
40
- }
41
-
42
- td {
43
- padding-bottom: 7px;
44
- padding-left: 5px;
45
- padding-right: 5px;
46
- font-family: helvetica, verdana, arial, sans-serif;
47
- border-left: none;
48
- border-bottom: 1px solid #cccccc;
49
- border-right: 1px solid #cccccc;
50
- vertical-align: top;
51
- font-size: 13px;
52
- color: inherit;
53
- border-top: solid 1px transparent;
54
- white-space: normal;
55
- }
56
-
57
- tr:nth-child(even) {
58
- background: #f2f2f2
59
- }
60
- tr:nth-child(odd) {
61
- background: #FFF
62
- }
63
- tr:hover{
64
- background: rgba(209, 209, 224, 0.5);
65
- }
66
-
67
- div.field,
68
- div.actions {
69
- margin-bottom: 10px;
70
- }
71
-
72
- #notice {
73
- color: green;
74
- }
75
-
76
- .field_with_errors {
77
- padding: 2px;
78
- background-color: red;
79
- display: table;
80
- }
81
-
82
- #error_explanation {
83
- width: 450px;
84
- border: 2px solid red;
85
- padding: 7px;
86
- padding-bottom: 0;
87
- margin-bottom: 20px;
88
- background-color: #f0f0f0;
89
- }
90
-
91
- #error_explanation h2 {
92
- text-align: left;
93
- font-weight: bold;
94
- padding: 5px 5px 5px 15px;
95
- font-size: 12px;
96
- margin: -7px;
97
- margin-bottom: 0;
98
- background-color: #c00;
99
- color: #fff;
100
- }
101
-
102
- #error_explanation ul li {
103
- font-size: 12px;
104
- list-style: square;
105
- }
106
-
107
- label {
108
- display: block;
109
- }
data/lib/rtrain.rb DELETED
@@ -1,2 +0,0 @@
1
- module Rtrain
2
- end
data/rtrain-0.0.1.gem DELETED
Binary file
data/rtrain-0.0.2.gem DELETED
Binary file
data/rtrain-0.0.3.gem DELETED
Binary file
data/rtrain-0.0.4.gem DELETED
Binary file
data/rtrain-0.0.5.gem DELETED
Binary file
data/rtrain-0.0.6.gem DELETED
Binary file
data/rtrain-0.0.7.gem DELETED
Binary file
data/rtrain-0.0.8.gem DELETED
Binary file
data/rtrain-0.0.9.gem DELETED
Binary file
data/rtrain-0.1.0.gem DELETED
Binary file
data/rtrain-0.1.1.gem DELETED
Binary file
data/rtrain-0.1.2.gem DELETED
Binary file
data/rtrain-0.1.3.gem DELETED
Binary file
data/rtrain-0.1.4.gem DELETED
Binary file
data/rtrain-0.1.5.gem DELETED
Binary file
data/rtrain-0.1.6.gem DELETED
Binary file
data/rtrain-0.1.7.gem DELETED
Binary file
data/rtrain-0.1.8.gem DELETED
Binary file
data/rtrain-0.1.9.gem DELETED
Binary file