edgarj 0.01.19 → 0.01.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/settings.yml +1 -0
- data/lib/core_ext/rails_config.rb +10 -0
- data/lib/edgarj/engine.rb +4 -2
- data/lib/edgarj/version.rb +1 -1
- data/test/dummy/config/settings.yml +5 -0
- data/test/dummy/test/unit/rails_config_test.rb +14 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 833876d738a4dc3b3cfee8d7efcfa9508c919dd3
|
4
|
+
data.tar.gz: 07c2604cc87942816f9192f48b06cea521164c21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23fd1a75c050a3080a00fef62a777c2af74595e6d96bb694395e8cc773515045dba4a68362b3a5ad349339056657d95bd77fe16d3844d1de1469fe12b22a16f9
|
7
|
+
data.tar.gz: 411a8e75d0d93849a5447eb337ad623e40cc9e63f8f50fba16864895df36d7da13a57408e7e6c4ac883b0e97b4e67f5e88eeddaf50c1a256caa3404c978802cb
|
data/config/settings.yml
CHANGED
data/lib/edgarj/engine.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
module Edgarj
|
2
2
|
class Engine < ::Rails::Engine
|
3
|
+
require 'rails_config'
|
4
|
+
require 'core_ext/rails_config'
|
3
5
|
require 'core_ext/active_record'
|
4
6
|
require 'core_ext/resources'
|
5
7
|
require 'edgarj/enum_cache'
|
@@ -12,8 +14,8 @@ module Edgarj
|
|
12
14
|
# (rails_config default loads from only Rails.root/config/...)
|
13
15
|
def self.load_config
|
14
16
|
engine_config_dir = Pathname.new(File.expand_path('../../../config', __FILE__))
|
15
|
-
Settings.
|
16
|
-
Settings.
|
17
|
+
Settings.prepend_source!((engine_config_dir + 'settings.yml').to_s)
|
18
|
+
Settings.prepend_source!((engine_config_dir + "settings/#{Rails.env}.yml").to_s)
|
17
19
|
Settings.reload!
|
18
20
|
end
|
19
21
|
|
data/lib/edgarj/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class AuthorTest < ActiveSupport::TestCase
|
4
|
+
test 'settings' do
|
5
|
+
# test rails-app settings
|
6
|
+
assert_equal 'Hello, World', Settings.dummy_app.hello
|
7
|
+
|
8
|
+
# test Edgarj's settings
|
9
|
+
assert_equal (Rails.root + 'tmp/edgarj/csv_download').to_s, Settings.edgarj.csv_dir.to_s
|
10
|
+
|
11
|
+
# test overritten Edgarj's settings by rails-app
|
12
|
+
assert_equal 'HELLO WORLD', Settings.edgarj._overwrite_test
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edgarj
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.01.
|
4
|
+
version: 0.01.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fuminori Ido
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -275,6 +275,7 @@ files:
|
|
275
275
|
- db/migrate/20140206222308_create_edgar_model_permissions.rb
|
276
276
|
- db/migrate/20141209053055_rename_edgar_to_edgarj.rb
|
277
277
|
- lib/core_ext/active_record.rb
|
278
|
+
- lib/core_ext/rails_config.rb
|
278
279
|
- lib/core_ext/resources.rb
|
279
280
|
- lib/edgarj.rb
|
280
281
|
- lib/edgarj/engine.rb
|
@@ -339,6 +340,7 @@ files:
|
|
339
340
|
- test/dummy/config/locales/en.yml
|
340
341
|
- test/dummy/config/locales/ja.yml
|
341
342
|
- test/dummy/config/routes.rb
|
343
|
+
- test/dummy/config/settings.yml
|
342
344
|
- test/dummy/db/migrate/20131107120635_create_authors.rb
|
343
345
|
- test/dummy/db/migrate/20131218011851_create_books.rb
|
344
346
|
- test/dummy/db/migrate/20140201000000_add_user_group_id_to_authors.rb
|
@@ -354,6 +356,7 @@ files:
|
|
354
356
|
- test/dummy/test/helpers/authors_helper_test.rb
|
355
357
|
- test/dummy/test/unit/author_test.rb
|
356
358
|
- test/dummy/test/unit/book_test.rb
|
359
|
+
- test/dummy/test/unit/rails_config_test.rb
|
357
360
|
- test/edgar_test.rb
|
358
361
|
- test/fixtures/authors.yml
|
359
362
|
- test/fixtures/books.yml
|
@@ -451,6 +454,7 @@ test_files:
|
|
451
454
|
- test/dummy/config/initializers/strong_parameter.rb
|
452
455
|
- test/dummy/config/initializers/session_store.rb
|
453
456
|
- test/dummy/config/routes.rb
|
457
|
+
- test/dummy/config/settings.yml
|
454
458
|
- test/dummy/config/database.yml
|
455
459
|
- test/dummy/config/boot.rb
|
456
460
|
- test/dummy/public/favicon.ico
|
@@ -464,6 +468,7 @@ test_files:
|
|
464
468
|
- test/dummy/db/migrate/20140201000000_add_user_group_id_to_authors.rb
|
465
469
|
- test/dummy/db/migrate/20140807065420_create_users.rb
|
466
470
|
- test/dummy/test/unit/author_test.rb
|
471
|
+
- test/dummy/test/unit/rails_config_test.rb
|
467
472
|
- test/dummy/test/unit/book_test.rb
|
468
473
|
- test/dummy/test/functional/books_controller_test.rb
|
469
474
|
- test/dummy/test/functional/authors_controller_test.rb
|