active_model_exporters 0.4.1 → 0.5.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 +6 -3
- data/Appraisals +7 -0
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -0
- data/Rakefile +3 -0
- data/active_model_exporters.gemspec +1 -4
- data/gemfiles/rails_4.gemfile +11 -0
- data/gemfiles/rails_4.gemfile.lock +136 -0
- data/gemfiles/rails_5.gemfile +11 -0
- data/gemfiles/rails_5.gemfile.lock +142 -0
- data/lib/action_controller/exportation/renderers.rb +1 -1
- data/lib/active_model/exporter/version.rb +1 -1
- data/test/test_helper.rb +3 -5
- metadata +9 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 21af4d9ee380b1b7239482e80b7ff3a1194f900a
|
4
|
+
data.tar.gz: 37fd40a7b0231f985108b994511ca881ed069f1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cfa8008e3cc52b0b6a3d6367f78b0d1a920772ea45a98aad330921a94b9b82355bfcea2db0766403e0fc93c9c67d0654cd668e79f5825a0ffb2497a73b5685a
|
7
|
+
data.tar.gz: 5ebc174a5f7f42cd67f448d4bf33ec5c9814480edef5946d97c1294442a6c9880bcf7ae6bd6f9a6296e2b69b166692cdb9712f97c14d1f41226996b5438fff4e
|
data/.travis.yml
CHANGED
data/Appraisals
ADDED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -19,8 +19,5 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.required_ruby_version = '>= 2.0.0'
|
21
21
|
|
22
|
-
spec.add_dependency 'activemodel', '>=
|
23
|
-
|
24
|
-
spec.add_development_dependency 'rails', '>= 4.0'
|
25
|
-
spec.add_development_dependency 'sqlite3', '~> 1.3'
|
22
|
+
spec.add_dependency 'activemodel', '>= 3.0'
|
26
23
|
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
active_model_exporters (0.4.1)
|
5
|
+
activemodel (>= 3.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionmailer (4.2.7.1)
|
11
|
+
actionpack (= 4.2.7.1)
|
12
|
+
actionview (= 4.2.7.1)
|
13
|
+
activejob (= 4.2.7.1)
|
14
|
+
mail (~> 2.5, >= 2.5.4)
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
actionpack (4.2.7.1)
|
17
|
+
actionview (= 4.2.7.1)
|
18
|
+
activesupport (= 4.2.7.1)
|
19
|
+
rack (~> 1.6)
|
20
|
+
rack-test (~> 0.6.2)
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
23
|
+
actionview (4.2.7.1)
|
24
|
+
activesupport (= 4.2.7.1)
|
25
|
+
builder (~> 3.1)
|
26
|
+
erubis (~> 2.7.0)
|
27
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
28
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
29
|
+
activejob (4.2.7.1)
|
30
|
+
activesupport (= 4.2.7.1)
|
31
|
+
globalid (>= 0.3.0)
|
32
|
+
activemodel (4.2.7.1)
|
33
|
+
activesupport (= 4.2.7.1)
|
34
|
+
builder (~> 3.1)
|
35
|
+
activerecord (4.2.7.1)
|
36
|
+
activemodel (= 4.2.7.1)
|
37
|
+
activesupport (= 4.2.7.1)
|
38
|
+
arel (~> 6.0)
|
39
|
+
activesupport (4.2.7.1)
|
40
|
+
i18n (~> 0.7)
|
41
|
+
json (~> 1.7, >= 1.7.7)
|
42
|
+
minitest (~> 5.1)
|
43
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
44
|
+
tzinfo (~> 1.1)
|
45
|
+
appraisal (2.1.0)
|
46
|
+
bundler
|
47
|
+
rake
|
48
|
+
thor (>= 0.14.0)
|
49
|
+
arel (6.0.3)
|
50
|
+
builder (3.2.2)
|
51
|
+
concurrent-ruby (1.0.2)
|
52
|
+
coveralls (0.8.15)
|
53
|
+
json (>= 1.8, < 3)
|
54
|
+
simplecov (~> 0.12.0)
|
55
|
+
term-ansicolor (~> 1.3)
|
56
|
+
thor (~> 0.19.1)
|
57
|
+
tins (>= 1.6.0, < 2)
|
58
|
+
docile (1.1.5)
|
59
|
+
erubis (2.7.0)
|
60
|
+
globalid (0.3.7)
|
61
|
+
activesupport (>= 4.1.0)
|
62
|
+
i18n (0.7.0)
|
63
|
+
json (1.8.3)
|
64
|
+
loofah (2.0.3)
|
65
|
+
nokogiri (>= 1.5.9)
|
66
|
+
mail (2.6.4)
|
67
|
+
mime-types (>= 1.16, < 4)
|
68
|
+
mime-types (3.1)
|
69
|
+
mime-types-data (~> 3.2015)
|
70
|
+
mime-types-data (3.2016.0521)
|
71
|
+
mini_portile2 (2.1.0)
|
72
|
+
minitest (5.9.1)
|
73
|
+
nokogiri (1.6.8.1)
|
74
|
+
mini_portile2 (~> 2.1.0)
|
75
|
+
rack (1.6.5)
|
76
|
+
rack-test (0.6.3)
|
77
|
+
rack (>= 1.0)
|
78
|
+
rails (4.2.7.1)
|
79
|
+
actionmailer (= 4.2.7.1)
|
80
|
+
actionpack (= 4.2.7.1)
|
81
|
+
actionview (= 4.2.7.1)
|
82
|
+
activejob (= 4.2.7.1)
|
83
|
+
activemodel (= 4.2.7.1)
|
84
|
+
activerecord (= 4.2.7.1)
|
85
|
+
activesupport (= 4.2.7.1)
|
86
|
+
bundler (>= 1.3.0, < 2.0)
|
87
|
+
railties (= 4.2.7.1)
|
88
|
+
sprockets-rails
|
89
|
+
rails-deprecated_sanitizer (1.0.3)
|
90
|
+
activesupport (>= 4.2.0.alpha)
|
91
|
+
rails-dom-testing (1.0.7)
|
92
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
93
|
+
nokogiri (~> 1.6.0)
|
94
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
95
|
+
rails-html-sanitizer (1.0.3)
|
96
|
+
loofah (~> 2.0)
|
97
|
+
railties (4.2.7.1)
|
98
|
+
actionpack (= 4.2.7.1)
|
99
|
+
activesupport (= 4.2.7.1)
|
100
|
+
rake (>= 0.8.7)
|
101
|
+
thor (>= 0.18.1, < 2.0)
|
102
|
+
rake (11.3.0)
|
103
|
+
simplecov (0.12.0)
|
104
|
+
docile (~> 1.1.0)
|
105
|
+
json (>= 1.8, < 3)
|
106
|
+
simplecov-html (~> 0.10.0)
|
107
|
+
simplecov-html (0.10.0)
|
108
|
+
sprockets (3.7.0)
|
109
|
+
concurrent-ruby (~> 1.0)
|
110
|
+
rack (> 1, < 3)
|
111
|
+
sprockets-rails (3.2.0)
|
112
|
+
actionpack (>= 4.0)
|
113
|
+
activesupport (>= 4.0)
|
114
|
+
sprockets (>= 3.0.0)
|
115
|
+
sqlite3 (1.3.12)
|
116
|
+
term-ansicolor (1.4.0)
|
117
|
+
tins (~> 1.0)
|
118
|
+
thor (0.19.1)
|
119
|
+
thread_safe (0.3.5)
|
120
|
+
tins (1.12.0)
|
121
|
+
tzinfo (1.2.2)
|
122
|
+
thread_safe (~> 0.1)
|
123
|
+
|
124
|
+
PLATFORMS
|
125
|
+
ruby
|
126
|
+
|
127
|
+
DEPENDENCIES
|
128
|
+
active_model_exporters!
|
129
|
+
appraisal
|
130
|
+
coveralls
|
131
|
+
rails (~> 4.2)
|
132
|
+
simplecov
|
133
|
+
sqlite3
|
134
|
+
|
135
|
+
BUNDLED WITH
|
136
|
+
1.13.6
|
@@ -0,0 +1,142 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
active_model_exporters (0.4.1)
|
5
|
+
activemodel (>= 3.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actioncable (5.0.0.1)
|
11
|
+
actionpack (= 5.0.0.1)
|
12
|
+
nio4r (~> 1.2)
|
13
|
+
websocket-driver (~> 0.6.1)
|
14
|
+
actionmailer (5.0.0.1)
|
15
|
+
actionpack (= 5.0.0.1)
|
16
|
+
actionview (= 5.0.0.1)
|
17
|
+
activejob (= 5.0.0.1)
|
18
|
+
mail (~> 2.5, >= 2.5.4)
|
19
|
+
rails-dom-testing (~> 2.0)
|
20
|
+
actionpack (5.0.0.1)
|
21
|
+
actionview (= 5.0.0.1)
|
22
|
+
activesupport (= 5.0.0.1)
|
23
|
+
rack (~> 2.0)
|
24
|
+
rack-test (~> 0.6.3)
|
25
|
+
rails-dom-testing (~> 2.0)
|
26
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
+
actionview (5.0.0.1)
|
28
|
+
activesupport (= 5.0.0.1)
|
29
|
+
builder (~> 3.1)
|
30
|
+
erubis (~> 2.7.0)
|
31
|
+
rails-dom-testing (~> 2.0)
|
32
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
33
|
+
activejob (5.0.0.1)
|
34
|
+
activesupport (= 5.0.0.1)
|
35
|
+
globalid (>= 0.3.6)
|
36
|
+
activemodel (5.0.0.1)
|
37
|
+
activesupport (= 5.0.0.1)
|
38
|
+
activerecord (5.0.0.1)
|
39
|
+
activemodel (= 5.0.0.1)
|
40
|
+
activesupport (= 5.0.0.1)
|
41
|
+
arel (~> 7.0)
|
42
|
+
activesupport (5.0.0.1)
|
43
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
44
|
+
i18n (~> 0.7)
|
45
|
+
minitest (~> 5.1)
|
46
|
+
tzinfo (~> 1.1)
|
47
|
+
appraisal (2.1.0)
|
48
|
+
bundler
|
49
|
+
rake
|
50
|
+
thor (>= 0.14.0)
|
51
|
+
arel (7.1.4)
|
52
|
+
builder (3.2.2)
|
53
|
+
concurrent-ruby (1.0.2)
|
54
|
+
coveralls (0.8.15)
|
55
|
+
json (>= 1.8, < 3)
|
56
|
+
simplecov (~> 0.12.0)
|
57
|
+
term-ansicolor (~> 1.3)
|
58
|
+
thor (~> 0.19.1)
|
59
|
+
tins (>= 1.6.0, < 2)
|
60
|
+
docile (1.1.5)
|
61
|
+
erubis (2.7.0)
|
62
|
+
globalid (0.3.7)
|
63
|
+
activesupport (>= 4.1.0)
|
64
|
+
i18n (0.7.0)
|
65
|
+
json (2.0.2)
|
66
|
+
loofah (2.0.3)
|
67
|
+
nokogiri (>= 1.5.9)
|
68
|
+
mail (2.6.4)
|
69
|
+
mime-types (>= 1.16, < 4)
|
70
|
+
method_source (0.8.2)
|
71
|
+
mime-types (3.1)
|
72
|
+
mime-types-data (~> 3.2015)
|
73
|
+
mime-types-data (3.2016.0521)
|
74
|
+
mini_portile2 (2.1.0)
|
75
|
+
minitest (5.9.1)
|
76
|
+
nio4r (1.2.1)
|
77
|
+
nokogiri (1.6.8.1)
|
78
|
+
mini_portile2 (~> 2.1.0)
|
79
|
+
rack (2.0.1)
|
80
|
+
rack-test (0.6.3)
|
81
|
+
rack (>= 1.0)
|
82
|
+
rails (5.0.0.1)
|
83
|
+
actioncable (= 5.0.0.1)
|
84
|
+
actionmailer (= 5.0.0.1)
|
85
|
+
actionpack (= 5.0.0.1)
|
86
|
+
actionview (= 5.0.0.1)
|
87
|
+
activejob (= 5.0.0.1)
|
88
|
+
activemodel (= 5.0.0.1)
|
89
|
+
activerecord (= 5.0.0.1)
|
90
|
+
activesupport (= 5.0.0.1)
|
91
|
+
bundler (>= 1.3.0, < 2.0)
|
92
|
+
railties (= 5.0.0.1)
|
93
|
+
sprockets-rails (>= 2.0.0)
|
94
|
+
rails-dom-testing (2.0.1)
|
95
|
+
activesupport (>= 4.2.0, < 6.0)
|
96
|
+
nokogiri (~> 1.6.0)
|
97
|
+
rails-html-sanitizer (1.0.3)
|
98
|
+
loofah (~> 2.0)
|
99
|
+
railties (5.0.0.1)
|
100
|
+
actionpack (= 5.0.0.1)
|
101
|
+
activesupport (= 5.0.0.1)
|
102
|
+
method_source
|
103
|
+
rake (>= 0.8.7)
|
104
|
+
thor (>= 0.18.1, < 2.0)
|
105
|
+
rake (11.3.0)
|
106
|
+
simplecov (0.12.0)
|
107
|
+
docile (~> 1.1.0)
|
108
|
+
json (>= 1.8, < 3)
|
109
|
+
simplecov-html (~> 0.10.0)
|
110
|
+
simplecov-html (0.10.0)
|
111
|
+
sprockets (3.7.0)
|
112
|
+
concurrent-ruby (~> 1.0)
|
113
|
+
rack (> 1, < 3)
|
114
|
+
sprockets-rails (3.2.0)
|
115
|
+
actionpack (>= 4.0)
|
116
|
+
activesupport (>= 4.0)
|
117
|
+
sprockets (>= 3.0.0)
|
118
|
+
sqlite3 (1.3.12)
|
119
|
+
term-ansicolor (1.4.0)
|
120
|
+
tins (~> 1.0)
|
121
|
+
thor (0.19.1)
|
122
|
+
thread_safe (0.3.5)
|
123
|
+
tins (1.12.0)
|
124
|
+
tzinfo (1.2.2)
|
125
|
+
thread_safe (~> 0.1)
|
126
|
+
websocket-driver (0.6.4)
|
127
|
+
websocket-extensions (>= 0.1.0)
|
128
|
+
websocket-extensions (0.1.2)
|
129
|
+
|
130
|
+
PLATFORMS
|
131
|
+
ruby
|
132
|
+
|
133
|
+
DEPENDENCIES
|
134
|
+
active_model_exporters!
|
135
|
+
appraisal
|
136
|
+
coveralls
|
137
|
+
rails (~> 5.0.0)
|
138
|
+
simplecov
|
139
|
+
sqlite3
|
140
|
+
|
141
|
+
BUNDLED WITH
|
142
|
+
1.13.6
|
@@ -4,7 +4,7 @@ ActiveModel::Exporter::TYPES.each do |type|
|
|
4
4
|
|
5
5
|
if resource.respond_to?(method)
|
6
6
|
encode = options[:encode] || 'iso-8859-1'
|
7
|
-
mtype =
|
7
|
+
mtype = Mime[type.to_sym]
|
8
8
|
file = resource.send(method).encode(encode)
|
9
9
|
|
10
10
|
default_options = {type: mtype, disposition: 'attachment'}
|
data/test/test_helper.rb
CHANGED
@@ -16,13 +16,11 @@ require 'fixtures/exporters'
|
|
16
16
|
require 'fixtures/active_record/models'
|
17
17
|
require 'fixtures/active_record/exporters'
|
18
18
|
|
19
|
+
ActiveSupport::TestCase.test_order = :random
|
20
|
+
|
19
21
|
module TestHelper
|
20
22
|
Routes = ActionDispatch::Routing::RouteSet.new
|
21
|
-
Routes.draw do
|
22
|
-
get ':controller(/:action(/:id))'
|
23
|
-
get ':controller(/:action)'
|
24
|
-
end
|
25
|
-
|
23
|
+
Routes.draw do get ':controller(/:action)' end
|
26
24
|
ActionController::Base.send(:include, Routes.url_helpers)
|
27
25
|
end
|
28
26
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model_exporters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Gutiérrez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,42 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rails
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '4.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '4.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: sqlite3
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '1.3'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '1.3'
|
26
|
+
version: '3.0'
|
55
27
|
description: A simple way to export data in Rails.
|
56
28
|
email:
|
57
29
|
- alejandrodevs@gmail.com
|
@@ -61,12 +33,17 @@ extra_rdoc_files: []
|
|
61
33
|
files:
|
62
34
|
- ".gitignore"
|
63
35
|
- ".travis.yml"
|
36
|
+
- Appraisals
|
64
37
|
- CHANGELOG.md
|
65
38
|
- Gemfile
|
66
39
|
- LICENSE.txt
|
67
40
|
- README.md
|
68
41
|
- Rakefile
|
69
42
|
- active_model_exporters.gemspec
|
43
|
+
- gemfiles/rails_4.gemfile
|
44
|
+
- gemfiles/rails_4.gemfile.lock
|
45
|
+
- gemfiles/rails_5.gemfile
|
46
|
+
- gemfiles/rails_5.gemfile.lock
|
70
47
|
- lib/action_controller/exportation.rb
|
71
48
|
- lib/action_controller/exportation/mime_types.rb
|
72
49
|
- lib/action_controller/exportation/renderers.rb
|