built_in_data 1.1.4 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/MIT-LICENSE +1 -1
  3. data/README.md +55 -0
  4. data/Rakefile +2 -9
  5. data/lib/built_in_data/version.rb +1 -1
  6. data/lib/built_in_data.rb +2 -0
  7. metadata +11 -100
  8. data/README.rdoc +0 -53
  9. data/test/built_in_data_test.rb +0 -104
  10. data/test/dummy/README.rdoc +0 -28
  11. data/test/dummy/Rakefile +0 -6
  12. data/test/dummy/app/assets/config/manifest.js +0 -4
  13. data/test/dummy/app/assets/javascripts/application.js +0 -13
  14. data/test/dummy/app/assets/stylesheets/application.css +0 -15
  15. data/test/dummy/app/controllers/application_controller.rb +0 -5
  16. data/test/dummy/app/helpers/application_helper.rb +0 -2
  17. data/test/dummy/app/models/national_park.rb +0 -3
  18. data/test/dummy/app/views/layouts/application.html.erb +0 -14
  19. data/test/dummy/bin/bundle +0 -3
  20. data/test/dummy/bin/rails +0 -4
  21. data/test/dummy/bin/rake +0 -4
  22. data/test/dummy/config/application.rb +0 -22
  23. data/test/dummy/config/boot.rb +0 -5
  24. data/test/dummy/config/database.yml +0 -25
  25. data/test/dummy/config/environment.rb +0 -5
  26. data/test/dummy/config/environments/development.rb +0 -37
  27. data/test/dummy/config/environments/production.rb +0 -78
  28. data/test/dummy/config/environments/test.rb +0 -42
  29. data/test/dummy/config/initializers/assets.rb +0 -8
  30. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  31. data/test/dummy/config/initializers/cookies_serializer.rb +0 -3
  32. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  33. data/test/dummy/config/initializers/inflections.rb +0 -16
  34. data/test/dummy/config/initializers/mime_types.rb +0 -4
  35. data/test/dummy/config/initializers/session_store.rb +0 -3
  36. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  37. data/test/dummy/config/locales/en.yml +0 -23
  38. data/test/dummy/config/routes.rb +0 -56
  39. data/test/dummy/config/secrets.yml +0 -22
  40. data/test/dummy/config.ru +0 -4
  41. data/test/dummy/db/built_in_data/national_parks.yml +0 -13
  42. data/test/dummy/db/migrate/20121024195810_create_national_parks.rb +0 -11
  43. data/test/dummy/db/migrate/20121024201818_add_built_in_key_to_national_parks.rb +0 -5
  44. data/test/dummy/db/migrate/20121101224000_add_protected_attribute_column_to_national_parks.rb +0 -5
  45. data/test/dummy/db/migrate/20141111224715_remove_protected_attribute_column_from_national_parks.rb +0 -5
  46. data/test/dummy/db/migrate/20141113214328_add_active_to_national_parks.rb +0 -5
  47. data/test/dummy/db/schema.rb +0 -26
  48. data/test/dummy/db/test.sqlite3 +0 -0
  49. data/test/dummy/log/test.log +0 -3533
  50. data/test/dummy/public/404.html +0 -67
  51. data/test/dummy/public/422.html +0 -67
  52. data/test/dummy/public/500.html +0 -66
  53. data/test/dummy/public/favicon.ico +0 -0
  54. data/test/test_helper.rb +0 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9394bd2479dccf207f906c6ca48653287a621c5d6522306b770e556fce552d56
4
- data.tar.gz: 9e1d7d9e4ef5706036452492f31bdd1061b79d8fc048c8cd891a1c68bb9f1793
3
+ metadata.gz: f76763097ab596cdc8993a507e28d53ed4cc58efaba3c8fad8ac202498fa0429
4
+ data.tar.gz: e7ac337759999e488b7bb1c531c0f6b70649a38acb6e54c761b0fdb9e550001e
5
5
  SHA512:
