ecrire 0.27.0 → 0.28.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/Rakefile +47 -12
- data/lib/ecrire/application.rb +30 -7
- data/lib/ecrire/config/environment/production.rb +2 -1
- data/lib/ecrire/db/migrate/20131111222709_create_posts.rb +1 -1
- data/lib/ecrire/db/migrate/20131113200949_create_users.rb +1 -1
- data/lib/ecrire/db/migrate/20131221195338_create_partials.rb +1 -1
- data/lib/ecrire/db/migrate/20140115215122_create_images.rb +1 -1
- data/lib/ecrire/db/migrate/20140617224837_create_labels.rb +1 -1
- data/lib/ecrire/db/migrate/20150318549479_create_tags.rb +1 -1
- data/lib/ecrire/theme/template/secrets.yml +11 -0
- data/lib/ecrire/version.rb +1 -1
- data/test/configuration/postgresql/user.rb +50 -0
- data/test/configuration/postgresql.rb +43 -0
- data/test/configuration.rb +10 -0
- data/test/editor/controllers/posts_controller_test.rb +0 -1
- data/test/editor/controllers/sessions_controller_test.rb +0 -1
- data/test/editor/controllers/tags_controller_test.rb +0 -1
- data/test/editor/helpers/base_helper_test.rb +0 -2
- data/test/editor/initializers.rb +23 -0
- data/test/editor/models/image_test.rb +0 -1
- data/test/editor/models/post_test.rb +0 -1
- data/test/editor/models/title_test.rb +0 -1
- data/test/editor/models/user_test.rb +0 -1
- data/test/onboarding/controllers/databases_controller_test.rb +1 -1
- data/test/onboarding/controllers/users_controller_test.rb +1 -1
- data/test/onboarding/initializers.rb +10 -0
- data/test/{editor/theme/secrets.yml → secrets.yml} +2 -2
- data/test/{test_task.rb → task.rb} +11 -5
- data/test/test_helper.rb +1 -10
- data/test/theme/initializers.rb +22 -0
- metadata +29 -24
- data/test/editor/test_helper.rb +0 -34
- data/test/theme/theme/secrets.yml +0 -8
- /data/lib/ecrire/app/assets/stylesheets/admin/{base.css.scss → base.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{documentation.css.scss → documentation.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{header.css.scss → header.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{help.css.scss → help.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{images.css.scss → images.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{navigation.css.scss → navigation.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{posts.css.scss → posts.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{save.css.scss → save.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{tags.css.scss → tags.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/admin/{title.css.scss → title.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/{admin.css.scss → admin.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/{ecrire.css.scss → ecrire.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/editor/{code.css.scss → code.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/editor/{content.css.scss → content.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/editor/{figure.css.scss → figure.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/{sessions.css.scss → sessions.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/shared/{popup.css.scss → popup.scss} +0 -0
- /data/lib/ecrire/app/assets/stylesheets/{variables.css.scss → variables.scss} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c710a91a9c520fde98fb9a8a49b0ecff109dc0a
|
4
|
+
data.tar.gz: cb48d989c3288a2c51715e645a287751059f9852
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc8f48e37fdddc4febb2ac9aafff96429cb9ebca88d7b9c527a5ef2e49891d4035b1c3f87a5035e26e5050a89f32cddb2fb533411d89788dc33fa3f021c9284b
|
7
|
+
data.tar.gz: fceca5ade5a602ed7710b8bcb1a148889ae4d09e2a151418b867139bda530936fbbadf5d48c2b4f6e28740d760f9d2eaa00ed5d7fd63701f0989ad68f28c713f
|
data/Rakefile
CHANGED
@@ -3,28 +3,69 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
ENV['RAILS_ENV'] ||= 'test'
|
4
4
|
|
5
5
|
require 'ecrire'
|
6
|
-
require_relative 'test/
|
6
|
+
require_relative 'test/configuration'
|
7
|
+
require_relative 'test/task'
|
7
8
|
|
8
9
|
task default: :test
|
9
10
|
|
10
11
|
namespace :database do
|
12
|
+
secrets = YAML.load_file(File.expand_path('../test/secrets.yml', __FILE__))
|
13
|
+
info = secrets[ENV['RAILS_ENV']]
|
14
|
+
postgresql = Ecrire::Test::Configuration::Postgresql.new(info['database'], info['username'])
|
11
15
|
|
12
|
-
task :
|
13
|
-
|
16
|
+
task :initialize do
|
17
|
+
begin
|
18
|
+
unless postgresql.configured?
|
19
|
+
puts "It seems you are running the development tests for the first time."
|
20
|
+
puts "Ecrire will try to configure postgresql for you..."
|
21
|
+
|
22
|
+
data = YAML.load_file(File.expand_path('../test/secrets.yml', __FILE__))
|
23
|
+
|
24
|
+
if postgresql.user.new?
|
25
|
+
postgresql.create_user!
|
26
|
+
end
|
27
|
+
|
28
|
+
if !postgresql.user.superuser?
|
29
|
+
postgresql.user.superuser!
|
30
|
+
end
|
31
|
+
|
32
|
+
if !postgresql.user.login?
|
33
|
+
postgresql.user.login!
|
34
|
+
end
|
35
|
+
|
36
|
+
puts "Done configuring postgresql."
|
37
|
+
end
|
38
|
+
|
39
|
+
postgresql.reset_database!
|
40
|
+
rescue Ecrire::Test::Configuration::Error => e
|
41
|
+
puts "Ecrire couldn't configure postgresql."
|
42
|
+
puts "=> #{e.message}"
|
43
|
+
puts "To fix this issue, make sure you have a superuser for #{%x(whoami)}"
|
44
|
+
puts "createuser -l -s postgres"
|
45
|
+
exit
|
46
|
+
end
|
14
47
|
end
|
15
48
|
|
16
49
|
end
|
17
50
|
|
18
51
|
namespace :test do
|
19
|
-
['
|
20
|
-
|
21
|
-
t.
|
52
|
+
['editor', 'onboarding', 'theme'].each do |name|
|
53
|
+
Ecrire::Test::Task.new(name) do |t|
|
54
|
+
t.before do
|
55
|
+
Rake::Task['database:initialize'].invoke
|
56
|
+
end
|
22
57
|
t.libs << "test"
|
23
58
|
t.test_files = FileList["test/#{name}/**/*_test.rb"]
|
24
59
|
t.verbose = true
|
25
60
|
end
|
26
61
|
end
|
27
62
|
|
63
|
+
Rake::TestTask.new 'markdown' do |t|
|
64
|
+
t.libs << "test"
|
65
|
+
t.test_files = FileList["test/markdown/**/*_test.rb"]
|
66
|
+
t.verbose = true
|
67
|
+
end
|
68
|
+
|
28
69
|
end
|
29
70
|
|
30
71
|
task :test do
|
@@ -32,9 +73,3 @@ task :test do
|
|
32
73
|
Rake::Task[name].invoke
|
33
74
|
end
|
34
75
|
end
|
35
|
-
|
36
|
-
at_exit do
|
37
|
-
unless Ecrire::Application.onboarding?
|
38
|
-
Rake::Task['database:purge'].invoke
|
39
|
-
end
|
40
|
-
end
|
data/lib/ecrire/application.rb
CHANGED
@@ -26,16 +26,32 @@ module Ecrire
|
|
26
26
|
|
27
27
|
alias :require_environment! :initialize!
|
28
28
|
|
29
|
-
|
30
|
-
|
29
|
+
config.before_initialize do
|
30
|
+
if paths['config/database'].existent.any?
|
31
|
+
require 'ecrire/theme/engine'
|
32
|
+
else
|
33
|
+
require 'ecrire/onboarding/engine'
|
34
|
+
end
|
31
35
|
end
|
32
36
|
|
33
|
-
|
37
|
+
##
|
38
|
+
# There seems to be a crack between when the configuration
|
39
|
+
# is loaded and when the initializer collection is built.
|
40
|
+
#
|
41
|
+
# Ecrire requires the configuration to be loaded before
|
42
|
+
# knowing which module it should load based on the current
|
43
|
+
# configuration.
|
44
|
+
#
|
45
|
+
# For that reason, this method is overloaded.
|
46
|
+
#
|
47
|
+
def initialize!(group=:default) #:nodoc:
|
48
|
+
raise "Application has been already initialized." if @initialized
|
34
49
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
50
|
+
ActiveSupport.run_load_hooks(:before_initialize, self)
|
51
|
+
|
52
|
+
run_initializers(group, self)
|
53
|
+
@initialized = true
|
54
|
+
self
|
39
55
|
end
|
40
56
|
|
41
57
|
##
|
@@ -48,6 +64,8 @@ module Ecrire
|
|
48
64
|
def paths
|
49
65
|
@paths ||= begin
|
50
66
|
paths = super
|
67
|
+
paths.add 'config/secrets', with: Dir.pwd + '/secrets.yml'
|
68
|
+
paths.add 'config/database', with: Dir.pwd + '/secrets.yml'
|
51
69
|
paths.add 'config/routes.rb', with: 'routes.rb'
|
52
70
|
paths.add 'config/locales', with: 'locales', glob: "**/*.{rb,yml}"
|
53
71
|
paths
|
@@ -62,5 +80,10 @@ module Ecrire
|
|
62
80
|
defined?(Ecrire::Onboarding::Engine)
|
63
81
|
end
|
64
82
|
|
83
|
+
Rails::Application::Bootstrap.initializers.select do |initializer|
|
84
|
+
initializer.name.eql? :bootstrap_hook
|
85
|
+
end.first.instance_variable_set :@block, Proc.new {}
|
86
|
+
|
65
87
|
end
|
88
|
+
|
66
89
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
---
|
2
|
+
development: &1
|
3
|
+
adapter: postgresql
|
4
|
+
database: ecrire
|
5
|
+
user: postgres
|
6
|
+
password: a69164528b8b6622e730f722c5d88386
|
7
|
+
encoding: utf8
|
8
|
+
secret_key: 7681ee4652c6f230cfdb96127826c438
|
9
|
+
secret_key_base: 7681ee4652c6f230cfdb96127826c438
|
10
|
+
test: *1
|
11
|
+
production: *1
|
data/lib/ecrire/version.rb
CHANGED
@@ -0,0 +1,50 @@
|
|
1
|
+
class Ecrire::Test::Configuration::Postgresql::User
|
2
|
+
attr_reader :name
|
3
|
+
|
4
|
+
def initialize(name)
|
5
|
+
@name = name
|
6
|
+
output = %x(psql -c "select rolname, rolsuper, rolcanlogin from pg_roles where rolname = '#{name}';" -U postgres -d postgres -t -A 2>&1)
|
7
|
+
|
8
|
+
if $?.to_i != 0 || output.blank?
|
9
|
+
@exists = false
|
10
|
+
return
|
11
|
+
end
|
12
|
+
|
13
|
+
@exists = true
|
14
|
+
row = output.chomp.split('|')
|
15
|
+
|
16
|
+
@name = row[0]
|
17
|
+
@superuser = row[1] == 't'
|
18
|
+
@login = row[2] == 't'
|
19
|
+
end
|
20
|
+
|
21
|
+
def new?
|
22
|
+
!@exists
|
23
|
+
end
|
24
|
+
|
25
|
+
def superuser?
|
26
|
+
@superuser
|
27
|
+
end
|
28
|
+
|
29
|
+
def login?
|
30
|
+
@login
|
31
|
+
end
|
32
|
+
|
33
|
+
def superuser!
|
34
|
+
puts "Making #{@name} a superuser..."
|
35
|
+
message = %x(psql -c "alter role #{@name} with superuser" -U postgres -d postgres 2>&1)
|
36
|
+
if $?.to_i != 0
|
37
|
+
raise Ecrire::Test::Configuration::Postgresql::PSQLError.new message
|
38
|
+
end
|
39
|
+
puts "#{@name} is a superuser."
|
40
|
+
end
|
41
|
+
|
42
|
+
def login!
|
43
|
+
puts "Making #{@name} loggable..."
|
44
|
+
message = %x(psql -c "alter role #{@name} with login" -U postgres -d postgres 2>&1)
|
45
|
+
if $?.to_i != 0
|
46
|
+
raise Ecrire::Test::Configuration::Postgresql::PSQLError.new message
|
47
|
+
end
|
48
|
+
puts "#{@name} can log in."
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
class Ecrire::Test::Configuration::Postgresql
|
2
|
+
class PSQLError < Ecrire::Test::Configuration::Error; end;
|
3
|
+
require_relative 'postgresql/user'
|
4
|
+
|
5
|
+
attr_reader :user
|
6
|
+
|
7
|
+
def initialize(database, user)
|
8
|
+
@database = database
|
9
|
+
@user = User.new(user)
|
10
|
+
end
|
11
|
+
|
12
|
+
def configured?
|
13
|
+
%x(psql -c '' -d #{@database} -U #{@user.name} 2>&1)
|
14
|
+
if $?.to_i != 0
|
15
|
+
return false
|
16
|
+
end
|
17
|
+
return true
|
18
|
+
end
|
19
|
+
|
20
|
+
def create_user!
|
21
|
+
puts "Creating user #{@user.name}..."
|
22
|
+
message = %x(psql -c 'CREATE ROLE #{@user.name} with superuser login' -d postgres -U postgres 2>&1)
|
23
|
+
if $?.to_i != 0
|
24
|
+
raise PSQLError.new message
|
25
|
+
end
|
26
|
+
@user= User.new(@user.name)
|
27
|
+
puts "User #{@user.name} created."
|
28
|
+
end
|
29
|
+
|
30
|
+
def reset_database!(silence = false)
|
31
|
+
unless silence
|
32
|
+
puts "Resetting #{@database} if it exists..."
|
33
|
+
end
|
34
|
+
|
35
|
+
ActiveRecord::Tasks::DatabaseTasks.drop({'adapter' => 'postgresql', 'database' => @database, 'user' => user.name})
|
36
|
+
ActiveRecord::Tasks::DatabaseTasks.create({'adapter' => 'postgresql', 'database' => @database, 'user' => user.name})
|
37
|
+
|
38
|
+
unless silence
|
39
|
+
puts "#{@database} configured."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Ecrire::Application.paths.add 'config/secrets', with: Dir.pwd + '/test/secrets.yml'
|
2
|
+
Ecrire::Application.paths.add 'config/database', with: Dir.pwd + '/test/secrets.yml'
|
3
|
+
|
4
|
+
Ecrire::Application.initializer 'ecrire.automigrate', after: "active_record.initialize_database" do |app|
|
5
|
+
path = app.paths['db/migrate'].existent
|
6
|
+
ActiveRecord::Migrator.migrations_paths = path
|
7
|
+
if ActiveRecord::Migrator.needs_migration?
|
8
|
+
ActiveRecord::Migration.verbose = false
|
9
|
+
ActiveRecord::Migrator.migrate(path)
|
10
|
+
end
|
11
|
+
ActiveRecord::Migration.maintain_test_schema!
|
12
|
+
end
|
13
|
+
|
14
|
+
class ActiveSupport::TestCase
|
15
|
+
include ActiveRecord::TestFixtures
|
16
|
+
ActiveSupport.test_order = :random
|
17
|
+
self.fixture_path = "#{Dir.pwd}/test/fixtures/"
|
18
|
+
fixtures :all
|
19
|
+
end
|
20
|
+
|
21
|
+
Dir.chdir "test/editor/theme" do
|
22
|
+
Ecrire::Application.initialize!
|
23
|
+
end
|
@@ -21,7 +21,7 @@ class DatabasesControllerTest < TestController
|
|
21
21
|
end
|
22
22
|
|
23
23
|
test 'redirect to users if the connection is successful' do
|
24
|
-
post :create, database: {
|
24
|
+
post :create, database: {name: 'ecrire_test', user: 'ecrire_test'}
|
25
25
|
assert_redirected_to '/users'
|
26
26
|
end
|
27
27
|
|
@@ -1,20 +1,26 @@
|
|
1
1
|
require 'rake/testtask'
|
2
2
|
|
3
|
-
class Ecrire::
|
4
|
-
|
3
|
+
class Ecrire::Test::Task < Rake::TestTask
|
4
|
+
|
5
|
+
def before(&block)
|
6
|
+
@callback = block
|
7
|
+
end
|
5
8
|
|
6
9
|
def define
|
7
10
|
desc @description
|
8
11
|
task @name do
|
12
|
+
|
13
|
+
unless @callback.nil?
|
14
|
+
@callback.call
|
15
|
+
end
|
16
|
+
|
9
17
|
Rake::FileUtilsExt.verbose(@verbose) do
|
10
18
|
args = [
|
11
19
|
"#{ruby_opts_string} #{run_code} ",
|
12
20
|
"#{file_list_string} #{option_list}"
|
13
21
|
]
|
14
22
|
|
15
|
-
|
16
|
-
args << theme
|
17
|
-
end
|
23
|
+
args << @name
|
18
24
|
|
19
25
|
ruby args.join do |ok, status|
|
20
26
|
if !ok && status.respond_to?(:signaled?) && status.signaled?
|
data/test/test_helper.rb
CHANGED
@@ -11,14 +11,7 @@ require 'rails/generators/test_case'
|
|
11
11
|
require 'warden'
|
12
12
|
require 'byebug'
|
13
13
|
|
14
|
-
|
15
|
-
Ecrire::Application.initialize!
|
16
|
-
end
|
17
|
-
|
18
|
-
|
19
|
-
class ActiveSupport::TestCase
|
20
|
-
ActiveSupport.test_order = :sorted
|
21
|
-
end
|
14
|
+
require_relative "#{ARGV.pop}/initializers"
|
22
15
|
|
23
16
|
class ActionController::TestCase
|
24
17
|
include Warden::Test::Helpers
|
@@ -27,5 +20,3 @@ class ActionController::TestCase
|
|
27
20
|
@routes = Rails.application.routes
|
28
21
|
end
|
29
22
|
end
|
30
|
-
|
31
|
-
|
@@ -0,0 +1,22 @@
|
|
1
|
+
Ecrire::Application.initializer 'ecrire.automigrate', after: "active_record.initialize_database" do |app|
|
2
|
+
path = app.paths['db/migrate'].existent
|
3
|
+
ActiveRecord::Migrator.migrations_paths = path
|
4
|
+
if ActiveRecord::Migrator.needs_migration?
|
5
|
+
ActiveRecord::Migrator.migrate(path)
|
6
|
+
end
|
7
|
+
ActiveRecord::Migration.maintain_test_schema!
|
8
|
+
end
|
9
|
+
|
10
|
+
class ActiveSupport::TestCase
|
11
|
+
include ActiveRecord::TestFixtures
|
12
|
+
ActiveSupport.test_order = :random
|
13
|
+
self.fixture_path = "#{Dir.pwd}/test/fixtures/"
|
14
|
+
fixtures :all
|
15
|
+
end
|
16
|
+
|
17
|
+
Ecrire::Application.paths.add 'config/secrets', with: Dir.pwd + '/test/secrets.yml'
|
18
|
+
Ecrire::Application.paths.add 'config/database', with: Dir.pwd + '/test/secrets.yml'
|
19
|
+
|
20
|
+
Dir.chdir "test/theme/theme" do
|
21
|
+
Ecrire::Application.initialize!
|
22
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecrire
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pier-Olivier Thibault
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Blog engine on Rails
|
14
14
|
email: pothibo@gmail.com
|
@@ -54,24 +54,24 @@ files:
|
|
54
54
|
- lib/ecrire/app/assets/javascripts/vendor/moment.js
|
55
55
|
- lib/ecrire/app/assets/javascripts/vendor/prism.js
|
56
56
|
- lib/ecrire/app/assets/javascripts/vendor/prism/prism.ruby.js
|
57
|
-
- lib/ecrire/app/assets/stylesheets/admin.
|
58
|
-
- lib/ecrire/app/assets/stylesheets/admin/base.
|
59
|
-
- lib/ecrire/app/assets/stylesheets/admin/documentation.
|
60
|
-
- lib/ecrire/app/assets/stylesheets/admin/header.
|
61
|
-
- lib/ecrire/app/assets/stylesheets/admin/help.
|
62
|
-
- lib/ecrire/app/assets/stylesheets/admin/images.
|
63
|
-
- lib/ecrire/app/assets/stylesheets/admin/navigation.
|
64
|
-
- lib/ecrire/app/assets/stylesheets/admin/posts.
|
65
|
-
- lib/ecrire/app/assets/stylesheets/admin/save.
|
66
|
-
- lib/ecrire/app/assets/stylesheets/admin/tags.
|
67
|
-
- lib/ecrire/app/assets/stylesheets/admin/title.
|
68
|
-
- lib/ecrire/app/assets/stylesheets/ecrire.
|
69
|
-
- lib/ecrire/app/assets/stylesheets/editor/code.
|
70
|
-
- lib/ecrire/app/assets/stylesheets/editor/content.
|
71
|
-
- lib/ecrire/app/assets/stylesheets/editor/figure.
|
72
|
-
- lib/ecrire/app/assets/stylesheets/sessions.
|
73
|
-
- lib/ecrire/app/assets/stylesheets/shared/popup.
|
74
|
-
- lib/ecrire/app/assets/stylesheets/variables.
|
57
|
+
- lib/ecrire/app/assets/stylesheets/admin.scss
|
58
|
+
- lib/ecrire/app/assets/stylesheets/admin/base.scss
|
59
|
+
- lib/ecrire/app/assets/stylesheets/admin/documentation.scss
|
60
|
+
- lib/ecrire/app/assets/stylesheets/admin/header.scss
|
61
|
+
- lib/ecrire/app/assets/stylesheets/admin/help.scss
|
62
|
+
- lib/ecrire/app/assets/stylesheets/admin/images.scss
|
63
|
+
- lib/ecrire/app/assets/stylesheets/admin/navigation.scss
|
64
|
+
- lib/ecrire/app/assets/stylesheets/admin/posts.scss
|
65
|
+
- lib/ecrire/app/assets/stylesheets/admin/save.scss
|
66
|
+
- lib/ecrire/app/assets/stylesheets/admin/tags.scss
|
67
|
+
- lib/ecrire/app/assets/stylesheets/admin/title.scss
|
68
|
+
- lib/ecrire/app/assets/stylesheets/ecrire.scss
|
69
|
+
- lib/ecrire/app/assets/stylesheets/editor/code.scss
|
70
|
+
- lib/ecrire/app/assets/stylesheets/editor/content.scss
|
71
|
+
- lib/ecrire/app/assets/stylesheets/editor/figure.scss
|
72
|
+
- lib/ecrire/app/assets/stylesheets/sessions.scss
|
73
|
+
- lib/ecrire/app/assets/stylesheets/shared/popup.scss
|
74
|
+
- lib/ecrire/app/assets/stylesheets/variables.scss
|
75
75
|
- lib/ecrire/app/assets/stylesheets/vendor/prism.scss
|
76
76
|
- lib/ecrire/app/assets/stylesheets/vendor/prism/ruby.scss
|
77
77
|
- lib/ecrire/app/controllers/admin/application_controller.rb
|
@@ -251,6 +251,7 @@ files:
|
|
251
251
|
- lib/ecrire/theme/template/controllers/tags_controller.rb
|
252
252
|
- lib/ecrire/theme/template/helpers/blog_helper.rb
|
253
253
|
- lib/ecrire/theme/template/routes.rb
|
254
|
+
- lib/ecrire/theme/template/secrets.yml
|
254
255
|
- lib/ecrire/theme/template/views/layouts/application.html.erb
|
255
256
|
- lib/ecrire/theme/template/views/posts/_latest.html.erb
|
256
257
|
- lib/ecrire/theme/template/views/posts/_post.html.erb
|
@@ -270,15 +271,18 @@ files:
|
|
270
271
|
- lib/ecrire/theme/template/views/tags/_post.html.erb
|
271
272
|
- lib/ecrire/theme/template/views/tags/show.html.erb
|
272
273
|
- lib/ecrire/version.rb
|
274
|
+
- test/configuration.rb
|
275
|
+
- test/configuration/postgresql.rb
|
276
|
+
- test/configuration/postgresql/user.rb
|
273
277
|
- test/editor/controllers/posts_controller_test.rb
|
274
278
|
- test/editor/controllers/sessions_controller_test.rb
|
275
279
|
- test/editor/controllers/tags_controller_test.rb
|
276
280
|
- test/editor/helpers/base_helper_test.rb
|
281
|
+
- test/editor/initializers.rb
|
277
282
|
- test/editor/models/image_test.rb
|
278
283
|
- test/editor/models/post_test.rb
|
279
284
|
- test/editor/models/title_test.rb
|
280
285
|
- test/editor/models/user_test.rb
|
281
|
-
- test/editor/test_helper.rb
|
282
286
|
- test/editor/theme/Gemfile
|
283
287
|
- test/editor/theme/assets/javascripts/blog.js.coffee
|
284
288
|
- test/editor/theme/assets/javascripts/post.js.coffee
|
@@ -286,7 +290,6 @@ files:
|
|
286
290
|
- test/editor/theme/assets/stylesheets/post.css.scss
|
287
291
|
- test/editor/theme/config.ru
|
288
292
|
- test/editor/theme/routes.rb
|
289
|
-
- test/editor/theme/secrets.yml
|
290
293
|
- test/editor/theme/views/layouts/application.html.erb
|
291
294
|
- test/editor/theme/views/posts/index.html.erb
|
292
295
|
- test/fixtures/images.yml
|
@@ -298,16 +301,18 @@ files:
|
|
298
301
|
- test/onboarding/controllers/databases_controller_test.rb
|
299
302
|
- test/onboarding/controllers/onboarding_controller_test.rb
|
300
303
|
- test/onboarding/controllers/users_controller_test.rb
|
304
|
+
- test/onboarding/initializers.rb
|
301
305
|
- test/onboarding/theme/.keep
|
306
|
+
- test/secrets.yml
|
307
|
+
- test/task.rb
|
302
308
|
- test/test_controller.rb
|
303
309
|
- test/test_helper.rb
|
304
|
-
- test/test_task.rb
|
305
310
|
- test/theme/controllers/posts_controller_test.rb
|
306
311
|
- test/theme/helpers/application_helper_test.rb
|
312
|
+
- test/theme/initializers.rb
|
307
313
|
- test/theme/theme/config.ru
|
308
314
|
- test/theme/theme/controllers/posts_controller.rb
|
309
315
|
- test/theme/theme/routes.rb
|
310
|
-
- test/theme/theme/secrets.yml
|
311
316
|
- test/theme/theme/views/posts/index.html.erb
|
312
317
|
- test/theme/theme/views/posts/show.html.erb
|
313
318
|
homepage: http://pothibo.com
|
data/test/editor/test_helper.rb
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
class ActiveSupport::TestCase
|
2
|
-
begin
|
3
|
-
# ActiveRecord's configuration assignation is done at the same time as the connection is tried
|
4
|
-
# If it fails, the configurations aren't set in AR::Base.
|
5
|
-
# This is why this is set here
|
6
|
-
ActiveRecord::Base.configurations = Rails.application.config.database_configuration
|
7
|
-
|
8
|
-
path = Rails.application.paths['db/migrate'].existent
|
9
|
-
ActiveRecord::Migrator.migrations_paths = path
|
10
|
-
if ActiveRecord::Migrator.needs_migration?
|
11
|
-
ActiveRecord::Migrator.migrate(path)
|
12
|
-
end
|
13
|
-
rescue ActiveRecord::NoDatabaseError
|
14
|
-
puts 'Database does not exist. Creating...'
|
15
|
-
ActiveRecord::Tasks::DatabaseTasks.create_current
|
16
|
-
puts 'Database created, migrating now...'
|
17
|
-
ActiveRecord::Migrator.migrate(path)
|
18
|
-
puts "Migration completed."
|
19
|
-
ensure
|
20
|
-
ActiveRecord::Migration.maintain_test_schema!
|
21
|
-
include ActiveRecord::TestFixtures
|
22
|
-
self.fixture_path = "#{Dir.pwd}/test/fixtures/"
|
23
|
-
fixtures :all
|
24
|
-
Post.reset_column_information
|
25
|
-
end
|
26
|
-
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
31
|
-
|
32
|
-
def create_fixtures(*fixture_set_names, &block)
|
33
|
-
FixtureSet.create_fixtures(ActiveSupport::TestCase.fixture_path, fixture_set_names, {}, &block)
|
34
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|