plant 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
body {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body>
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
File without changes
|
data/spec/factories.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# Helper specs
|
2
|
+
module Plant
|
3
|
+
# Ensure helper does correct stuff
|
4
|
+
RSpec.describe PlantHelper do
|
5
|
+
include PlantHelper
|
6
|
+
before :each do
|
7
|
+
stub_const('Plant::Content', FakeContent)
|
8
|
+
end
|
9
|
+
|
10
|
+
it 'should get the content escaped' do
|
11
|
+
r = plant_content_for('ff')
|
12
|
+
expect(r).to eq('say arrr to my <b>friend</b>')
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should be html safe' do
|
16
|
+
r = plant_content_for('dd', html_safe: true)
|
17
|
+
expect(r).to eq(r.html_safe)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
# We don't want to call Plant:Content, so fake it
|
23
|
+
class FakeContent
|
24
|
+
def self.get_node_content(_, _)
|
25
|
+
'say arrr to my <b>friend</b>'
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# Specs for core of plant
|
2
|
+
module Plant
|
3
|
+
RSpec.describe Core do
|
4
|
+
before :each do
|
5
|
+
Plant::Content.delete_all
|
6
|
+
end
|
7
|
+
|
8
|
+
it 'should be able to create new content' do
|
9
|
+
expect(Content.new).to be_a Plant::Content
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should create a factory' do
|
13
|
+
expect(create(:content)).to be_a Plant::Content
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should be able to find on a node' do
|
17
|
+
create :content, node_id: 'foobar', content: 'Harrah'
|
18
|
+
result = Plant::Content.get_node_content('foobar')
|
19
|
+
expect(result).to eq('Harrah')
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should only allow one entry for node-id/scenario combination' do
|
23
|
+
create :content, node_id: 'jump'
|
24
|
+
create :content, node_id: 'jump.no'
|
25
|
+
create :content, node_id: 'jump.yes'
|
26
|
+
cont = build(:content, node_id: 'jump.no')
|
27
|
+
expect(cont).to_not be_valid
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should find a node' do
|
31
|
+
node = create :content, node_id: 'milk'
|
32
|
+
result = Plant::Content.get_node('milk')
|
33
|
+
expect(result).to eq(node)
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should replace parameters' do
|
37
|
+
create :content, node_id: 'pirates', content: 'Say arrrr to #{name}'
|
38
|
+
result = Plant::Content.get_node_content('pirates', name: 'Harry')
|
39
|
+
expect(result).to eq('Say arrrr to Harry')
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should multi inject params' do
|
43
|
+
create :content, node_id: 'pirates',
|
44
|
+
content: 'Say arrrr to #{name} the #{animal}'
|
45
|
+
result = Plant::Content.get_node_content('pirates',
|
46
|
+
name: 'Harry',
|
47
|
+
animal: 'dog')
|
48
|
+
expect(result).to eq('Say arrrr to Harry the dog')
|
49
|
+
end
|
50
|
+
|
51
|
+
context 'with scenarios' do
|
52
|
+
before :each do
|
53
|
+
create :content, node_id: 'foo', content: 'ice cream'
|
54
|
+
@lollipop = create :content, node_id: 'foo.mm', content: 'lollipop'
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'should find a node with a scenario' do
|
58
|
+
result = Plant::Content.get_node_content('foo', 'mm')
|
59
|
+
expect(result).to eq('lollipop')
|
60
|
+
end
|
61
|
+
|
62
|
+
it 'can find node object with scenario' do
|
63
|
+
result = Plant::Content.get_node('foo', scenario: 'mm')
|
64
|
+
expect(result).to eq(@lollipop)
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'should find a node without a scenario' do
|
68
|
+
result = Plant::Content.get_node_content('foo')
|
69
|
+
expect(result).to eq('ice cream')
|
70
|
+
end
|
71
|
+
|
72
|
+
it 'should find a node with an object scenario' do
|
73
|
+
user = double(scenario: 'mm')
|
74
|
+
result = Plant::Content.get_node_content('foo', user)
|
75
|
+
expect(result).to eq('lollipop')
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'should throw when nothing found' do
|
79
|
+
expect do
|
80
|
+
Plant::Content.get_node_content('NODDY')
|
81
|
+
end.to raise_exception(ActiveRecord::RecordNotFound)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# Tests for hash monkey patch
|
2
|
+
RSpec.describe Hash do
|
3
|
+
before :each do
|
4
|
+
test = { jupiter:
|
5
|
+
{ io:
|
6
|
+
{ moon_name:
|
7
|
+
{ main: 'foo',
|
8
|
+
tuesdays: 'bb',
|
9
|
+
wednesdays: 'dsadas' }
|
10
|
+
}
|
11
|
+
},
|
12
|
+
saturn:
|
13
|
+
{ foo:
|
14
|
+
{ moon_name:
|
15
|
+
{ main: 'boo',
|
16
|
+
tuesdays: 'mm' },
|
17
|
+
sun_name: 'the sun' },
|
18
|
+
bar: 'ddd' },
|
19
|
+
earth: 'mm' }
|
20
|
+
|
21
|
+
@result = test.pathify
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should be a hash' do
|
25
|
+
expect(@result).to be_a Hash
|
26
|
+
end
|
27
|
+
it 'should include all the paths' do
|
28
|
+
keys = @result.keys
|
29
|
+
expect(keys).to include('jupiter/io/moon_name/main')
|
30
|
+
expect(keys).to include('jupiter/io/moon_name/tuesdays')
|
31
|
+
expect(keys).to include('jupiter/io/moon_name/wednesdays')
|
32
|
+
expect(keys).to include('saturn/foo/moon_name/main')
|
33
|
+
expect(keys).to include('saturn/foo/moon_name/tuesdays')
|
34
|
+
expect(keys).to include('saturn/foo/sun_name')
|
35
|
+
expect(keys).to include('saturn/bar')
|
36
|
+
expect(keys).to include('earth')
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should include the hashes' do
|
40
|
+
expect(@result).to include('saturn/foo/moon_name/tuesdays' => 'mm')
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'rake'
|
2
|
+
RSpec.describe 'Populating the database' do
|
3
|
+
before :all do
|
4
|
+
Plant::Content.delete_all
|
5
|
+
Rake.application.rake_require 'tasks/plant_tasks'
|
6
|
+
Rake::Task.define_task(:environment)
|
7
|
+
Rake::Task['plant:seed'].reenable
|
8
|
+
Rake.application.invoke_task 'plant:seed'
|
9
|
+
end
|
10
|
+
after :all do
|
11
|
+
Plant::Content.delete_all
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should be able to get the moon name' do
|
15
|
+
cont = Plant::Content.get_node_content('jupiter.io.moon_name')
|
16
|
+
expect(cont).to eq('Foobar')
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should be able to get the moon name on Tuesdays' do
|
20
|
+
cont = Plant::Content.get_node_content('jupiter.io.moon_name.tuesdays')
|
21
|
+
expect(cont).to eq('Barfoo')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'should be able to get the moon name on Wednesdays' do
|
25
|
+
cont = Plant::Content.get_node_content('jupiter.io.moon_name.wednesdays')
|
26
|
+
expect(cont).to eq('multi line content with some stuff')
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
RSpec.describe 'Populating just one file' do
|
31
|
+
before :all do
|
32
|
+
Plant::Content.delete_all
|
33
|
+
Rake.application.rake_require 'tasks/plant_tasks'
|
34
|
+
Rake::Task.define_task(:environment)
|
35
|
+
Rake::Task['plant:specific_seed'].reenable
|
36
|
+
Rake.application.invoke_task 'plant:specific_seed[spec/support/test.yml]'
|
37
|
+
end
|
38
|
+
|
39
|
+
after :all do
|
40
|
+
Plant::Content.delete_all
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'should get the one file' do
|
44
|
+
plant = Plant::Content.first
|
45
|
+
expect(Plant::Content.count).to eq(1)
|
46
|
+
expect(plant.node_id).to eq('foo.mm.nn')
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Specs for utils
|
2
|
+
module Plant
|
3
|
+
RSpec.describe Utils do
|
4
|
+
it 'should find the yml files' do
|
5
|
+
files = Utils.yaml_files
|
6
|
+
start = "#{Rails.root}/app/content/"
|
7
|
+
expect(files.sort).to eq(["#{start}jupiter/io.yml",
|
8
|
+
"#{start}solar/earth/moon.yml",
|
9
|
+
"#{start}sun.yml"])
|
10
|
+
end
|
11
|
+
|
12
|
+
it 'should load the yaml file' do
|
13
|
+
con = Utils.load_yaml_file("#{Rails.root}/app/content/jupiter/io.yml")
|
14
|
+
expect(con).to be_a Hash
|
15
|
+
expect(con.keys).to include('jupiter.io.moon_name.main')
|
16
|
+
expect(con.keys).to include('jupiter.io.moon_name.tuesdays')
|
17
|
+
expect(con.keys).to include('jupiter.io.moon_name.wednesdays')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/spec/sample_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV['RAILS_ENV'] = 'test'
|
3
|
+
|
4
|
+
require File.expand_path('../dummy/config/environment.rb', __FILE__)
|
5
|
+
ActiveRecord::Migrator.migrations_paths =
|
6
|
+
[File.expand_path('../../test/dummy/db/migrate', __FILE__)]
|
7
|
+
ActiveRecord::Migrator.migrations_paths <<
|
8
|
+
File.expand_path('../../db/migrate', __FILE__)
|
9
|
+
|
10
|
+
require 'rspec/rails'
|
11
|
+
require 'reek'
|
12
|
+
require 'reek/spec'
|
13
|
+
require 'plant'
|
14
|
+
require 'factory_girl_rails'
|
15
|
+
|
16
|
+
def shouldnt_reek
|
17
|
+
it 'should not reek' do
|
18
|
+
full_path = self.class.metadata[:file_path]
|
19
|
+
.gsub(%r{(^\./spec)(.*)(\_spec\.rb$)}, 'app\2.rb')
|
20
|
+
expect(File.exist?(full_path)).to eq(true), "Testing if #{full_path} reeks"\
|
21
|
+
'but file does not exist. consider restructuring your code/spec'
|
22
|
+
expect(File.read(full_path)).not_to reek
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
RSpec.configure do |config|
|
27
|
+
config.expect_with :rspec do |expectations|
|
28
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
29
|
+
end
|
30
|
+
|
31
|
+
config.mock_with :rspec do |mocks|
|
32
|
+
# Prevents you from mocking or stubbing a method that does not exist on
|
33
|
+
# a real object. This is generally recommended, and will default to
|
34
|
+
# `true` in RSpec 4.
|
35
|
+
mocks.verify_partial_doubles = true
|
36
|
+
end
|
37
|
+
|
38
|
+
config.filter_run :focus
|
39
|
+
config.run_all_when_everything_filtered = true
|
40
|
+
|
41
|
+
config.include FactoryGirl::Syntax::Methods
|
42
|
+
# Limits the available syntax to the non-monkey patched syntax that is
|
43
|
+
# recommended. For more details, see:
|
44
|
+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
|
45
|
+
# - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
|
46
|
+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
|
47
|
+
config.disable_monkey_patching!
|
48
|
+
|
49
|
+
# This setting enables warnings. It's recommended, but in some cases may
|
50
|
+
# be too noisy due to issues in dependencies.
|
51
|
+
config.warnings = true
|
52
|
+
|
53
|
+
# Run specs in random order to surface order dependencies.
|
54
|
+
config.order = :random
|
55
|
+
|
56
|
+
# Seed global randomization in this process using the `--seed` CLI option.
|
57
|
+
Kernel.srand config.seed
|
58
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yule
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -164,13 +164,14 @@ dependencies:
|
|
164
164
|
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
166
|
version: '0'
|
167
|
-
description:
|
167
|
+
description: Define your content in yml. Read out of database
|
168
168
|
email:
|
169
169
|
- paul.brennan@ahc.uk.com
|
170
170
|
executables: []
|
171
171
|
extensions: []
|
172
172
|
extra_rdoc_files: []
|
173
173
|
files:
|
174
|
+
- LICENSE
|
174
175
|
- README.md
|
175
176
|
- Rakefile
|
176
177
|
- app/helpers/plant/plant_helper.rb
|
@@ -179,11 +180,57 @@ files:
|
|
179
180
|
- lib/capistrano/plant.rb
|
180
181
|
- lib/capistrano/tasks/plant.rake
|
181
182
|
- lib/plant.rb
|
183
|
+
- lib/plant/core.rb
|
182
184
|
- lib/plant/engine.rb
|
183
185
|
- lib/plant/hash_pathify.rb
|
184
186
|
- lib/plant/utils.rb
|
185
187
|
- lib/plant/version.rb
|
186
188
|
- lib/tasks/plant_tasks.rake
|
189
|
+
- spec/dummy/README.rdoc
|
190
|
+
- spec/dummy/Rakefile
|
191
|
+
- spec/dummy/app/assets/javascripts/application.js
|
192
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
193
|
+
- spec/dummy/app/content/jupiter/io.yml
|
194
|
+
- spec/dummy/app/content/solar/earth/moon.yml
|
195
|
+
- spec/dummy/app/content/sun.yml
|
196
|
+
- spec/dummy/app/controllers/application_controller.rb
|
197
|
+
- spec/dummy/app/helpers/application_helper.rb
|
198
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
199
|
+
- spec/dummy/bin/bundle
|
200
|
+
- spec/dummy/bin/rails
|
201
|
+
- spec/dummy/bin/rake
|
202
|
+
- spec/dummy/bin/setup
|
203
|
+
- spec/dummy/config.ru
|
204
|
+
- spec/dummy/config/application.rb
|
205
|
+
- spec/dummy/config/boot.rb
|
206
|
+
- spec/dummy/config/database.yml
|
207
|
+
- spec/dummy/config/environment.rb
|
208
|
+
- spec/dummy/config/environments/development.rb
|
209
|
+
- spec/dummy/config/initializers/assets.rb
|
210
|
+
- spec/dummy/config/initializers/session_store.rb
|
211
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
212
|
+
- spec/dummy/config/locales/en.yml
|
213
|
+
- spec/dummy/config/routes.rb
|
214
|
+
- spec/dummy/config/secrets.yml
|
215
|
+
- spec/dummy/db/development.sqlite3
|
216
|
+
- spec/dummy/db/schema.rb
|
217
|
+
- spec/dummy/db/test.sqlite3
|
218
|
+
- spec/dummy/log/development.log
|
219
|
+
- spec/dummy/log/test.log
|
220
|
+
- spec/dummy/public/404.html
|
221
|
+
- spec/dummy/public/422.html
|
222
|
+
- spec/dummy/public/500.html
|
223
|
+
- spec/dummy/public/favicon.ico
|
224
|
+
- spec/factories.rb
|
225
|
+
- spec/helpers/plant/plant_helper_spec.rb
|
226
|
+
- spec/lib/core_spec.rb
|
227
|
+
- spec/lib/hash_pathify_spec.rb
|
228
|
+
- spec/lib/seed_spec.rb
|
229
|
+
- spec/lib/utils_spec.rb
|
230
|
+
- spec/models/plant/content_spec.rb
|
231
|
+
- spec/sample_spec.rb
|
232
|
+
- spec/spec_helper.rb
|
233
|
+
- spec/support/test.yml
|
187
234
|
homepage: https://rubygems.org/gems/plant
|
188
235
|
licenses:
|
189
236
|
- MIT
|
@@ -207,5 +254,50 @@ rubyforge_project:
|
|
207
254
|
rubygems_version: 2.4.6
|
208
255
|
signing_key:
|
209
256
|
specification_version: 4
|
210
|
-
summary:
|
211
|
-
test_files:
|
257
|
+
summary: 'A seed replacement: don''t just seed, plant.'
|
258
|
+
test_files:
|
259
|
+
- spec/spec_helper.rb
|
260
|
+
- spec/support/test.yml
|
261
|
+
- spec/factories.rb
|
262
|
+
- spec/sample_spec.rb
|
263
|
+
- spec/dummy/log/test.log
|
264
|
+
- spec/dummy/log/development.log
|
265
|
+
- spec/dummy/README.rdoc
|
266
|
+
- spec/dummy/app/assets/javascripts/application.js
|
267
|
+
- spec/dummy/app/assets/stylesheets/application.css
|
268
|
+
- spec/dummy/app/controllers/application_controller.rb
|
269
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
270
|
+
- spec/dummy/app/content/jupiter/io.yml
|
271
|
+
- spec/dummy/app/content/solar/earth/moon.yml
|
272
|
+
- spec/dummy/app/content/sun.yml
|
273
|
+
- spec/dummy/app/helpers/application_helper.rb
|
274
|
+
- spec/dummy/public/500.html
|
275
|
+
- spec/dummy/public/404.html
|
276
|
+
- spec/dummy/public/422.html
|
277
|
+
- spec/dummy/public/favicon.ico
|
278
|
+
- spec/dummy/db/schema.rb
|
279
|
+
- spec/dummy/db/test.sqlite3
|
280
|
+
- spec/dummy/db/development.sqlite3
|
281
|
+
- spec/dummy/config.ru
|
282
|
+
- spec/dummy/config/locales/en.yml
|
283
|
+
- spec/dummy/config/database.yml
|
284
|
+
- spec/dummy/config/application.rb
|
285
|
+
- spec/dummy/config/routes.rb
|
286
|
+
- spec/dummy/config/secrets.yml
|
287
|
+
- spec/dummy/config/boot.rb
|
288
|
+
- spec/dummy/config/environments/development.rb
|
289
|
+
- spec/dummy/config/initializers/wrap_parameters.rb
|
290
|
+
- spec/dummy/config/initializers/session_store.rb
|
291
|
+
- spec/dummy/config/initializers/assets.rb
|
292
|
+
- spec/dummy/config/environment.rb
|
293
|
+
- spec/dummy/bin/rake
|
294
|
+
- spec/dummy/bin/bundle
|
295
|
+
- spec/dummy/bin/setup
|
296
|
+
- spec/dummy/bin/rails
|
297
|
+
- spec/dummy/Rakefile
|
298
|
+
- spec/lib/core_spec.rb
|
299
|
+
- spec/lib/seed_spec.rb
|
300
|
+
- spec/lib/hash_pathify_spec.rb
|
301
|
+
- spec/lib/utils_spec.rb
|
302
|
+
- spec/models/plant/content_spec.rb
|
303
|
+
- spec/helpers/plant/plant_helper_spec.rb
|