cambium 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/lib/cambium/version.rb +1 -1
- data/lib/generators/cambium/setup/config_generator.rb +14 -7
- data/lib/generators/cambium/setup/controllers_generator.rb +6 -0
- data/lib/generators/cambium/setup/utilities_generator.rb +2 -0
- data/lib/generators/cambium/setup/views_generator.rb +4 -0
- data/lib/generators/cambium/templates/Gemfile.erb +1 -2
- data/lib/generators/cambium/templates/app/assets/javascripts/backbone/app.js.coffee +1 -1
- data/lib/generators/cambium/templates/app/views/layouts/admin.html.erb +1 -1
- data/lib/generators/cambium/templates/app/views/layouts/application.html.erb +1 -1
- data/lib/generators/cambium/templates/config/routes.rb.erb +1 -1
- metadata +2 -3
- data/lib/docs/notes.md +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51a3c4b8209ac4b348b16e1c852d6d71f9f4cbdf
|
4
|
+
data.tar.gz: e3e021298a50f0253858e5c086ab211ecf0294db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb15ad72c5660eb5d50fef183221027b1406a278fd844945a276dfe8affb8a0d85d18f2ee4991034ae4c47868609af22496dd023edee3b4245f6008b382c8770
|
7
|
+
data.tar.gz: d1761401c0993206ac32f755e5d1ad5a98ec7333499c4bac2b646b9b5f3de1fd9392e4a39526e3b722f97f2fa1d833112ae0cfad1bdf100bf5705155a5362c91
|
data/.gitignore
CHANGED
data/lib/cambium/version.rb
CHANGED
@@ -12,6 +12,10 @@ module Cambium
|
|
12
12
|
|
13
13
|
# ------------------------------------------ Config
|
14
14
|
|
15
|
+
def git_init
|
16
|
+
run_cmd "git init"
|
17
|
+
end
|
18
|
+
|
15
19
|
def cambium_setup
|
16
20
|
@config = {
|
17
21
|
:db => {},
|
@@ -39,8 +43,6 @@ module Cambium
|
|
39
43
|
end
|
40
44
|
# Application Class Name
|
41
45
|
@config[:app][:name] = Rails.application.class.parent_name
|
42
|
-
# Database Name
|
43
|
-
@config[:db][:name] = @config[:app][:name].underscore.downcase
|
44
46
|
end
|
45
47
|
|
46
48
|
def user_config
|
@@ -57,11 +59,10 @@ module Cambium
|
|
57
59
|
end
|
58
60
|
end
|
59
61
|
|
60
|
-
#
|
61
|
-
@config[:
|
62
|
-
|
63
|
-
@config[:
|
64
|
-
@config[:app][:prod_url] = 'localhost:3000' if @config[:app][:prod_url].blank?
|
62
|
+
# Database Name
|
63
|
+
@config[:db][:name] = @config[:app][:name].underscore.downcase
|
64
|
+
db_name = ask "\n#{set_color('Database Base Name:', :green, :bold)} [default: #{@config[:db][:name]}]"
|
65
|
+
@config[:db][:name] = db_name unless db_name.blank?
|
65
66
|
|
66
67
|
# Database Credentials
|
67
68
|
@config[:db][:user] = confirm_ask("#{set_color('Database User', :green, :bold)}: [leave blank for no user]")
|
@@ -70,6 +71,12 @@ module Cambium
|
|
70
71
|
else
|
71
72
|
@config[:db][:password] = ''
|
72
73
|
end
|
74
|
+
|
75
|
+
# Root URL (for mailers)
|
76
|
+
@config[:app][:dev_url] = ask("\n#{set_color('Development URL', :green, :bold)}: [leave blank for localhost:3000]")
|
77
|
+
@config[:app][:dev_url] = 'localhost:3000' if @config[:app][:dev_url].blank?
|
78
|
+
@config[:app][:prod_url] = ask("#{set_color('Production URL', :green, :bold)}: [leave blank for localhost:3000]")
|
79
|
+
@config[:app][:prod_url] = 'localhost:3000' if @config[:app][:prod_url].blank?
|
73
80
|
end
|
74
81
|
|
75
82
|
# ------------------------------------------ Gems & Gemfile
|
@@ -10,6 +10,12 @@ module Cambium
|
|
10
10
|
|
11
11
|
source_root File.expand_path('../../templates', __FILE__)
|
12
12
|
|
13
|
+
# ------------------------------------------ Default Public Controller
|
14
|
+
|
15
|
+
def add_home_controller
|
16
|
+
run_cmd "#{g} controller home index"
|
17
|
+
end
|
18
|
+
|
13
19
|
# ------------------------------------------ Admin Controller
|
14
20
|
|
15
21
|
def add_admin_controller
|
@@ -13,6 +13,8 @@ module Cambium
|
|
13
13
|
# ------------------------------------------ Settings Files
|
14
14
|
|
15
15
|
def add_settings_files
|
16
|
+
template "config/initializers/_settings.rb",
|
17
|
+
"config/initializers/_settings.rb"
|
16
18
|
['settings','settings_private','settings_private.sample'].each do |s|
|
17
19
|
template "config/#{s}.yml", "config/#{s}.yml"
|
18
20
|
end
|
@@ -19,6 +19,10 @@ module Cambium
|
|
19
19
|
# ------------------------------------------ Layouts
|
20
20
|
|
21
21
|
def add_layouts
|
22
|
+
@site_title = Rails.application.class.parent_name.humanize.titleize
|
23
|
+
site_title = ask "\n#{set_color('App Title:', :green, :bold)} [default: #{@site_title}]"
|
24
|
+
@site_title = site_title unless site_title.blank?
|
25
|
+
|
22
26
|
app = "app/views/layouts/application.html.erb"
|
23
27
|
admin = "app/views/layouts/admin.html.erb"
|
24
28
|
remove_file app
|
@@ -5,8 +5,6 @@ source 'https://rubygems.org'
|
|
5
5
|
gem 'rails', '<%= @config[:app][:version] %>'
|
6
6
|
gem 'unicorn-rails'
|
7
7
|
gem '<%= @config[:db][:adapter] %>'
|
8
|
-
# gem 'cambium', :git => 'git@github.com:seancdavis/cambium.git'
|
9
|
-
gem 'cambium', :path => "/Users/sean/www/rt/rt/cambium"
|
10
8
|
|
11
9
|
# ------------------------------------------ Assets
|
12
10
|
|
@@ -27,6 +25,7 @@ gem 'pickadate-rails'
|
|
27
25
|
|
28
26
|
# ------------------------------------------ Utilities
|
29
27
|
|
28
|
+
gem 'cambium'
|
30
29
|
gem 'devise'
|
31
30
|
gem 'carrierwave'
|
32
31
|
gem 'hirb'
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
12
12
|
<meta name="format-detection" content="telephone=no">
|
13
13
|
|
14
|
-
<title
|
14
|
+
<title><%= @site_title %></title>
|
15
15
|
|
16
16
|
<%%= stylesheet_link_tag "admin/admin", :media => "all" %>
|
17
17
|
<%%= javascript_include_tag "modernizr" %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html class="public">
|
3
3
|
<head>
|
4
|
-
<title
|
4
|
+
<title><%= @site_title %></title>
|
5
5
|
<meta charset="utf-8">
|
6
6
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
7
|
<!-- <meta name="description" content="<%%#= @meta[:description] %>"> -->
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cambium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean C Davis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -322,7 +322,6 @@ files:
|
|
322
322
|
- lib/cambium.rb
|
323
323
|
- lib/cambium/engine.rb
|
324
324
|
- lib/cambium/version.rb
|
325
|
-
- lib/docs/notes.md
|
326
325
|
- lib/generators/cambium/setup/config_generator.rb
|
327
326
|
- lib/generators/cambium/setup/controllers_generator.rb
|
328
327
|
- lib/generators/cambium/setup/devise_generator.rb
|
data/lib/docs/notes.md
DELETED