plant 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +21 -0
- data/app/helpers/plant/plant_helper.rb +3 -0
- data/app/models/plant/content.rb +1 -65
- data/lib/capistrano/tasks/plant.rake +1 -0
- data/lib/plant/core.rb +81 -0
- data/lib/plant/engine.rb +1 -0
- data/lib/plant/utils.rb +1 -0
- data/lib/plant/version.rb +1 -1
- data/lib/plant.rb +2 -0
- data/lib/tasks/plant_tasks.rake +3 -1
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +3 -0
- data/spec/dummy/app/assets/javascripts/application.js +13 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/content/jupiter/io.yml +8 -0
- data/spec/dummy/app/content/solar/earth/moon.yml +0 -0
- data/spec/dummy/app/content/sun.yml +0 -0
- data/spec/dummy/app/controllers/application_controller.rb +6 -0
- data/spec/dummy/app/helpers/application_helper.rb +3 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +15 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +32 -0
- data/spec/dummy/config/initializers/assets.rb +2 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +8 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +9 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +28 -0
- data/spec/dummy/log/test.log +9737 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/factories.rb +6 -0
- data/spec/helpers/plant/plant_helper_spec.rb +27 -0
- data/spec/lib/core_spec.rb +85 -0
- data/spec/lib/hash_pathify_spec.rb +42 -0
- data/spec/lib/seed_spec.rb +48 -0
- data/spec/lib/utils_spec.rb +20 -0
- data/spec/models/plant/content_spec.rb +9 -0
- data/spec/sample_spec.rb +5 -0
- data/spec/spec_helper.rb +58 -0
- data/spec/support/test.yml +4 -0
- metadata +97 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd41caf850e81cba20f441d090d7f6329ead3cc2
|
4
|
+
data.tar.gz: b15e9dc6409f83ff0b38159b962a689b2b537e8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d79c05fe73790426f4394b4f82fafa536d84f8e557664eb1eddf583a7827db536d0b0d7fc53eb725c2fb18d7a57d46281bfd25495fd8c7127cded6efd2f5f06b
|
7
|
+
data.tar.gz: 524510dcb7c795f2cc004f3ff63a686b16c186c48cb0e2450606c224d5a1e61ae51cb19af7f454dc9ef8785a0781fa52b1581a68fc40ae34dc730108a094c6ef
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
Author: Paul Brennan, AHC
|
2
|
+
Copyright (c) 2015, AHC
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -2,6 +2,9 @@
|
|
2
2
|
module Plant
|
3
3
|
# Namespace application helper for writing to page
|
4
4
|
module PlantHelper
|
5
|
+
# Writes the content out onto the page for the given node.
|
6
|
+
# Params: options: Hash:
|
7
|
+
# => html_safe: whether to allow html or not.
|
5
8
|
def plant_content_for(node, options = {})
|
6
9
|
content = Plant::Content.get_node_content(node, options)
|
7
10
|
if options[:html_safe]
|
data/app/models/plant/content.rb
CHANGED
@@ -1,70 +1,6 @@
|
|
1
1
|
module Plant
|
2
2
|
# Model for content
|
3
3
|
class Content < ActiveRecord::Base
|
4
|
-
|
5
|
-
validates_uniqueness_of :node_id
|
6
|
-
|
7
|
-
# Gets a given node
|
8
|
-
# => Parameter: node ID (string)
|
9
|
-
# => Parameter: Options (hash), containing
|
10
|
-
# - scenario (optional)
|
11
|
-
# Can either be a string or an object with
|
12
|
-
# a scenario method, for example a user.
|
13
|
-
#
|
14
|
-
# If no specific scenario returned, then will
|
15
|
-
# default back to a nil scenario.
|
16
|
-
#
|
17
|
-
# => Throws: NotFound if node not found
|
18
|
-
# => Returns: A content object
|
19
|
-
def self.get_node(node_id, options = {})
|
20
|
-
options = defaults.merge(options)
|
21
|
-
find_specific(node_id, options[:scenario]) || find_main(node_id)
|
22
|
-
end
|
23
|
-
|
24
|
-
def self.defaults
|
25
|
-
{ scenario: nil,
|
26
|
-
parameters: {} }
|
27
|
-
end
|
28
|
-
|
29
|
-
# Convenience method to get the content of a given node
|
30
|
-
# => Paramter: node ID (string)
|
31
|
-
# => Paramter: Options (hash)
|
32
|
-
# - scenario
|
33
|
-
# Can either be a string or an object with
|
34
|
-
# a scenario method, for example a user
|
35
|
-
#
|
36
|
-
# - Also can be any arbitary key to be injected into the
|
37
|
-
# returned content. For example
|
38
|
-
# When called get_node_content(node_id, foo: 'hhh)
|
39
|
-
# "This is content for #{foo} and bar"
|
40
|
-
# will return 'This is content for hhh and bar'
|
41
|
-
#
|
42
|
-
# Note: If second parameter is a string, it will be treated as
|
43
|
-
# scenario.
|
44
|
-
# Also see: get_node
|
45
|
-
def self.get_node_content(node_id, options = {})
|
46
|
-
options = { scenario: options } unless options.is_a? Hash
|
47
|
-
options = defaults.merge(options)
|
48
|
-
inject_content(get_node(node_id, options).content, options)
|
49
|
-
end
|
50
|
-
|
51
|
-
# Interpolation of content
|
52
|
-
def self.inject_content(content, options)
|
53
|
-
options.each do |key, replacement|
|
54
|
-
content.gsub!("\#\{#{key}\}", replacement.to_s)
|
55
|
-
end
|
56
|
-
content
|
57
|
-
end
|
58
|
-
|
59
|
-
def self.find_specific(node, scenario)
|
60
|
-
scenario = scenario.scenario if scenario.respond_to? :scenario
|
61
|
-
find_by(node_id: "#{node}.#{scenario}")
|
62
|
-
end
|
63
|
-
|
64
|
-
def self.find_main(node)
|
65
|
-
main = find_by(node_id: "#{node}.main")
|
66
|
-
return main if main
|
67
|
-
find_by!(node_id: "#{node}")
|
68
|
-
end
|
4
|
+
include Plant::Core
|
69
5
|
end
|
70
6
|
end
|
data/lib/plant/core.rb
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
module Plant
|
2
|
+
# Main Plant Methods
|
3
|
+
module Core
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
included do
|
6
|
+
# Can only have one scenario-node_id combination
|
7
|
+
validates_uniqueness_of :node_id
|
8
|
+
end
|
9
|
+
|
10
|
+
# All methods are class level, extend this class to allow for instance
|
11
|
+
# level variables
|
12
|
+
module ClassMethods
|
13
|
+
# Gets a given node
|
14
|
+
# => Parameter: node ID (string)
|
15
|
+
# => Parameter: Options (hash), containing
|
16
|
+
# - scenario (optional)
|
17
|
+
# Can either be a string or an object with
|
18
|
+
# a scenario method, for example a user.
|
19
|
+
#
|
20
|
+
# If no specific scenario returned, then will
|
21
|
+
# default back to a nil scenario.
|
22
|
+
#
|
23
|
+
# => Throws: NotFound if node not found
|
24
|
+
# => Returns: A content object
|
25
|
+
def get_node(node_id, options = {})
|
26
|
+
options = defaults.merge(options)
|
27
|
+
find_specific(node_id, options[:scenario]) || find_main(node_id)
|
28
|
+
end
|
29
|
+
|
30
|
+
def defaults
|
31
|
+
{ scenario: nil,
|
32
|
+
parameters: {} }
|
33
|
+
end
|
34
|
+
|
35
|
+
# Convenience method to get the content of a given node
|
36
|
+
# => Paramter: node ID (string)
|
37
|
+
# => Paramter: Options (hash)
|
38
|
+
# - scenario
|
39
|
+
# Can either be a string or an object with
|
40
|
+
# a scenario method, for example a user
|
41
|
+
#
|
42
|
+
# - Also can be any arbitary key to be injected into the
|
43
|
+
# returned content. For example
|
44
|
+
# When called get_node_content(node_id, foo: 'hhh)
|
45
|
+
# "This is content for #{foo} and bar"
|
46
|
+
# will return 'This is content for hhh and bar'
|
47
|
+
#
|
48
|
+
# Note: If second parameter is a string, it will be treated as
|
49
|
+
# scenario.
|
50
|
+
# Also see: get_node
|
51
|
+
def get_node_content(node_id, options = {})
|
52
|
+
options = { scenario: options } unless options.is_a? Hash
|
53
|
+
options = defaults.merge(options)
|
54
|
+
inject_content(get_node(node_id, options).content, options)
|
55
|
+
end
|
56
|
+
|
57
|
+
# Interpolation of content
|
58
|
+
def inject_content(content, options)
|
59
|
+
options.each do |key, replacement|
|
60
|
+
content.gsub!("\#\{#{key}\}", replacement.to_s)
|
61
|
+
end
|
62
|
+
content
|
63
|
+
end
|
64
|
+
|
65
|
+
# Private
|
66
|
+
# Finds a specific scenario
|
67
|
+
def find_specific(node, scenario)
|
68
|
+
scenario = scenario.scenario if scenario.respond_to? :scenario
|
69
|
+
find_by(node_id: "#{node}.#{scenario}")
|
70
|
+
end
|
71
|
+
|
72
|
+
# Private
|
73
|
+
# Find the main node or falls back to the node if main does not exist.
|
74
|
+
def find_main(node)
|
75
|
+
main = find_by(node_id: "#{node}.main")
|
76
|
+
return main if main
|
77
|
+
find_by!(node_id: "#{node}")
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
data/lib/plant/engine.rb
CHANGED
data/lib/plant/utils.rb
CHANGED
data/lib/plant/version.rb
CHANGED
data/lib/plant.rb
CHANGED
data/lib/tasks/plant_tasks.rake
CHANGED
@@ -9,9 +9,10 @@ namespace :plant do
|
|
9
9
|
puts "Planted #{count} seeds."
|
10
10
|
end
|
11
11
|
|
12
|
+
desc 'Puts the content from the YAML files in app/content into the database'
|
12
13
|
task seeds: :seed
|
13
14
|
|
14
|
-
desc '
|
15
|
+
desc 'Usage: rake plant:specific_seed[yaml_file.yml] imports yaml_file'
|
15
16
|
task :specific_seed, [:yaml_path] => :environment do |_, args|
|
16
17
|
Plant::Utils.load_yaml_file(args[:yaml_path]).each do |full_node, value|
|
17
18
|
add_object(full_node, value)
|
@@ -19,6 +20,7 @@ namespace :plant do
|
|
19
20
|
end
|
20
21
|
end
|
21
22
|
|
23
|
+
# Adds the object to the database from a yaml file
|
22
24
|
def add_object(full_node, value)
|
23
25
|
content_obj = Plant::Content.find_or_initialize_by(node_id: full_node)
|
24
26
|
content_obj.content = value.chomp
|
@@ -0,0 +1,28 @@
|
|
1
|
+
== README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
25
|
+
|
26
|
+
|
27
|
+
Please feel free to use a different markup language if you do not plan to run
|
28
|
+
<tt>rake doc:app</tt>.
|
data/spec/dummy/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// compiled file.
|
9
|
+
//
|
10
|
+
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
|
11
|
+
// about supported directives.
|
12
|
+
//
|
13
|
+
//= require_tree .
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
+
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
+
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
+
* file per style scope.
|
12
|
+
*
|
13
|
+
*= require_tree .
|
14
|
+
*= require_self
|
15
|
+
*/
|
File without changes
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Dummy</title>
|
5
|
+
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
|
6
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
data/spec/dummy/bin/rake
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
# path to your application root.
|
5
|
+
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
|
6
|
+
|
7
|
+
Dir.chdir APP_ROOT do
|
8
|
+
# This script is a starting point to setup your application.
|
9
|
+
# Add necessary setup steps to this file:
|
10
|
+
|
11
|
+
puts '== Installing dependencies =='
|
12
|
+
system 'gem install bundler --conservative'
|
13
|
+
system 'bundle check || bundle install'
|
14
|
+
|
15
|
+
# puts '\n== Copying sample files =='
|
16
|
+
# unless File.exist?('config/database.yml')
|
17
|
+
# system 'cp config/database.yml.sample config/database.yml'
|
18
|
+
# end
|
19
|
+
|
20
|
+
puts '\n== Preparing database =='
|
21
|
+
system 'bin/rake db:setup'
|
22
|
+
|
23
|
+
puts '\n== Removing old logs and tempfiles =='
|
24
|
+
system 'rm -f log/*'
|
25
|
+
system 'rm -rf tmp/cache'
|
26
|
+
|
27
|
+
puts '\n== Restarting application server =='
|
28
|
+
system 'touch tmp/restart.txt'
|
29
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
require 'rails/all'
|
4
|
+
|
5
|
+
Bundler.require(*Rails.groups)
|
6
|
+
require 'plant'
|
7
|
+
|
8
|
+
module Dummy
|
9
|
+
# The sample app
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Do not swallow errors in after_commit/after_rollback callbacks.
|
12
|
+
config.active_record.raise_in_transactional_callbacks = true
|
13
|
+
config.eager_load = false
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# SQLite version 3.x
|
2
|
+
# gem install sqlite3
|
3
|
+
#
|
4
|
+
# Ensure the SQLite 3 gem is defined in your Gemfile
|
5
|
+
# gem 'sqlite3'
|
6
|
+
#
|
7
|
+
default: &default
|
8
|
+
adapter: sqlite3
|
9
|
+
pool: 5
|
10
|
+
timeout: 5000
|
11
|
+
|
12
|
+
development:
|
13
|
+
<<: *default
|
14
|
+
database: db/development.sqlite3
|
15
|
+
|
16
|
+
# Warning: The database defined as "test" will be erased and
|
17
|
+
# re-generated from your development database when you run "rake".
|
18
|
+
# Do not set this db to the same as development or production.
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: db/test.sqlite3
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: db/production.sqlite3
|
@@ -0,0 +1,32 @@
|
|
1
|
+
Rails.application.configure do
|
2
|
+
# since you don't have
|
3
|
+
config.cache_classes = false
|
4
|
+
|
5
|
+
# Do not eager load code on boot.
|
6
|
+
config.eager_load = false
|
7
|
+
|
8
|
+
# Show full error reports and disable caching.
|
9
|
+
config.consider_all_requests_local = true
|
10
|
+
config.action_controller.perform_caching = false
|
11
|
+
|
12
|
+
# Don't care if the mailer can't send.
|
13
|
+
config.action_mailer.raise_delivery_errors = false
|
14
|
+
|
15
|
+
# Print deprecation notices to the Rails logger.
|
16
|
+
config.active_support.deprecation = :log
|
17
|
+
|
18
|
+
# Raise an error on page load if there are pending migrations.
|
19
|
+
config.active_record.migration_error = :page_load
|
20
|
+
|
21
|
+
config.assets.debug = true
|
22
|
+
|
23
|
+
config.assets.digest = true
|
24
|
+
|
25
|
+
# Adds additional error checking when serving assets at runtime.
|
26
|
+
# Checks for improperly declared sprockets dependencies.
|
27
|
+
# Raises helpful error messages.
|
28
|
+
config.assets.raise_runtime_errors = true
|
29
|
+
|
30
|
+
# Raises error for missing translations
|
31
|
+
# config.action_view.raise_on_missing_translations = true
|
32
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
ActiveSupport.on_load(:action_controller) do
|
7
|
+
wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
|
8
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Files in the config/locales directory are used for internationalization
|
2
|
+
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
+
# than English, add the necessary files in this directory.
|
4
|
+
#
|
5
|
+
# To use the locales, use `I18n.t`:
|
6
|
+
#
|
7
|
+
# I18n.t 'hello'
|
8
|
+
#
|
9
|
+
# In views, this is aliased to just `t`:
|
10
|
+
#
|
11
|
+
# <%= t('hello') %>
|
12
|
+
#
|
13
|
+
# To use a different locale, set it with `I18n.locale`:
|
14
|
+
#
|
15
|
+
# I18n.locale = :es
|
16
|
+
#
|
17
|
+
# This would use the information in config/locales/es.yml.
|
18
|
+
#
|
19
|
+
# To learn more, please read the Rails Internationalization guide
|
20
|
+
# available at http://guides.rubyonrails.org/i18n.html.
|
21
|
+
|
22
|
+
en:
|
23
|
+
hello: "Hello world"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
# You can use `rake secret` to generate a secure secret key.
|
9
|
+
|
10
|
+
# Make sure the secrets in this file are kept private
|
11
|
+
# if you're sharing your code publicly.
|
12
|
+
|
13
|
+
development:
|
14
|
+
secret_key_base: 7c5be3ff2f86bf8619d9e8a085210cdb3369b195b4ebd2bd18dbf91cdf7d73b8fa13089c165d40b3f916653ee2b3c4e7809788183b49575cf6060f5dcf12a746
|
15
|
+
|
16
|
+
test:
|
17
|
+
secret_key_base: 09dcff95e386330ba66c03f108b694004258d2a03e416095a9a16f6e9792f0ffaadbf7c07b22468d9d08d6b63055b5ff47635282e31bc89aa55aa7bf4d9d86c4
|
18
|
+
|
19
|
+
# Do not keep production secrets in the repository,
|
20
|
+
# instead read values from the environment.
|
21
|
+
production:
|
22
|
+
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
Binary file
|
Binary file
|
@@ -0,0 +1,28 @@
|
|
1
|
+
[1m[36mPlant::Content Load (0.2ms)[0m [1mSELECT "plant_contents".* FROM "plant_contents" WHERE "plant_contents"."node_id" = ? LIMIT 1[0m [["node_id", "jupiter.io.moon_name.main"]]
|
2
|
+
[1m[35m (0.2ms)[0m begin transaction
|
3
|
+
[1m[36mPlant::Content Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "plant_contents" WHERE ("plant_contents"."scenario" IS NULL AND "plant_contents"."node_id" = 'jupiter.io.moon_name.main') LIMIT 1[0m
|
4
|
+
[1m[35mSQL (0.2ms)[0m INSERT INTO "plant_contents" ("node_id", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["node_id", "jupiter.io.moon_name.main"], ["content", "Foobar"], ["created_at", "2015-08-21 13:45:12.153929"], ["updated_at", "2015-08-21 13:45:12.153929"]]
|
5
|
+
[1m[36m (8.5ms)[0m [1mcommit transaction[0m
|
6
|
+
[1m[35mPlant::Content Load (0.1ms)[0m SELECT "plant_contents".* FROM "plant_contents" WHERE "plant_contents"."node_id" = ? LIMIT 1 [["node_id", "jupiter.io.moon_name.tuesdays"]]
|
7
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
8
|
+
[1m[35mPlant::Content Exists (0.1ms)[0m SELECT 1 AS one FROM "plant_contents" WHERE ("plant_contents"."scenario" IS NULL AND "plant_contents"."node_id" = 'jupiter.io.moon_name.tuesdays') LIMIT 1
|
9
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "plant_contents" ("node_id", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?)[0m [["node_id", "jupiter.io.moon_name.tuesdays"], ["content", "Barfoo"], ["created_at", "2015-08-21 13:45:12.166374"], ["updated_at", "2015-08-21 13:45:12.166374"]]
|
10
|
+
[1m[35m (3.4ms)[0m commit transaction
|
11
|
+
[1m[36mPlant::Content Load (0.1ms)[0m [1mSELECT "plant_contents".* FROM "plant_contents" WHERE "plant_contents"."node_id" = ? LIMIT 1[0m [["node_id", "jupiter.io.moon_name.wednesdays"]]
|
12
|
+
[1m[35m (0.4ms)[0m begin transaction
|
13
|
+
[1m[36mPlant::Content Exists (0.1ms)[0m [1mSELECT 1 AS one FROM "plant_contents" WHERE ("plant_contents"."scenario" IS NULL AND "plant_contents"."node_id" = 'jupiter.io.moon_name.wednesdays') LIMIT 1[0m
|
14
|
+
[1m[35mSQL (0.1ms)[0m INSERT INTO "plant_contents" ("node_id", "content", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["node_id", "jupiter.io.moon_name.wednesdays"], ["content", "multi line content with some stuff\n"], ["created_at", "2015-08-21 13:45:12.172588"], ["updated_at", "2015-08-21 13:45:12.172588"]]
|
15
|
+
[1m[36m (3.4ms)[0m [1mcommit transaction[0m
|
16
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
17
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
18
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
19
|
+
[1m[36m (12.6ms)[0m [1mCREATE TABLE "schema_migrations" ("version" varchar NOT NULL) [0m
|
20
|
+
[1m[35m (0.1ms)[0m select sqlite_version(*)
|
21
|
+
[1m[36m (3.4ms)[0m [1mCREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")[0m
|
22
|
+
[1m[35mActiveRecord::SchemaMigration Load (0.1ms)[0m SELECT "schema_migrations".* FROM "schema_migrations"
|
23
|
+
Migrating to CreatePlantContents (20150820134825)
|
24
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
25
|
+
[1m[35m (0.2ms)[0m CREATE TABLE "plant_contents" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "node_id" varchar, "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
26
|
+
[1m[36mSQL (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES (?)[0m [["version", "20150820134825"]]
|
27
|
+
[1m[35m (4.4ms)[0m commit transaction
|
28
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.1ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|