binary_fixtures 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -1
- data/Gemfile +7 -7
- data/Gemfile.lock +86 -81
- data/Gemfile.rails40 +13 -0
- data/Gemfile.rails41 +13 -0
- data/VERSION +1 -1
- data/binary_fixtures.gemspec +26 -25
- data/lib/binary_fixtures/patch_rails.rb +2 -3
- data/lib/binary_fixtures/rails_13022.rb +16 -24
- data/test/helper.rb +1 -1
- data/test/helpers/db_setup.rb +9 -8
- data/test/migrations/001_create_attachments.rb +1 -1
- data/test/test_binary_fixtures.rb +1 -1
- metadata +19 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64d1f33caf417046023a3f21f8149984dc0c6f38
|
4
|
+
data.tar.gz: 55803e3a7458b122a25532638e4428d8605cca60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e399019a55e4990df7e7bdca8d813bfc79808778ed5d2dac3642b0b260a25bc77e69fa1265447fb0e07853a31c9a06b26ee53cc2f8186136d482195c7c42d03
|
7
|
+
data.tar.gz: 4eb7b851f145d2a9bbf629ffe055322d2373c237cb33e47b98f2edb5477ea59be98c6565e5ed7d3f73695920edc143317fe09df5affc24cd7cd146867946f554
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'rails', '>= 4.
|
3
|
+
gem 'rails', '>= 4.1.0'
|
4
4
|
|
5
5
|
group :development do
|
6
|
-
gem 'bundler', '>= 1.
|
7
|
-
gem 'jeweler', '>=
|
8
|
-
gem 'mysql2', '>= 0.3.
|
9
|
-
gem 'pg', '>= 0.17.
|
10
|
-
gem 'sqlite3', '>= 1.3.
|
11
|
-
gem 'yard', '>= 0.7'
|
6
|
+
gem 'bundler', '>= 1.6.2'
|
7
|
+
gem 'jeweler', '>= 2.0.1'
|
8
|
+
gem 'mysql2', '>= 0.3.16'
|
9
|
+
gem 'pg', '>= 0.17.1'
|
10
|
+
gem 'sqlite3', '>= 1.3.9'
|
11
|
+
gem 'yard', '>= 0.8.7.4'
|
12
12
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,128 +1,133 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (4.
|
5
|
-
actionpack (= 4.
|
4
|
+
actionmailer (4.1.1)
|
5
|
+
actionpack (= 4.1.1)
|
6
|
+
actionview (= 4.1.1)
|
6
7
|
mail (~> 2.5.4)
|
7
|
-
actionpack (4.
|
8
|
-
|
9
|
-
|
10
|
-
erubis (~> 2.7.0)
|
8
|
+
actionpack (4.1.1)
|
9
|
+
actionview (= 4.1.1)
|
10
|
+
activesupport (= 4.1.1)
|
11
11
|
rack (~> 1.5.2)
|
12
12
|
rack-test (~> 0.6.2)
|
13
|
-
|
14
|
-
activesupport (= 4.
|
15
|
-
builder (~> 3.1
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
13
|
+
actionview (4.1.1)
|
14
|
+
activesupport (= 4.1.1)
|
15
|
+
builder (~> 3.1)
|
16
|
+
erubis (~> 2.7.0)
|
17
|
+
activemodel (4.1.1)
|
18
|
+
activesupport (= 4.1.1)
|
19
|
+
builder (~> 3.1)
|
20
|
+
activerecord (4.1.1)
|
21
|
+
activemodel (= 4.1.1)
|
22
|
+
activesupport (= 4.1.1)
|
23
|
+
arel (~> 5.0.0)
|
24
|
+
activesupport (4.1.1)
|
25
|
+
i18n (~> 0.6, >= 0.6.9)
|
26
|
+
json (~> 1.7, >= 1.7.7)
|
27
|
+
minitest (~> 5.1)
|
26
28
|
thread_safe (~> 0.1)
|
27
|
-
tzinfo (~>
|
28
|
-
addressable (2.3.
|
29
|
-
arel (
|
30
|
-
|
31
|
-
|
29
|
+
tzinfo (~> 1.1)
|
30
|
+
addressable (2.3.6)
|
31
|
+
arel (5.0.1.20140414130214)
|
32
|
+
builder (3.2.2)
|
33
|
+
descendants_tracker (0.0.4)
|
34
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
32
35
|
erubis (2.7.0)
|
33
|
-
faraday (0.
|
34
|
-
multipart-post (
|
36
|
+
faraday (0.9.0)
|
37
|
+
multipart-post (>= 1.2, < 3)
|
35
38
|
git (1.2.6)
|
36
|
-
github_api (0.
|
37
|
-
addressable
|
38
|
-
|
39
|
+
github_api (0.11.3)
|
40
|
+
addressable (~> 2.3)
|
41
|
+
descendants_tracker (~> 0.0.1)
|
42
|
+
faraday (~> 0.8, < 0.10)
|
39
43
|
hashie (>= 1.2)
|
40
|
-
multi_json (
|
41
|
-
nokogiri (~> 1.
|
44
|
+
multi_json (>= 1.7.5, < 2.0)
|
45
|
+
nokogiri (~> 1.6.0)
|
42
46
|
oauth2
|
43
|
-
hashie (2.
|
44
|
-
highline (1.6.
|
47
|
+
hashie (2.1.1)
|
48
|
+
highline (1.6.21)
|
45
49
|
hike (1.2.3)
|
46
|
-
|
47
|
-
|
48
|
-
jeweler (1.8.8)
|
50
|
+
i18n (0.6.9)
|
51
|
+
jeweler (2.0.1)
|
49
52
|
builder
|
50
|
-
bundler (
|
53
|
+
bundler (>= 1.0)
|
51
54
|
git (>= 1.2.5)
|
52
|
-
github_api
|
55
|
+
github_api
|
53
56
|
highline (>= 1.6.15)
|
54
|
-
nokogiri (
|
57
|
+
nokogiri (>= 1.5.10)
|
55
58
|
rake
|
56
59
|
rdoc
|
57
60
|
json (1.8.1)
|
58
|
-
jwt (0.
|
59
|
-
multi_json (>= 1.5)
|
61
|
+
jwt (1.0.0)
|
60
62
|
mail (2.5.4)
|
61
63
|
mime-types (~> 1.16)
|
62
64
|
treetop (~> 1.4.8)
|
63
|
-
mime-types (1.25)
|
64
|
-
|
65
|
-
|
65
|
+
mime-types (1.25.1)
|
66
|
+
mini_portile (0.6.0)
|
67
|
+
minitest (5.3.4)
|
68
|
+
multi_json (1.10.1)
|
66
69
|
multi_xml (0.5.5)
|
67
|
-
multipart-post (
|
68
|
-
mysql2 (0.3.
|
69
|
-
nokogiri (1.
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
jwt (~>
|
74
|
-
multi_json (~> 1.
|
70
|
+
multipart-post (2.0.0)
|
71
|
+
mysql2 (0.3.16)
|
72
|
+
nokogiri (1.6.2.1)
|
73
|
+
mini_portile (= 0.6.0)
|
74
|
+
oauth2 (0.9.4)
|
75
|
+
faraday (>= 0.8, < 0.10)
|
76
|
+
jwt (~> 1.0)
|
77
|
+
multi_json (~> 1.3)
|
75
78
|
multi_xml (~> 0.5)
|
76
79
|
rack (~> 1.2)
|
77
|
-
pg (0.17.
|
78
|
-
polyglot (0.3.
|
80
|
+
pg (0.17.1)
|
81
|
+
polyglot (0.3.4)
|
79
82
|
rack (1.5.2)
|
80
83
|
rack-test (0.6.2)
|
81
84
|
rack (>= 1.0)
|
82
|
-
rails (4.
|
83
|
-
actionmailer (= 4.
|
84
|
-
actionpack (= 4.
|
85
|
-
|
86
|
-
|
85
|
+
rails (4.1.1)
|
86
|
+
actionmailer (= 4.1.1)
|
87
|
+
actionpack (= 4.1.1)
|
88
|
+
actionview (= 4.1.1)
|
89
|
+
activemodel (= 4.1.1)
|
90
|
+
activerecord (= 4.1.1)
|
91
|
+
activesupport (= 4.1.1)
|
87
92
|
bundler (>= 1.3.0, < 2.0)
|
88
|
-
railties (= 4.
|
89
|
-
sprockets-rails (~> 2.0
|
90
|
-
railties (4.
|
91
|
-
actionpack (= 4.
|
92
|
-
activesupport (= 4.
|
93
|
+
railties (= 4.1.1)
|
94
|
+
sprockets-rails (~> 2.0)
|
95
|
+
railties (4.1.1)
|
96
|
+
actionpack (= 4.1.1)
|
97
|
+
activesupport (= 4.1.1)
|
93
98
|
rake (>= 0.8.7)
|
94
99
|
thor (>= 0.18.1, < 2.0)
|
95
|
-
rake (10.
|
96
|
-
rdoc (4.
|
100
|
+
rake (10.3.2)
|
101
|
+
rdoc (4.1.1)
|
97
102
|
json (~> 1.4)
|
98
|
-
sprockets (2.
|
103
|
+
sprockets (2.12.1)
|
99
104
|
hike (~> 1.2)
|
100
105
|
multi_json (~> 1.0)
|
101
106
|
rack (~> 1.0)
|
102
107
|
tilt (~> 1.1, != 1.3.0)
|
103
|
-
sprockets-rails (2.
|
108
|
+
sprockets-rails (2.1.3)
|
104
109
|
actionpack (>= 3.0)
|
105
110
|
activesupport (>= 3.0)
|
106
111
|
sprockets (~> 2.8)
|
107
|
-
sqlite3 (1.3.
|
108
|
-
thor (0.
|
109
|
-
thread_safe (0.
|
110
|
-
atomic
|
112
|
+
sqlite3 (1.3.9)
|
113
|
+
thor (0.19.1)
|
114
|
+
thread_safe (0.3.3)
|
111
115
|
tilt (1.4.1)
|
112
116
|
treetop (1.4.15)
|
113
117
|
polyglot
|
114
118
|
polyglot (>= 0.3.1)
|
115
|
-
tzinfo (
|
116
|
-
|
119
|
+
tzinfo (1.1.0)
|
120
|
+
thread_safe (~> 0.1)
|
121
|
+
yard (0.8.7.4)
|
117
122
|
|
118
123
|
PLATFORMS
|
119
124
|
ruby
|
120
125
|
|
121
126
|
DEPENDENCIES
|
122
|
-
bundler (>= 1.
|
123
|
-
jeweler (>=
|
124
|
-
mysql2 (>= 0.3.
|
125
|
-
pg (>= 0.17.
|
126
|
-
rails (>= 4.
|
127
|
-
sqlite3 (>= 1.3.
|
128
|
-
yard (>= 0.7)
|
127
|
+
bundler (>= 1.6.2)
|
128
|
+
jeweler (>= 2.0.1)
|
129
|
+
mysql2 (>= 0.3.16)
|
130
|
+
pg (>= 0.17.1)
|
131
|
+
rails (>= 4.1.0)
|
132
|
+
sqlite3 (>= 1.3.9)
|
133
|
+
yard (>= 0.8.7.4)
|
data/Gemfile.rails40
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '~> 4.1.1'
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem 'bundler', '>= 1.6.2'
|
7
|
+
gem 'jeweler', '>= 2.0.1'
|
8
|
+
gem 'mysql2', '>= 0.3.16'
|
9
|
+
gem 'pg', '>= 0.17.1'
|
10
|
+
gem 'sqlite3', '>= 1.3.9'
|
11
|
+
gem 'yard', '>= 0.8.7.4'
|
12
|
+
end
|
13
|
+
|
data/Gemfile.rails41
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '~> 4.1.1'
|
4
|
+
|
5
|
+
group :development do
|
6
|
+
gem 'bundler', '>= 1.6.2'
|
7
|
+
gem 'jeweler', '>= 2.0.1'
|
8
|
+
gem 'mysql2', '>= 0.3.16'
|
9
|
+
gem 'pg', '>= 0.17.1'
|
10
|
+
gem 'sqlite3', '>= 1.3.9'
|
11
|
+
gem 'yard', '>= 0.8.7.4'
|
12
|
+
end
|
13
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/binary_fixtures.gemspec
CHANGED
@@ -2,15 +2,14 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: binary_fixtures 0.1.2 ruby lib
|
6
5
|
|
7
6
|
Gem::Specification.new do |s|
|
8
7
|
s.name = "binary_fixtures"
|
9
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
10
9
|
|
11
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
11
|
s.authors = ["Victor Costan"]
|
13
|
-
s.date = "
|
12
|
+
s.date = "2014-05-25"
|
14
13
|
s.description = "Convenience method for inlining binary data in Rails fixtures"
|
15
14
|
s.email = "victor@costan.us"
|
16
15
|
s.extra_rdoc_files = [
|
@@ -22,6 +21,8 @@ Gem::Specification.new do |s|
|
|
22
21
|
".travis.yml",
|
23
22
|
"Gemfile",
|
24
23
|
"Gemfile.lock",
|
24
|
+
"Gemfile.rails40",
|
25
|
+
"Gemfile.rails41",
|
25
26
|
"LICENSE",
|
26
27
|
"README.rdoc",
|
27
28
|
"Rakefile",
|
@@ -43,37 +44,37 @@ Gem::Specification.new do |s|
|
|
43
44
|
s.homepage = "http://github.com/pwnall/binary_fixtures"
|
44
45
|
s.licenses = ["MIT"]
|
45
46
|
s.require_paths = ["lib"]
|
46
|
-
s.rubygems_version = "2.
|
47
|
+
s.rubygems_version = "2.0.14"
|
47
48
|
s.summary = "Use binary files in Rails fixtures"
|
48
49
|
|
49
50
|
if s.respond_to? :specification_version then
|
50
51
|
s.specification_version = 4
|
51
52
|
|
52
53
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
53
|
-
s.add_runtime_dependency(%q<rails>, [">= 4.
|
54
|
-
s.add_development_dependency(%q<bundler>, [">= 1.
|
55
|
-
s.add_development_dependency(%q<jeweler>, [">=
|
56
|
-
s.add_development_dependency(%q<mysql2>, [">= 0.3.
|
57
|
-
s.add_development_dependency(%q<pg>, [">= 0.17.
|
58
|
-
s.add_development_dependency(%q<sqlite3>, [">= 1.3.
|
59
|
-
s.add_development_dependency(%q<yard>, [">= 0.7"])
|
54
|
+
s.add_runtime_dependency(%q<rails>, [">= 4.1.0"])
|
55
|
+
s.add_development_dependency(%q<bundler>, [">= 1.6.2"])
|
56
|
+
s.add_development_dependency(%q<jeweler>, [">= 2.0.1"])
|
57
|
+
s.add_development_dependency(%q<mysql2>, [">= 0.3.16"])
|
58
|
+
s.add_development_dependency(%q<pg>, [">= 0.17.1"])
|
59
|
+
s.add_development_dependency(%q<sqlite3>, [">= 1.3.9"])
|
60
|
+
s.add_development_dependency(%q<yard>, [">= 0.8.7.4"])
|
60
61
|
else
|
61
|
-
s.add_dependency(%q<rails>, [">= 4.
|
62
|
-
s.add_dependency(%q<bundler>, [">= 1.
|
63
|
-
s.add_dependency(%q<jeweler>, [">=
|
64
|
-
s.add_dependency(%q<mysql2>, [">= 0.3.
|
65
|
-
s.add_dependency(%q<pg>, [">= 0.17.
|
66
|
-
s.add_dependency(%q<sqlite3>, [">= 1.3.
|
67
|
-
s.add_dependency(%q<yard>, [">= 0.7"])
|
62
|
+
s.add_dependency(%q<rails>, [">= 4.1.0"])
|
63
|
+
s.add_dependency(%q<bundler>, [">= 1.6.2"])
|
64
|
+
s.add_dependency(%q<jeweler>, [">= 2.0.1"])
|
65
|
+
s.add_dependency(%q<mysql2>, [">= 0.3.16"])
|
66
|
+
s.add_dependency(%q<pg>, [">= 0.17.1"])
|
67
|
+
s.add_dependency(%q<sqlite3>, [">= 1.3.9"])
|
68
|
+
s.add_dependency(%q<yard>, [">= 0.8.7.4"])
|
68
69
|
end
|
69
70
|
else
|
70
|
-
s.add_dependency(%q<rails>, [">= 4.
|
71
|
-
s.add_dependency(%q<bundler>, [">= 1.
|
72
|
-
s.add_dependency(%q<jeweler>, [">=
|
73
|
-
s.add_dependency(%q<mysql2>, [">= 0.3.
|
74
|
-
s.add_dependency(%q<pg>, [">= 0.17.
|
75
|
-
s.add_dependency(%q<sqlite3>, [">= 1.3.
|
76
|
-
s.add_dependency(%q<yard>, [">= 0.7"])
|
71
|
+
s.add_dependency(%q<rails>, [">= 4.1.0"])
|
72
|
+
s.add_dependency(%q<bundler>, [">= 1.6.2"])
|
73
|
+
s.add_dependency(%q<jeweler>, [">= 2.0.1"])
|
74
|
+
s.add_dependency(%q<mysql2>, [">= 0.3.16"])
|
75
|
+
s.add_dependency(%q<pg>, [">= 0.17.1"])
|
76
|
+
s.add_dependency(%q<sqlite3>, [">= 1.3.9"])
|
77
|
+
s.add_dependency(%q<yard>, [">= 0.8.7.4"])
|
77
78
|
end
|
78
79
|
end
|
79
80
|
|
@@ -2,34 +2,26 @@ require 'active_record'
|
|
2
2
|
require 'active_record/fixtures'
|
3
3
|
|
4
4
|
# Packaged version of https://github.com/rails/rails/pull/13022
|
5
|
-
unless
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
# A new subclass of this class is created each time the ERB renderer is
|
12
|
-
# called so that methods defined in ERB templates do not leak into other
|
13
|
-
# templates' context.
|
14
|
-
class ActiveRecord::FixtureSet::RenderContext
|
15
|
-
# An instance of a new RenderContext subclass.
|
16
|
-
def self.create
|
17
|
-
klass = ::Class.new(ActiveRecord::FixtureSet::RenderContext) do
|
18
|
-
def get_binding
|
19
|
-
binding()
|
20
|
-
end
|
21
|
-
end
|
5
|
+
unless ActiveRecord::FixtureSet.respond_to?(:context_class)
|
6
|
+
class ActiveRecord::FixtureSet # :nodoc:
|
7
|
+
# Superclass for the evaluation contexts used by ERB fixtures.
|
8
|
+
def self.context_class
|
9
|
+
@context_class ||= Class.new
|
10
|
+
end
|
22
11
|
|
23
|
-
|
12
|
+
class File
|
13
|
+
def render(content)
|
14
|
+
context = ActiveRecord::FixtureSet::RenderContext.create_subclass.new
|
15
|
+
ERB.new(content).result(context.get_binding)
|
16
|
+
end
|
24
17
|
end
|
25
18
|
end
|
26
19
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
def
|
31
|
-
|
32
|
-
ERB.new(content).result(context.get_binding)
|
20
|
+
class ActiveRecord::FixtureSet::RenderContext # :nodoc:
|
21
|
+
def self.create_subclass
|
22
|
+
Class.new ActiveRecord::FixtureSet.context_class do
|
23
|
+
def get_binding
|
24
|
+
binding()
|
33
25
|
end
|
34
26
|
end
|
35
27
|
end
|
data/test/helper.rb
CHANGED
@@ -7,7 +7,7 @@ rescue Bundler::BundlerError => e
|
|
7
7
|
$stderr.puts "Run `bundle install` to install missing gems"
|
8
8
|
exit e.status_code
|
9
9
|
end
|
10
|
-
require '
|
10
|
+
require 'minitest/autorun'
|
11
11
|
|
12
12
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
13
13
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
data/test/helpers/db_setup.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
ar_config = { adapter: 'sqlite3', database: ':memory:'}
|
2
|
+
|
1
3
|
case ENV['DB']
|
2
4
|
when /mysql/i
|
3
5
|
create_sql = 'CREATE DATABASE plugin_dev DEFAULT CHARACTER SET utf8;'
|
@@ -6,21 +8,20 @@ when /mysql/i
|
|
6
8
|
end
|
7
9
|
|
8
10
|
`mysql -u root -e "DROP DATABASE IF EXISTS plugin_dev; #{create_sql}"`
|
9
|
-
|
10
|
-
|
11
|
+
ar_config = { adapter: 'mysql2', database: 'plugin_dev',
|
12
|
+
username: 'root', password: '' }
|
11
13
|
when /pg/i
|
12
14
|
pg_user = ENV['DB_USER'] || ENV['USER']
|
13
15
|
`psql -U #{pg_user} -d postgres -c "DROP DATABASE IF EXISTS plugin_dev;"`
|
14
16
|
`psql -U #{pg_user} -d postgres -c "CREATE DATABASE plugin_dev;"`
|
15
|
-
|
16
|
-
|
17
|
-
else
|
18
|
-
ActiveRecord::Base.establish_connection adapter: 'sqlite3',
|
19
|
-
database: ':memory:'
|
17
|
+
ar_config = { adapter: 'postgresql', database: 'plugin_dev',
|
18
|
+
username: pg_user, password: '' }
|
20
19
|
end
|
21
20
|
|
21
|
+
ActiveRecord::Base.configurations = { 'test' => ar_config }
|
22
|
+
ActiveRecord::Base.establish_connection :test
|
23
|
+
|
22
24
|
class ActiveRecord::Base
|
23
|
-
self.configurations = true
|
24
25
|
if ActiveRecord::Base.respond_to? :mass_assignment_sanitizer=
|
25
26
|
self.mass_assignment_sanitizer = :strict
|
26
27
|
|
@@ -3,7 +3,7 @@ class CreateAttachments < ActiveRecord::Migration
|
|
3
3
|
create_table :attachments do |t|
|
4
4
|
t.string :name, length: 64, null: false
|
5
5
|
t.string :mime_type, length: 64, null: false
|
6
|
-
t.
|
6
|
+
t.integer :size, null: false
|
7
7
|
t.binary :data, null: false
|
8
8
|
end
|
9
9
|
end
|
@@ -24,7 +24,7 @@ class BinaryFixturesTest < ActiveSupport::TestCase
|
|
24
24
|
test 'invoice metadata was set up correctly' do
|
25
25
|
assert_equal 'invoice.pdf', @invoice.name
|
26
26
|
assert_equal 'application/pdf', @invoice.mime_type
|
27
|
-
assert_equal File.stat(@
|
27
|
+
assert_equal File.stat(@invoice_path).size, @invoice.size
|
28
28
|
end
|
29
29
|
|
30
30
|
test 'invoice binary data was set up correctly' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binary_fixtures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Costan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,98 +16,98 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.1.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: 4.
|
26
|
+
version: 4.1.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.6.2
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.6.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: jeweler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 2.0.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 2.0.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: mysql2
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.3.
|
61
|
+
version: 0.3.16
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 0.3.
|
68
|
+
version: 0.3.16
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: pg
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.17.
|
75
|
+
version: 0.17.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.17.
|
82
|
+
version: 0.17.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - '>='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 1.3.
|
89
|
+
version: 1.3.9
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - '>='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 1.3.
|
96
|
+
version: 1.3.9
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: yard
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.8.7.4
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.8.7.4
|
111
111
|
description: Convenience method for inlining binary data in Rails fixtures
|
112
112
|
email: victor@costan.us
|
113
113
|
executables: []
|
@@ -120,6 +120,8 @@ files:
|
|
120
120
|
- .travis.yml
|
121
121
|
- Gemfile
|
122
122
|
- Gemfile.lock
|
123
|
+
- Gemfile.rails40
|
124
|
+
- Gemfile.rails41
|
123
125
|
- LICENSE
|
124
126
|
- README.rdoc
|
125
127
|
- Rakefile
|
@@ -157,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
159
|
version: '0'
|
158
160
|
requirements: []
|
159
161
|
rubyforge_project:
|
160
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.0.14
|
161
163
|
signing_key:
|
162
164
|
specification_version: 4
|
163
165
|
summary: Use binary files in Rails fixtures
|