6
- metadata.gz: 638ce6c855a13e1254ff71a0e3fe5888d7c4c8996d70277e58ea2636f470dabde48922bca6aa60c6459487d0604329a4f8d9d49c266732c2dcd192281f49e874
7
- data.tar.gz: 6d737a730d0b4a63b7393babcb4de49fdff07e0b1a556bd07d436769c97d3d8c6bf05ee9befea440798a580ad19a2f291f32f9c05529cae747b6e65ed972006a
6
+ metadata.gz: fd963620a173fb9cc213ce414c9d9126ac509bb57a75b951a7e0c44c2a75919864c5fb8cee7b622fe625d3e801cf4963a3943646a243b546209ffe449b9225e2
7
+ data.tar.gz: 23420031c980b6e3fc420176dc50f84af1ef756bf6335d07f116cdf275b078b256da284771d926d7ed7968be8d01f552a4f653c4624c5e750e3135c42137fd49
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012-2013 WorldWide IDEA, Inc http://www.wwidea.org
1
+ Copyright 2012-2022 Brightways Learning https://www.brightwayslearning.org
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # BuiltInData
2
+
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/02eb42a4a53414adae01/maintainability)](https://codeclimate.com/github/wwidea/built_in_data/maintainability)
4
+
5
+ BuiltInData is a simple tool for loading and updating data in a Rails application.
6
+
7
+ Objects are stored in the database with a **built_in_key** that is used on subsequent loads to update or remove the object. Items in the table without a **built_in_key** will not be modified or removed.
8
+
9
+ BuiltInData is designed to address the data gray area between customer data and constants. It allows developers to deliver, update, and destroy data that is stored in the database.
10
+
11
+ ## Setup
12
+ Add **built_in_key** to your model:
13
+ ```bash
14
+ ruby script/rails generate migration AddBuiltInKeyToYourModel built_in_key:string:index
15
+ rake db:migrate
16
+ ```
17
+
18
+ Include **BuiltInData** in your model:
19
+ ```ruby
20
+ class YourModel < ActiveRecord::Base
21
+ include BuiltInData
22
+ end
23
+ ```
24
+
25
+ ## Loading Data
26
+ There are two methods to load data
27
+
28
+ - Pass as a hash to load_built_in_data!
29
+ ```ruby
30
+ YourModel.load_built_in_data!({
31
+ glacier: {
32
+ name: 'Glacier National Park'
33
+ },
34
+ yellowstone: {
35
+ name: 'Yellowstone National Park'
36
+ }
37
+ })
38
+ ```
39
+
40
+ - Create a yaml load file in **db/built_in_data** with the name of the model (ie. national_parks.yml), and load the data with `YourModel.load_built_in_data!` without any arguments. The yaml file can contain erb.
41
+ ```yaml
42
+ glacier:
43
+ name: Glacier National Park
44
+ established: <%= Date.parse('1910-05-11') %>
45
+
46
+ yellowstone:
47
+ name: Yellowstone National Park
48
+ established: 1872-03-01
49
+ ```
50
+
51
+ ## Other
52
+ Use **built_in?** to check if an object was loaded by BuiltInData:
53
+ ```ruby
54
+ object.built_in?
55
+ ```
data/Rakefile CHANGED
@@ -1,10 +1,3 @@
1
- require "bundler/gem_tasks"
2
- require "rake/testtask"
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << "test"
6
- t.libs << "lib"
7
- t.test_files = FileList["test/**/*_test.rb"]
8
- end
1
+ require "bundler/setup"
9
2
 
10
- task default: :test
3
+ require "bundler/gem_tasks"
@@ -1,3 +1,3 @@
1
1
  module BuiltInData
2
- VERSION = "1.1.4"
2
+ VERSION = "1.2.0"
3
3
  end
data/lib/built_in_data.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "built_in_data/version"
2
+
1
3
  module BuiltInData
2
4
  extend ActiveSupport::Concern
3
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: built_in_data
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Baldwin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-02-07 00:00:00.000000000 Z
12
+ date: 2023-01-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -28,66 +28,23 @@ dependencies:
28
28
  description: BuiltInData is a simple tool for loading and updating data in a Rails
29
29
  application.
30
30
  email:
31
- - developers@brightwayslearning.org
31
+ - baldwina@brightwayslearning.org
32
32
  executables: []
33
33
  extensions: []
34
34
  extra_rdoc_files: []
35
35
  files:
36
36
  - MIT-LICENSE
37
- - README.rdoc
37
+ - README.md
38
38
  - Rakefile
39
39
  - lib/built_in_data.rb
40
40
  - lib/built_in_data/version.rb
41
- - test/built_in_data_test.rb
42
- - test/dummy/README.rdoc
43
- - test/dummy/Rakefile
44
- - test/dummy/app/assets/config/manifest.js
45
- - test/dummy/app/assets/javascripts/application.js
46
- - test/dummy/app/assets/stylesheets/application.css
47
- - test/dummy/app/controllers/application_controller.rb
48
- - test/dummy/app/helpers/application_helper.rb
49
- - test/dummy/app/models/national_park.rb
50
- - test/dummy/app/views/layouts/application.html.erb
51
- - test/dummy/bin/bundle
52
- - test/dummy/bin/rails
53
- - test/dummy/bin/rake
54
- - test/dummy/config.ru
55
- - test/dummy/config/application.rb
56
- - test/dummy/config/boot.rb
57
- - test/dummy/config/database.yml
58
- - test/dummy/config/environment.rb
59
- - test/dummy/config/environments/development.rb
60
- - test/dummy/config/environments/production.rb
61
- - test/dummy/config/environments/test.rb
62
- - test/dummy/config/initializers/assets.rb
63
- - test/dummy/config/initializers/backtrace_silencers.rb
64
- - test/dummy/config/initializers/cookies_serializer.rb
65
- - test/dummy/config/initializers/filter_parameter_logging.rb
66
- - test/dummy/config/initializers/inflections.rb
67
- - test/dummy/config/initializers/mime_types.rb
68
- - test/dummy/config/initializers/session_store.rb
69
- - test/dummy/config/initializers/wrap_parameters.rb
70
- - test/dummy/config/locales/en.yml
71
- - test/dummy/config/routes.rb
72
- - test/dummy/config/secrets.yml
73
- - test/dummy/db/built_in_data/national_parks.yml
74
- - test/dummy/db/migrate/20121024195810_create_national_parks.rb
75
- - test/dummy/db/migrate/20121024201818_add_built_in_key_to_national_parks.rb
76
- - test/dummy/db/migrate/20121101224000_add_protected_attribute_column_to_national_parks.rb
77
- - test/dummy/db/migrate/20141111224715_remove_protected_attribute_column_from_national_parks.rb
78
- - test/dummy/db/migrate/20141113214328_add_active_to_national_parks.rb
79
- - test/dummy/db/schema.rb
80
- - test/dummy/db/test.sqlite3
81
- - test/dummy/log/test.log
82
- - test/dummy/public/404.html
83
- - test/dummy/public/422.html
84
- - test/dummy/public/500.html
85
- - test/dummy/public/favicon.ico
86
- - test/test_helper.rb
87
41
  homepage: https://github.com/wwidea/built_in_data
88
42
  licenses:
89
43
  - MIT
90
- metadata: {}
44
+ metadata:
45
+ homepage_uri: https://github.com/wwidea/built_in_data
46
+ source_code_uri: https://github.com/wwidea/built_in_data
47
+ rubygems_mfa_required: 'true'
91
48
  post_install_message:
92
49
  rdoc_options: []
93
50
  require_paths:
@@ -96,61 +53,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
96
53
  requirements:
97
54
  - - ">="
98
55
  - !ruby/object:Gem::Version
99
- version: '0'
56
+ version: 2.7.0
100
57
  required_rubygems_version: !ruby/object:Gem::Requirement
101
58
  requirements:
102
59
  - - ">="
103
60
  - !ruby/object:Gem::Version
104
61
  version: '0'
105
62
  requirements: []
106
- rubygems_version: 3.3.6
63
+ rubygems_version: 3.4.1
107
64
  signing_key:
108
65
  specification_version: 4
109
66
  summary: Data management for Rails models.
110
- test_files:
111
- - test/dummy/app/models/national_park.rb
112
- - test/dummy/app/controllers/application_controller.rb
113
- - test/dummy/app/views/layouts/application.html.erb
114
- - test/dummy/app/assets/config/manifest.js
115
- - test/dummy/app/assets/javascripts/application.js
116
- - test/dummy/app/assets/stylesheets/application.css
117
- - test/dummy/app/helpers/application_helper.rb
118
- - test/dummy/bin/rake
119
- - test/dummy/bin/bundle
120
- - test/dummy/bin/rails
121
- - test/dummy/config/secrets.yml
122
- - test/dummy/config/routes.rb
123
- - test/dummy/config/locales/en.yml
124
- - test/dummy/config/environments/production.rb
125
- - test/dummy/config/environments/development.rb
126
- - test/dummy/config/environments/test.rb
127
- - test/dummy/config/environment.rb
128
- - test/dummy/config/application.rb
129
- - test/dummy/config/database.yml
130
- - test/dummy/config/boot.rb
131
- - test/dummy/config/initializers/backtrace_silencers.rb
132
- - test/dummy/config/initializers/mime_types.rb
133
- - test/dummy/config/initializers/filter_parameter_logging.rb
134
- - test/dummy/config/initializers/session_store.rb
135
- - test/dummy/config/initializers/wrap_parameters.rb
136
- - test/dummy/config/initializers/assets.rb
137
- - test/dummy/config/initializers/cookies_serializer.rb
138
- - test/dummy/config/initializers/inflections.rb
139
- - test/dummy/config.ru
140
- - test/dummy/Rakefile
141
- - test/dummy/public/favicon.ico
142
- - test/dummy/public/422.html
143
- - test/dummy/public/500.html
144
- - test/dummy/public/404.html
145
- - test/dummy/db/schema.rb
146
- - test/dummy/db/test.sqlite3
147
- - test/dummy/db/built_in_data/national_parks.yml
148
- - test/dummy/db/migrate/20121101224000_add_protected_attribute_column_to_national_parks.rb
149
- - test/dummy/db/migrate/20121024195810_create_national_parks.rb
150
- - test/dummy/db/migrate/20121024201818_add_built_in_key_to_national_parks.rb
151
- - test/dummy/db/migrate/20141111224715_remove_protected_attribute_column_from_national_parks.rb
152
- - test/dummy/db/migrate/20141113214328_add_active_to_national_parks.rb
153
- - test/dummy/log/test.log
154
- - test/dummy/README.rdoc
155
- - test/built_in_data_test.rb
156
- - test/test_helper.rb
67
+ test_files: []
data/README.rdoc DELETED
@@ -1,53 +0,0 @@
1
- =BuiltInData
2
-
3
- {<img src="https://codeclimate.com/github/wwidea/built_in_data/badges/gpa.svg" />}[https://codeclimate.com/github/wwidea/built_in_data]
4
-
5
- BuiltInData is a simple tool for loading and updating data in a Rails application.
6
-
7
- Objects are stored in the database with a *built_in_key* that is used on subsequent loads to update or remove the object.
8
- Items in the table without a *built_in_key* will not be modified or removed.
9
-
10
- BuiltInData is designed to address the data gray area between customer data and constants.
11
- It allows developers to deliver, update, and destroy data that is stored in the database.
12
-
13
- == Setup
14
- Add *built_in_key* to your model:
15
-
16
- ruby script/rails generate migration AddBuiltInKeyToYourModel built_in_key:string:index
17
- rake db:migrate
18
-
19
- Include *BuiltInData* in your model:
20
-
21
- class YourModel < ActiveRecord::Base
22
- include BuiltInData
23
- end
24
-
25
- == Loading Data
26
- There are two methods to load data
27
-
28
- * Pass as a hash to load_built_in_data!
29
- YourModel.load_built_in_data!({
30
- :glacier => {
31
- :name => 'Glacier National Park',
32
- },
33
-
34
- :yellowstone => {
35
- :name => 'Yellowstone National Park',
36
- }
37
- })
38
-
39
-
40
- * Create a yaml load file in *db/built_in_data* with the name of the model (ie. national_parks.yml), and load the data with <tt>YourModel.load_built_in_data!</tt> without any arguments. The yaml file can contain erb.
41
-
42
- glacier:
43
- name: Glacier National Park
44
- established: <%= Date.parse('1910-05-11') %>
45
-
46
- yellowstone:
47
- name: Yellowstone National Park
48
- established: 1872-03-01
49
-
50
- == Other
51
- Use *built_in?* to check if an object was loaded by BuiltInData:
52
-
53
- object.built_in?
@@ -1,104 +0,0 @@
1
- require 'test_helper'
2
-
3
- class BuiltInDataTest < ActiveSupport::TestCase
4
- HASH_DATA = {
5
- test: {
6
- name: 'Yellowstone National Park',
7
- established: '1872-03-01',
8
- url: 'http://www.nps.gov/yell/index.htm',
9
- }
10
- }
11
-
12
- test 'should return true for built_in?' do
13
- assert_equal true, NationalPark.new(built_in_key: 'test').built_in?
14
- end
15
-
16
- test 'should return false for built_in?' do
17
- assert_equal false, NationalPark.new(built_in_key: '').built_in?
18
- end
19
-
20
- test "should load built in data" do
21
- assert_difference 'NationalPark.count' do
22
- load_hash_data
23
- end
24
-
25
- assert_equal 'Yellowstone National Park', NationalPark.find_by_built_in_key('test').name
26
- end
27
-
28
- test "should remove built in data" do
29
- load_hash_data
30
-
31
- assert_difference 'NationalPark.count', -1 do
32
- NationalPark.load_built_in_data!({})
33
- end
34
-
35
- assert_nil NationalPark.find_by_built_in_key('test')
36
- end
37
-
38
- test "should not remove a record without a built_in_key" do
39
- park = NationalPark.create(:name => 'Testing')
40
-
41
- assert_difference 'NationalPark.count', 1 do
42
- load_hash_data
43
- end
44
- assert_equal 'Testing', park.reload.name
45
- end
46
-
47
- test "should update existing built in data" do
48
- load_hash_data
49
- assert_not_equal 'http://en.wikipedia.org/wiki/Yellowstone_National_Park', NationalPark.find_by_built_in_key('test').url
50
- modified_hash = HASH_DATA.dup
51
- modified_hash[:test][:url] = 'http://en.wikipedia.org/wiki/Yellowstone_National_Park'
52
- NationalPark.load_built_in_data!(modified_hash)
53
- assert_equal 'http://en.wikipedia.org/wiki/Yellowstone_National_Park', NationalPark.find_by_built_in_key('test').url
54
- end
55
-
56
- test "should load built in data from yaml file" do
57
- assert_difference 'NationalPark.count', 2 do
58
- NationalPark.load_built_in_data!
59
- end
60
- end
61
-
62
- test "should load elements from file only once" do
63
- NationalPark.load_built_in_data!
64
-
65
- assert_no_difference 'NationalPark.count' do
66
- NationalPark.load_built_in_data!
67
- end
68
- end
69
-
70
- test "should process erb in yaml file" do
71
- assert_equal '1910-05-11', NationalPark.send(:load_yaml_data)['glacier']['established'].to_s(:db)
72
- end
73
-
74
- test 'should return active record objects from load' do
75
- parks = NationalPark.load_built_in_data!
76
- assert_equal(2,parks.size)
77
- assert_equal(NationalPark,parks.first.class)
78
- assert_equal(false,parks.first.new_record?)
79
- end
80
-
81
- test 'should load yaml defaults' do
82
- NationalPark.load_built_in_data!
83
- assert_equal true, NationalPark.find_by(name: 'Yellowstone National Park').active
84
- end
85
-
86
- test 'should return built_in_data object database id' do
87
- load_hash_data
88
- assert_equal NationalPark.where(name: 'Yellowstone National Park').first.id, NationalPark.built_in_object_id(:test)
89
- end
90
-
91
- test 'should clear built_in_object_ids cache when delete_all is called' do
92
- NationalPark.instance_variable_set('@built_in_object_ids', 'testing')
93
-
94
- NationalPark.delete_all
95
- assert_nil NationalPark.instance_variable_get('@built_in_object_ids')
96
- end
97
-
98
- private
99
-
100
- def load_hash_data
101
- NationalPark.load_built_in_data!(HASH_DATA)
102
- end
103
-
104
- end
@@ -1,28 +0,0 @@
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/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -1,4 +0,0 @@
1
-
2
- //= link_tree ../images
3
- //= link_directory ../javascripts .js
4
- //= link_directory ../stylesheets .css
@@ -1,13 +0,0 @@
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 vendor/assets/javascripts of plugins, if any, 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/sstephenson/sprockets#sprockets-directives) for details
11
- // about supported directives.
12
- //
13
- //= require_tree .
@@ -1,15 +0,0 @@
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 vendor/assets/stylesheets of plugins, if any, 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
- */
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,3 +0,0 @@
1
- class NationalPark < ActiveRecord::Base
2
- include BuiltInData
3
- end
@@ -1,14 +0,0 @@
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>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
data/test/dummy/bin/rake DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
@@ -1,22 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- Bundler.require(*Rails.groups)
6
- require "built_in_data"
7
-
8
- module Dummy
9
- class Application < Rails::Application
10
- # Settings in config/environments/* take precedence over those specified here.
11
- # Application configuration should go into files in config/initializers
12
- # -- all .rb files in that directory are automatically loaded.
13
-
14
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
15
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
16
- # config.time_zone = 'Central Time (US & Canada)'
17
-
18
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
19
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
20
- # config.i18n.default_locale = :de
21
- end
22
- end
@@ -1,5 +0,0 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
5
- $LOAD_PATH.unshift File.expand_path('../../../../lib', __FILE__)
@@ -1,25 +0,0 @@
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
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,37 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send.
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
21
-
22
- # Raise an error on page load if there are pending migrations.
23
- config.active_record.migration_error = :page_load
24
-
25
- # Debug mode disables concatenation and preprocessing of assets.
26
- # This option may cause significant delays in view rendering with a large
27
- # number of complex assets.
28
- config.assets.debug = true
29
-
30
- # Adds additional error checking when serving assets at runtime.
31
- # Checks for improperly declared sprockets dependencies.
32
- # Raises helpful error messages.
33
- config.assets.raise_runtime_errors = true
34
-
35
- # Raises error for missing translations
36
- # config.action_view.raise_on_missing_translations = true
37
- end