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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e28aa619df1b233dfde079815b4311a97b6baf8
4
- data.tar.gz: cee209b988492319a11bedbe913848868b2e2d1e
3
+ metadata.gz: 51a3c4b8209ac4b348b16e1c852d6d71f9f4cbdf
4
+ data.tar.gz: e3e021298a50f0253858e5c086ab211ecf0294db
5
5
  SHA512:
6
- metadata.gz: b628402023f64e5f40ec18988e60175c66e7bf480c891f669f5de58372efb058d64bc7846c969f0755665401f6f407b6e9d280fb320efaa1a7e67f6fb2e38620
7
- data.tar.gz: 0ade2250383704544931a67ca71464d88d471a94c0269d12a7a6f25db7c82f42851c793776c3d5b49d1c1a50a37aac2415996da18b4bacaea73eaf8a23f05916
6
+ metadata.gz: bb15ad72c5660eb5d50fef183221027b1406a278fd844945a276dfe8affb8a0d85d18f2ee4991034ae4c47868609af22496dd023edee3b4245f6008b382c8770
7
+ data.tar.gz: d1761401c0993206ac32f755e5d1ad5a98ec7333499c4bac2b646b9b5f3de1fd9392e4a39526e3b722f97f2fa1d833112ae0cfad1bdf100bf5705155a5362c91
data/.gitignore CHANGED
@@ -20,3 +20,4 @@ tmp
20
20
  *.o
21
21
  *.a
22
22
  mkmf.log
23
+ *.DS_Store
@@ -1,3 +1,3 @@
1
1
  module Cambium
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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
- # Root URL (for mailers)
61
- @config[:app][:dev_url] = ask("\n#{set_color('Development URL', :green, :bold)}: [leave blank for localhost:3000]")
62
- @config[:app][:dev_url] = 'localhost:3000' if @config[:app][:dev_url].blank?
63
- @config[:app][:prod_url] = ask("#{set_color('Production URL', :green, :bold)}: [leave blank for localhost:3000]")
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'
@@ -4,7 +4,7 @@
4
4
  #= require_tree ./views
5
5
  #= require_tree ./routers
6
6
 
7
- window.Pilot =
7
+ window.App =
8
8
  Models: {}
9
9
  Collections: {}
10
10
  Routers: {}
@@ -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>Patience</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>Cambium</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] %>"> -->
@@ -28,6 +28,6 @@
28
28
 
29
29
  # ------------------------------------------ Root
30
30
 
31
- root :to => 'pages#index'
31
+ root :to => 'home#index'
32
32
 
33
33
  end
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.1
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-07 00:00:00.000000000 Z
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
@@ -1,4 +0,0 @@
1
- Doc Notes
2
-
3
- * add `gem 'cambium'` to `Gemfile`
4
- *