active_model_exporters 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +9 -18
- data/.travis.yml +8 -5
- data/Appraisals +4 -8
- data/CHANGELOG.md +14 -3
- data/Gemfile +0 -7
- data/LICENSE.txt +17 -18
- data/README.md +48 -12
- data/Rakefile +3 -5
- data/active_model_exporters.gemspec +21 -8
- data/gemfiles/rails_5.2.gemfile +1 -5
- data/gemfiles/rails_5.2.gemfile.lock +81 -85
- data/gemfiles/rails_6.0.gemfile +7 -0
- data/gemfiles/rails_6.0.gemfile.lock +169 -0
- data/lib/active_model/exporter.rb +6 -7
- data/lib/active_model/exporter/version.rb +1 -1
- metadata +99 -33
- data/gemfiles/rails_4.gemfile +0 -11
- data/gemfiles/rails_4.gemfile.lock +0 -142
- data/gemfiles/rails_5.gemfile +0 -11
- data/gemfiles/rails_5.gemfile.lock +0 -149
- data/test/fixtures/active_record/exporters.rb +0 -3
- data/test/fixtures/active_record/models.rb +0 -18
- data/test/fixtures/exporters.rb +0 -23
- data/test/fixtures/locale.rb +0 -20
- data/test/fixtures/models.rb +0 -6
- data/test/integration/action_controller/exportation/csv_test.rb +0 -162
- data/test/integration/action_controller/exportation/xls_test.rb +0 -162
- data/test/integration/active_record/exportation/csv_test.rb +0 -23
- data/test/test_helper.rb +0 -31
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module ActiveModel
|
4
|
-
class Exporter::CSV
|
5
|
-
class LocaleHeadersTest < Minitest::Test
|
6
|
-
def setup
|
7
|
-
@collection = [
|
8
|
-
ARUser.new(first_name: 'ARFoo1', last_name: 'ARBar1'),
|
9
|
-
ARUser.new(first_name: 'ARFoo2', last_name: 'ARBar2'),
|
10
|
-
ARUser.new(first_name: 'ARFoo3', last_name: 'ARBar3')
|
11
|
-
]
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_locale_headers
|
15
|
-
exporter = ActiveModel::ArrayExporter.new(@collection)
|
16
|
-
assert_equal "First,Last\n"\
|
17
|
-
"ARFoo1,ARBar1\n"\
|
18
|
-
"ARFoo2,ARBar2\n"\
|
19
|
-
"ARFoo3,ARBar3\n", exporter.to_csv
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'coveralls'
|
2
|
-
Coveralls.wear!
|
3
|
-
|
4
|
-
require 'simplecov'
|
5
|
-
SimpleCov.start
|
6
|
-
|
7
|
-
require 'ostruct'
|
8
|
-
require 'action_controller'
|
9
|
-
require 'active_model_exporters'
|
10
|
-
require 'minitest/autorun'
|
11
|
-
require 'minitest/unit'
|
12
|
-
require 'minitest/pride'
|
13
|
-
require 'fixtures/locale'
|
14
|
-
require 'fixtures/models'
|
15
|
-
require 'fixtures/exporters'
|
16
|
-
require 'fixtures/active_record/models'
|
17
|
-
require 'fixtures/active_record/exporters'
|
18
|
-
|
19
|
-
ActiveSupport::TestCase.test_order = :random
|
20
|
-
|
21
|
-
module TestHelper
|
22
|
-
Routes = ActionDispatch::Routing::RouteSet.new
|
23
|
-
Routes.draw do get ':controller(/:action)' end
|
24
|
-
ActionController::Base.send(:include, Routes.url_helpers)
|
25
|
-
end
|
26
|
-
|
27
|
-
class ActionController::TestCase
|
28
|
-
def setup
|
29
|
-
@routes = TestHelper::Routes
|
30
|
-
end
|
31
|
-
end
|